Skip to content

Expose window processors to C# scripts#1155

Merged
dalyIsaac merged 3 commits intomainfrom
1153-a-way-to-disable-teamswindowprocessor-and-other-window-processors
Jul 19, 2025
Merged

Expose window processors to C# scripts#1155
dalyIsaac merged 3 commits intomainfrom
1153-a-way-to-disable-teamswindowprocessor-and-other-window-processors

Conversation

@dalyIsaac
Copy link
Copy Markdown
Owner

Expose the IWindowProcessorManager through the IContext, to allow customization through scripting.

IWindowProcessors have a static Id string field which is used to identify them. This can be used to add or remove them from the IWindowProcessorManager.ProcessorCreators dictionary.

@dalyIsaac dalyIsaac requested a review from Copilot July 19, 2025 07:26
@dalyIsaac dalyIsaac added enhancement New feature or request core Whim labels Jul 19, 2025
@dalyIsaac dalyIsaac linked an issue Jul 19, 2025 that may be closed by this pull request
1 task
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR exposes the window processor management system to C# scripts by making IWindowProcessorManager available through the IContext. This enables custom scripting to add or remove window processors at runtime.

  • Refactored WindowProcessorManager to implement a public interface with a keyed dictionary for processor management
  • Added unique string identifiers to existing window processors for dictionary-based lookup
  • Exposed IWindowProcessorManager through the IContext interface for scripting access

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
WindowEventListener.cs Removed local processor manager in favor of context-provided instance
WindowProcessorManager.cs Converted to implement public interface with keyed processor dictionary
TeamsWindowProcessor.cs Added static Id property for processor identification
IWindowProcessorManager.cs New public interface defining processor management contract
IWindowProcessor.cs Updated documentation and removed redundant public modifiers
FirefoxWindowProcessor.cs Added static Id property for processor identification
IContext.cs Added WindowProcessorManager property to expose processor management
Context.cs Initialized WindowProcessorManager instance in constructor
troubleshooting.md Added documentation about scripting access to processor management

@dalyIsaac dalyIsaac marked this pull request as ready for review July 19, 2025 07:46
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 19, 2025

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 80.17%. Comparing base (caa9d13) to head (09cce27).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/Whim/Context/Context.cs 0.00% 2 Missing ⚠️
.../WindowSector/Processors/WindowProcessorManager.cs 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1155      +/-   ##
==========================================
- Coverage   80.22%   80.17%   -0.06%     
==========================================
  Files         279      279              
  Lines       12730    12733       +3     
  Branches     1470     1470              
==========================================
- Hits        10213    10209       -4     
- Misses       2348     2354       +6     
- Partials      169      170       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dalyIsaac dalyIsaac merged commit f22f65e into main Jul 19, 2025
6 of 9 checks passed
@dalyIsaac dalyIsaac deleted the 1153-a-way-to-disable-teamswindowprocessor-and-other-window-processors branch July 19, 2025 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Whim enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A way to disable TeamsWindowProcessor (and other Window Processors)

2 participants