Skip to content

Add worktree-per-task workflows - #31

Merged
yansfil merged 3 commits into
mainfrom
gen-prd/hide-worktree-per-task
Sep 8, 2026
Merged

yansfil merged 3 commits into
mainfrom
gen-prd/hide-worktree-per-task

Conversation

@yansfil

@yansfil yansfil commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Replaces the project-level New chat here flow with a worktree creation sheet that selects a branch, base branch, and optional agent.
  • Adds base-branch-aware checkout rows, menus, migration, detached-state presentation, path copying, and Finder/default-editor actions.
  • Moves Scratch folder, workspace, and tab creation into the core while the macOS shell remains responsible for starting the selected agent and delivering its first message.
  • Makes worktree, migration, pane, agent-start, and first-message failures explicit, with cleanup or retry behavior matched to the stage that failed.
  • Applies the native shell design system to the new sheet through shared field, picker, and text-button components built only from existing theme tokens.

Result

Users can create an isolated worktree directly from a project, optionally start an agent there, manage the checkout from its sidebar row, and migrate the main worktree's current branch without moving panes or focus.
Scratch creation now has one core-owned path for its folder, workspace, and tab, and first-message delivery is not reported as successful until the agent lifecycle confirms delivery.
The receipt records all 41 behaviors as passing, including real isolated-server failure injection, a real one-message agent round trip, running-app screenshots, and all three verification lanes.
This PR does not merge itself, alter the bundled Herdr pin, or commit run artifacts.

Screenshots / Demo

Running-app screenshots for the tokenized New worktree sheet, checkout row states, migration consequence sheet, and Scratch round trip will be attached to this PR after creation.
The source images remain local run artifacts and are not committed, as required by the repository evidence policy.

Human Review Focus

Recorded evidence already proves creation and migration success paths, separate pane-create and agent-start failure paths with retry, first-message delivery, slug collision behavior, menu actions, native visual states, and the complete local test/build gate set.

Please review the product wording for migration and destructive confirmations, the ownership split between worktree_control.rs and WorktreeTasks.swift, and the recovery behavior when both migration creation and restoration fail.
There are no data migrations, authentication changes, permission changes, or new dependencies.

Product And Scope Result

  • PRD: agents/prd/hide-worktree-per-task/prd.md
  • Implementation state: agents/runs/hide-worktree-per-task/state.json (local-only)
  • Receipt: agents/runs/hide-worktree-per-task/receipt.json (local-only, status: complete)
  • Result report: agents/runs/hide-worktree-per-task/implementation-result.md (local-only)

Behaviors

