Skip to content

Fill the sidebar's project, checkout and agent row menus - #220

Merged
yansfil merged 9 commits into
mainfrom
prd/sidebar-context-menus
Sep 28, 2026
Merged

yansfil merged 9 commits into
mainfrom
prd/sidebar-context-menus

Conversation

@yansfil

@yansfil yansfil commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Related: PRD agents/prd/sidebar-context-menus/prd.md

Summary

  • 사이드바의 프로젝트·체크아웃·에이전트 행을 우클릭하면 보드에 그린 순서대로 메뉴가 열립니다. 호스트에 없는 항목은 빠지고, 행이 쓸 수 없는 항목은 이유와 함께 비활성으로 보입니다.
  • 프로젝트: Open Overview, New worktree…, New tab in main(단축키 표시), Reveal in Finder(데스크톱만), Copy path, Pin/Unpin, Remove project…. Herdr가 보여 주기만 하는 미등록 행에서도 Pin은 그 행을 등록하면서 고정하고, Remove는 그 행의 pane을 닫습니다(D-14).
  • 체크아웃: Open, New tab here, Open pull request, Set purpose…, Set as default checkout, Copy branch name, Copy path, Reveal in Finder, Delete worktree…. 원격 장치의 행은 Finder·기본 체크아웃·worktree 삭제가 비활성입니다.
  • 에이전트: Show(⌥n), Copy title, Copy session id, Close tab…. 이를 위해 스냅샷의 에이전트 행이 Herdr가 기록한 session id를 싣고, 데스크톱 preload에 revealPath 하나가 생깁니다.
  • Screen / Projects Sidebar 시트에 세 메뉴가 열린 프레임을 스크립트로 추가했고, UI_BEHAVIOR·ARCHITECTURE를 같이 고쳤습니다.

Herdr가 보여 주기만 하던(미등록) 프로젝트 행의 메뉴: Open Overview, New worktree, New tab in main ⌥T, Copy path, Pin, Remove project

링크된 worktree 체크아웃 행의 메뉴: 기본 체크아웃 지정, 브랜치/경로 복사, 파괴적 항목인 Delete worktree는 빨간색

에이전트 행의 메뉴: Show, Copy title, Copy session id, Close tab

Review

  • 판단해 주세요: 원격 체크아웃의 Delete worktree…가 이제 비활성입니다(B9/D-07). 이전에는 원격에서도 열 수 있었습니다.
  • 판단해 주세요: "New tab in main"은 보드 문구 그대로라서 기본 체크아웃 이름이 main이 아니어도 같은 라벨입니다. 대상은 home 글리프가 붙은 체크아웃입니다.
  • 판단해 주세요: 미등록 프로젝트의 Set as default checkout은 "Pin the project first to keep a default checkout."로 비활성입니다(core가 거부하는 경우라 PRD 밖의 판단).
  • 조심해서 볼 파일: herdr-core/src/runtime/projects.rs - runtime mutex 안에서 미등록 행을 등록합니다. 등록 id는 행의 id를 그대로 쓰고(다음 catalog rebuild가 같은 id를 채택), 파일 I/O는 없습니다. helper가 아직 묶지 않은 장치 행과 제거 진행 중인 행은 진단 로그로 거부합니다.
  • 조심해서 볼 파일: herdr-core/src/model.rs - snapshot wire에 에이전트 session_id가 추가됩니다(없으면 생략). 세션이 바뀔 때만 값이 바뀝니다.
  • 조심해서 볼 파일: desktop/src/main/host.ts, desktop/src/main/reveal.ts - 새 IPC. reportBindings와 같은 sender 검사, 절대 경로·길이·NUL 검사, shell.showItemInFolder만 부르며 로그에 경로를 남기지 않습니다.
  • 조심해서 볼 파일: web/src/components/entry-menu.tsx - 공용 메뉴 항목이 라벨과 단축키를 한 줄에 두도록 바뀌었고(items-start → items-stretch), 라벨·이유에 data-menu-label/data-menu-reason이 붙습니다. History·ViewAreas·Workspace 메뉴도 같은 컴포넌트를 씁니다.

