Repository navigation
Conversation
…tead of a second head
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 seconds. View limit details
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. Comment |
Owner
Author
|
Closing: the pinned-section design is being redone. |
devswha
added a commit
that referenced
this pull request
Oct 15, 2026
…desktop (#1137) ## Change Replaces #1126. Two commits, squash-merged as one: the first removes the desktop row `⋯` and marks pinned agents (with a hairline under them); the second turns that hairline into the card below and adds workspace pins. **No row `⋯` on a desktop; a quieter pinned-agents card** #1120 made pinning an agent row action. On a desktop the selected row always showed a `⋯` (kept, with a focus ring, after its menu closed), and a "Pinned" head stacked right under the "Agents" head while the pinned rows themselves carried no mark. - Workspace, worktree and agent rows draw no `⋯` where the pointer is fine and the window is wider than 768px (the tab strip's rule). A right-click or the context-menu key (Shift+F10) opens the same menu, at the pointer or at the row, and focus goes back where it was. Touch screens and narrow windows keep the `⋯`. - `onRowContextMenu` anchors the menu on the row when its `⋯` is not drawn. - Pinned agents: no second head. They stand in a card (hairline `--border` edge, `--radius-lg`, `--space-1` padding, no fill, so hover and selection read inside it as elsewhere; a filled tray read as a selection), each with an `--accent` pin after its title. The list keeps the name "Pinned" for screen readers. **Pin workspaces and worktrees** Researched against Paseo (pins workspaces/chats into a top Pinned section, server-stored `pinnedAt`), T3 Code (pins threads above active work) and Codex (pins projects and chats). herdr's usual flow is one worktree workspace per task, so the workspace row is the unit. - **Pin workspace / Unpin workspace** leads each workspace row's menu (right-click, Shift+F10, or the `⋯` on touch). - Pinned workspaces leave their place and stand first in their PC's list, in pin order, in the same card with the same pin. A pinned repository's workspace brings its worktrees; a pinned worktree leaves its repository's group, which stays (as Paseo keeps a project whose chats are pinned). - Pinned rows are not dragged (mouse or touch) and Alt+↑/↓ does not move them; the rest reorder among the neighbours the list shows (`moveIndex` / `dropIndex` work on the unpinned groups). - Storage: the existing shared pin list (`/api/preferences`), with a workspace keyed `machine:workspace:id`. No protocol change; other browsers see the pins. The Agents list's prune leaves workspace keys alone, and each PC's list prunes only its own gone workspaces, on a change of the user's. - The focus returns to the moved row after a pin or unpin from it. - New strings in ko/ja/zh; DESIGN.md, docs/development.md, `shared/preferences.ts`'s comment and `changelog.d` follow. ## Validation - `bun run typecheck`: pass. - `bun run test:unit`: 3719 pass, 0 fail (8 skip). New in `src/lib/sidebarPins.test.ts`: workspace keys, per-kind pruning, and the group split (a pinned repository with its worktrees, a pinned worktree alone, a missing id ignored). - `bun scripts/sidebar-activity-demo-regression.ts`: 7/7 pass. Adds: a workspace pins from its right-click menu into the card with its pin, the rest keep herdr's order, the pinned row is not draggable, the key is saved with the agents' pins, and unpinning restores the order. - `bun scripts/workspace-touch-reorder-demo-regression.ts`, `bun scripts/workspace-rows-regression.ts`: pass. - `bun scripts/ui-regression.ts`: pass, including a new check that a real linked worktree leaves its group for the card when pinned and returns when unpinned, plus the keyboard and right-click workspace menus and the close confirm's focus. One earlier run timed out in a `until` wait right after "a desktop's chat offers the mic", which this PR does not touch; the rerun passed whole. - Demo screenshots at 1440px (dark and light: workspace and agent cards, the pinned workspace's menu, keyboard pin with focus kept on the moved row) and on a 390px phone (`⋯` on every row, the card in the drawer). The demo has no linked worktree, so worktree pinning was checked through ui-regression only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
#1120 made pinning a row action, and on a desktop it reads badly: the selected Agents row always shows a
⋯(and keeps it, with a focus ring, after its menu closes), and a "Pinned" head stacks right under the "Agents" head while the pinned rows themselves carry no mark. Workspace and worktree rows show the same⋯on selection.⋯on a desktop. Workspace, worktree and agent rows draw no⋯where the pointer is fine and the window is wider than 768px, the tab strip's rule. A right-click or the context-menu key (Shift+F10) opens the same menu, at the pointer or at the row, and dismissal hands the focus back where it was. Touch screens and narrow windows keep the⋯as before.onRowContextMenuanchors the menu on the row when its⋯is not drawn, so the keyboard's menu opens at the row instead of the screen's corner.--space-3pin in--text-dimafter its title, and a--hairline--borderrule with--space-2on each side parts the pinned rows from the rest. The pinned list keeps the name "Pinned" for screen readers (aria-label).changelog.dfragment follow. The Playwright scripts that clicked a desktop⋯now use a right-click or Shift+F10.Validation
bun run typecheck: pass.bun run test:unit: 3716 pass, 0 fail (8 skip).bun scripts/sidebar-activity-demo-regression.ts: 7/7 pass. No visible⋯on a desktop; the context-menu key and a right-click give identical workspace menus; pin and unpin by right-click and Shift+F10; a pinned row carries its pin and the list is named Pinned; a phone still pins from the⋯sheet.bun scripts/workspace-rows-regression.ts: pass (keyboard and right-click workspace menus identical).bun scripts/ui-regression.ts: pass, including the repository and worktree menus and the workspace close confirm (focus returns to the row after Escape and after a cancelled confirm). A first run failed earlier, in the command palette's resting-pointer scroll check (option count 18 → 21 mid-test), code this PR does not touch; the second run passed whole.⋯on every row, pins marked).