# 사용자가 관찰하는 행동 검사 방법 상태 결과
B1 프로젝트 행 ⋯ 메뉴에 New chat here가 없고 New worktree…가 있다 check: swift test --package-path macos --filter WorktreeMenuTests green exit 0 at 2026-09-07T23:28:02.676Z
B2 New worktree…를 열면 브랜치명·base·agent 입력만 있고 채팅 입력창이 없다 judge: 시트가 열린 직후의 실행 중 앱 스크린샷 PASS PASS: 실행 중 앱 스크린샷에 New worktree 시트의 Branch, Base, Agent 입력과 Cancel, Create만 보이며 채팅 입력창이 없다. (agents/runs/hide-worktree-per-task/artifacts/visual/current-new-worktree-sheet/keep-0001.png; harness row ledger B2 PASS)
B3 브랜치명이 비어 있으면 제출할 수 없다 check: swift test --package-path macos --filter WorktreeSheetTests green exit 0 at 2026-09-07T23:28:03.874Z
B4 base 목록의 최상단이자 기본 선택은 프로젝트 base branch다 check: cargo test --manifest-path herdr-core/Cargo.toml base_branch_default_selection green exit 0 at 2026-09-07T23:28:28.218Z
B5 base가 미확인이어도 생성은 가능하고 다만 기본 선택이 없다 check: cargo test --manifest-path herdr-core/Cargo.toml base_branch_unknown_allows_creation green exit 0 at 2026-09-07T23:28:36.540Z
B6 고를 브랜치가 하나도 없는 저장소에서는 생성이 차단되고 이유가 보인다 check: cargo test --manifest-path herdr-core/Cargo.toml worktree_creation_blocked_without_branches green exit 0 at 2026-09-07T23:28:39.266Z
B7 제출하는 동안 입력이 잠기고 버튼이 진행 표시로 바뀌며 취소 버튼은 없다 check: swift test --package-path macos --filter WorktreeSheetSubmissionTests green exit 0 at 2026-09-07T23:28:40.855Z
B8 Esc로 시트를 닫으면 입력한 값이 버려진다 check: swift test --package-path macos --filter WorktreeSheetSubmissionTests green exit 0 at 2026-09-07T23:28:42.040Z
B9 제출하면 base에서 갈라진 worktree가 herdr 기본 경로에 생기고 사이드바에 그 checkout 행이 나타난다 judge: 격리 herdr 서버와 일회용 저장소에서의 실행 전사, 그때의 git worktree list, 스냅샷의 checkout 행 PASS PASS: Harness-recorded B9 verdict is PASS. The registered screenshot visibly shows the task-one checkout row in the sidebar, and the recorded worktree evidence shows task-one created as a linked worktree under Herdr's default path. (HARNESS-OWNED ROW LEDGER B9; S1/S2/S3 GREEN; agents/runs/hide-worktree-per-task/artifacts/visual/B9-created-worktree.png; agents/runs/hide-worktree-per-task/artifacts/runtime/B9-created-worktree/git-worktree-list.txt; agents/runs/hide-worktree-per-task/artifacts/runtime/B9-created-worktree/herdr-worktree-list.json)
B10 agent를 고르면 그 agent가 새 pane에 뜨고, 고르지 않으면 같은 자리에 터미널이 남는다 judge: 두 경우를 각각 실행한 전사와 각 pane의 상태 PASS PASS: Agent를 선택하지 않은 경우에는 터미널이 남고, 선택한 경우에는 새 pane에서 agent가 준비 상태가 됐다. 두 동작의 실행 전사와 pane 상태를 확인했다.
B11 생성이 성공하면 시트가 닫히고 새 worktree의 pane이 포커스를 받는다 check: swift test --package-path macos --filter WorktreeSheetTests green exit 0 at 2026-09-07T23:28:43.217Z
B12 이미 있는 브랜치명은 git의 문구로 거부되고 worktree도 pane도 남지 않는다 judge: 충돌을 유발한 실행 전사와 거부 직후의 git worktree list PASS PASS: 기존 브랜치 충돌 시 Git의 정확한 거부 문구가 표시되고, 실패 직후 existing 브랜치의 worktree나 pane 잔여물이 없으며 시트가 열린 채 유지된다. (HARNESS-OWNED B12 verdict; agents/runs/hide-worktree-per-task/artifacts/runtime/B12-existing-branch-refusal.log; agents/runs/hide-worktree-per-task/artifacts/visual/B12-existing-branch-refusal.png)
B13 이미 다른 worktree에 체크아웃된 브랜치는 git의 문구로 거부된다 judge: 그 충돌을 유발한 실행 전사 PASS PASS: 실행 전사에 exit 1과 Git의 정확한 'already used by worktree at' 거부 문구가 기록되어 있고, 구현은 해당 브랜치를 worktree 생성으로 넘겨 Git이 거부하도록 한다. (HARNESS-OWNED ROW LEDGER B13; herdr-core/src/worktree_control.rs; agents/runs/hide-worktree-per-task/artifacts/runtime/B13-checked-out-branch-refusal.log)
B14 브랜치 충돌이 아닌 herdr나 git의 다른 오류도 시트에 그 문구 그대로 한 줄로 보인다 check: swift test --package-path macos --filter WorktreeSheetSubmissionTests green exit 0 at 2026-09-07T23:28:44.437Z
B15 거부 뒤에도 시트가 열린 채 사유를 보여주고, 이름을 고쳐 다시 제출하면 성공한다 judge: 거부에 이어진 재시도 성공 전사 PASS PASS: 거부 사유가 표시된 시트가 열린 채 유지되고, 이름을 retry-ok로 수정해 재제출한 뒤 시트가 닫히며 체크아웃이 생성된다. (agents/runs/hide-worktree-per-task/artifacts/visual/B15-existing-failure-sheet/keep-0001.png; agents/runs/hide-worktree-per-task/artifacts/visual/B15-retry-created.png; agents/runs/hide-worktree-per-task/artifacts/runtime/B15-retry-after-refusal.log; herdr-core/src/worktree_control.rs)
B16 main worktree 행의 라벨은 브랜치와 무관하게 main worktree이고 실제 브랜치는 칩에 있다 check: cargo test --manifest-path herdr-core/Cargo.toml main_worktree_row_label green exit 0 at 2026-09-07T23:28:45.181Z
B17 브랜치가 base와 다르면 칩이 warning 색이고, 같으면 중립이며, base 미확인이면 중립이고 이탈을 주장하지 않는다 judge: 세 상태를 담은 실행 중 앱 스크린샷 PASS PASS: 실행 중 앱 스크린샷에 base와 같은 main의 중립 칩, base와 다른 feature의 warning 칩, base 미확인 브랜치의 중립 칩이 모두 확인된다. (agents/runs/hide-worktree-per-task/artifacts/visual/window-baseline/keep-0001.png)
B18 origin/HEAD도 사용자 설정도 없는 저장소에서 현재 체크아웃된 브랜치가 base로 승격되지 않는다 check: cargo test --manifest-path herdr-core/Cargo.toml base_branch_source_excludes_head_fallback green exit 0 at 2026-09-07T23:28:46.047Z
B19 main worktree 행 메뉴에 Start agent here가 없고, linked worktree 행 메뉴에는 있다 check: swift test --package-path macos --filter WorktreeMenuTests green exit 0 at 2026-09-07T23:28:47.239Z
B20 두 종류의 checkout 행 우클릭 메뉴 모두에 Set as base branch가 나타난다 check: swift test --package-path macos --filter WorktreeMenuTests green exit 0 at 2026-09-07T23:28:48.442Z
B21 Set as base branch를 고르면 그 프로젝트의 base branch가 바뀌고 행의 칩이 그에 맞게 갱신된다 check: cargo test --manifest-path herdr-core/Cargo.toml set_base_branch_from_checkout_row green exit 0 at 2026-09-07T23:28:49.459Z
B22 Copy Path가 그 worktree 경로를 클립보드에 넣고, Open in >이 Finder와 기본 에디터를 연다 judge: 메뉴 스크린샷, Copy Path 실행 후의 클립보드 값, Open in 실행 결과 PASS PASS: 메뉴에 Copy Path와 Open in >가 표시되고, 클립보드에 worktree 경로가 기록되었으며 Finder와 TextEdit 실행 증거가 등록되어 있다. (HARNESS-OWNED ROW LEDGER B22 PASS; keep-0001.png context-menu/openin-submenu screenshots; clipboard-after-copy-path.json; finder-windows.json; app-list-after-default-editor.json; textedit-windows.json)
B23 옮기기는 실행 전에 결과 문장을 보여주고, 그 문장이 그 폴더에서 돌고 있는 에이전트가 보던 내용이 바뀐다는 것을 말한다 judge: 결과 문장이 보이는 실행 중 앱 스크린샷 PASS PASS: 실행 중 앱의 확인 화면에 checkout 순서, pane·포커스가 이동하지 않는 점, 실행 중 에이전트가 main worktree의 변경된 파일을 보게 된다는 결과 문장이 명확히 표시된다. (agents/runs/hide-worktree-per-task/artifacts/visual/B23-migration-consequence-sheet/keep-0001.png; agents/runs/hide-worktree-per-task/artifacts/visual/B23-migration-consequence-sheet/ax-text.json)
B24 main worktree가 dirty하면 옮기기가 차단되고 이유가 보이며 저장소는 변하지 않는다 check: cargo test --manifest-path herdr-core/Cargo.toml migrate_branch_blocked_when_dirty green exit 0 at 2026-09-07T23:28:50.184Z
B25 옮기기가 성공하면 main worktree는 base branch를 체크아웃하고 있고 원래 브랜치는 새 worktree에 있다 check: cargo test --manifest-path herdr-core/Cargo.toml migrate_branch_moves_branch_to_worktree green exit 0 at 2026-09-07T23:28:56.366Z
B26 옮기기의 worktree 생성 단계가 실패하면 main worktree는 원래 브랜치로 돌아와 있고 새 worktree는 없다 check: cargo test --manifest-path herdr-core/Cargo.toml migrate_branch_restores_on_failure green exit 0 at 2026-09-07T23:29:07.886Z
B27 옮기기는 포커스를 옮기지 않고 실행 중 에이전트 pane도 옮기지 않는다 check: cargo test --manifest-path herdr-core/Cargo.toml migrate_branch_leaves_panes_and_focus green exit 0 at 2026-09-07T23:29:08.724Z
B28 detached worktree의 checkout 행은 브랜치 자리에 짧은 SHA와 detached를 보여주고 목록에서 사라지지 않는다 check: cargo test --manifest-path herdr-core/Cargo.toml detached_worktree_row_label green exit 0 at 2026-09-07T23:29:09.461Z
B29 scratch 폴더가 없는 상태에서 Scratch 채팅을 시작하면 폴더가 만들어지고 pane의 cwd가 그 폴더이며 프로젝트 트리에 새 행이 생기지 않는다 check: cargo test --manifest-path herdr-core/Cargo.toml scratch_chat_creates_folder green exit 0 at 2026-09-07T23:29:10.193Z
B30 Scratch 채팅을 반복해도 herdr 워크스페이스가 매번 새로 생기지 않고 기존 Scratch 워크스페이스에 탭이 추가된다 check: cargo test --manifest-path herdr-core/Cargo.toml scratch_chat_reuses_workspace green exit 0 at 2026-09-07T23:29:10.965Z
B31 응답 경로를 요청 경로와 다르게 주입하면 만든 것이 되돌려지고 실패가 보이며, 디스크·사이드바 checkout 행·herdr worktree 목록 세 곳 모두에 잔해가 없다 check: cargo test --manifest-path herdr-core/Cargo.toml created_path_mismatch_is_rolled_back green exit 0 at 2026-09-07T23:29:11.710Z
B32 Scratch 채팅의 폴더 생성이나 탭 생성이 실패하면 아무것도 남지 않고 어느 단계에서 실패했는지 보인다 check: cargo test --manifest-path herdr-core/Cargo.toml scratch_chat_cleanup_on_early_failure green exit 0 at 2026-09-07T23:29:12.532Z
B33 Scratch 채팅의 agent 시작이나 첫 메시지 전달이 실패하면 탭은 쓸 수 있는 셸 프롬프트로 남고 어느 단계에서 실패했는지 보인다 check: cargo test --manifest-path herdr-core/Cargo.toml scratch_chat_late_failure_keeps_tab green exit 0 at 2026-09-07T23:29:13.404Z
B34 worktree는 요청한 경로에 생겼는데 pane 생성 실패와 agent 시작 실패를 각각 주입하면 두 경우 모두 worktree가 남고 실패한 단계 이름이 보이며 그 행의 Start agent here로 재시도하면 agent가 뜬다 judge: 두 실패를 각각 주입한 실행 전사와 각각의 재시도 성공 전사 PASS PASS: 실제 주입으로 pane 생성 실패와 agent 시작 실패가 각각 표시되고, 두 경우 모두 worktree와 checkout 행이 유지되었다. 각 행의 재시도 후 agent가 interactive_ready 상태로 실행되며 입력 전사도 확인된다. (HARNESS-OWNED ROW LEDGER B34 PASS; 02-b34-pane-fail-start/12-pane-failure-visible.png; 02-b34-pane-fail-start/git-worktree-list.txt; 02-b34-pane-fail-start/herdr-pane-list.txt; 04-b34-pane-retry-after-path-fix/10-after-send.png; 04-b34-pane-retry-after-path-fix/herdr-agent-list-after.txt; 06-b34-agent-fail/11-agent-failure-visible.png; 06-b34-agent-fail/13-git-worktree-list-after-fail.txt; 06-b34-agent-fail/15-herdr-pane-list-after-fail.txt; 09-b34-agent-retry-clean-app/10-agent-list-ready.txt; 09-b34-agent-retry-clean-app/13-pane-read-ready.txt; 09-b34-agent-retry-clean-app/15-final-ui.png)
B35 Scratch 채팅이 제출부터 agent 시작과 첫 메시지 전달까지 여전히 동작한다 judge: 격리 herdr 서버에서 agent 세션 하나를 시작해 최소 첫 메시지 한 번을 주고받은 전사 PASS PASS: 실제 agent 세션이 Scratch 경로에서 한 번의 프롬프트를 받고 정확한 응답을 반환했다. Agent/pane 메타데이터로 준비 상태와 Scratch cwd를 확인했고, 실행 중 앱 화면과 관련 기계 검사도 함께 통과했다.
B36 경로 slug가 충돌할 때 herdr의 실제 동작이 기록되고, herdr가 기존 디렉토리를 조용히 재사용하면 hide가 거부한다 judge: 충돌을 만든 실행 전사와 그때 herdr가 돌려준 경로 PASS PASS: 실행 전사에서 feat/a가 feat-a 경로를 만든 뒤, 동일 경로를 사용하는 feat-a 생성이 exit 1과 'already exists' 오류로 거부되었다. 기존 디렉토리를 조용히 재사용하지 않는 herdr의 실제 동작이 기록되어 있다. (agents/runs/hide-worktree-per-task/artifacts/runtime/B36-slug-collision.log)
B37 Delete worktree…와 Remove registration의 문구가 각각 디스크 삭제와 등록 해제라는 결과를 스스로 말한다 judge: 두 확인 화면의 문구 전문 PASS PASS: 두 확인 화면의 문구가 각각 폴더 삭제와 등록 해제 결과를 명확히 설명한다. (agents/runs/hide-worktree-per-task/artifacts/visual/B37-delete-worktree-confirmation/keep-0001.png; agents/runs/hide-worktree-per-task/artifacts/visual/B37-remove-registration-confirmation/keep-0001.png; 각 ax-confirmation.json)
B38 새로 그린 시트·메뉴·칩이 HideTheme 토큰만 쓰고 색·간격 값을 호출부에 직접 쓰지 않는다 check: bash scripts/check-hide-theme-literals.sh green exit 0 at 2026-09-07T23:29:14.022Z
B39 새 UI가 공유 툴팁·키캡·배지 컴포넌트 규약을 따른다 check: bash scripts/check-hide-components.sh green exit 0 at 2026-09-07T23:29:14.703Z
B40 옮기기의 main worktree checkout 단계가 실패하면 저장소는 원래 브랜치 그대로이고 새 worktree는 생기지 않으며 실패한 단계가 보인다 check: cargo test --manifest-path herdr-core/Cargo.toml migrate_branch_checkout_failure_leaves_repo_untouched green exit 0 at 2026-09-07T23:29:15.448Z
B41 옮기기의 원래 브랜치 복구까지 실패하면 조용히 넘어가지 않고 저장소가 지금 어느 브랜치에 있는지와 사용자가 할 일을 문구로 밝힌다 check: cargo test --manifest-path herdr-core/Cargo.toml migrate_branch_restore_failure_reports_repo_state green exit 0 at 2026-09-07T23:29:16.166Z