Evidence

  • 확인한 것: 새 web e2e sidebar-menus.spec.ts(고립 Herdr + debug hided + fake claude): 세 메뉴의 항목·순서·구분선·단축키, 미등록 행 Pin → Pinned · 1과 Unpin, New tab in main → 기본 체크아웃에 탭 2개, Set as default → home 글리프와 첫 자리 이동, Copy session id/Copy title → 클립보드 값, 대기 중 에이전트의 Close tab… → 확인창 없이 그 탭만 닫힘.
  • 확인한 것: Head the sidebar with an Overview row and a Projects | Agents strip with Search and New workspace #219 병합 뒤 web e2e 전체 77개를 로컬에서 돌려 76개 통과, 남은 checkout-pr.spec.ts 하나는 536b794에서 고친 뒤 단독 3회·병렬 4회 통과. 메뉴가 바뀌어 기존 spec 두 개(checkout-pr, s7)가 첫 CI에서 떨어졌던 것을 같은 PR에서 고쳤습니다(메뉴 항목에 data-menu-label/data-menu-reason).
  • 확인한 것: herdr-core 테스트로 미등록 행 Pin이 한 이벤트로 등록·고정되고, Remove가 pane을 닫고 아무것도 등록하지 않으며, 에이전트 행이 session id를 싣는 것을 고정했습니다. sasu implement verify PASS(verify-cargo.sh test/lint, 536b794).
  • 확인한 것: vitest web 438개(메뉴 규칙: 순서, 비활성 이유, 호스트별 항목, 원격 게이트, D-14) + desktop 43개(revealablePath 포함), web·desktop typecheck와 eslint, check-design-contract.mjs 통과.
  • 확인하지 못한 것: 데스크톱 앱을 띄워 Reveal in Finder와 Show의 ⌥n 표시를 보지 않았습니다(단위 테스트와 typecheck만). 원격 장치 행은 단위 테스트만 있습니다. 작업 중 에이전트의 Close tab… 확인창 경로는 e2e 에이전트가 대기 상태라 닿지 않았습니다.
  • 확인하지 못한 것: 이전 로컬 전체 cargo 실행에서 hide-agent-hooks deadline(부하 중 1.86s), device_worktrees(git 서명 키), install::tests(임시 settings.json) 세 테스트가 한 번씩 실패했고 각각 단독 3회 통과했습니다. 이 PR은 그 코드를 바꾸지 않으며 최종 verify에서는 모두 통과했습니다.
  • 확인하지 못한 것: 536b794 CI 첫 시도에서 web shell의 s2.spec.ts가 ⌥T 새 탭 라벨을 "Tab 2" 대신 "zsh"로 읽어 실패했고(https://github.com/modakbul-gongbang/hide/actions/runs/36360754915/attempts/1), 재실행에서 통과했습니다. 그 spec과 탭 이름 경로는 이 PR diff 밖이고, #220의 첫 CI 실행에서는 같은 spec이 통과했습니다. 로컬 병렬 4회×2 테스트도 통과.
  • 생성물: design/hide-screens.pen의 큰 diff는 scripts/pen-screens.mjs + gen-screens.mjs가 만든 것으로, Projects Sidebar 시트의 메뉴 프레임 3개와 Menus and Overlays 시트의 프로젝트 메뉴 갱신입니다. Head the sidebar with an Overview row and a Projects | Agents strip with Search and New workspace #219 병합 뒤 main의 파일에서 다시 생성했고, main과 다른 시트는 이 둘뿐입니다.

AI tooling: 대부분 AI 도구. 메뉴 항목·순서를 PRD 보드와 e2e 캡처로, core 변경을 테스트와 두 리뷰로 대조했습니다.

Verification record
  • PRD: agents/prd/sidebar-context-menus/prd.md (sha256 4310c5aa5d74f6efc5b8863cb1dd0ac4f2955b925b3c8b505181470ba6264bfd)
  • Base 72d3083 → head 536b794, verified 2026-09-28T00:02:47.928Z: PASS
  • Verification report: agents/runs/sidebar-context-menus/verification-report.json and agents/runs/sidebar-context-menus/verification-report.md; source fingerprint 3e1226c1e8a8a521a4d8c71c87c89b677f1027c27ee5af503a1a14d16a139a52
  • Suites:
    • S1: GREEN bash scripts/verify-cargo.sh test (exit 0)
    • S2: GREEN bash scripts/verify-cargo.sh lint (exit 0)
  • Reviews:
  • Evidence: 18 registered (18 screenshot); paths are local to the run directory
    • agents/runs/sidebar-context-menus/artifacts/e2e/sidebar-menus-project-dark.png
    • agents/runs/sidebar-context-menus/artifacts/e2e/sidebar-menus-project-light.png
    • agents/runs/sidebar-context-menus/artifacts/e2e/sidebar-menus-checkout-dark.png
    • agents/runs/sidebar-context-menus/artifacts/e2e/sidebar-menus-checkout-light.png
    • agents/runs/sidebar-context-menus/artifacts/e2e/sidebar-menus-agent-dark.png
    • agents/runs/sidebar-context-menus/artifacts/e2e/sidebar-menus-agent-light.png
    • agents/runs/sidebar-context-menus/artifacts/e2e-wait-read/sidebar-menus-project-dark.png
    • agents/runs/sidebar-context-menus/artifacts/e2e-wait-read/sidebar-menus-project-light.png
    • agents/runs/sidebar-context-menus/artifacts/e2e-wait-read/sidebar-menus-checkout-dark.png
    • agents/runs/sidebar-context-menus/artifacts/e2e-wait-read/sidebar-menus-checkout-light.png
    • agents/runs/sidebar-context-menus/artifacts/e2e-wait-read/sidebar-menus-agent-dark.png
    • agents/runs/sidebar-context-menus/artifacts/e2e-wait-read/sidebar-menus-agent-light.png
    • agents/runs/sidebar-context-menus/artifacts/e2e-merged/sidebar-menus-project-dark.png
    • agents/runs/sidebar-context-menus/artifacts/e2e-merged/sidebar-menus-project-light.png
    • agents/runs/sidebar-context-menus/artifacts/e2e-merged/sidebar-menus-checkout-dark.png
    • agents/runs/sidebar-context-menus/artifacts/e2e-merged/sidebar-menus-checkout-light.png
    • agents/runs/sidebar-context-menus/artifacts/e2e-merged/sidebar-menus-agent-dark.png
    • agents/runs/sidebar-context-menus/artifacts/e2e-merged/sidebar-menus-agent-light.png
  • Changed paths: 46 (see Files changed)

… agent's session id

Pinning a row Herdr shows without a registration registers it with the id,
label, root and device the row already carries and pins it in the same
workspace_pin_set event; the next catalog rebuild adopts it as the same row.
remove_workspace on such a row closes its panes through the existing close
worker and retires nothing, so the row leaves with Herdr's workspace. Every
row now carries the removal gate's pane counts. Agent rows serialize the
session id Herdr recorded, for the row menu's Copy session id.
Project rows offer Open Overview, New worktree, New tab in main, Reveal in
Finder, Copy path, Pin/Unpin and Remove project on every row, registered or
not. Checkout rows offer Open, New tab here, the pull request, Set purpose,
Set as default checkout, Copy branch name, Copy path, Reveal in Finder and
Delete worktree. Agent rows gain a menu: Show with its option-digit chord,
Copy title, Copy session id and Close tab. A device's rows list Finder, the
default and deletion disabled with the reason. Reveal in Finder goes through
a new desktop bridge method that shows the folder and opens nothing; a
browser tab has no such item.
On an isolated Herdr and hided: an unregistered project row's menu lists the
board's items and Pin registers and pins it; New tab in main opens a tab in
the default checkout; Set as default checkout moves the home glyph and first
place; an agent row copies its session id and title and Close tab closes the
tab holding its pane in a checkout that is not in front.
…debar

Project, checkout and agent rows each get a frame with the menu the desktop
app draws, and the Menus and Overlays sheet's project menu follows the new
items as a browser tab draws them.
UI_BEHAVIOR lists each row kind's items, host and device gating, and what
Pin and Remove do on a row Herdr shows without a registration; ARCHITECTURE
names the events each item sends, the core's unregistered-row handling, the
agent row's session id and the desktop bridge's Finder reveal.
…re the folder row's checkout items

The menus spec asserted Delete worktree… disabled, which held only while the
worktree reader had not yet read the row a few seconds after launch. It now
reads the menu again until the row is read and expects the item enabled.
A plain folder's row takes its checkout items from one set that both the
menu builder and the row's routing use.
…enus

# Conflicts:
#	design/hide-screens.pen
#	docs/UI_BEHAVIOR.md
#	scripts/pen-screens.mjs
…menu in the pull request spec

A menu item's label now sits in a row with its chord, so the view tab spec
read the label where it expected the disabled reason. Items carry
data-menu-label and data-menu-reason and the specs read those. The pull
request spec expects the checkout menu's full item list and arrows down to
Open pull request, which now follows Open and New tab here.
…st spec

The menu moves focus to the next item on a timer after each arrow key, so a
second press sent before that move acts on the old item and the walk falls
short. Each press now waits until focus has moved.
@yansfil
yansfil merged commit 7f1d1e7 into main Sep 28, 2026
11 of 13 checks passed
@yansfil
yansfil deleted the prd/sidebar-context-menus branch September 28, 2026 00:50
@yansfil

yansfil commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

CI note: the web shell lane failed once on e2e/s2.spec.ts (expected "Tab 2", read "zsh"), a tab-name timing flake outside this diff; the rerun of https://github.com/modakbul-gongbang/hide/actions/runs/36360754915 passed with the other five lanes. Verify PASS on 536b794.

yansfil added a commit that referenced this pull request Sep 28, 2026
Brings in Agent tab groups (#217), the sidebar shell (#219), the
sidebar row menus (#220) and the project row fold (#221) alongside the
issue-first Overview.

- The every-project screen keeps main's title, Overview (sidebar-shell
  D-02), on the issue-first board; its docs and Screen / Main follow.
- actions.ts keeps main's row-menu and project-fold actions and the
  issue-linked createWorktree; WorkspaceDialogs keeps the issue dialogs
  and main's Remove project `listed` flag; keyboard.ts keeps the renamed
  recent entries and main's agentListOrder.
- design/hide-screens.pen is rewritten from the merged
  scripts/pen-screens.mjs with scripts/gen-screens.mjs rather than
  merged by hand.
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