LayerFilter plugin — configurable two-step layer filter#164
Open
BhattaraiSijan wants to merge 6 commits into
Open
LayerFilter plugin — configurable two-step layer filter#164BhattaraiSijan wants to merge 6 commits into
BhattaraiSijan wants to merge 6 commits into
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🤖 Version Auto-BumpedThe version has been automatically incremented to This commit was added to your PR branch. When you merge this PR, the new version will be included. If you want a different version, update |
4 tasks
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 LayerFilter, a generic, configuration-driven two-step layer filter, built as two cooperating plugins:
Both are decoupled — they talk only through the app's event bus, with nothing hardcoded into the core.
What's included
Two-step filtering. A far-left rail lists a few high-level themes; selecting one reveals just that theme's filters in the panel beside it. Choosing filters narrows the set of relevant layers, so a mission with dozens of layers collapses to the handful that matter for the task at hand.
Configurable per mission, no code. The themes, each theme's filters, and which layer attribute a filter narrows on are all defined in the mission's configuration and editable in the admin UI — a non-coder can add a theme or filter, and tag layers, without touching code.
Decoupled by design. It's two cooperating plugins that communicate only through the app's event bus — they don't reach into the core or each other. The filter doesn't change layers itself; it announces the matched set so the layer list and other tools can react. The rail's top button signals collapsing the panel the same way.
Matches the design. The rail and panel follow the Figma (theme tokens), with the left panels sitting edge-to-edge.
Scope
Emit-only — it announces the matched layer set on the bus; it does not change layers yet (wiring the layer list to consume that is a follow-up).
Testing
Unit-tested matching and option-derivation (
npm run test:unit, Node 20);tscclean.Follow-ups
Closes: Issue #163