Open Human Confirmations

  • None: every human: row is confirmed.

Verification Lanes

  • Acceptance lane: PASS
  • Fidelity lane: PASS
  • Risk lane: PASS
  • Score: 기계·판사: 41/41 PASS | suite: 3/3 GREEN

Delivery Staging

  • Mode: unknown
  • Branch: unknown
  • Base: main
  • Staging include: default allowlist
  • Staging exclude: default volatile paths

Changed Paths Planned For This PR

  • herdr-core/src/live.rs
  • herdr-core/src/model.rs
  • herdr-core/src/runtime.rs
  • herdr-core/src/session_sync.rs
  • herdr-core/src/wire.rs
  • herdr-core/src/workspace.rs
  • herdr-core/src/worktree_behavior_tests.rs
  • herdr-core/src/worktree_control.rs
  • herdr-core/src/worktrees.rs
  • herdr-core/tests/ffi_contract.rs
  • macos/Sources/HerdrMacOS/ChatComposer.swift
  • macos/Sources/HerdrMacOS/CoreBridge.swift
  • macos/Sources/HerdrMacOS/ExternalFileOpener.swift
  • macos/Sources/HerdrMacOS/GitWorktreesPresentation.swift
  • macos/Sources/HerdrMacOS/GitWorktreesView.swift
  • macos/Sources/HerdrMacOS/HideFormPicker.swift
  • macos/Sources/HerdrMacOS/HideTextButtonStyle.swift
  • macos/Sources/HerdrMacOS/HideUI.swift
  • macos/Sources/HerdrMacOS/RuntimeEnvironment.swift
  • macos/Sources/HerdrMacOS/ShellModel.swift
  • macos/Sources/HerdrMacOS/WorktreeTasks.swift
  • macos/Tests/HerdrMacOSTests/ChatComposerTests.swift
  • macos/Tests/HerdrMacOSTests/ChatLaunchFailureTests.swift
  • macos/Tests/HerdrMacOSTests/ExternalFileOpenerTests.swift
  • macos/Tests/HerdrMacOSTests/WorktreeTaskTests.swift
  • scripts/check-hide-components.mjs

Risks, Rollback, And Human Review

  • Risk review found and closed three issues: removal of a competing worktree after an ambiguous create failure, unsafe copyable recovery text, and ignored-file overwrite during branch checkout.
  • Both migration checkouts now use --no-overwrite-ignore; ambiguous create failures do not remove unowned worktrees; recovery guidance is descriptive rather than executable shell text.
  • Rollback is the ordinary PR revert. There is no schema, persistent-data, authentication, or dependency migration to unwind.
  • No required check is unrun or blocked. The receipt records 41/41 behaviors passing, 3/3 suites green, and acceptance, fidelity, and risk lanes passing.
  • The remaining human task is review of product interpretation and copy. No merge is requested by this PR.

Tokenized New worktree sheet

Checkout row base states

Branch migration consequence sheet

Scratch round trip in the running app

@yansfil
yansfil merged commit 719b1e5 into main Sep 8, 2026
5 checks passed
@yansfil
yansfil deleted the gen-prd/hide-worktree-per-task branch September 8, 2026 00:09
yansfil added a commit that referenced this pull request Oct 15, 2026
## Summary

- 문제: PR이 어디서 막혔고 지금 누구 차례인지 알려면 Overview의 PRs 탭과 세션 목록을 오가며 직접 따져야
했습니다.
- 바뀐 것: 오른쪽 레일(`Work · 기억 · 파일 · 변경`)의 맨 위에 Work 도구가 생겼습니다. 아이콘은 칸반
보드이고, 프로젝트 도구(Work, 기억)와 체크아웃 도구(파일, 변경) 사이에 짧은 구분선이 있습니다. 레인 머리말은 이름 뒤에
범위 아이콘(프로젝트는 폴더, 체크아웃은 브랜치)을 보여 줍니다. Work 안의 `Sessions | PRs` 스위치에서 PRs는
"누구 차례인가"로 묶이고 행마다 이유 한 줄이 붙습니다. 지금 내가 움직여야 하는 수는 레일의 Work 아이콘에 숫자로
보입니다.
- 행을 누르면 `PR #N` 결정 카드가 파일 도구의 View 탭으로 열리고(레일이 Work에서 파일로 바뀜), 그 PR의
에이전트가 있으면 앞으로 옵니다. Work 아이콘을 다시 누르면 목록으로 돌아옵니다.
- 카드의 Merge와 브랜치 업데이트는 이 앱의 첫 GitHub 쓰기입니다. 확인을 한 번 거치고, 카드가 보여 준 head
커밋에만 나가며 목록이 본 head와 다르면 보내지 않습니다.
- 옛 Overview PRs 탭, `PullRequestsView`, `PrPanel`, 옛 보드 규칙은 지웠습니다.

