Skip to content

fix(sidebar): no row menu button on a desktop; mark pinned agents instead of a second head - #1126

Closed
devswha wants to merge 1 commit into
mainfrom
fix/sidebar-desktop-row-menus
Closed

devswha wants to merge 1 commit into
mainfrom
fix/sidebar-desktop-row-menus

Conversation

@devswha

@devswha devswha commented Oct 14, 2026

Copy link
Copy Markdown
Owner

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.

  • No row ⋯ 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.
  • onRowContextMenu anchors 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.
  • Pinned agents: no second head. Each pinned row has a --space-3 pin in --text-dim after its title, and a --hairline --border rule with --space-2 on each side parts the pinned rows from the rest. The pinned list keeps the name "Pinned" for screen readers (aria-label).
  • DESIGN.md, docs/development.md, feat(sidebar): pin agents from a row menu; drop Workspace cards and Quiet opened finishes #1120's changelog fragment and a new changelog.d fragment 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.
  • Demo screenshots checked at 1440px (rows at rest and hovered, an agent's and a workspace's right-click menu) and on a 390px phone (⋯ on every row, pins marked).

@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4d66cd18-3bc4-428d-a39a-cd5c15c0d3e1
📥 Commits

Reviewing files that changed from the base of the PR and between c3a9340 and 4f7362b.

📒 Files selected for processing: 11
  • DESIGN.md
  • changelog.d/agents-pin-menu-drop-cards-quiet.md
  • changelog.d/desktop-row-menus-right-click.md
  • docs/development.md
  • scripts/sidebar-activity-demo-regression.ts
  • scripts/ui-regression.ts
  • scripts/workspace-rows-regression.ts
  • src/components/AgentSidebar.css
  • src/components/AgentSidebar.tsx
  • src/components/Sidebar.css
  • src/components/Sidebar.tsx
  • 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.

@devswha

devswha commented Oct 14, 2026

Copy link
Copy Markdown
Owner Author

Closing: the pinned-section design is being redone.

@devswha devswha closed this Oct 14, 2026
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.
@devswha
devswha deleted the fix/sidebar-desktop-row-menus branch October 17, 2026 14:08
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