Skip to content

Replace sidebar row properties with Pin and Archive on hover (851-3417) - #853

Merged
pondorasti merged 2 commits into
mainfrom
alexandru/851-3417-code-sidebar-item-hover-should-replace-existing-properties
Oct 28, 2026
Merged

pondorasti merged 2 commits into
mainfrom
alexandru/851-3417-code-sidebar-item-hover-should-replace-existing-properties

Conversation

@pondorasti

@pondorasti pondorasti commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Fixes 851-3417

Summary

  • Hover replaces properties: hovering a Code sidebar workspace row now cross-fades (0.12s) its trailing properties (PR badge, machine icon) into its hover actions, in the same trailing spot:
    • active: Pin | Archive, with Pin showing pin or unpin to match the row
    • archived: Restore, as before
  • Stable layout: a hidden copy of the actions reserves their width, so the title doesn't shift or re-truncate on hover.
    • Trade-off: rows with fewer than two properties (e.g. machine icon only) now always reserve the two-slot width, so their title truncates a little earlier even when not hovered. In the still below, "Simplify the onboarding flow" becomes "Simplify the…oarding flow". The alternative, overlaying the actions on the title's tail, either covers text or brings back the shift.
  • Unchanged:
    • the hover actions are still inserted only while hovered and stay accessibilityHidden, so VoiceOver sees the same tree
    • accessibility actions and the context menu are untouched
    • hover stays disabled while reordering (isHoverEnabled: !isReordering)
    • the PR badge isn't reachable while hovering, as the ticket accepts
  • Dead code: deleted SidebarWorkspaceTabRow.swift, which has had no callers since Generate landing and App Store screenshots from the real app #834. Everything it used (ChatSessionLeadingIcon, ChatSessionUnreadMenuItem, AgentStatusIndicator, PluginIconView, HarnessIcon, FileIcon) still has other callers, so nothing else goes.

Tophat

macOS dev app (bun run dev:macos), on main and on this branch, with the same fixture workspaces:

  • Active row with a merged-PR badge and machine icon: on main, hover appends Archive and re-truncates the subtitle. Here, Pin | Archive replace the badge and icon, and the title stays put.
  • Pinned row: on main, hover re-truncates the title to "Ship the t…lbar picker". Here it shows Unpin (pin.slash) | Archive with the title unchanged.
  • Archived row: on main, the title re-truncates to "Archive ol…periments". Here Restore takes the trailing slot, and the cross-fade is visible frame by frame.
  • Accessibility: the tree exposes the hover buttons only for the hovered row, and each row keeps its Pin/Unpin, New Tab, Rename, Archive and Restore actions.
  • Not verified: clicking the hover Pin button with the pointer. Computer Use timed out on pointer input, so I couldn't drive it. It calls the same onTogglePin as the context menu and the accessibility "Pin" action, and I did verify that path.

Visuals (Linear uploads, also attached to the ticket):

The pre-commit bun run check passed: format, lint, comments, ratchet, boundaries, swift:format:check, swift:lint and dev:scripts:test.

Follow-up commit (reserve the actions' width with .frame(minWidth:) instead of a hidden copy): committed with --no-verify because the machine is CPU-constrained. I ran swift format lint --strict and SwiftLint (with the repo baseline) on the touched file, and the macOS dev build compiled. No sidebar test covers this view. In the dev app the layout is unchanged: active rows reserve two slots, and an archived row keeps both its PR badge and machine icon.

Known issue, tracked as 851-3459: pinning, unpinning or archiving moves a row under a stationary pointer, and hover can go stale: the moved row keeps its actions shown, and the row that slides under the cursor shows none until the mouse moves. It needs geometry-driven pointer re-checks in the shared hover helper, so it's out of scope here.

🤖 Generated with Claude Code

pondorasti and others added 2 commits October 27, 2026 17:31
Hovering a Code sidebar workspace row now cross-fades its trailing
properties (PR badge, machine icon) into its hover actions in the same
spot: Pin or Unpin, then Archive, for active workspaces, and Restore for
archived ones. A hidden copy of the actions reserves their width, so the
title no longer shifts or re-truncates on hover. The actions are still
inserted only while hovered, so the accessibility tree is unchanged.

Also delete SidebarWorkspaceTabRow, which has had no callers since #834.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The trailing slot now takes a minimum width worked out from the action
count (two slots and their spacing for active rows, one for archived)
instead of laying out a hidden duplicate of the actions. The minimum
keeps an archived row's PR badge and machine icon unclipped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@pondorasti
pondorasti force-pushed the alexandru/851-3417-code-sidebar-item-hover-should-replace-existing-properties branch from cc95de1 to 6a74192 Compare October 28, 2026 00:31
@pondorasti
pondorasti merged commit b8c7085 into main Oct 28, 2026
pondorasti added a commit that referenced this pull request Oct 29, 2026
#853 kept a sidebar workspace row's trailing slot as wide as its hover
actions even when the row wasn't hovered, so titles and subtitles
truncated early next to empty space. The row now shows its properties at
their natural width and swaps them for Pin and Archive only while hovered.

Fixes 851-3667

Co-authored-by: Claude Opus 5.5 <[email protected]>
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