Skip to content

fix(native): receding working rows no longer set hover twice - #85

Merged
rynfar merged 1 commit into
nativefrom
nw/83-row-hover
Nov 2, 2026
Merged

rynfar merged 1 commit into
nativefrom
nw/83-row-hover

Conversation

@rynfar

@rynfar rynfar commented Nov 2, 2026

Copy link
Copy Markdown
Owner

Problem

sidebar/row.rs set .hover() twice on a thread row that is neither active nor selected and is a receding working row: once for the row hover background, once for the receding row's opacity 0.7 -> 1. GPUI keeps one hover style per element. In debug builds its debug_assert! panics (hover style already set), so cargo run crashes whenever such a row is on screen. In release the second call replaces the first, so the row loses its hover background.

Fix

The row now sets one hover style. It has the background when the row is neither active nor selected, and full opacity when the row is a receding working row. That matches the web's SidebarThreadRow surface (hover:bg-sidebar-row-hover plus opacity-70 hover:opacity-100). The resting opacity(0.7) stays on the base style.

I also checked every .hover( in crates/app/src for a second call on the same element (same builder chain, .when closures, and helpers such as hover_action/media_button whose callers add another). The only other pair is media/viewer.rs media_button, and its two branches are filled / !filled, so they never both apply. No other fixes were needed.

Evidence

Debug offscreen renderer (--features snapshot) against the smoke server. A free Replay (dev) turn ran on a pinned scratch thread, so the receding working card sits at the top of the list. The Working shelf sits below the fold. Afterwards the thread was unpinned, and all scratch threads were archived.

  • Before (native at c0eca6c): the snapshot exits 101 when the working row renders.
    thread 'main' panicked at .../gpui/src/elements/div.rs:786:9:
    hover style already set
       2: <Stateful<Div> as InteractiveElement>::hover::<<SidebarPane>::row_surface::{closure#5}::{closure#0}>
       3: <SidebarPane>::row_surface::{closure#5}  at ./crates/app/src/sidebar/row.rs:138:60
       8: <SidebarPane>::render_card               at ./crates/app/src/sidebar/row.rs:330:22
    
    Full log: /private/tmp/claude-501/-Volumes-DevSSD-t3code-native/15deb025-b650-4cf9-a1aa-1cc16b006f6d/scratchpad/shots83/before.log
  • After, at rest (pointer elsewhere): the row is "Working 2s" at 0.7 opacity. /private/tmp/claude-501/-Volumes-DevSSD-t3code-native/15deb025-b650-4cf9-a1aa-1cc16b006f6d/scratchpad/shots83/after-rest.png
  • After, hovered (same timing, pointer on the row): it has the row hover background and full opacity, and the Settle action shows. /private/tmp/claude-501/-Volumes-DevSSD-t3code-native/15deb025-b650-4cf9-a1aa-1cc16b006f6d/scratchpad/shots83/after-hover.png

Gates: cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace, gen-theme --check, parity/sync.test.ts, and conformance/generate.ts --check all pass.

Closes #83

Opus 5.5, Claude Code

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.

1 participant