Skip to content

fix(desktop): sidebar ports chip sits left of ×, hover card survives a brush across chips - #8549

Closed
saddlepaddle wants to merge 2 commits into
mainfrom
saddlepaddle/fix-port-hover-layout-f6521cc2
Closed

saddlepaddle wants to merge 2 commits into
mainfrom
saddlepaddle/fix-port-hover-layout-f6521cc2

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

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) → ⌘N hint (hover) → ports chip → ×. Only × reserves its width (invisible rather than hidden), 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.
  • useDashboardSidebarChipHoverSuppression begins the hold in onOpenChange(true) and ends it on close; the pointerenter hold 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 ⌘2 row, 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.error during 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 — clean
  • bun run check:i18n — no catalog changes
  • bun 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 base e6cfbc8f74
  • bun test apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar — 189/189
  • bun 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 and git-task-handlers.test.ts passes 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 invisible instead of display:none, so the chip no longer jumps when hover hints appear.
  • Drops the chip's pointerenter hold on the workspace hover card; the hold starts only when the chip's own card opens and ends when it closes.

Changes:

  • Reworks DashboardSidebarExpandedWorkspaceRow so the row edge, queued badge, diff stats, shortcut hint, ports chip, and delete × live in a single flex container.
  • Simplifies useDashboardSidebarChipHoverSuppression to track an open flag instead of ref-counted holds.
  • Removes onPointerEnter from the ports and agents chip triggers.

Written for commit b5a6d41. Summary will update on new commits.

View guided diff Turn on auto-fix

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.

…utton

The workspace row's right cluster is now one flex row: queued badge and
diff stats, then the ⌘N hint, then the ports chip, then ×. Only the ×
reserves its width (visibility hidden rather than display none), so the
chip never moves when the hover controls appear; the dynamic hints sit
to its left where their swaps cannot shift it. The stacked grid cell
from #8524, which put the chip right of × so it would not hop, is gone.

Measured over CDP: chip x identical idle vs hover on the active row with
diff stats, a row with a ⌘N hint, and a row past 9 with no hint.
A chip took a hold on the row's workspace hover card on pointerenter, so
touching the ports or agents chip closed the card before the chip's own
card had opened, and the row's mouseenter never fires again to bring it
back. The hold now begins when the chip's card opens and ends when it
closes; brushing across a chip leaves the workspace card alone, and the
ref-counted holds collapse to the open flag the hook already tracked.
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b97f4c87-fb5f-47c9-9cf9-bffcde60fd22
📥 Commits

Reviewing files that changed from the base of the PR and between e6cfbc8 and b5a6d41.

📒 Files selected for processing: 5
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarExpandedWorkspaceRow/DashboardSidebarExpandedWorkspaceRow.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarExpandedWorkspaceRow/components/DashboardSidebarPortsChip/DashboardSidebarPortsChip.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarExpandedWorkspaceRow/components/DashboardSidebarWorkspaceChips/components/DashboardSidebarAgentsChip/DashboardSidebarAgentsChip.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarExpandedWorkspaceRow/hooks/useDashboardSidebarChipHoverSuppression/useDashboardSidebarChipHoverSuppression.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarWorkspaceDiffStats/DashboardSidebarWorkspaceDiffStats.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

📝 Walkthrough

The workspace sidebar row’s right-side layout changed. Chip hover suppression now starts and ends with the card’s open state, and the chip components no longer attach pointer-enter handlers.

Changes: Workspace sidebar

Layer / File(s) Summary
Chip hover suppression
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarExpandedWorkspaceRow/hooks/useDashboardSidebarChipHoverSuppression/useDashboardSidebarChipHoverSuppression.ts, apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarExpandedWorkspaceRow/components/DashboardSidebarPortsChip/DashboardSidebarPortsChip.tsx, apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarExpandedWorkspaceRow/components/DashboardSidebarWorkspaceChips/components/DashboardSidebarAgentsChip/DashboardSidebarAgentsChip.tsx
The hook now starts and ends suppression when the chip card opens and closes. Pointer leave still clears click dismissal. The agents and ports chips no longer attach pointer-enter handlers.
Workspace row right-side layout
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarExpandedWorkspaceRow/DashboardSidebarExpandedWorkspaceRow.tsx, apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspaceItem/components/DashboardSidebarWorkspaceDiffStats/DashboardSidebarWorkspaceDiffStats.tsx
The row no longer uses a stacked grid and shared hover-revealed actions container. The shortcut, delete control, queued badge, diff stats, and ports chip follow updated placement and visibility conditions. The diff stats container no longer applies justify-self-end.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: avipeltz

