Skip to content

Raise Needs You and Done above Pinned in the Projects sidebar - #222

Merged
yansfil merged 3 commits into
mainfrom
feat/sidebar-raised-attention
Sep 28, 2026
Merged

yansfil merged 3 commits into
mainfrom
feat/sidebar-raised-attention

Conversation

@yansfil

@yansfil yansfil commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Agents that need the operator, and finished unread agents, now sit at the top of the Projects sidebar, so nothing has to be unfolded to find them.
This builds the existing contract in docs/status-model.md (Projects raises Needs You and Done above the tree), which the web shell never drew.
projectRows now returns Needs You · N and Done · N sections above Pinned, each holding the core's needs_you / done agents whose pane a listed project owns.
Each raised row is the Agents list's own row with its place line. It is always folded with its descendant badge, and opening it opens the agent.
The agent also stays in its checkout tree. An ⌥ hold shows its number once: on the raised row, or else on its row under the checkout that owns its pane.

Needs You and Done raised above Pinned; the asking agent is also in its opened checkout

Review

  • Needs judgment: ⌥n still selects by the Agents list order (UI_BEHAVIOR "whether or not the sidebar shows it"), so the numbers Projects shows are that list's. They stay truthful, but tree rows below the raised sections can read out of order (for example 5 above 3). The alternative was renumbering ⌥n by the Projects draw order, which would duplicate the tree's fold logic in keyboard.ts.
  • Needs judgment: a non-raised agent shows its number only on its own checkout's row. A child drawn under a parent in another checkout carries none there, so a child whose own checkout is folded shows no number (⌥n still reaches it).
  • Files to watch: web/src/sidebar.tsx (ProjectList, the high-frequency path): rows, places and numbers are memoized so a snapshot does not rebuild the memoized agent rows. web/src/projects.ts now imports from navigation.ts, which imports projects.ts back. The cycle is only used at call time.

Evidence

  • Confirmed: in the web e2e (projects-sidebar.spec.ts, isolated Herdr and hided) Needs You and Done are drawn above Pinned and the agent stays in its tree. The raised row survives a folded checkout and project and names its place. It sends one focus_pane when opened, and the section goes away when the question is answered.
  • Confirmed: in the desktop e2e (digit-shortcuts.spec.ts, a real Electron window) an ⌥ hold in Projects shows exactly 2 keycaps: 1 on the raised row, none on its tree row, and 2 on the other agent's tree row.
  • Confirmed: unit tests cover projectRows raised rows (order, drawn-pane filter, forced fold, empty section) and projectListNumbers. scripts/verify-web.sh and check-design-contract.mjs pass.
  • Confirmed: a separate code review found nothing to fix now.
  • Not confirmed: I did not look at a selected SSH device's Projects list with raised rows, only through the code path.
  • Not confirmed: design/hide-screens.pen still shows the sidebar without raised sections. This PR adds no new part: the rows reuse the section header and the agent row.
More evidence

Raised rows stay while the project is folded:

Project folded, raised rows still visible

Desktop app, ⌥ held in Projects: one number per agent:

Keycap 1 on the raised row, 2 on the other agent's tree row

Follow-ups from the review: the pane-to-owning-checkout scan now exists in four places and could become one helper. sidebar.tsx and navigation.ts each hold an agentTree that has to keep the same order.

AI tooling: Mostly AI tooling. I checked the behavior by hand against the e2e screenshots and the status-model contract.

@yansfil
yansfil merged commit 6501c90 into main Sep 28, 2026
7 checks passed
@yansfil
yansfil deleted the feat/sidebar-raised-attention branch September 28, 2026 06:10
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