fix(desktop): ports chip no longer moves when a sidebar row is hovered
Merged
SA
1mo ago+81+81+01234567890123456789-101-101-012345678901234567890123456789
Summary
- The workspace row's ports chip jumped ~20 px left on every row hover, because the delete
×to its right wasdisplay:noneuntil hover. The×now reserves its width (invisible, nothidden), and the⌘Nhint and diff stats sit left of the chip, where they can't move it. This is #8549's layout, applied toDashboardSidebarLegacyExpandedWorkspaceRow— the row that's shown while the new-sidebar experiment is off. The experiment's redesigned row from #8528 is untouched. useDashboardSidebarChipHoverSuppressiondrops the pointer-enter hold and thesuppressWorkspaceCardOnoption. 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.serverlisteners (1, 2, 3, 5 and 12 ports):- Chip x: before, 244 idle → 224 on hover. After, 224 both idle and hovered on a
⌘3row and on the9+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.
- Chip x: before, 244 idle → 224 on hover. After, 224 both idle and hovered on a
bun testin 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
invisibleinstead ofdisplay: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.