Merge Risk: ⚪ Minimal · up to b5a6d

The sidebar changes appear mergeable after normal checks; no actionable risk was established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title uses conventional commit format and clearly describes both primary fixes: stable ports-chip placement and workspace hover-card behavior.
Description check Passed The description clearly explains the changes, motivation, implementation, manual QA, automated testing, known limitations, and unrelated test failures. It does not reproduce the template's separate Ch…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

🔗 Preview Links

Service Status Link
Neon Database (Neon) ✅ View Branch
Vercel API (Vercel) ✅ Open Preview
Vercel Web (Vercel) ✅ Open Preview
Vercel Marketing (Vercel) ✅ Open Preview
Vercel Docs (Vercel) ✅ Open Preview

Preview updates automatically with new commits

@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Moves the ports chip directly left of the delete button and keeps the button’s width reserved.

  • Workspace rows keep the ports chip fixed beside the delete button.
  • Ports and agents chips hold the workspace card only while their own card is open.

Known limitation: saddlepaddle explicitly deferred reopening the workspace card while the pointer remains over an open ports chip. The stated structural fix is one card per row.

Reviews (1) · Last reviewed commit: "fix(desktop): let the workspace hover ca..." · Reviewed by Greptile

Copy link
Copy Markdown
Contributor

Review verdict: minor issues. The approach is sound, it is smaller than the code it replaces, and CI is green at b5a6d419.

  • Layout trade-off. DashboardSidebarExpandedWorkspaceRow.tsx:422-444 keeps the invisible × in the layout on every idle row, including rows with no ports chip. In the live sidebar the name column measures 186 px with × reserved and 206 px without it, so names truncate about 20 px earlier. If that isn't intended, reserve the width only when ports.length > 0.
  • Nit: the comment at DashboardSidebarHoverProvider.tsx:117 still gives "chip trigger hovered while its hover card is open" as the reason for the count. That double hold is the one this PR removes.
  • Nit: useDashboardSidebarChipHoverSuppression.ts has no test. Two would cover the change: no hold before onOpenChange(true), and unmounting while open releases exactly one hold.

I checked the layout with the PR's markup and the app's real CSS in the live sidebar: the chip x stays at 232 px idle and hovered. I could not check the brush-across-chip hover card end to end, because this sandbox has no local workspace rows. Details, screenshots and measurements: https://app.superset.sh/page/pr-8549-review-sidebar-ports-chip-hover-card-ekgfbj

saddlepaddle added a commit that referenced this pull request Oct 17, 2026
…er moves on row hover (#8592)

idle, so the chip still jumped 20 px toward the row edge on every hover.
Take #8549's shape instead: one flex row of queued badge + diff stats →
⌘N hint → ports chip → ×, where only the × reserves its width (invisible,
not hidden); the hint and diff stats swap to the chip's left where they
cannot move it. On a bulk-selected row the × stays rendered-but-invisible
for the same reason.

The chip hover-suppression hook loses the pointer-enter hold and the
`suppressWorkspaceCardOn` option: the hold begins in onOpenChange(true) and
ends on close for both the ports and agents chips, so brushing across a
chip no longer dismisses the row's workspace hover card.

Measured over CDP on five seeded rows (1, 2, 3, 5 and 12 ports): chip x is
224 idle and hovered on a ⌘3 row and on the 9+ row; before the swap it was
244 → 224.
@saddlepaddle

Copy link
Copy Markdown
Member Author

Superseded by #8592, which carries this layout onto the legacy row after #8528 split the row.

This branch was previously deployed

1 inactive deployment
preview — b5a6d419 Deployed Oct 15, 2026 by saddlepaddle via Deploy Docs #12033
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.

2 participants