Forward workspace filter to external plugins and fix search scheduling#290
Open
erik-balfe wants to merge 3 commits into
Open
Forward workspace filter to external plugins and fix search scheduling#290erik-balfe wants to merge 3 commits into
erik-balfe wants to merge 3 commits into
Conversation
ExternalPlugin::search() always sent plain Request::Search, so cosmic_toplevel never received SearchFiltered(Current). Pass WorkspaceFilter through the service Plugin trait and forward SearchFiltered to external plugin processes. pop_shell ignored SearchFiltered and never finished on COSMIC, which blocked subsequent window-switcher queries; handle SearchFiltered like Search, return false from reload on D-Bus or deserialization errors, and deactivate when PopShell is unavailable. Teach cosmic_toplevel to match windows by workspace coordinates, defer Current searches until active workspace metadata is known, and add unit tests for the filter. Only emit SearchFiltered to plugins when the filter is Current; keep plain Search for WorkspaceFilter::All so non-window plugins still finish normal launcher queries. Assisted by an AI coding agent; changes were reviewed, tested on COSMIC with multiple workspaces, and validated with CodeRabbit CLI review.
1 task
ExternalPlugin always forwarded SearchFiltered to subprocess plugins, but legacy plugins such as desktop_entries only handled Search. That left Super launcher typing with a frozen list while cosmic_toplevel window search still worked. Send Request::Search when the filter is All to match the service's plugin_request logic, and teach desktop_entries to accept SearchFiltered as a belt-and-suspenders fallback.
9193a30 to
caf234b
Compare
Gate plugin Append/Finished responses so only active searches or an explicit Clear refresh can populate results. Deduplicate windows in the service sort path. cosmic_toplevel now refreshes Current-filtered lists when workspace coordinates change (user switched workspace with switcher open), sends Clear before refresh appends, and handles Interrupt. Assisted by an AI coding agent; changes were reviewed and tested.
caf234b to
53e03ad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds workspace-scoped window filtering for the COSMIC window switcher via
WorkspaceFilter/Request::SearchFiltered.Key fixes (tested locally on COSMIC)
ExternalPluginmapsWorkspaceFilter::All→Request::Search)SearchFilteredcosmic_toplevelrefreshes on workspace change and defers search until metadata is readyStacked PR: pop-os/cosmic-launcher#432
Testing
Search("fire")returns filtered appsalt-tab-workspace/alt-tab-allwork as expectedChecklist