![레일의 Work 아이콘에 숫자 3, 오른쪽 파일 도구에 PR #31 결정 카드(머지할 수 있는 PR이라 Merge가 주
버튼)](https://github.com/yansfil/pr-assets/blob/main/hide/work-tab-pr-lens/204f5ad/lane-card-ko-dark.png?raw=true)

<sub>다크, 한국어. 레일의 Work 아이콘 숫자는 내 차례인 PR 3개입니다.</sub>

![Work 목록(영어,
라이트)](https://github.com/yansfil/pr-assets/blob/main/hide/work-tab-pr-lens/204f5ad/lane-work-en-light.png?raw=true)

<sub>같은 레일에서 Work 도구를 연 모습(영어, 라이트).</sub>

![레일의 구분선과 머리말 범위 아이콘: Work(폴더)와
파일(브랜치)](https://github.com/yansfil/pr-assets/blob/main/hide/work-tab-pr-lens/d552289/rail-scope-light.png?raw=true)

<sub>왼쪽 Work 머리말은 폴더, 오른쪽 파일 머리말은 브랜치 아이콘이고, 레일은 기억과 파일 사이에 구분선이
있습니다.</sub>

## Review

- **판단해 주세요**: GitHub가 `UNSTABLE`(필수 아닌 검사 실패)을 줄 때 머지 가능으로 보는 것(D-20).
- **판단해 주세요**: Merge 버튼은 내가 올린 PR에만 보입니다. 남의 PR은 리뷰 버튼만 있습니다.
- **판단해 주세요**: 원격 기기로 연 프로젝트의 PR은 카드 대신 GitHub을 엽니다.
- **판단해 주세요**: 그룹 이름(`Needs You` 등)은 PRD 이름 그대로 모든 언어에서 영어입니다.
- **조심해서 볼 파일**: `hide-node-link/src/gh.rs` - 쓰기 둘은 정확한 모양만 허용하는 gh 허용
목록(failure path).
- **조심해서 볼 파일**: `herdr-core/src/runtime/pull_requests.rs` - 쓰기 경로, 목록
head와 다르면 거절, 모든 gh 호출은 워커(runtime mutex 밖).
- **조심해서 볼 파일**: `herdr-core/src/agent_state/work/board.rs` - 그룹과 이유를
정하는 규칙(Blocked는 내 PR·내 세션·봇만).
- **조심해서 볼 파일**: `herdr-core/src/runtime/request_view.rs` - 60초 재조회
범위(high-frequency path).
- **조심해서 볼 파일**: `web/src/PrCard.tsx`, `web/src/prCardModel.ts` - 확인 창이
보여 준 head에 고정되는 규칙.
- **비용 검토**: 5분 목록 읽기에 읽기 3개(로그인, 리뷰 요청 검색, 사실 조회)가 늘고 행당 비용은 없습니다. 카드는
열 때와 head가 바뀔 때 GraphQL 1회, 최대 8장.
- **비용 검토**: 60초 재조회는 Work 목록의 PR이나 에이전트 PR의 검사가 도는 프로젝트만,
Work/Sessions/카드가 보일 때만 돕니다. 카드 본문은 코어에서 2만 자로 자릅니다.
- **판단해 주세요**: 카드를 열면 레일이 파일 도구로 바뀌어 Work 목록이 가려지고, 목록은 Work 아이콘으로
돌아갑니다(승인된 레일 매핑).
- **조심해서 볼 파일**: `herdr-core/src/workspace_views.rs` - 저장된 도구 값
`agent_sessions`는 읽기만 하고 `work`로 다시 씁니다(`Tool::parse`는 `work`만 받음).

## Evidence

- **확인한 것**: Rust `nextest` 4637개 전부 통과(리뷰 수정 전 head), 최종 head에서
`verify-cargo.sh test`와 `lint` PASS. 웹은 vitest 1562개, `tsc`, eslint와 e2e
크기 예산, Playwright `work-prs` 6개 전부 통과.
- **확인한 것**: 실제 GitHub(`yansfil/gittest`)에서 PR 5개로 목록 묶음과 이유, 충돌 PR의
Merge 비활성, head가 바뀐 PR의 거절(`head_moved`)과 다시 보기 후 머지,
`--match-head-commit` 머지, 브랜치 업데이트의 낡은 sha 거절(422)과 올바른 sha 성공을 확인했습니다.
- **확인한 것**: Electron 후보(격리한 Herdr와 hided)에서 en/ko/ja/zh-CN, 라이트/다크 렌더러
캡처. 유휴 hided CPU는 Sessions와 PRs 모두 30초에 0.19초, 카드 60번 열기에 0.53초(단일 측정,
하드웨어 하나).
- **확인한 것**: 레일 이식 후 Electron 데스크톱 호스트 캡처(ko/en, 라이트/다크): 레일의 Work 숫자,
Work 목록, 파일 도구의 카드, 가장 좁은 폭. 웹 렌더러 캡처는 ko/en/ja/zh-CN. `work-prs` e2e
6개와 `workCounts` 중복 제거 vitest 통과.
- **확인한 것**: 네이티브 Fidelity·Code·Security 리뷰를 받아 Fix now를 모두 고쳤습니다(아래
Verification record).
- **확인한 것**: Pen `Screen / Work` 시트와 `Screen / Workspace`를 레인 모양으로
맞췄습니다. 레일, 레인 헤더, `PR #N` 탭은 `Component / Workspace columns`의 부품
참조이고(복사본 없음), 레일은 `Work · 기억 · 파일 · 변경`(기억과 파일 사이 구분선)과 Work 경고 배지, 레인
머리말의 범위 아이콘, 목록 레인은 최소 폭 360입니다. `check-design-contract`와 디자인 node 테스트
84개 통과. `design-review.mjs review`(right-lane, work 상태, 라이트/다크, 1456과
1040 폭)는 PASS이고, 실제 화면과 Pen을 나란히 본 결과 구조(레일 숫자, Work 헤더, Sessions | PRs
스위치)가 맞았습니다. 갤러리 장면의 머리글은 영어(`Work · all of hide`)라 글자는 다릅니다.
- **확인하지 못한 것**: ja/zh-CN 목록과 카드의 레일 폭 캡처, 레일 툴팁 캡처.
- **확인하지 못한 것**: 머지 큐 저장소, UI에서 BEHIND 브랜치 업데이트(gittest에 최신 브랜치 규칙이 없어
argv만 직접 확인), Windows와 Linux 실행(Windows gh 경계 테스트는 unix 전용이라
`docs/INSTALL.md`에 빈칸으로 적음).
- **확인하지 못한 것**: PR이 수백 개인 프로젝트, 실제 GitHub 지연, 원격 기기 프로젝트, 실제 hide-ai 요약
호출, 1440pt 네이티브 창에서 Work 목록(Tools가 접힘), OS 창 캡처(배경 창이라 거부되어 렌더러 캡처만).
- **생성물**: `design/hide-screens.pen`의 `Screen / Work` 7장은
`scripts/pen-transplant.mjs`와 `gen-screens.mjs`가 만들었습니다.

<details><summary>추가 증거</summary>

![같은 화면, 다크
테마](https://github.com/yansfil/pr-assets/blob/main/hide/work-tab-pr-lens/0b0f71d/work-card-and-list-dark.png?raw=true)

<sub>같은 화면, 다크 테마.</sub>

![레일 이전 빌드에서 Tools를 가장 좁게(260px) 줄인 일본어 화면: 탭 이름과 이유 줄이 잘리지
않는다](https://github.com/yansfil/pr-assets/blob/main/hide/work-tab-pr-lens/0b0f71d/work-list-narrow-ja-dark.png?raw=true)

<sub>레일 이전 빌드에서 Tools를 가장 좁게(260px) 줄인 일본어 화면. Work 탭 이름과 이유 줄이 잘리지
않습니다(옆 탭 이름은 기존 도구 이름이라 그대로 줄임표).</sub>

</details>

## Breaking change

- 저장된 `workspace-views.json`에 `tool: "work"`가 들어갑니다. 이전 빌드는 이 값을 읽지 못해
파일을 옆으로 치우고 기본값으로 시작합니다. 옛 값 `agent_sessions`는 이 빌드가 계속 읽습니다. 운영자가 할 일은
없습니다.

<details><summary>Verification record</summary>

- PRD: `agents/prd/work-tab-pr-lens/prd.md` (sha256
541050d0f6da59c342df0a94b2dc0f6e8cdf748cfeb8ff7dca3495de9f7b72fd,
amendment 1 D-34 moves Work onto the right lane)
- Base 8d2f793 → head 204f5ad, verified 2026-10-15T03:31:54.779Z: PASS
- Verification report:
`agents/runs/work-tab-pr-lens/verification-report.json` and
`agents/runs/work-tab-pr-lens/verification-report.md`; source
fingerprint
f83ebe9d09d243c259306cee5a29fd699ac155bd53eba8c544c8c1ed5bea7e1b
- Suites:
  - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0)
  - S2: GREEN `bash scripts/verify-cargo.sh lint` (exit 0)
- Reviews (advisory, run on committed heads):
- Fidelity: first review d903651, 8 Fix now (B44 re-read scope,
threads failure line, Merge's reason, printed-address sessions, stale
evidence, row menu on Blocked and merged rows, dead code and keys,
conflict re-read) all fixed; 515fbbf: 2 more (B48 clipping at 260 px,
an automatic read dismissing a refusal) fixed; 0b0f71d: no Fix now.
Follow-ups: ja names of the other tabs still clipped at 260 px, a
threads placeholder while unread, B26 time, path spelling in the re-read
match.
- Code: first review d903651, 6 Fix now (write on a head the list did
not judge, B44 for PRs without an agent, merged cards never read, two
desktop specs on the old selector, request-view demand as one boolean,
dead whole-store subscription) all fixed; 515fbbf: re-read scope too
broad, fixed; 0b0f71d: no Fix now. Follow-ups: body cut marker, no 60
s re-read for node projects, GHE host and viewer login, `BLOCKED` of an
approved PR read as `assign_reviewer`.
- Security: first review d903651, 2 Fix now (head the list did not
judge, confirmation not frozen) fixed; 515fbbf and 0b0f71d: no Fix
now. Follow-ups: the head guard passes when the list has no `head_oid`,
per-project backoff for the 60 s re-read, core-side checks of `mine` and
allowed methods, the review agent's "do not merge" is a prompt,
`pr_summary` redaction patterns, check-log URL host.
- Follow-up review on a5f19cb (after the observer's two findings: a
refused write keeps Merge off until Look again; a merge Hide saw succeed
reads as merged at once) and the third merge of main: Security no Fix
now; Fidelity 1 Fix now (the refusal gate also blocked retrying a
transient failure) and Code 3 Fix now (a failed read dropped the merged
mark, its time was re-stamped on every read, a node's merge could mark a
local PR) all fixed in 8970693; not reviewed again. Follow-ups: the
merged mark does not cover a node's project, is lost if the card was
evicted before the write finished, and `ingest_pr_write` skips the store
save and worktree projection of a normal answer; a merge queue that
ejects the PR within 10 minutes reads merged until then; the gate on a
refused write is UI only (the head condition still protects the write);
`already_merged` is matched on `gh`'s text.
- Lane port (amendment 1, on f0d970a): Fidelity no failing behavior (1
Fix now: B4 had no test); Code 5 Fix now (misplaced doc comment,
schema-2 `work` half-handled, tests still sending `agent_sessions`, B4
test, stale text: contracts README, dead i18n key, toolbar menu id,
ARCHITECTURE line) all fixed in 204f5ad; the last commit was not
reviewed again. Follow-ups: rail count is computed on every snapshot,
`pr_open` test should start from a lane on Work, command title "Toggle
Tools", older builds move aside `workspace-views.json` holding
`tool:"work"`.
- After the verified head 204f5ad: main merged (d362e55), the three e2e
spec fixes from CI triage (s6 Work menu id, the node fake gh reads, the
Memory PR button), the narrow-lane spec's showTool, and the Pen redraw;
these were checked by CI, not by a new `sasu implement verify`, and were
not reviewed again.
- Verify note: two earlier runs on this head failed on different
unrelated tests (`sqlite: disk I/O error` in hide-factory, `socket open`
in hided mobile) while the disk was 100% full and load above 25; each
passes alone and the third run passed.
- Live: PR #7 in yansfil/gittest merged through the card against real
GitHub left Needs You and the card drew no Merge. Update branch through
the card is still not driven live (no up-to-date rule in gittest, and
GitHub was unreachable when adding one).
- Evidence: none registered separately.
- Changed paths: 129 (see Files changed)
- Delivery: mode pr, branch `gen-prd/work-tab-pr-lens`, base `main`

</details>
yansfil added a commit that referenced this pull request Oct 16, 2026
…ails (#1236)

Closes #1189

## Summary

프로젝트의 PR 읽기는 PR 목록 말고도 세 가지를 더 묻습니다: 로그인한 계정, 나에게 온 리뷰 요청, 머지 큐 자리입니다.
지금은 이 셋 중 하나만 실패해도 그 프로젝트의 PR이 앱 어디에도 보이지 않았습니다.
이제 PR 목록이 읽히면 읽기는 성공입니다. 실패한 질문에 기대던 판정(내 PR인지, 나나 우리 팀에 리뷰가 요청됐는지, 큐에
있는지)만 "모름"으로 남습니다.
판정할 수 없는 PR은 자기가 속할 수도 있는 그룹이 아니라 평범한 Waiting에 두고, 그 줄에 무엇을 알 수 없는지
적습니다. 배너나 시트는 없습니다.
PRs 옆 ⚠는 그대로 쓰고, 툴팁이 어떤 질문을 못 읽었는지 말합니다.
이 PR은 PRD work-tab-pr-lens D-25의 "하나라도 실패하면 읽기 전체 실패" 규칙을 대체합니다. D-25는
로컬 PRD라 이 본문에만 적습니다.

![머지 큐를 못 읽었을 때: 목록은 그대로고 ⚠ 툴팁이 이유를
말합니다](https://github.com/yansfil/pr-assets/blob/main/hide/fix-1189-pr-extra-queries/1735e97/work-prs-unread-merge-queue-light.png?raw=true)

머지 큐만 못 읽은 경우입니다. 큐에 있을 수 있는 #31, #32만 `Not judged`로 Waiting에 앉고, 충돌
PR(#34)과 리뷰 PR(#33)은 그대로 판정됩니다.

## Review

- **판단해 주세요**: 판정할 수 없는 PR을 어디에 둘까요. 저는 평범한 Waiting을 골랐습니다. Needs You는
"내 차례"라는 뜻이라 틀리게 말할 수 있고, Blocked는 "고쳐야 함"이라 틀립니다.
- **판단해 주세요**: 그 줄은 `Not judged · can't tell if it is yours`처럼 읽힙니다. 같은
모양으로 `checking`(머지 상태 확인 중)이 있어 흐린 색을 맞췄는데, 더 조용하거나 더 분명하게 하고 싶은지 봐 주세요.
- **판단해 주세요**: 계정을 못 읽으면 세션이 닿지 않은 내 PR 후보 전부가 Waiting으로 가서 Needs You가
비고, Work 아이콘 숫자도 비어 있습니다. 숫자를 틀리게 세는 것보다 낫다고 봤습니다.
- **조심해서 볼 파일**: `herdr-core/src/github.rs` - 세 질문을 따로 묻고, 목록이 이미 정한
것(요청이 내 이름을 부르는 경우)은 계속 정합니다. `review_ask`의 표가 그 규칙입니다.
- **조심해서 볼 파일**: `herdr-core/src/agent_state/work/board.rs` - `listed`와
`standing`이 "모름"을 "아님"으로 읽지 않는 자리입니다.
- **조심해서 볼 파일**: `herdr-core/src/runtime/projects.rs` - 뒤 읽기가 실패해 지난 목록을
남길 때 안 읽힌 질문 이름도 같이 남깁니다. 지난 목록을 남기는 동작 자체는 바꾸지 않았습니다.
- **조심해서 볼 파일**: `herdr-core/src/github_store.rs` - 저장 파일 스키마를 2로 올렸습니다.
옛 파일은 버려지고 다음 읽기가 새로 씁니다.
- **질문**: 이 질문들이 실제로 얼마나 자주 실패하는지는 아직 근거가 없습니다. 그럴듯한 원인은 GitHub
Enterprise의 GraphQL 차이, 좁은 토큰, 요청 한도입니다. 빈도는 주장하지 않습니다.

## Evidence

- **확인한 것**: Rust 단위 테스트가 질문 셋을 하나씩, 그리고 셋 모두 실패시켰을 때 각 PR의 판정을
확인합니다(`github.rs` 8개, `board.rs` 4개, 런타임 1개). 기대값은 구현이 아니라 규칙 표에서 적었습니다.
- **확인한 것**: 가짜 `gh`로 Playwright 4개가 질문별로 실패시킨 뒤 목록, 그룹, 이유 줄, ⚠의 접근 이름과
툴팁 문구를 확인합니다(`web/e2e/work-prs.spec.ts`, macOS, 파일의 10개 모두 통과. main을 합친
뒤에는 새 4개만 다시 돌렸습니다).
- **확인한 것**: `verify-cargo.sh test -p herdr-core`, `lint`,
`verify-web.sh web typecheck`, `lint`, `test`와 `check-no-attribution`,
`check-no-workstation-identity`.
- **확인한 것**: `hided`의
`opener_lifecycle::thirteenth_quick_launch_is_over_budget`가 전체 실행에서 한 번
실패했고 단독 실행에서는 통과했습니다. 이 변경과 무관한 시간 예산 테스트로 보지만 원인은 따로 보지 않았습니다.
- **확인하지 못한 것**: 실제 GitHub나 GitHub Enterprise, 실제 `gh`의 실패 모양. 실패는 가짜
`gh`의 종료 코드로만 만들었습니다.
- **확인하지 못한 것**: 설치된 앱과 Windows, Linux. 이 변경은 플랫폼 코드를 건드리지 않아 CI의
Windows와 Linux 레인에 맡깁니다.
- **확인하지 못한 것**: 일본어와 중국어 문구는 번역 검토를 받지 않았습니다. 영어와 한국어만 화면으로 봤습니다.

<details><summary>추가 증거</summary>

![세 질문이 모두 실패: 목록 전체가 Waiting에 있고 툴팁이 셋을 모두
말합니다](https://github.com/yansfil/pr-assets/blob/main/hide/fix-1189-pr-extra-queries/1735e97/work-prs-unread-all-light.png?raw=true)

세 질문이 모두 실패한 경우입니다. 초안, 봇, 머지된 PR은 목록만으로 정해져 그대로입니다.

</details>
yansfil added a commit that referenced this pull request Oct 16, 2026
…m the tools (#1273)

## Summary

- PR 카드가 우측 레인에 뜨면 rail 맨 위에 버튼이 하나 생기는데, PRs 도구와 같은 회색 PR 아이콘이라 도구가 두
개처럼 보였다.
- 승인된 설계(Task lens C, E, I)는 이 버튼을 PR 상태의 아이콘과 색(머지 가능 초록, 머지됨 보라 등)으로
그리고 아래에 짧은 구분선을 둔다. 코드가 둘 다 빠뜨렸다.
- 수정: 버튼과 레인 머리줄의 마크를 카드 PR의 상태 마크로 그리고, 버튼 아래에 도구와 가르는 선을 하나 둔다. 세션 기록은
지금처럼 문서 아이콘이다.

![rail 확대: 왼쪽 before, 가운데 after(라이트), 오른쪽 after(다크). 맨 위 버튼이 초록 PR 마크로
바뀌고 아래에 선이
생김](https://github.com/yansfil/pr-assets/blob/main/with-hide/hide/detail-slot-rail-mark/54e344b/rail-zoom.png?raw=true)

## Review

- **판단해 주세요**: 맨 위 버튼이 PRs 도구와 충분히 구별되는지(색과 선만으로 구별, 모양은 상태가 열린 PR이면 같은
glyph).
- **조심해서 볼 파일**: `web/src/DetailPanel.tsx` - `DetailIcon`이 목록의 PR 상태를
읽는다; 목록에 없는 PR은 상태 없이 기본 glyph를 그린다.

## Evidence

- **확인한 것**: `work-prs.spec.ts` 카드 테스트가 rail 순서 `detail, 구분선, memory,
prs, 구분선, files, changes`와 마크 상태(#31 mergeable, #37 merged)를 확인.
- **확인한 것**: `work-prs`, `right-lane`, `link-graph` e2e 20개, web lint,
web unit 1717개 통과(로컬, pinned Herdr 0.9.3).
- **확인한 것**: e2e 캡처로 라이트/다크 둘 다 Pen 설계(`보기 · PR #1217`:
`$--pr-mergeable` glyph, `보기 | tools divider`)와 맞음을 눈으로 확인.
- **확인하지 못한 것**: 데스크톱 앱 네이티브 화면 캡처는 하지 않았다(같은 웹 셸을 브라우저로 확인).

<details><summary>추가 증거</summary>

레인 전체: 왼쪽 before, 가운데 after 라이트, 오른쪽 after 다크. 머리줄의 `PR #31` 마크도 상태 색으로
바뀜.

![before
after](https://github.com/yansfil/pr-assets/blob/main/with-hide/hide/detail-slot-rail-mark/54e344b/before-after.png?raw=true)

</details>
HyunjunJeon pushed a commit to HyunjunJeon/hide that referenced this pull request Nov 9, 2026
…e#2262)

Related: with-hide/hide-private#744 (짝이 되는 설계 문서 PR)

## Summary

한 체크아웃에 Agent 탭이 여럿일 때, 탭 A에서 연 PR 카드가 탭 B로 가도 그대로 따라와 있었습니다.
이제 보기 슬롯의 카드(PR 카드, 세션 기록, 계획, 워크트리 표, 비용)는 연 순간 앞에 있던 Agent 탭의 것입니다.
탭을 옮기면 그 탭의 카드가 보이고, 없으면 체크아웃의 문서/탐색기만 보입니다. 돌아오면 카드와 ← 기록이 그대로입니다.

![Before: tab second in front still shows tab 1's PR with-hide#31
card](https://github.com/yansfil/pr-assets/blob/main/hide/fix-slot-per-tab/7bdab72/slot-before-second-tab.png?raw=true)
![After: tab second in front, no card
follows](https://github.com/yansfil/pr-assets/blob/main/hide/fix-slot-per-tab/7bdab72/slot-after-second-tab.png?raw=true)

위가 이전, 아래가 이후입니다. 둘 다 `second` 탭이 앞에 있고, 이전에는 Tab 1에서 연 PR with-hide#31 카드가 오른쪽에
남아 있습니다.

## Review

- **판단해 주세요**: 이전 빌드가 창 하나로 저장한 슬롯은 처음 앞에 오는 탭에 붙습니다(결정 7, 단순함을 위해 고른
가정).
- **판단해 주세요**: 나갔다 들어온 탭의 카드는 그 카드가 가리키는 PR/기록을 다시 읽습니다.
- **조심해서 볼 파일**: `hide-core/src/runtime/detail.rs` - `sync_detail_home`이
모든 이벤트 끝(`terminal.rs`)과 기기 세션 도착(`session.rs`)에서 돕니다.
- **조심해서 볼 파일**: `hide-core/src/node_migration.rs` - 핵심 이동이 새 필드의 기기/탭
id를 옮기도록 키 표에 5줄을 더했습니다. 빠지면 이동이 거부됩니다.
- **조심해서 볼 파일**: `hide-core/src/persistence.rs`, `runtime/events.rs` - 새
필드(`detail_home`, `detail_tabs`)는 코어 전용이고 와이어에는 나가지 않으며, 셸의 전체 상태 저장이
지우지 못합니다.
- **비용 검토**: 이벤트당 추가 일은 앞 탭 id 조회 한 번이고, 슬롯의 집이 앞 탭이고 다른 슬롯이 없으면 거기서
끝납니다. 저장은 슬롯이 실제로 바뀔 때만 합니다.
- **비용 검토**: 슬롯 수는 열린 탭 수 이하(탭이 닫히면 사라짐), 슬롯마다 기존 상한 20개입니다.
- **비용 검토**: 기기의 탭은 그 기기의 세션이 도착해 "없다"고 말할 때만 닫힌 것으로 봅니다. 오프라인 기기의 슬롯은
남습니다.

## Evidence

- **확인한 것**: `hide-core` 전체 4149개 테스트 통과, clippy와 fmt 깨끗, 웹 typecheck와
lint(e2e 크기 예산 포함) 통과.
- **확인한 것**: 실제 hided에서 도는 e2e(`work-prs.spec.ts`)가 카드 열기, 두 번째 탭으로
이동(카드와 슬롯 버튼 없음), 돌아오기(카드 있음)를 확인합니다.
- **확인한 것**: 같은 e2e는 수정 전 코어로 빌드한 hided에서 실패하고(카드가 따라옴), 수정 후 통과합니다. 이전
캡처가 그 실패 상태입니다.
- **확인한 것**: 코어 테스트가 탭별 슬롯, 닫힌 탭의 슬롯 삭제, 기기 탭 슬롯 보존, 이전 빌드 슬롯 흡수, 저장/복원,
코어 이동 키를 확인합니다.
- **확인하지 못한 것**: 실제 기기(원격) 탭에서의 흐름과 Electron 데스크톱 앱 캡처. 기기 쪽은 단위 테스트로만
확인했습니다.
- **확인하지 못한 것**: 웹 e2e 전체와 Windows/Linux 레인(CI에 맡김). 변경은 플랫폼에 의존하지 않는 코어
로직입니다.
- **확인하지 못한 것**: `scripts/release_state/scenario.py`에 새 필드를 넣는 단계는 더하지
않았습니다.

<details><summary>추가 증거</summary>

![After: the card stays in the tab it was opened in (Tab
1)](https://github.com/yansfil/pr-assets/blob/main/hide/fix-slot-per-tab/7bdab72/slot-after-first-tab.png?raw=true)

Tab 1에서는 카드가 그대로 있습니다.

</details>

<details><summary>Verification record</summary>

- base `5c34fa4c9`, 코드 리뷰 subagent 1회: Fix now 6건(기기 탭 슬롯 삭제, 같은 이벤트의
열기와 탭 이동, 기기 세션 도착 시 동기화, 이벤트당 비용, 코어 이동 키, B22 문장)을 모두 반영했습니다.
- Follow-up(이 PR 밖): Workspace가 없을 때 연 항목은 마지막 앞 탭의 슬롯에 들어갑니다(결정 6 그대로).
탭 전환 때 맨 위 항목을 다시 읽는 비용. 한쪽만 슬롯이 있는 탭 전환 뒤 ⌘E가 한 번 더 필요한지는 확인하지 않았습니다.

</details>
HyunjunJeon pushed a commit to HyunjunJeon/hide that referenced this pull request Nov 12, 2026
Related: with-hide#2451; paired design update: with-hide/hide-private#870.

## Summary

A plan can now leave one node's merge to the operator while the rest of
the mission continues.
That node finishes when its PR is green and approved, then appears in
Your turn with its merge action.
PR-scope missions keep their existing quiet readiness behavior and
closing report.

![Light: before readiness on the left, operator merge turn on the
right](https://github.com/yansfil/pr-assets/blob/main/hide/feat-mission-merge-owner/6c438ca/comparison-light.png?raw=true)
Look at Your turn: the merge appears only after the PR becomes ready.

![Dark readiness
transition](https://github.com/yansfil/pr-assets/blob/main/hide/feat-mission-merge-owner/6c438ca/comparison-dark.png?raw=true)
Before readiness is on the left; the ready node's operator merge is on
the right.

![Needs You keeps open PR 31 after the last held PR 37
merged](https://github.com/yansfil/pr-assets/blob/main/hide/feat-mission-merge-owner/6c438ca/turn-sidebar-light.png?raw=true)
Merge turns name the latest still-open held PR and `+N` for the others;
the report names all open PRs.
Map-card strips, stations and headers belong to a separate change.

## Review

- **Decide**: Check the existing turn card's merge wording and the quiet
PR-scope captures in Light and Dark.
- **Risky files**: `mission_health.rs`, `runtime/missions.rs`,
`mission_landing.rs`: completion, landing and device count.
- **Risky files**: `agent_state/tally/phone/missions.rs`, `snapshot.ts`:
additive phone and desktop projection.
- **Cost**: Bounded reads of existing nodes/PRs during mission
publication; no new worker, timer, queue or I/O.
- **Risky files**: `MissionTurn.tsx`, `MissionScreen.tsx`,
`missionList.ts`, sidebar and phone: use the same open PR selection,
including when the last held PR settled.
- **Compatibility**: Storage and wire additions are optional. Old
records keep scope behavior; old builds ignore/drop the override and
cannot honor it. The retained old phone bundle lists and opens a real
new-core frame.

## Tests

- **Layer**: Runtime completion/landing and wire tests, shared
desktop/phone rules, and two fake-GitHub browser flows.
- **Catches**: Readiness mistaken for merge, early/noisy turns, a
missing device count, or a scope-PR readiness turn. Also catches a
report/turn naming a merged or closed last PR while an earlier held PR
stays open.
- **Repeat**: Final candidate: 248 filtered Rust and 149 focused web
tests passed. Two isolated browser scenarios passed twice each (4/4),
including the open-31/merged-37 regression. [CI
checks](https://github.com/with-hide/hide/pull/2459/checks) will rerun
on push.
- **Waits**: Existing catalog, CLI and GitHub observation helpers; poll
node completion and visible UI, with no sleeps.

## Evidence

- **Verified**: Plan owner/reason, readiness turn/count, quiet PR scope,
report and GitHub-driven settlement.
- **Verified**: Real candidate daemon, private fixture state, real
git/local bare origin, and fake GitHub; two flows passed twice each.
- **Verified**: Formatting, lint, design contract, enum contract,
generated-type reproduction and attribution checks.
- **Not verified**: Final-head CI, native window, physical phone,
production relay/GitHub and Windows/Linux runtime.
- **Not verified**: Operator visual approval and independent review
remain with the mission's designated reviewers.

<details><summary>More evidence and compatibility</summary>

The plan accepts `operator_merge` on a merge-scope change delivered by
PR, with a trimmed one-line reason of 1-80 characters.
Omitting the value keeps it; `null` clears it.
The CLI and Conductor guide name the scope exception.
This stays `landing: left/merge`, never a gate; only a GitHub merge
settles it.
A ready exception contributes one mission Needs You item, including the
device count.
Scope `pr` adds no readiness turn/count/badge/notification; its
pre-existing `merge_wait` landing actions remain.

Record schema stays 4, with optional `operator_merge` omitted from old
records.
Released-state fixtures keep their published state through the first
evaluation.
An older build accepts a new record by ignoring the unknown field and
can drop it on save; its scope rules may merge this PR.
Downgrading while relying on the override is therefore not a supported
safety guarantee.

The wire adds optional `node.merge` (`by`, optional `why`, `state`,
`prs`) and PR `base`.
New enum families are added without renaming or removing old values.
The phone explicitly projects these fields; old phone code ignores them,
and new phone code accepts their absence.
`merge.prs` carries only held PRs GitHub last read open, in held order;
older cores omit it and keep their previous display.
Mission rest is an existing schema gap owned by `snapshot.ts` under
`web/AGENTS.md`; declared-frame generation reproduces without changes.
The retained pre-change `/p/5` bundle received an actual new-core
mission frame containing `merge.state=due` and `merge.prs=[31]`, then
listed and opened that mission without a page error.
This browser smoke served the unchanged archived bytes through the
isolated daemon with direct pairing; production relay and a physical
phone were not exercised.

Baseline cells touched, from the supplied inventory:

| Cells | Preserved behavior and extension |
| --- | --- |
| B-1, B-2 | PR readiness and default merge completion remain; only an
explicit merge-owner exception finishes ready. |
| B-7, B-8 | Unsettled landing closes `merge_wait`; GitHub merge settles
it and closes without a Hide action. |
| B-13, B-15 | Existing landing proof and ordering remain; merge targets
and report use only still-open held PRs. |
| B-20, B-21, B-22 | Stale/missing reads do not complete work; required
evidence and follow-up PR behavior remain tested. |
| B-40, B-42 | Add only the explicit ready-node turn; retain existing
closed/merge-wait actions and report. |
| B-44, B-45 | Phone uses the shared optional merge projection; existing
gate and folded-step tests remain green. |
| B-46, B-47, B-48, B-55 | Optional storage addition retains
schema/defaults, migrations, profiles and old records. |
| B-50, B-51, B-54 | Extend existing snapshots with merge
owner/state/reason and PR base; do not replace prior fields. |

No pull-at-close or worktree-cleanup behavior changes here.

</details>

<details><summary>Verification record</summary>

Base: `04c0b2d3bce6`; candidate:
`6c438ca61e5cd8507f66bcc1ac16fcecc9369884`.
The final candidate fixes multi-PR selection in reports and merge turns;
it retains the per-node readiness and quiet scope-PR rules.

- Filtered `hide-core` library tests: 248 passed (mission
runtime/health/landing, record/phone, wire enums).
- Six focused web/map/list/sidebar/phone unit files: 149 passed.
- `mission-merge-owner.spec.ts`: 4 passed (two scenarios repeated
twice), real isolated daemon plus local bare origin and fake GitHub.
- `fmt-check`, filtered core clippy, web typecheck/lint/bundle, design
contract, timed-wait policy, harness-ignore and attribution: passed.
- Declared-frame generation with install overrides unset: clean
reproduction.
- 18 filtered CLI formatting/contract tests passed; archived p/5 phone
smoke passed against the final daemon, including the new open-PR list
(one scenario).
- F1 regression was observed failing before the fix: the report omitted
open with-hide#31 and named only with-hide#37. All-open, last-merged and last-closed cases
now pass.
- The previous CI run failed on two missing wait annotations (now
committed) and a Windows fixture compiler timeout before tests; the
final-head run is pending.

Run artifacts stay outside tracked source.
Merge-order after push: stay on main; do not stack on the independent
cleanup PR.

</details>
yansfil added a commit that referenced this pull request Nov 20, 2026
…r view (#2705)

Related: stacked on `feat/lane-desk` (the core's desk, #2672); paired
with with-hide/hide-private#952, which rewrites the 보기 slot section of
`docs/tasks-and-pr-list.md` into card tabs on a desk.

## Summary

### Problem

The core keeps one desk per Agent tab and opens cards as tabs on it, but
the screen still drew the old shape.
Card tabs carried the project in their names, the rail counted every
tab's Views, the pane head kept `@` beside zoom with no pair view, and
Escape in the lane closed it even from inside a document's editor, so
the editor had no keyboard exit.
Only the desk's front card is read, yet a record or PR card in another
area spun until pressed.

### Before → After

| | Before | After |
| --- | --- | --- |
| What the user gets | Card tabs `PR #N · project`, `Record · <title>`;
rail counts all tabs; `@` on the head | Short card tabs (`PR #N`, `기록`)
and a path line naming the card's target and owner; rail counts this
tab's desk; `@` and pair view in `…`, ◧ beside zoom |
| Screen | Card tabs read `PR #N · project`; the rail counted every
tab's Views; `@` sat on the pane head | ![desk with a record card
tab](https://github.com/yansfil/pr-assets/blob/main/hide/m78-desk/688f717/06-desk-record-card-tab.png?raw=true)
|
| Flow | rail desk button → keyboard in the editor → Escape closes the
lane | rail desk button → **keyboard on the front tab** → Escape closes
the lane; in the editor **Escape, Tab** leaves it |

Look at the desk's tab strip (the front tab whole, the others shrunk),
the path line (`Session record · Claude` with its owner's logo) and the
pane head's right side.

## Decide

- A card shows its agent's logo (hint `이 카드의 에이전트`) only when an agent
here owns it by the core's rule (a record's or a plan's session, a
mission's Conductor, the agent that made a pull request); a card with no
such agent, such as a person's pull request, has none. Matches the
mockup?

## Not verified

- The pair layer itself: ◧ sends `pair_view` to the core and node `pair`
draws it; where ◧ is offered is decided in two places (web and core),
which node `pair` folds into the core.
- A card's owner is read in the web from the same rows the core's
`detail_owner_pane` reads (`web/src/cardTitle.ts` `cardOwnerPane`, held
equal by `cardTitle.test.ts`); node `pair` moves it onto the card's
display from the core (B24), so the rule lives in one place.
- A pane of a connected device (B31): no e2e here; node `together`
checks it.
- The 볼 것 press (B4) has a core test only, no e2e.
- The packaged desktop window: captures come from the web shell on a
private hided in headless Chromium.
- Windows and Linux: web-only change with no system-specific code;
covered by CI's lanes, not run here.

<details><summary>Evidence</summary>

- **Verified**: Playwright e2e on a private hided per test (own
`HIDE_STATE_DIR`, debug build): `lane-desk`, `work-prs`,
`agent-reference-drop`, `right-lane`, `lane-last-tool`, `mission-map`,
`session-record-restore`, `view-bookmarks`, 36/36 on 688f717, and
`lane-desk`, `tab-strip-fit`, `work-prs`, `mission-map`, `view-opener`,
`overview-map` again on b9f7367; web unit tests 3086 passed; web
typecheck, lint and design contract.

![rail and pane
heads](https://github.com/yansfil/pr-assets/blob/main/hide/m78-desk/688f717/01-closed-lane-rail-count-pane-heads.png?raw=true)
Closed lane: the desk button counts this tab's 2 Views; `2 views` and `1
view` on the pane heads, ◧ beside zoom.

![rail
hint](https://github.com/yansfil/pr-assets/blob/main/hide/m78-desk/688f717/02-rail-desk-button-hint.png?raw=true)
The desk button's hint: `Documents · Claude · 2 views open`.

![pane
menu](https://github.com/yansfil/pr-assets/blob/main/hide/m78-desk/688f717/03-pane-menu-mention-and-pair.png?raw=true)
The `…` menu leads with `Talk to another agent` (@) and `Pair view`.

![views
list](https://github.com/yansfil/pr-assets/blob/main/hide/m78-desk/688f717/04-pane-views-list.png?raw=true)
The pane beside's `1 view` list; its row puts todo.md on this tab's
desk.

![three
tabs](https://github.com/yansfil/pr-assets/blob/main/hide/m78-desk/688f717/05-desk-three-tabs.png?raw=true)
Three desk tabs, names only; the 볼 것 eye leads an unseen one.

![other
pane](https://github.com/yansfil/pr-assets/blob/main/hide/m78-desk/688f717/07-other-pane-same-desk.png?raw=true)
The keyboard in the pane beside: the desk is unchanged.

![second
tab](https://github.com/yansfil/pr-assets/blob/main/hide/m78-desk/688f717/08-second-agent-tab-own-desk.png?raw=true)
The second Agent tab shows its own desk, empty; the desk button is off.

![crowded
desk](https://github.com/yansfil/pr-assets/blob/main/hide/m78-desk/688f717/lane-desk-crowded.png?raw=true)
Four tabs: the front one reads whole, the others shrink to their marks,
each naming itself whole on hover.

![PR card
tab](https://github.com/yansfil/pr-assets/blob/main/hide/m78-desk/688f717/work-pr-card-light.png?raw=true)
A PR card tab reads `PR #31`; the path line `PR #31 · 머지할 수 있는 PR`;
`View on GitHub` is its one GitHub button.

</details>

<details><summary>Tests</summary>

- **Layer**: e2e for the desk across panes and Agent tabs, the rail
count, the crowded strip and Escape, which need a real daemon's desk and
real keys; unit for the strip's widths, the pane menu's offers and a
record card out of front.
- **Catches**: a desk that follows the keyboard to another pane (B8), a
tab showing another tab's desk (B9), a rail count of every tab (B2), a
front tab cut short on a crowded desk (D-30), the rail press leaving the
keyboard in the editor, the @ list taking the keyboard from where a
press landed, a record out of front spinning or reading.
- **Repeat**: `lane-desk`, `right-lane`, `lane-last-tool`,
`agent-reference-drop` x3, 39/39 on cd63a8d; the crowded desk test
x3, 3/3.
- **Waits**: none new besides Playwright's own `expect` polls.
- **Not ours**: on 0fad84c the repeat lane failed
`work-prs.spec.ts:192` once in three, at teardown (`hided … did not
stop` in `hided-fixture.ts:87`, from `openWork`); that test is unchanged
here and passed its other two runs; it fails 1 in 30 on the base too,
recorded as #2720.

</details>

<details><summary>Risky files</summary>

- `web/src/components/ui/tooltip.tsx` - a hint's Escape dismiss is
marked so the lane, Desk and the mission map still answer the same press
(`escapeConsumed`).
- `web/src/AreaTree.tsx`, `web/src/areaLayout.ts` - the View strip
measures the front tab's whole name on every fit change; Agent and Desk
strips pass no need and keep their stages.
- `web/src/deskFront.ts`, `web/src/PrCard.tsx`,
`web/src/SessionRecord.tsx` - one place says which card the core reads;
cards out of front keep their last drawing, eight each.

</details>

<details><summary>Verification record</summary>

PRD `agents/prd/lane-desk-pair-view/prd.md` (local), base
`feat/lane-desk`, head 0fad84c. Review round 1 (5c7d1ec): findings
1-6 and 8 fixed here; 7 handed to node `pair`. Review round 2
(864dc79): A (card owner rule and hint) fixed in 26430ee, the core
display field handed to node `pair`; the front tab's name measured one
way (6bc9f3b).

</details>
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