fix(desktop): sidebar ports chip sits left of ×, hover card survives a brush across chips
Closed
SA
1mo ago+76+76+01234567890123456789-105-105-012345678901234567890123456789
Summary
- Local workspace rows put the ports chip directly left of the delete
×instead of right of it; the stacked grid cell #8524 added to stop the chip hopping is gone. - Hovering a ports/agents chip no longer closes the row's workspace hover card. The chip holds the card only while its own card is open.
Why / Context
#8524 parked the chip right of × because the hover-only ⌘N × cluster was display:none when idle, so anything left of it jumped as the row was hovered. It also had the chip close the workspace hover card on pointerenter, which meant brushing across the chip killed the card before the ports card had opened, and the row's mouseenter never fires again to bring it back.
How It Works
- Right cluster is one flex row: queued badge + diff stats (idle) →
⌘Nhint (hover) → ports chip →×. Only×reserves its width (invisiblerather thanhidden), so the chip's offset from the row edge is constant; the dynamic hints live to its left where their swaps cannot move it. On a bulk-selected row the×stays rendered-but-invisible for the same reason. useDashboardSidebarChipHoverSuppressionbegins the hold inonOpenChange(true)and ends it on close; thepointerenterhold and the ref-count are gone. Ports and agents chips both use it.
Manual QA Checklist
Driven over CDP with real pointer input in the dev app, five rows seeded with live python3 -m http.server listeners from their own terminals:
- Chip x identical idle vs hover on the active row with
+126979 −5826, a⌘2row, and a row past 9 with no hint;×directly right of the chip in all three -
9+badge on a 12-port row; hover card lists ports and close-all works - Row card open → 60 ms brush across the chip → row card still open
- Dwell on chip → ports card opens, row card closes; back to row text → row card reopens
- No
console.errorduring any run - Not covered: queued-message badge and a creating-workspace row (need real agent sessions); bulk-select state (⌘-click did not engage over CDP, width is reserved by construction)
Testing
bun run lint:fix,bunx sherif— cleanbun run check:i18n— no catalog changesbun run typecheck— the only failure is@superset/auth(better-auth session types) in files this PR does not touch; main's CI typecheck is green at the same basee6cfbc8f74bun test apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar— 189/189bun run test --filter=@superset/desktop— 8266 pass, 37 fail in main-process git/worktree/shell-env suites (spawn EBADF,git update-ref); none import the changed modules andgit-task-handlers.test.tspasses 12/12 alone
Known Limitations
- Once the ports card is open the workspace card stays closed until the pointer leaves the chip. The structural fix is one card per row (ports as a section of the workspace card); deliberately not in this PR.
Summary by cubic
Fixes the workspace row's right-cluster layout and hover behavior so the ports chip sits directly left of the delete × and the row's hover card survives brushing across a chip.
- Moves the ports chip into one flex row with the delete ×, which now reserves its width via
invisibleinstead ofdisplay:none, so the chip no longer jumps when hover hints appear. - Drops the chip's
pointerenterhold on the workspace hover card; the hold starts only when the chip's own card opens and ends when it closes.
Changes:
- Reworks
DashboardSidebarExpandedWorkspaceRowso the row edge, queued badge, diff stats, shortcut hint, ports chip, and delete × live in a single flex container. - Simplifies
useDashboardSidebarChipHoverSuppressionto track an open flag instead of ref-counted holds. - Removes
onPointerEnterfrom the ports and agents chip triggers.
Summary by CodeRabbit
- Interface Updates
- Workspace rows now display queued status and change statistics in a more compact right-side layout.
- Port and agent chips remain available when applicable, with updated hover behavior.
- Shortcut labels appear on hover or focus for non-pending, unselected rows.
- Delete controls are available for all non-pending rows and appear on hover or focus when the row is not selected.