Repository navigation
Description
Problem
The Filter by … toggle buttons on the Logging, History, and Network screens give no visual feedback when you toggle one off, because their hover background and their active (toggled-on) background are the same color token.
Each toggle is an UnstyledButton variant=\"listItem\" whose active background is set inline:
bg={active ? \"var(--mantine-primary-color-light)\" : undefined}clients/web/src/components/groups/LogControls/LogControls.tsx:113-117(log levels)clients/web/src/components/groups/NetworkControls/NetworkControls.tsx:74-75(categories)clients/web/src/components/groups/MessageDirectionFilter/MessageDirectionFilter.tsx:63-64(message directions, used byHistoryControls)
The shared hover comes from the .list-item class (assigned by the listItem variant in clients/web/src/theme/UnstyledButton.ts) in clients/web/src/App.css:187-193:
.list-item:hover {
background-color: var(--mantine-primary-color-light);
}
[data-mantine-color-scheme=\"dark\"] .list-item:hover {
background-color: var(--mantine-primary-color-light);
}Since hover bg == active bg == --mantine-primary-color-light, clicking a toggled-on button to turn it off removes the active background, but the cursor is still over the button so the identical hover background immediately takes its place — it looks like nothing happened. You only see the change after moving the mouse away.
Proposed change
Hover should render as a thin border around the button, not a background. That keeps hover visually distinct from the active (filled-background) state, so toggling off is immediately obvious even while the cursor is over the button.
Important scoping note
The .list-item class / listItem variant is not exclusive to these filter toggles — it's also used by the selectable list rows (PromptListItem, AppListItem, ToolListItem, ResourceListItem) and by sectionHeader Groups (clients/web/src/theme/Group.ts). Those are single-select / navigation rows, not toggles, so they don't have this off-feedback problem and shouldn't necessarily lose their hover-fill.
So don't just flip the global .list-item:hover rule. Instead, give the filter toggles their own shared style.
Share one style across all three filter button groups
Right now the three filter sections each repeat the same UnstyledButton JSX + inline bg={active ? … : undefined}. As part of this fix, the toggle styling should be defined once and shared by all three (Logging / History / Network) — e.g. a dedicated filterToggle variant in theme/UnstyledButton.ts (hover = thin border, plus an active/aria-pressed filled-background rule) and/or a small shared FilterToggleButton element component that each controls panel renders. The goal: hover-as-border and active-as-fill live in one place, not copy-pasted three times.
Acceptance criteria
- Hovering a filter toggle (Logging levels, History message directions, Network categories) shows a thin border, not a background fill.
- The active/toggled-on state remains a filled background, visually distinct from hover.
- Toggling a button off while the cursor is still over it visibly changes its appearance immediately (no "nothing happened" illusion).
- The toggle styling (hover-border + active-fill) is shared by all three filter button groups via a single source (theme variant and/or shared element component), not duplicated inline in each controls file.
- Selectable list rows (
PromptListItem,AppListItem,ToolListItem,ResourceListItem) andsectionHeaderGroups are unaffected (or intentionally updated, if decided) — this change is scoped to the filter toggles. - Works in both light and dark color schemes.
- Tests/stories for
LogControls,NetworkControls, andMessageDirectionFilterupdated to assert the active vs. hover distinction (e.g.aria-pressedstate) and the shared styling. -
npm run validate+npm run test:storybookpass.
Notes
aria-pressed={active}is already set on the Network and Direction toggles (NetworkControls.tsx:75,MessageDirectionFilter.tsx:64) but missing on the Logging level toggles (LogControls.tsx) — worth adding for consistency and to give the active-state styling a clean selector to hang off of.- Per project conventions, prefer a Mantine theme variant /
withPropssubcomponent over CSS classes; only pseudo-selectors like:hoverbelong inApp.css.
Activity
fix(web): move filter-toggle border to CSS so :hover actually shows (#…
fix(web): filter toggle hover as border, not background (#1460) (#1461)