Skip to content

fix: highlight the palette row under the pointer - #414

Merged
umputun merged 1 commit into
masterfrom
fix/palette-row-hover
Aug 9, 2026
Merged

fix: highlight the palette row under the pointer#414
umputun merged 1 commit into
masterfrom
fix/palette-row-hover

Conversation

@umputun

@umputun umputun commented Aug 9, 2026

Copy link
Copy Markdown
Owner

palette rows have been full-width click targets since they were built, but nothing painted under the pointer. Only the keyboard-selected row was tinted, so there was no way to tell what a click would run until you clicked it.

the title-bar popover rows already highlight on hover through SessionPopoverRow, and README documents that behavior, so the palette was the one clickable list in the app with no pointer feedback. The Ctrl-Tab switcher is the opposite case and stays as it is: same accent selection, no hover, and its rows are not clickable.

what changed

  • PaletteRow gets its own @State hovering and .onHover, so the diffing boundary the struct exists for is unchanged.
  • hover paints a neutral wash, Color.primary.opacity(0.04), not a weaker accent. Hover and the accent-tinted selection can sit on different rows at once, so the same hue at two strengths would read as a second selection. It also has to hold up over both panel backings, .regularMaterial and the opaque Reduce Transparency one.
  • selection wins on the row that has it, so the two never stack.
  • hover is visual only. It does not move the keyboard cursor, which would fire onSelect and thrash the theme palette's live preview on every mouse move across the list.

covers the action, session, theme, attention and control-API pick palettes, since they all render through PaletteRow.

not included

the issue also lists sidebar row tinting and the eight .plain/.borderless buttons. Left alone here, per the reporter's own offer to split them.

testing

no automated test. Hover is private view state painting a background color, so there is no host-free surface and XCUITest cannot assert it. Same as SessionPopoverRow, which has no hover test either. Verified by running it, plus ControlPickUITests row click and PaletteUITests arrow navigation to confirm the hit target and AX tree are unchanged.

Fix #408

Palette rows have been full-width click targets since they were built, but nothing
painted under the pointer — only the keyboard-selected row was tinted, so there was
no way to tell what a click would run. The title-bar popover rows already highlight
on hover via SessionPopoverRow, and README documents that behavior, so the palette
was the one clickable list in the app with no pointer feedback.

PaletteRow now carries its own hover state, keeping the diffing boundary the struct
exists for. Hover paints a neutral wash instead of a weaker accent so it cannot be
mistaken for a second selection when both are on screen; selection still wins on the
row that has it, and hover stays purely visual — it does not move the keyboard
cursor, which would thrash the theme palette's live preview.

Fix #408
Copilot AI lite review requested due to automatic review settings August 9, 2026 18:29
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying agterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4c24be2
Status: ✅  Deploy successful!
Preview URL: https://2d84ad02.agterm.pages.dev
Branch Preview URL: https://fix-palette-row-hover.agterm.pages.dev

View logs

Copilot AI left a comment

Copy link
Copy Markdown

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 adds pointer-hover feedback to command palette rows so users can see which full-width row will be activated before clicking, bringing the palette in line with existing hover behavior in SessionPopoverRow and addressing Issue #408.

Changes:

  • Add per-row hover tracking (@State hovering + .onHover) to PaletteRow.
  • Introduce a neutral hover tint (Color.primary.opacity(0.04)) and a rowTint resolver so keyboard selection and pointer hover can coexist without stacking.
  • Replace the previous selection-only background with the unified rowTint background.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@umputun
umputun merged commit ab7b6a3 into master Aug 9, 2026
9 checks passed
@umputun
umputun deleted the fix/palette-row-hover branch August 9, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Command palette rows have no hover state, unlike the title-bar popover rows

2 participants