fix(fleet): show default Running filter as selected on matrix toolbar#196
Merged
TerrifiedBug merged 1 commit intomainfrom Apr 28, 2026
Merged
fix(fleet): show default Running filter as selected on matrix toolbar#196TerrifiedBug merged 1 commit intomainfrom
TerrifiedBug merged 1 commit intomainfrom
Conversation
The matrix default status filter was "running" (lowercase) while the toolbar status chips use ids "Running"/"Stopped"/"Crashed" (capitalized). The page-level filter logic uppercases both sides before comparing, so matrix rows were correctly filtered, but the "Running" chip rendered as unselected because statusFilter.includes(opt.id) is case-sensitive. User saw an unhighlighted toolbar and concluded the default wasn't being applied even though the matrix was filtered. - DEFAULT_STATUS_FILTER: ["running"] -> ["Running"] - Update test expectation to match
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
Fixes Notion bug: "Add default running filter for deployment matrix on fleet/overview page (still not working)".
The default filter **was** being applied (matrix rows were filtered correctly), but the toolbar chip rendered unselected, so the user perceived no filter at all.
Root cause
`useMatrixFilters` returns the default status as `["running"]` (lowercase). `DeploymentMatrixToolbar` defines its chip ids as `["Running", "Stopped", "Crashed"]` (capitalized). The chip selection check is `statusFilter.includes(opt.id)`, which is case-sensitive — `"Running"` !== `"running"` so the chip stayed unhighlighted.
The page-level filter logic uppercases both sides (`s.toUpperCase()`) before comparing against `aggregateProcessStatus` output, so the actual filtering worked. Just the visual feedback was broken.
Fix
Align casing: `DEFAULT_STATUS_FILTER: ["Running"]`.
Test plan
Greptile Summary
This PR fixes a UI mismatch where the default
"Running"status filter chip appeared unselected on initial page load. The root cause was a casing discrepancy:DEFAULT_STATUS_FILTERused"running"(lowercase) whileMATRIX_STATUS_OPTIONSchip IDs are"Running"(capitalized), causing the case-sensitivestatusFilter.includes(opt.id)check to fail. The fix aligns the default casing with the chip IDs; filtering logic on the page continues to work correctly because it already normalises both sides with.toUpperCase()before comparing againstaggregateProcessStatusoutput.Confidence Score: 5/5
Safe to merge — minimal one-line fix with no risk of regression.
Single constant value change that aligns casing between the hook default and the toolbar chip IDs. Filtering logic is unaffected because the page already normalises with
.toUpperCase(). Test is correctly updated. No security, data, or logic concerns.No files require special attention.
Important Files Changed
DEFAULT_STATUS_FILTERvalue from"running"to"Running"to match the capitalized chip IDs inDeploymentMatrixToolbar; no other logic changed."running"to"Running"to match the new default; correctly reflects the changed behaviour.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["useMatrixFilters\nstatusParam === null"] -->|"DEFAULT_STATUS_FILTER"| B["statusFilter = ['Running']"] B --> C["DeploymentMatrixToolbar\nstatusFilter.includes(opt.id)"] C -->|"'Running' === 'Running' ✅"| D["Chip renders SELECTED\n(bg-accent)"] B --> E["fleet/overview page\nmatrixStatusFilter.map(s => s.toUpperCase())"] E -->|"'RUNNING'.includes(agg) ✅"| F["Matrix rows filtered correctly"]Reviews (1): Last reviewed commit: "fix(fleet): align deployment-matrix defa..." | Re-trigger Greptile