fix(desktop): ports chip no longer moves when a sidebar row is hovered

Merged
SA
1mo ago
+81-101

Summary

  • The workspace row's ports chip jumped ~20 px left on every row hover, because the delete × to its right was display:none until hover. The × now reserves its width (invisible, not hidden), and the ⌘N hint and diff stats sit left of the chip, where they can't move it. This is #8549's layout, applied to DashboardSidebarLegacyExpandedWorkspaceRow — the row that's shown while the new-sidebar experiment is off. The experiment's redesigned row from #8528 is untouched.
  • useDashboardSidebarChipHoverSuppression drops the pointer-enter hold and the suppressWorkspaceCardOn option. The hold now starts when the chip's card opens and ends when it closes, for both the ports and agents chips. So brushing across a chip doesn't dismiss the row's workspace hover card.

Supersedes #8549 (conflicting with main).

Testing

  • Dev app over CDP, five rows seeded with real python3 -m http.server listeners (1, 2, 3, 5 and 12 ports):
    • Chip x: before, 244 idle → 224 on hover. After, 224 both idle and hovered on a ⌘3 row and on the 9+ row.
    • Ran 25 pointer journeys across chip, card and rows: brush, dwell, click toggle, into the card and out, far jumps, stopping in the safe-triangle cone, oscillation, drag-off, and scrolling under the pointer. Each one ended with the row hover card's suppression released. No console.error.
  • bun test in the DashboardSidebar folder: 208 pass. Biome is clean on the changed files.

Summary by cubic

Fixes the sidebar ports chip jumping ~20 px left whenever a row is hovered, because the delete button next to it was hidden until hover.

  • The delete button now reserves its width with invisible instead of display:none, and row content is reordered so the shortcut hint and diff stats sit left of the chip where they can't shift it.
  • The chip hover-suppression hook now holds the workspace hover card only while the chip's card is open, instead of from pointer-enter. Brushing across a chip no longer dismisses the row's workspace hover card, and a chip unmounting mid-hover still releases the hold.

Summary by CodeRabbit

  • Bug Fixes
    • Workspace hover cards now remain suppressed only while a sidebar chip’s card is open, and are restored when it closes or is unmounted.
  • Style
    • Workspace status details now appear together in a single row.
    • The close button is hidden by default on unselected workspace rows and appears when you hover over or focus a row.