Repository navigation
Pin projects in the sidebar and close a project's panes before removing it - #109
Merged
Merged
Conversation
…ts registration A registration carries a pinned flag that survives a relaunch and loads unpinned from an older state file. The project sort keeps device first, then pinned, then activity, and a pinned project is exempt from the device's inactive fold. workspace_pin_set moves the row in place, refuses an unregistered id, and treats the same value as a no-op. remove_workspace no longer refuses a project with open panes. It sends pane.close for every pane in the project's checkouts from a worker outside the runtime mutex and removes the registration only once Herdr confirms them gone; a timeout keeps the registration and reports workspace.remove_failed, and a retry continues from the panes that remain. The snapshot carries the pane and running-agent counts the confirmation names.
…l dialogs on the Screen / Sidebar / Projects board The board gains a Pinned 2 state beside the pin 0 project fold state, the shared row menu with Pin/Unpin and Remove project…, and both removal dialogs, all as refs of the existing section, project row and fold masters. The Scratch boards are deleted: the sidebar pinning scratch is now this board, and the Overview restructure scratch that rode in with the branch base lives on design/overview-scratch-2026-09-19.
DESIGN.md's Projects and checkout context section carries the Pinned section rules, the shared row menu, the persisted pin, the fold exemption and the remove flow that closes panes before the registration goes; the documentation map and the performance guide name the new owners and regression tests.
…nd confirm removal with the core's pane counts The sidebar splits the core's ordered projects into a Pinned section, drawn only while a project is pinned, and the activity list whose header now counts the rest. Registered project rows offer Pin/Unpin and Remove project… from both the ⋯ menu and a new context menu; a temporary folder row offers neither. The removal alert reads the pane and running-agent counts the core reports and names them in the message and the destructive button, keeping the registration-only copy for a project without panes.
The Projects list drew the Pinned section and the activity section as two ForEach groups, so pinning a project removed its row from one and inserted it into the other, and the List kept its scroll offset past the new header. Section headers are now rows of one list, so a pinned project moves in place, and the list reveals the Pinned header when it first appears.
Removing the project that held the focused checkout left the shell on a checkout no catalog carried; every sync then reported the closed pane as unavailable instead of showing the next project. The retire path now drops the focus and pane selection with the project, the way a Herdr restart does, so the next checkout comes forward. The removal gate counts only local registrations: a remote tree arrives freshly projected on every sync, and a count written into it read as a change on every tick. The row menu offers Pin and Remove project only for a local registration, which is the only kind the core can act on.
A registration id is keyed by the folder, so a folder added back while `Remove project…` was still waiting for Herdr named the entry the retire was about to delete, and the confirmation then removed the operator's re-added project without a word. The create event now refuses a folder whose removal is in flight, removal refuses a project whose first pane is still being opened, and a creation that lands anyway cancels the removal and says so, so the project it opened a pane in stays registered. The confirm button node in the registration-only dialog frame on the design canvas is named after its content.
# Conflicts: # design/hide.pen
yansfil
added a commit
that referenced
this pull request
Sep 20, 2026
## Summary
- The Overview is one list: the project's worktrees as groups, each
holding the agents working in it, under a stat strip of derived project
facts. The Git ancestry graph, the two inspectors, the summary rows, the
Tasks/Git toggle and the Needs You bar are gone, with their graph
tokens, lane colours, canvas variables,
`overview_select`/`overview_changes` events and `history` snapshot
field.
- Stat strip: row 1 is always `N GB on disk` (opens the existing disk
popover) and `⑂ N open PRs` (opens the existing GitHub popover, zero
drawn); row 2 holds `<base> ↓N behind origin` and `N merged to clean up`
only when there is something to act on. One glyph language everywhere: a
number, `…` while reading, `?` when unreadable, absence when not
applicable; reasons live in tooltips and popovers.
- Group header: `▾ ⎇ branch` on the left, opening the workspace; a mono
micro line `<N files|Clean> · <↑a ↓b> · <size> · <#PR>` on the right
with zero sides omitted, behind in the warning colour, and the pull
request chip as the bundled octicon in its state colour. The `N files`
chip opens that checkout on History through one core event,
`overview_open_section`. Long branch names truncate on the left.
- Rows: mark · badge · name · task · `↗`, a click shows the pane; a
delegated child is indented `↳` under its parent, and a child working in
another worktree stands in its own group with `↳ from <parent> · <parent
branch>`. An empty group reads `No agent · Start agent…`; the header
menu's `New agent here ▸ Terminal only / Claude / Codex` and that row
share the new `agent_start_in_checkout` core event, which creates a tab
in the checkout's workspace through the existing task-operation slot and
starts the provider on the `startAgentInCreatedPane` path.
- Order is fixed: primary checkout, then linked worktrees oldest first
by the `.git/worktrees/<name>` creation time (new `created_at_unix_ms`),
then the `› Inactive N` fold sharing the sidebar's state. Search matches
name, task and branch and keeps rows with their group header.
`behind_upstream` rides the existing `rev-list --left-right --count
@{u}...HEAD` call, so no git process was added.
- The Changes tab is labelled History; its body is unchanged (PR 2).
DESIGN.md, ARCHITECTURE.md, PERFORMANCE_TESTING.md, README.md,
CONTRIBUTING.md and the workflow review carry the new contract; the
Overview gate scripts assert the new states; the unused
`HideDisclosureStyle` is removed.
## Result
A reviewer can open the Overview of any registered project and see the
list described above, click a row to show its pane, click the header to
open the workspace, click `N files` to land on History for that
checkout, open the disk and GitHub popovers and the cleanup sheet from
the strip, start an agent in a worktree from the header menu or the
empty-group row, search, and fold Inactive. A plain folder project shows
only its size. When Herdr is unreachable the caption `⚡ Live task status
unavailable; showing the last known agents` sits above the search and
the last rows stay clickable.
Not included: the History body (PR 2, `right-panel-history`), any fetch
(behind is read only), and any change to the sidebar or the pane header.
## Screenshots / Demo
No inline images. The captures are registered run artifacts under
`agents/runs/right-panel-overview/artifacts/live/shots/` (local-only by
repository rule, AGENTS.md "Evidence Belongs Outside The Repository"),
and they show the workstation's user and host name in the terminal
prompt, which this public repository must not carry; there was no
user-attachment upload channel from this session. What each shows is
written out under Evidence, and the design target is the `Screen / Panel
/ Overview`, `Screen / Overview / States` and `Screen / Overview /
Actions` boards in `design/hide.pen`.
## Human Review Focus
Proven by the recorded evidence: the strings and layout of every state
on a six-worktree fixture (Git project with an origin two commits ahead,
dirty and ahead worktrees, two merged, one long branch name, a plain
folder project), row click, header click, files chip to History,
popovers and sheet, `New agent here ▸ Claude` creating a tab and
starting the agent, search keep and no-match, the Inactive fold, the
disconnected caption, and the reader cost (0 git commands over 60 s
idle; 67 commands in about 1 s per detected change).
Still for a reviewer:
- Product interpretation: the subtitle omits `· M inactive` at zero
(design rule 13, no explicit PRD line); a group's chevron folds its rows
and shares the sidebar's collapsed set, an affordance the PRD did not
spell out; a search lists a matching inactive checkout as a header line
among the groups and hides the fold while searching.
- Copy: the disconnected caption wraps to two lines at the default panel
width; `Clear search` uses the regular text button.
- Risky files: `herdr-core/src/runtime/projects.rs`
(`agent_start_in_checkout` picks the session workspace from the
checkout's visible tabs, then any tab, and refuses without a live
connection) and `herdr-core/src/worktree_control.rs`
(`create_checkout_tab` chooses `tab.create` when the checkout has a
Herdr workspace and `workspace.create` otherwise).
- Not exercised live: the pull request chip and the `⑂ N` count with a
signed-in `gh` (the fixture has no GitHub remote; covered by
`OverviewPresentationTests`), the header and row context menus (SwiftUI
context menus could not be opened through accessibility in the
background; item lists and order are asserted by
`menusListTheAgreedItemsInOrder`), `Reveal in sidebar`, `Copy pane id`,
`Close pane…`, and `Delete worktree…` from the Overview.
- Question: should an inactive checkout that still holds a delegated
child pane (the fixture's `prd/hide-orchestrator…`) be inactive at all?
The Overview mirrors the sidebar's classification, so the child appears
nowhere in the Overview while its parent's group shows only the sibling.
## Product And Scope Result
- PRD: agents/prd/right-panel-overview/prd.md
- Implementation state:
/Users/hoyeonlee/projects/herdr-ide/agents/runs/right-panel-overview/state.json
- Verification report:
/Users/hoyeonlee/projects/herdr-ide/agents/runs/right-panel-overview/verification-report.json
(status: PASS)
- Verification summary:
/Users/hoyeonlee/projects/herdr-ide/agents/runs/right-panel-overview/verification-report.md
## Actual Tests
- S1: GREEN - `bash scripts/verify-cargo.sh test` (cwd: ., exit 0)
- S2: GREEN - `bash scripts/verify-swift.sh test` (cwd: ., exit 0)
- S3: GREEN - `bash scripts/verify-cargo.sh lint` (cwd: ., exit 0)
## Actual Observations
- agents/runs/right-panel-overview/artifacts/live/timing-summary.md
(log, observed 2026-09-19T15:30:25.776Z, sha256
7bbfceeb9c7e684f8ea0556d874e7405a8f412704ec3efb6f37c890857cf2cde):
GIT_TRACE on the dev app, passes grouped by 1 s gaps
-
agents/runs/right-panel-overview/artifacts/live/shots/03-overview-orchestra.png
(screenshot, observed 2026-09-19T15:30:42.031Z, sha256
dc011bd35741a54d9303c4d53767f5523f767c8ac93e87cc2c8d3649e3d9a66b):
peekaboo exact-window background capture of the dev app window
-
agents/runs/right-panel-overview/artifacts/live/shots/10-relaunch-inactive-order.png
(screenshot, observed 2026-09-19T15:30:42.408Z, sha256
f6cb2c6ede9cfd94cfc1392f01826b4e369bd02651747f872485e7b8299f3922):
peekaboo exact-window background capture of the dev app window
-
agents/runs/right-panel-overview/artifacts/live/shots/11-folder-project.png
(screenshot, observed 2026-09-19T15:30:42.771Z, sha256
2d0356d603b3739f02411f1bf5f3eef2f88313934fa3f84a4054e05f6926b237):
peekaboo exact-window background capture of the dev app window
-
agents/runs/right-panel-overview/artifacts/live/shots/05-search-review.png
(screenshot, observed 2026-09-19T15:30:43.118Z, sha256
99dfd889dee5dd02b786a759ea311e077479b69c90076a2c2a15343d0e2cd4fa):
peekaboo exact-window background capture of the dev app window
-
agents/runs/right-panel-overview/artifacts/live/shots/06-search-no-match.png
(screenshot, observed 2026-09-19T15:30:43.473Z, sha256
23cf5ade2910aaac8af48e6389d7c7cb673c42e98aa864d3212ad3296bc1186c):
peekaboo exact-window background capture of the dev app window
-
agents/runs/right-panel-overview/artifacts/live/shots/07-row-click-focuses-pane.png
(screenshot, observed 2026-09-19T15:30:43.822Z, sha256
7aeb4d7f0c07ddb1aba6331902cb3c8fa5eb262a17c754249ffb60410148407f):
peekaboo exact-window background capture of the dev app window
-
agents/runs/right-panel-overview/artifacts/live/shots/08-files-chip-opens-history.png
(screenshot, observed 2026-09-19T15:30:44.169Z, sha256
3d545b80a4f903ecd0832419b1101f493650f2238981e4206b7e5adeca8bf790):
peekaboo exact-window background capture of the dev app window
-
agents/runs/right-panel-overview/artifacts/live/shots/12-start-agent-menu.png
(screenshot, observed 2026-09-19T15:30:44.525Z, sha256
c9ad5fb43bb1503b1a5942a04c105a0bb2e971f877a4d170cdcfc42b858f19f6):
peekaboo exact-window background capture of the dev app window
-
agents/runs/right-panel-overview/artifacts/live/shots/13-agent-started-in-gamma.png
(screenshot, observed 2026-09-19T15:30:44.868Z, sha256
f05b8c11d862f31d73900a5704cb92edeef72730a978fc2d6c1f22581f32417e):
peekaboo exact-window background capture of the dev app window
-
agents/runs/right-panel-overview/artifacts/live/shots/14-disk-popover.png
(screenshot, observed 2026-09-19T15:30:45.202Z, sha256
4916606e48fe7bb99c7946c22a7b06dddf5cf9ab571b54ebe12024f0ce7faeaa):
peekaboo exact-window background capture of the dev app window
-
agents/runs/right-panel-overview/artifacts/live/shots/15-cleanup-sheet.png
(screenshot, observed 2026-09-19T15:30:45.555Z, sha256
39ba767d5409e50de55b11f247cce805986df774d182463eb072d6647d50d900):
peekaboo exact-window background capture of the dev app window
-
agents/runs/right-panel-overview/artifacts/live/shots/16-disconnected.png
(screenshot, observed 2026-09-19T15:30:45.917Z, sha256
6a811148eb1de19baa65f7f704e4a003f9bcbe634e404e6b2124eb557e56beb1):
peekaboo exact-window background capture of the dev app window
## Deterministic Verification
- Deterministic verification: PASS
- PRD SHA:
f1d4434cdadeb687c25e136efa2bcb7f7955a3634c05de6d44f8bf2680f934c1
- Base SHA: 958aad8
- Head SHA: 2c3b6ab
- Source fingerprint:
d41d3ba8829835e7d8d9139c96d03437b25cb7fd5aba71d570befc8876290c1c
- Generated: 2026-09-19T15:47:12.243Z
- Agent reviews are visible advisory notes produced by native runtime
subagents.
## Agent Review: Fix Now
Fidelity and Code reviews ran for head 34b5f65 and again for 2c3b6ab
(same tree as 98bebf5). Both raised one finding, fixed in 2c3b6ab:
- `WorktreeMenuPolicy.overviewHeaderItems`
(`macos/Sources/HerdrMacOS/WorktreeTasks.swift`) was dead code whose
order disagreed with B12/D-10 and with the menu the view builds;
deleted. The menu's order is stated once, by
`OverviewPresentation.headerMenuItems`, and asserted by
`menusListTheAgreedItemsInOrder`.
Also folded in from the Code review's follow-ups: the inert
`#[serde(default)]` on the Serialize-only
`WorktreeSnapshot.behind_upstream` removed; the
`check-right-panel-sections.sh` header comment says History. Re-review
at 2c3b6ab: Fix now `None` from both reviewers.
## Agent Review: Follow-up Improvements
From the Fidelity review, for a human to confirm rather than change now:
- `OverviewPresentation.subtitle` omits `· M inactive` at zero rather
than drawing `0 inactive` (design rule 13; the PRD gives only a nonzero
example).
- The per-group chevron folds a group's rows and shares the sidebar's
collapsed set; not in B1..B24, reuses existing state.
From the Code review:
- Header chips are identified positionally in
`ForEach(Array(chips.enumerated()), id: \.offset)`; fine for a stateless
row, worth a stable id if chips ever gain per-chip state.
Reviewer on the Overview's inactive classification: a checkout holding
only a delegated child pane counts as inactive in the sidebar and so in
the Overview, which hides that child from every group; the answer
belongs to the sidebar's rule, not this PR.
## Delivery Staging
- Mode: unknown
- Branch: unknown
- Base: main
- Staging include: default allowlist
- Staging exclude: default volatile paths
## Changed Paths Planned For This PR
- CONTRIBUTING.md
- DESIGN.md
- design/agent-workflow-review.md
- design/hide.pen
- docs/ARCHITECTURE.md
- docs/PERFORMANCE_TESTING.md
- docs/README.md
- herdr-core/src/git_history.rs
- herdr-core/src/live.rs
- herdr-core/src/model.rs
- herdr-core/src/reader.rs
- herdr-core/src/runtime.rs
- herdr-core/src/runtime/events.rs
- herdr-core/src/runtime/projects.rs
- herdr-core/src/runtime/tests/projects.rs
- herdr-core/src/worktree_behavior_tests.rs
- herdr-core/src/worktree_control.rs
- herdr-core/src/worktrees.rs
- macos/Sources/HerdrMacOS/CheckoutOverview.swift
- macos/Sources/HerdrMacOS/CoreBridgeSnapshot.swift
- macos/Sources/HerdrMacOS/CoreBridgeWorkspaceSnapshot.swift
- macos/Sources/HerdrMacOS/GitWorktreesPresentation.swift
- macos/Sources/HerdrMacOS/HideDisclosureStyle.swift
- macos/Sources/HerdrMacOS/HideSidebar.swift
- macos/Sources/HerdrMacOS/HideTheme.swift
- macos/Sources/HerdrMacOS/OverviewGitTree.swift
- macos/Sources/HerdrMacOS/OverviewPresentation.swift
- macos/Sources/HerdrMacOS/ShellModel.swift
- macos/Sources/HerdrMacOS/SidebarList.swift
- macos/Tests/HerdrMacOSTests/ChangesPresentationTests.swift
- macos/Tests/HerdrMacOSTests/OverviewPresentationTests.swift
- macos/Tests/HerdrMacOSTests/SidebarPresentationTests.swift
- scripts/check-git-worktree-states.sh
- scripts/check-hide-components.mjs
- scripts/check-right-panel-sections.sh
- scripts/check-worktree-catalog-presentation.sh
- scripts/design-control-policy.json
- scripts/pen-foundations.mjs
- scripts/pen-token-map.json
- scripts/tests/design-controls.test.mjs
## Risks, Rollback, And Human Review
- Risk: `agent_start_in_checkout` is a new live write path (tab.create
or workspace.create, then the shell's `startAgentInCreatedPane`); a
failure lands in the task-operation slot as the same error the worktree
sheet already shows, and a missing live connection is refused before any
slot is taken.
- Risk: the reader pass reads two counts from one `rev-list --left-right
--count` where it read one before; the parse takes both numbers or none,
and a parse failure reads as `?`, never as zero (`parse_left_right`,
`behind_upstream_is_absent_without_an_upstream_and_counts_the_fetched_side`).
- Rollback: revert the merge commit; the UI state file gains no new key,
and a saved `right_panel_section` of `changes` still opens the same
section under its new label.
- Not run: the pull request chip and open-PR count against a signed-in
`gh`; the Overview context menus, `Reveal in sidebar`, `Copy pane id`,
`Close pane…` and `Delete worktree…` in the native app (item lists and
wiring are covered by tests and by the shared `closePaneFromHeader` /
`requestDeleteWorktree` paths the sidebar already uses).
- Follow-up: PR 2 (`right-panel-history`) replaces the History body.
## Related
- PRD: `agents/prd/right-panel-overview/prd.md` (right-panel-overview,
D-01..D-19, B1..B24)
- Follows PR #109 (sidebar pinning) and PR #101 (agent row redesign); PR
2 of this restructure is `right-panel-history`.
## Review focus
- **사람이 판단할 것**: the subtitle omits `· M inactive` at zero; the
per-group chevron folds rows and shares the sidebar's collapsed set; a
matching inactive checkout appears as a header line during search;
whether a checkout holding only a delegated child should count as
inactive (the Overview follows the sidebar's answer).
- **위험한 파일**: `herdr-core/src/runtime/projects.rs`
(`agent_start_in_checkout`, `overview_open_section`, the folder
`disk_request`), `herdr-core/src/worktree_control.rs`
(`create_checkout_tab`), `herdr-core/src/worktrees.rs` (`upstream()` now
parses two counts), `macos/Sources/HerdrMacOS/CheckoutOverview.swift`
(the whole surface is new).
- **리뷰어에게 묻는 것**: is `Terminal only / Claude / Codex` the right submenu
order, given the New worktree sheet lists providers the same way?
## Risk surface
- **Runtime mutex**: nothing new runs under `Mutex<Runtime>`;
`behind_upstream` and `created_at_unix_ms` are read in the existing
`WorktreeReader` worker pass, and `agent_start_in_checkout` spawns its
worker thread outside the lock like `create_worktree`.
- **Snapshot wire**: two new fields on the revisioned `rest` worktree
rows, both `Option`, both absent when not applicable; `history` and
`inspected_checkout_path` leave the snapshot.
- **Ownership**: the row click, header click and `overview_open_section`
change core-owned focus and section and tell Herdr afterwards, as the
sidebar does; `agent_start_in_checkout` waits for Herdr's created pane
through the task-operation slot before the shell starts the provider.
- **Herdr contract**: only `tab.create` and `workspace.create`, both
already in `contracts/herdr-api.schema.json` and already built by
`wire.rs`.
- **Failure path**: an unknown checkout or section answers
`overview.unknown_checkout` / `overview.unknown_section` in the error
slot; an agent start without a live connection reports `start an agent:
a live Herdr connection is required` in the task-operation slot; an
unreadable count draws `?` with the reason in its tooltip; every
diagnostic goes to `core.jsonl`.
- **High-frequency path**: no added git process per pass (one `rev-list`
per worktree as before, the upstream one only where an upstream exists);
`created_at_unix_ms` is one `stat` per linked worktree; idle adds
nothing (0 git commands over 60 s with the Overview visible).
## Evidence
- **확인한 것**: `bash scripts/verify-cargo.sh test` (19 test binaries, 574
core tests), `bash scripts/verify-swift.sh test` (493 tests, 10 in
`OverviewPresentationTests`), `bash scripts/verify-cargo.sh lint`, `node
scripts/check-design-contract.mjs` (141 mapped canvas values), `node
--test scripts/tests/design-controls.test.mjs` (7), and every gate in
CONTRIBUTING.md including the four rewritten Overview gates and
`check-herdr-contract.sh --schema-only`. Live: dev build against an
isolated Herdr 0.9.1 server (own HOME/XDG, private socket,
`HERDR_SESSION=rpo-live`) with a six-worktree fixture whose origin is
two commits ahead of main, three shim agents with `parent_pane` tokens,
and a plain folder project; twelve background exact-window captures
registered in the run record cover the grouped list with both strip
rows, the unfolded Inactive fold with left-truncated branch name, the
folder project's single size cell, search keep and no-match, row click,
files chip to History, the Start agent menu and the agent it started,
the disk popover, the cleanup sheet and the disconnected caption. Reader
cost with `GIT_TRACE`: 0 git commands over 60 s idle at 0.9% CPU; ten
edits three seconds apart across three worktrees produced one 67-command
pass of 0.89-1.0 s each at 1.8% CPU.
- **확인하지 못한 것과 그 이유**: the pull request chip and a numeric `⑂ N open
PRs` (the isolated HOME has no `gh` login and the fixture has no GitHub
remote; drawn from unit fixtures only); the header and row context
menus, `Reveal in sidebar`, `Copy pane id`, `Close pane…`, `Delete
worktree…` (SwiftUI context menus do not open through background
accessibility actions and foreground input was not used against the
operator's desktop); VoiceOver reading order beyond the accessibility
labels the AX dump shows (`sasu, Idle, prd/right-panel-overview`;
`feature/gamma, clean, 1 ahead, 4 behind, 20 KB`).
- **화면 증거**: see Screenshots / Demo; the captures stay in the local run
record because they carry the workstation's user and host name.
## AI tooling
- [ ] 사람이 직접 작성 - [ ] 일부를 AI 도구로 작성 - [x] 대부분을 AI 도구로 작성
**손으로 확인한 것**: the twelve live captures were read one by one against the
PRD's strings and the `Screen / Panel / Overview` board; the
verification report, the two native reviews and the git trace were read
in full.
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.
Summary
⋯or right-click): aPinned Nsection leads the Projects list aboveProjects · Recent activity, pinned rows keep activity order among themselves, and a pinned project never falls into theInactive projectsfold. The flag lives onWorkspaceRegistrationand survives relaunch; older stores load unpinned.Remove project…replaces the old refusal for a project with open panes. The confirmation names what the close will send (Closes 3 panes (1 running agent).) and the core closes those panes through Herdr, waits for the confirmation, and only then removes the registration. A timeout or refusal keeps the project registered with the reason in the status banner, and the same command retries from the panes that remain.pane.projection_unavailableon every sync until the operator clicked elsewhere (found live, fixed in b6d21b4).Pinnedheader when it first appears (the two-ForEachversion left the list scrolled past it).design/hide.pen:Screen / Sidebar / Projectsgains the pin-0,Pinned 2, row-menu andRemove project…states drawn from the existing masters; the fiveScratch /boards that rode the branch base are deleted.DESIGN.md,docs/README.mdanddocs/PERFORMANCE_TESTING.mdare updated with the behavior.Related
agents/prd/hide-sidebar-pinning/prd.md(B1-B20)main;origin/main(Open PDFs in the file viewer and add Explorer open items for the default app and a browser pane #107) is merged in at 7737f0c, so the diff againstmainis the pinning and removal change only. Those scratch boards remain ondesign/overview-scratch-2026-09-19and tagbackup/hide-sidebar-pinning-pre-merge.Result
Pinned Nsection leads the Projects list while any exist, ordered by activity, never folded, and the flag survives relaunch.Remove project…on a project with panes confirms with the pane and running-agent counts, closes the panes through Herdr, and removes the registration only after Herdr confirms; the project stays registered with the reason visible on timeout, refusal, or no live connection.Screenshots / Demo
No inline images: the screenshots are registered run artifacts under
agents/runs/hide-sidebar-pinning/live/shots/(local-only by repository rule, see AGENTS.md "Evidence Belongs Outside The Repository"), and this session had no channel to upload GitHub user attachments. What each shows is written out under Evidence below and in the artifact descriptions instate.json; the design target is theScreen / Sidebar / Projectsboard indesign/hide.pen(statesPinned 2,Row menu,Remove project…).Human Review Focus
Closes N pane(s) (M running agent(s)).with the parenthetical omitted at 0 running agents,Close N pane(s) and remove; "running" means the agent's activity axis saysworking. Row-menu orderPin/Unpin, divider,Refresh GitHub status,New worktree…, divider,Remove project…. Pin and Remove are offered only for local registrations (a remote project is the device's own; a temporary folder row has nothing to store the pin in).herdr-core/src/runtime/projects.rs(remove_workspace,ingest_workspace_close_result,retire_workspace_registration: the in-flight set and the focus hand-off),herdr-core/src/worktree_control.rs(spawn_workspace_closereuses the worktree close-then-confirm thread),herdr-core/src/sidebar.rs(removal counts on the per-sync summary pass),macos/Sources/HerdrMacOS/SidebarList.swift(revealTopRowIDscroll).resync_navigator_focus), which is the first pinned project when one exists. Is that the order you want, or should it prefer the most recently active project?Risk surface
herdr-core-workspace-closethread (same shape as worktree removal) and re-enters the runtime once with the result; under the lock the removal path only mutates snapshot vectors and queues the off-lock state save. Removal counts are computed on the existing per-sync summary pass, one pass over the checkout pane lists.confirmation_stateoversession.snapshot); the pin is core-owned UI state persisted to the app state file.pane.closeandsession.snapshotonly, both incontracts/herdr-api.schema.jsonfor the pinned v0.9.1.workspace.remove_failedin the status banner ("… The project stays registered; remove it again to close the panes that remain."); removing with panes and no live connection sets the same kind with "needs a live Herdr connection"; pinning an unregistered id setsworkspace.pin_unregistered. Every transition emits aworkspace.pinned|unpinned|unregistereddiagnostic andremove.close_requestednames the pane ids.Evidence
bash scripts/verify-cargo.sh test(561 lib tests + workspace crates),bash scripts/verify-swift.sh test(448 tests),bash scripts/verify-cargo.sh lint, everycheck-*lane in CONTRIBUTING.md,node scripts/check-design-contract.mjs(canvas: Screen 25, Scratch 0),python3 -m unittest discover -s scripts/tests(38). Live, against a private Herdr 0.9.1 server (HERDR_SOCKET_PATH=/tmp/hsp/h.sock, isolated HOME and XDG dirs, four fixture projects: alpha with 3 panes and two long-running processes, bravo with 1 pane, charlie 14d and delta 18d inactive) in the dev app built bymacos/scripts/build_dev_app.sh, input bound to that PID: pin from the⋯menu and from right-click;Pinned 1appears and the header is the first row after relaunch; unpin returns today's screen; pinning the folded charlie takes it out ofInactive projects 2intoPinned 1; two pins order alpha (18m) above charlie (14d); a pinned row's menu saysUnpin;Remove project…on alpha showsCloses 3 panes. The folder, repository, and worktrees stay on disk./Close 3 panes and remove; after confirming,herdr pane listholds onlyw2:p1andpsfinds neitherhsp-longrunprocess (PRD Risk 1: the pane close ended the PTY and the processes in it, no survivors);Remove project…on a project with no panes shows the registration-only copy; removing the focused project lands on the next project with its pane projected.(1 running agent)copy is covered byremovalPromptNamesThePanesAndAgentsItClosesand the count byremoving_a_registration_with_panes_closes_them_and_removes_only_on_confirmation).agents/runs/hide-sidebar-pinning/live/shots/, local-only by repository rule) and described above; no upload channel for GitHub user attachments was available from this session, so none are inline.Product And Scope Result
Actual Tests
bash scripts/verify-cargo.sh test(cwd: ., exit 0)bash scripts/verify-swift.sh test(cwd: ., exit 0)bash scripts/verify-cargo.sh lint(cwd: ., exit 0)Actual Observations
Deterministic Verification
Agent Review: Fix Now
Review availability: Fidelity and Code reviews ran as native subagents on b6d21b4, again on 950f4ae, confirmed on 680ef9d, and confirmed the origin/main merge at 11f1aa8. No Security review (the PRD is not tagged high-risk).
Fidelity verdicts at 680ef9d: B1-B8 met, B9 met (code inspection only), B10-B14 met, B15 met (by design, not re-tested), B16 met (code inspection, no VoiceOver capture), B17-B20 met.
CreateWorkspacerefuses a folder whose removal is in flight (workspace.remove_in_flight),remove_workspacerefuses a project whose creation is in flight (workspace.create_in_flight), and a creation that lands anyway cancels the removal withworkspace.remove_cancelledso the close's late answer authorizes nothing. Testsadding_a_folder_while_its_removal_closes_panes_is_refused_and_a_landed_add_cancels_itandremoving_a_project_whose_creation_is_in_flight_is_refused. Both reviewers confirmed the fix on the re-review of 950f4ae.pane.projection_unavailableon every sync ("Selected pane w1:p3 is not available for the selected checkout") and an empty Overview. The retire path now drops the focus and pane selection with the project, asconsume_restore_hintdoes after a Herdr restart; testremoving_the_focused_project_moves_focus_off_its_closed_panes, live re-check in the rebuilt app (bravo came forward withw2:p1).Agent Review: Follow-up Improvements
Advisory, outside the current contract:
spawn_worktree_close/spawn_workspace_close(herdr-core/src/worktree_control.rs) never release their in-flight marker ifruntime.lock()returnsErr(a poisoned mutex, pre-existing pattern shared by every worker callback); fix once across them, e.g.unwrap_or_else(PoisonError::into_inner).project_base_branches(herdr-core/src/model.rs) is never pruned when a registration is removed (pre-existing gap);retire_workspace_registrationis now the natural place.catalog_roots/worktree_catalogstay transiently stale after a removal until the next sync (deliberate, avoids git under the lock; self-heals viaresync_navigator_focus).workspace_removals_in_flight, so the row shows nothing while the close runs (PRD non-goal: no progress UI).Pinnedsection in remote navigation) holds because the remote wire never sendspinnedand the DTO defaults to false; there is no dedicated test or screenshot for the remote path.Button/Menu/Alert, the pre-existingHideSectionLabel) but was not captured with VoiceOver.set_errorcalls passretryable: false; nothing in the shell keys the banner on it today.Delivery Staging
gen-prd/hide-sidebar-pinning; the verified head is what is pushed)Changed Paths Planned For This PR
Risks, Rollback, And Human Review
herdr-core-workspace-closethread and re-enters the runtime once with the result; under the lock the removal path mutates snapshot vectors and queues the off-lock state save; removal counts ride the existing per-sync summary pass (one pass over the checkout pane lists, local registrations only). The in-flight checks compare stored registration paths and never canonicalize under the lock.confirmation_stateoversession.snapshot); the pin is core-owned UI state persisted to the app state file.pane.closeandsession.snapshotonly, both incontracts/herdr-api.schema.jsonfor the pinned v0.9.1 (check-herdr-contract.sh --schema-onlypasses against the installed binary).workspace.remove_failed("… The project stays registered; remove it again to close the panes that remain."); no live connection with panes → same kind, "needs a live Herdr connection"; add during removal →workspace.remove_in_flight; remove during add →workspace.create_in_flight; add landing during removal →workspace.remove_cancelled; pin of an unregistered id →workspace.pin_unregistered. Diagnostics:workspace.pinned|unpinned|unregistered,remove.close_requestedwith pane ids,workspace.create.refused_during_removal.pinnedflag is#[serde(default)]on both sides, so a build without it reads the state file unchanged and a build with it reads an older file as unpinned.(N running agents)dialog copy live (fixtures ran plain shells; covered byremovalPromptNamesThePanesAndAgentsItCloses); VoiceOver.origin/mainmerge (Open PDFs in the file viewer and add Explorer open items for the default app and a browser pane #107 and Open Explorer single clicks in a replaceable preview tab #108: BrowserPaneOpener, PDFDocumentView, WorkspaceOutline*, editor preview tab files, docs/BROWSER_PANES.md, plugins/browser, herdr-core/src/files.rs, ffi_contract.rs). The review diff againstmainisgit diff origin/main...HEAD(31 source files +design/hide.pen).AI tooling
손으로 확인한 것: every live observation above was made on the running dev app and read from screenshots and
herdr pane list/psoutput, not inferred from code.