Skip to content

feat: add Desk, a room whose chosen agent starts and follows sessions through hide - #1913

Merged
yansfil merged 32 commits into
mainfrom
feat/desk-host
Oct 31, 2026
Merged

yansfil merged 32 commits into
mainfrom
feat/desk-host

Conversation

@yansfil

@yansfil yansfil commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Related: #1907 (Desk 화면 부품, 머지됨). 이 PR이 그 부품을 앱에 연결한다.

Summary

Desk 방이다(PRD Desk 1차 B1-B24, B36-B40).
사이드바 맨 위 ◆ Desk 줄을 누르면 가운데에 Desk 채팅이 열린다.
운영자가 고른 에이전트(Claude 또는 Pi)와 ACP로 대화한다.
그 에이전트는 hide 명령으로 세션을 띄우고 따라가며, 승인 카드는 hided가 결정한다.
Desk가 띄운 세션은 운영자 소유 탭으로 체크아웃의 ◆ Desk 그룹에 들어간다.
상한 8과 대기열, 일 카드 상태, hide agent archive, Settings › Desk가 함께 들어 있다.
Codex는 운영자 설정이 섞이고 샌드박스가 hide를 막아서 아직 고를 수 없게 두었다(공백, 아래 Review).
lane(Threads, 결과물, ⌘J)은 lane 노드가 붙인다.

Desk room in the isolated candidate: a fake Claude adapter asks to run touch note.txt and the approval card waits

Eight Desk starts on a device that does not exist: each card failed with its reason and Try again

Review

  • 판단해 주세요: 화면 연결에서 정한 것.
    • lane이 붙기 전에는 카드, 세션 칩, 편지 줄을 누르면 그 세션의 탭이 열린다. lane 노드가 스레드 칸으로 바꾼다.
    • 알림의 다시 시도는 운영자의 마지막 말을 그대로 다시 보낸다. 코어에 재시도 이벤트가 없어서다.
    • 대화가 64장 넘게 전의 카드를 가리키면 그 카드 줄은 그리지 않는다. desk_jobs는 최신 64장만 보내기 때문이다.
    • 📎(첨부)는 desk_send가 첨부를 받지 않아서 보이지 않게 했다.
    • 보낸 말은 대화에 나타난 뒤에 입력창에서 지운다. 코어가 거절하면 말이 입력창에 남는다.
  • 판단해 주세요: Claude의 plan 모드를 Desk에서 막았다(리뷰 7).
    • 실제 어댑터에서 EnterPlanMode는 권한을 묻지 않고 바로 plan 모드로 바꿨다.
    • 그러면 Desk는 ask 모드를 벗어났다고 세션을 끝내고 Claude를 묻기 모드 없음으로 표시했다. hided를 다시 켤 때까지 Claude를 고를 수 없게 된다.
    • 세션 설정에 deny: ["EnterPlanMode"]를 넣었다. 다시 확인하니 도구 목록에서 빠졌고 세션은 ask 모드에 남았다(7381e90).
    • 벗어난 세션을 끝내는 안전장치는 그대로 둔다.
  • 화면 연결, 재리뷰, verify에서 찾아 고친 결함 일곱:
    • Desk가 부르는 spawn과 request가 모두 reserved_name으로 거절되고 있었다. Desk의 이름 hide:desk가 Factory 이름 막기에 걸렸기 때문이다. Hide가 만든 신원은 제 이름을 쓸 수 있게 했다(a503ded).
      • 코어 테스트는 Desk의 접수 함수를 직접 불렀고, c2 확인은 가짜 hide를 썼다. 그래서 둘 다 이 경로를 지나지 않았다. 이제 prepare_delivery를 Desk 호출자로 지나는 테스트가 있다.
    • 카드만 바뀌는 이벤트(취소, 다시 맡기기, 읽음)에도 대화 구획 desk를 다시 보내고 있었다. 이제 desk_jobs만 간다(a503ded).
    • @ 메뉴의 프로젝트가 등록 id로 가고 있었다. Desk의 에이전트는 @project(<경로> <이름>)를 --repo로 넘기고, 화면은 그 경로로 체크아웃을 찾는다. 그래서 프로젝트를 고른 말은 엉뚱한 --repo가 되고 프로젝트 칩은 눌러도 열리지 않았다. 이제 기본 체크아웃의 경로를 보낸다(기본 체크아웃이 없는 폴더 프로젝트는 그 폴더의 경로, 2333ae0).
    • Desk가 일을 하나도 띄우지 못했다(verify). 모든 spawn이 parent_unavailable로 거절되었다. 부모 없는 spawn은 부르는 쪽의 기록을 origin으로 쓰는데, 실제 경로에서는 아무도 hide:desk의 기록을 만들지 않았다. Desk 테스트들은 그 기록을 손으로 만들고 시작했고, 화면 확인은 없는 기기로 보내 실패 카드만 봤기 때문에 둘 다 놓쳤다.
      • 이제 Hide의 신원(hide:<role>)이 부모 없이 처음 spawn할 때 executor가 그 기록을 등록하고 origin으로 쓴다. Hide AI가 spawn마다 손으로 부르던 등록은 지웠다(e21bf35).
      • 새 테스트는 손 등록 없이 Desk 프로세스가 묻는 그대로(DESK_CALLER, prepare_delivery, 전달 worker) 가짜 기기 Herdr에 spawn한다. 일이 시작되고, 카드가 Working이고, 상한 1에서 다음 spawn이 대기 1번이 된다. 고침을 빼면 이 테스트는 실패한다.
    • 턴 요약이 실패한 시작도 세션 n개 시작으로 셌다(verify). 이제 시작은 spawn이 성공으로 답한 것만 센다(bded951).
    • 대기 카드가 약 24초 늦게 떴다(verify 2차). spawn은 바로 queued로 답했지만 카드 구획은 다음 갱신 때 만들어졌고, 그 변화를 화면에 알리는 일도 없었다. 이제 대기열에 넣는 그 자리에서 카드를 만들고, 잠금을 놓은 뒤 화면에 알린다(5a9bad1).
    • 탭이 열린 뒤 실패한 시작(에이전트가 제때 brief를 받지 못함)은 탭이 살아 있는데 ◆ Desk 그룹 밖에 있었고 카드는 Failed였다(verify 2차). 그룹에 넣는 일이 child 기록이 묶인 spawn만 보았기 때문이다. 이제 spawn이 만든 pane으로 그룹에 넣는다. 카드는 그 pane의 에이전트가 일하거나 물으면 그 상태를 따르고, 쉬고 있으면 Failed로 남아 그 pane을 연다(4f58ee9).
      • 판단해 주세요: 쉬는 에이전트를 완료로 보이지 않게 했다. brief를 받지 못했으니 일을 하지 않은 것이고, 다시 시도가 같은 pane에 brief를 넘긴다.
  • 판단해 주세요: Codex는 흐리게만 보이고 고를 수 없다(not_offered).
    • 실제 어댑터로 확인하니 운영자의 ~/.codex/AGENTS.md, 스킬, MCP를 읽었고 read-only 샌드박스가 루프백을 막아 hide가 실패했다.
    • 닫으려면 Hide 소유 CODEX_HOME과 Desk 전용 codex login이 필요하다. 로그인이 하나 더 생기는 일이라 운영자 결정을 기다린다(with-hide/hide-private#388).
    • Codex 어댑터 실행 코드와 권한 분류는 #388에서 쓰므로 지우지 않았다.
  • 판단해 주세요: 다른 기기에서 띄운 일의 탭은 ◆ Desk 그룹 밖, 그 기기가 만든 자리에 둔다(받아들인 공백, docs/UI_BEHAVIOR.md Desk's jobs).
  • 판단해 주세요: Desk가 카드 없이 실행하는 hide 명령은 코어가 Desk에게 받아 주는 것만 남겼다.
    • 남긴 것: agent, request, inbox, watch, ps, device list, 그리고 CLI 도움말(guide, contract, status, version).
    • hide agent spawn ... -- <인자>는 카드로 묻고, --parent를 단 spawn은 invalid_request로 거절한다.
  • 리뷰가 남긴 '화면 연결 때 볼 점'의 결과:
    • WebSearch와 WebFetch: Claude에서 둘 다 기타 카드가 떴다(제목과 입력 전문). 거절하니 실행되지 않았다.
    • plan 모드(7): 위의 판단 항목대로 막았다.
    • bare hide(10): 운영자의 실제 HOME과 rc로 Claude Bash에서 which -a hide를 돌리니 Desk가 준 hide가 첫째, ~/.local/bin/hide가 둘째였다. rc가 PATH를 다시 만들어도 Desk의 hide가 앞선다.
    • 일 8개의 전송량: 카드 8장의 desk_jobs는 4.4 KB였다. 고친 뒤 카드 하나를 다시 시도하면 그 구획만 간다(4.6 KB 프레임). 대화 구획은 가지 않는다.
    • 대기열 재시작: 실패 카드 8장과 대화는 hided를 두 번 다시 켜도 그대로였다. 대기 중 카드는 화면에서 만들지 못했다. 자리를 잡으려면 진짜 에이전트를 띄워야 해서다. 대기열 유지는 코어 테스트가 보인다.
  • 커밋 순서:
  • 조심해서 볼 파일:
    • herdr-core/src/runtime/delivery.rs: 이름 막기의 예외. Hide가 만든 신원(code_owned)만 예외이고, pane은 그런 신원을 주장할 수 없다.
    • herdr-core/src/runtime/desk/worker.rs: runtime mutex 밖의 단일 소유 스레드다. 보고는 짧은 잠금 아래에서 적용된다.
    • hide-desk/src/permission.rs: failure path. 읽지 못한 요청은 실행되지 않고, allow_always는 고르지 않는다.
    • herdr-core/src/runtime/desk/jobs.rs: high-frequency path. refresh_desk_jobs가 rest가 바뀐 publish마다 돈다.
    • web/src/MarkdownText.tsx: 답 속 세션 칩을 CodeMirror 위젯으로 그린다. 칩마다 React 루트가 하나이고, 편집기가 놓은 뒤에 내린다.
    • web/src/DeskScreen.tsx: 화면이 가진 것은 쓰는 중인 말과 @ 메뉴 위치뿐이다. 나머지는 모두 코어의 구획이다.
  • 비용 검토:
    • publish마다 하는 일: 보관 기록, 행, 기기, plan, mission, 열린 View를 한 번 색인하고 카드를 한 번 만든다(최대 64장).
    • 카드, @ 메뉴, 답 스트림은 각자 제 구획으로 간다. 대화(desk, 최대 2 MiB)는 대화나 방이 바뀔 때만 간다.
    • 화면은 보이는 카드만 읽음으로 보내고, 카드의 변화마다 한 번만 보낸다.
    • Desk 프로세스는 하나다. 워커가 소유하고, hided 종료, 새 대화, 다시 시작, 자손 48개나 RSS 4 GiB 상한에서 끝난다.

Evidence

  • 확인한 것:
    • 격리 후보(사설 HOME, XDG, Hide 상태, Herdr 소켓, 이 브랜치의 debug hided와 웹 셸, Aside 브라우저): Claude 어댑터 자리에 가짜 ACP 에이전트를 두었다. 진짜 에이전트는 띄우지 않았다.
      • ◆ Desk 줄로 방이 열렸고, 에이전트 메뉴에서 Codex는 아직 고를 수 없음으로 흐렸다.
      • 메시지를 보내자 touch note.txt 승인 카드가 명령, 이유, 두 답과 함께 떴다(위 첫 스크린샷). 거절하니 한 줄로 접혔고 note.txt는 생기지 않았다.
      • hided를 다시 켜자 대화가 남았고, 가짜 에이전트가 이어가기를 못 해 '새로 시작' 줄이 보였다(B11).
      • 가짜 에이전트가 없는 기기로 spawn 8번을 부르자 카드 8장이 실패와 이유, 다시 시도로 떴다(위 둘째 스크린샷). 고치기 전에는 8번 모두 reserved_name으로 막혀 카드가 없었다. 이 확인은 성공하는 spawn을 보지 않았고, 그 빈틈을 verify가 찾았다(위 결함 넷째).
      • 끝난 뒤 후보의 hided, Herdr, 가짜 에이전트 프로세스가 남지 않았다(ps).
    • 실제 어댑터 확인(운영자 HOME, 임시 작업 폴더, 기록만 하는 가짜 hide, 일회용 실행 파일은 지움): WebSearch, WebFetch, plan 모드, which -a hide. 끝난 뒤 남은 프로세스가 없었고 전역 설정 파일 해시가 그대로였다.
    • 이전 c2 확인: Claude와 Pi에서 hide 명령과 파일 읽기는 카드 없이, 편집과 셸 명령은 카드로 물었고 거절하면 실행되지 않았다.
    • 게이트(0045aff, main cb4a85e merge 뒤): fmt와 clippy, hakari, cargo test 6672개 통과(실패 0), verify-web(웹 2375개, 데스크톱 302개), scripts 단위 테스트 741개, 정적 검사 8개, design contract가 모두 통과했다. CI는 4f58ee9af에서 모두 초록이었다.
    • verify 2차(b5cb652, 격리 후보 앱): ◆ Desk 그룹 탭, 상한 1의 대기 카드와 취소, 다시 맡기기, 재시작 뒤 순서, 자리가 나면 다음 일이 스스로 시작, 턴 요약, archive 확인 요구가 통과했다. CI도 b5cb652b7에서 모두 초록이었다(Windows 포함).
    • 새 테스트: a_spawn_desk_asks_for_starts_with_no_record_made_beforehand_and_takes_its_place(고침을 빼면 실패함을 확인), a_turn_tells_the_sessions_it_started_and_not_a_start_that_was_refused, a_project_in_the_at_menu_is_named_by_its_primary_checkout_s_path, a_queued_spawn_s_card_is_drawn_with_its_answer_and_the_screen_is_told, a_start_that_failed_after_its_tab_opened_joins_the_group_and_its_card_follows_the_pane, DeskScreen.test.tsx 4개.
    • CI(9740cad)의 windows check 실패는 connect_stop 세 테스트가 hided 시작에서 10초를 넘긴 것이다. 같은 시작 코드가 2df1b562d에서 Windows를 통과했고, 차가운 러너의 알려진 flake(with-hide/hide-private#326)로 본다.
  • 확인하지 못한 것:
    • 마지막 두 고침(5a9bad1, 4f58ee9)의 앱 화면 확인. 코어 테스트로 보였고, 그 앞의 b5cb652b7은 verify가 후보 앱에서 통과시켰다(◆ Desk 그룹 탭, 대기 카드와 취소, 다시 맡기기, 재시작 뒤 순서, 턴 요약).
    • plan 모드 막기의 앱 화면 확인. 실제 어댑터 확인에서 EnterPlanMode가 도구 목록에서 빠지고 세션이 ask 모드에 남는 것은 봤다. 후보 앱 화면에서 Claude에게 계획 모드를 시켜 보는 것은 하지 않았다.
    • 데스크톱 앱(Electron) 창. 같은 웹 셸을 격리 hided에 붙여 Aside 브라우저로 봤다.
    • Windows와 Linux에서 진짜 어댑터 실행. 코드는 플랫폼에 중립적이고 CI 레인에서 돈다.
    • Codex. 고를 수 없게 막아 두었다.
    • 다른 기기 일의 그룹 배치. 받아들인 공백이다.
Verification record
  • head 0045aff (main cb4a85e merged in 7664293)
  • verify-cargo lint 0, hakari 0, test 0 (6672 passed, 0 failed), verify-web 0 (web 2375, desktop 302), scripts unittest 0 (741 ran, 21 skipped), static checks 8 PASS, design contract PASS
  • isolated candidate: private HOME, XDG_CONFIG_HOME, HIDE state and HERDR_SOCKET_PATH under /tmp; debug hided and web/dist of this branch; fake ACP agent at the Claude adapter path; candidate processes stopped by exact pid, none left
  • real adapter probe: scratch working folder and adapters, fake hide that records its arguments, global config hashes unchanged, no adapter process left

hide-desk is the ACP client Desk drives the operator's chosen agent with:
the tied host process, the ndjson connection, the session in each
adapter's ask mode, the pinned npm install, and the permission rule
that lets only Desk's own hide commands and file reads run without a
card.
…l cards

The core's Desk worker starts the chosen agent's ACP adapter tied to
hided, holds it in its ask mode, answers each permission request by the
Desk rule and waits on an approval card for the rest. hided binds a
capability to that process so its hide commands act as hide:desk in
delivery only. The conversation, choices and settings are kept in
state/desk/desk.json and sent as the desk and desk_live sections.
…d agent archive

Desk's spawns past its places wait in a persisted queue and start as
hide:desk when one frees; each job is a card derived from the ledger and
the row the sidebar draws (queued, starting, working, asking, done,
failed, cancelled, closed, moved out, archived). A new session's tab goes
into its checkout's Desk group once, the operator's close, move out and
typing are remembered, and a watch follows it. Hand-offs and started jobs
leave a line in the conversation. The work placement setting reaches the
agent with its first message. hide agent archive does what the screen's
session archive does.
A job card carries its row's status mark and read ask, the sleeping state,
what an asking job waits on, the code a failed start ended with, and every
View its session opened with whether it was seen; reading a card reads the
row as the sidebar does. Desk's own replies fold their turn into thinking
time and step counts, the live section says when the turn started, and a
letter line carries its kind, first line and whether it was taken in.
The Pi ask-mode marker check moves into the Desk crate, beside the process
it proves.
… only the hide commands the core takes from Desk
…tch's answer, and send Desk's cards once a publish in their own section
# Conflicts:
#	contracts/hide-cli.json
#	contracts/snapshot-wire-enums.json
#	herdr-core/src/delivery/worker.rs
#	herdr-core/src/model.rs
#	herdr-core/src/runtime/delivery.rs
#	hided/src/cli_contract.rs
#	hided/src/workspace_cli.rs
#	web/src/components/desk/desk-composer.tsx
@yansfil
yansfil merged commit 09a5eaf into main Oct 31, 2026
63 checks passed
@yansfil
yansfil deleted the feat/desk-host branch October 31, 2026 00:25
yansfil added a commit that referenced this pull request Oct 31, 2026
…he lane from its column head (#1915)

Related: #1913 (merged; this PR builds on it, base `main`)

## Summary

Desk's right side now works: the rail's ☰ opens the Threads list and one
thread in the tool column, and ▣ opens the outputs a thread made in the
보기 column as preview tabs.
Cards, `답하기` and a session chip open their thread there instead of
jumping to the Agent tab.
A mission chip opens its map beside the Conductor's thread, and a node
switches to that worker's thread.
⌘J goes between a thread and its Agent tab, and back.
The lane's 📌 moves from the rail's bottom to the head of the column at
the lane's edge, before ✕, in Desk and in the project lane alike.

Desk is now off until it is turned on in Settings › Desk (`Use Desk`),
since it is still in development.
Off, the sidebar has no `◆ Desk` row, a thread's Agent tab has no
`Desk로`, ⌘J is not Hide's and Desk's agent does not run.
Turning it on shows Desk at once, with no restart; turning it off ends
Desk's agent and keeps the sessions it started as ordinary sessions, and
if the Desk room was in front, the tab used before it comes back.

| Settings › Desk, off (the default) | On |
| --- | --- |
|
![settings-off](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/ac33053/desk-switch-settings-off.png?raw=true)
|
![settings-on](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/ac33053/desk-switch-settings-on.png?raw=true)
|


![sidebar-off](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/ac33053/desk-switch-sidebar-off.png?raw=true)
With Desk off the sidebar starts at Overview: no `◆ Desk` row.

![Desk lane: Threads list, 📌 before ✕, foot line 쉬는 중 ·
보관됨](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/ddeab1c/desk-lane-threads-foot.png?raw=true)
Look at the column head: 📌 sits before ✕, and the rail keeps only ☰
(with the asking count) and ▣.

Five screen defects the verify run found in the candidate app are fixed
here; each pair is the same scene in an isolated candidate, before
(dead645) and after (98ef95a1):
the pinned lane keeps its width instead of growing to 692 and squeezing
the chat to 360; a lane over the chat moves the chat's words clear
instead of cutting them; the 보기 tabs share their width by the View tab
strip's rule instead of overlapping; a planning mission's chip is grey
in Desk as in the sidebar; a thread row keeps `main · Done` whole.

| | Before | After |
| --- | --- | --- |
| Pinned Threads | ![before
15](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/98ef95a/before-15-pinned.png?raw=true)
| ![after
15](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/98ef95a/after-15-pinned.png?raw=true)
|
| Over, both columns | ![before
10](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/98ef95a/before-10-preview-image.png?raw=true)
| ![after
10](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/98ef95a/after-10-preview-image.png?raw=true)
|

## Review

- **판단해 주세요**: a page output is drawn as its still and address with `그
자리에서 열기`, not as a live browser (D-40 asked for a live one). The live
page belongs to the checkout that opened it; a second live copy in Desk
is a follow-up.
- **판단해 주세요**: a mission chip's colour now comes from the web's one rule
(`missionToneOf`), so the core no longer sends `tone`; Desk's `deciding`
is now "a decision waits while the mission is open", as the sidebar
reads it.
- **판단해 주세요**: the project lane's pin is now only drawn while the lane
is up (a closed lane has no column head to hold it).
- **판단해 주세요**: ⌘J moves to ⌥⇧J (Alt+Shift+J on Windows and Linux) in a
browser tab, marked moved for Chrome, since Chrome keeps Ctrl+Shift+J
for DevTools; the desktop app keeps ⌘J and Ctrl+Shift+J (its DevTools
key is Ctrl+Shift+I).
- **판단해 주세요**: Desk's switch is kept in the core's Desk store with its
other settings, so every window follows it; a store written before this
PR reads as off, so someone already using Desk turns it on once.
- **판단해 주세요**: off, the rest of Settings › Desk is dimmed and out of
reach with its values kept, as Hide AI's are; Settings › Shortcuts still
lists ⌘J for rebinding, while the shortcut sheet drops it.
- **판단해 주세요**: the PRD's "사이드바 ◆ Desk 그룹" is read as the sidebar's `◆
Desk` row; a checkout's `◆ Desk` tab group Desk made earlier stays as
the operator's tab group.

  | 정한 것 | 이유 |
  | --- | --- |
| Desk off keeps the spawns waiting in its queue, starts none and
removes none; turned on again, they start in order | Off erases nothing
Desk made (D-76), and nothing should start while Desk is off
(Conductor's decision) |
| The desktop app's View menu has no `Desk thread ⇄ terminal` while Desk
is off; the page tells the host the switch (`hide:desk`) as it tells it
the bindings and the language | The menu's accelerator answers ⌘J before
the page does, so hiding the row in the page alone left the chord
working |
| `openDesk` and `deskTerminal` refuse while Desk is off, whichever
menu, host chord or button asks | One guard where every path ends |
| The shortcut sheet drops Desk's row while off; Settings › Shortcuts
keeps it, binding and all | Off hides Desk, and a stored binding is the
operator's to keep |
- **조심해서 볼 파일**: `herdr-core/src/runtime/desk.rs` - Desk off refuses
every `desk_*` event but `desk_settings_set` (`desk_off`) and checks no
agent; turning it off ends the process as `다시 시작` does. Also new
`desk_lane` and `desk_output_seen` events; pin and kept tabs live in
Desk's store, 16 kept tabs at most, a 17th refused as `desk_tabs_full`.
- **조심해서 볼 파일**: `herdr-core/src/runtime/desk/jobs.rs` - outputs now
only `is_output` Views (B30) with their device, checkout and path; new
`workers` cards for a mission's workers (64 at most), built from the
same card index as the job cards in one publish.
- **조심해서 볼 파일**: `herdr-core/src/runtime/unseen_views.rs` -
`mark_view_seen` split out of `settle_seen_views`, so looking at an
output in Desk reads it as looking at it in its checkout.
- **조심해서 볼 파일**: snapshot wire - `desk.lane`, `desk_jobs.workers` and
four new fields on an output. This overlaps #1913's wire; it merges
after it.
- **비용 검토**: no new resident work. `workers` shares the job cards' index
(one build a publish) from data already under the lock; an output seen
saves no Desk store; an output's bytes are read through the existing
`file_bytes` path only while its tab shows.
- **원칙**: state the core owns (pin, kept tabs) is in the core with a cap
and a reported refusal (engineering 4, 15); the window's columns stay in
`ui.ts` (web/CLAUDE.md). Both lanes draw one pin part, `LanePinButton`
(design 5). The lane shows a state only where the operator acts on it:
the ☰ count and the ▣ dot (design 13).

## Evidence

- **확인한 것**: `web/e2e/desk-lane.spec.ts` 3 passed on a real Herdr and
hided: ☰ list, thread, ‹ back, ☰ closes, ▣ empty; 📌 docks, Escape leaves
a pinned lane, the pin survives a reload, unpinned Escape closes and
focuses the composer; ⌘J and `터미널로` go to the Agent tab and ⌘J/`Desk로`
come back with the thread open.
- **확인한 것**: the 11 e2e files that use the project lane's pin ran: 49
passed, 2 failed on the moved pin (button counts, unpin before the lane
was up); both fixed and passed.
- **확인한 것**: core `cargo nextest` desk, lane and unseen_views filters,
81 passed, incl. the pin and kept tabs coming back after a restart, the
cap refusal, workers found by their panes, and an output seen in Desk
leaving Needs You.
- **확인한 것**: `bash scripts/verify-web.sh` exit 0 on e5e4c5f (web 2383,
desktop 302), `cargo` lint clean, `check-design-contract.mjs` passes.
- **확인한 것**: verify's isolated candidate (Electron over CDP, private
Herdr and HOME) at 98ef95a1: pinned Threads lane 400 wide with the chat
1052 → 652 (before 692 and 360); both columns over the chat 692 wide
with the chat's words left of it; tabs 132 px each with titles ending in
an ellipsis; planning chip grey in sidebar, card and Threads row; job-c
reads `main · Done`.
- **확인한 것** (switch, ac33053): `desk-lane.spec.ts` 4 passed, the new
one on a real Herdr and hided: no `◆ Desk` row and no `Desk로` on a new
install, both appear when Settings › Desk turns on without a restart,
and turning it off in the room brings back the focused pane before it
with Desk's session still open and no `Desk로`; the other three turn Desk
on first. The shortcut sheet e2e lists 60 rows with no Desk row by
default.
- **확인한 것** (switch): core tests
`desk_is_off_by_default_and_only_its_switch_reaches_it_while_off` (no
order reaches the worker while off, on sends a check) and
`switching_desk_off_ends_its_process_and_keeps_its_conversation` (cancel
and end sent, the waiting card closed, the conversation kept,
`hide:desk` commands refused); `DeskScreen.test` covers the sidebar
entry and leaving the room.
- **확인한 것** (review fixes, 9beed04): desktop e2e `desk-switch.spec.ts`
on the real Electron build: no `desk_terminal` menu item while Desk is
off, `Command+J` once Settings turns it on, gone again when off;
`menu.test` checks the same for macOS and Windows/Linux
(`Control+Shift+J`); an `actions.test` case sends the host's
`desk_terminal` with a Desk thread in front and `openDesk` while off and
sees no move (it fails without the guard), and checks the host is told
on and off; core test
`a_queued_spawn_waits_while_desk_is_off_and_starts_when_it_is_on_again`
keeps a queued spawn waiting with a place free while off and starts it
when on (it fails without the queue's check).
- **확인하지 못한 것**: the switch was not run in the packaged app; Windows and
Linux run the same web and core code and are left to CI's e2e lanes.
- **확인하지 못한 것**: the mission chip and a node click (B34) are covered by
unit tests of the lane state, not by an e2e; the stack runs no
Conductor.
- **확인하지 못한 것**: an output's diff lines were not captured; the image,
document and page stills were drawn in the gallery only.
- **확인하지 못한 것**: the PR mark in a Desk card chip has no hint, so the
carryover note about its pointer events needed no change.

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

Verify defects, the rest of the pairs (before dead645, after 98ef95a1,
same scene numbers as the verify run):

| | Before | After |
| --- | --- | --- |
| 11 tabs | ![before
11](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/98ef95a/before-11-preview-replaced.png?raw=true)
| ![after
11](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/98ef95a/after-11-preview-replaced.png?raw=true)
|
| 25 three tabs, mission | ![before
25](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/98ef95a/before-25-mission-map-and-conductor.png?raw=true)
| ![after
25](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/98ef95a/after-25-mission-map-and-conductor.png?raw=true)
|
| 26 mission chip tone | ![before
26](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/98ef95a/before-26-threads-with-mission.png?raw=true)
| ![after
26](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/98ef95a/after-26-threads-with-mission.png?raw=true)
|
| 05 `main · Done` | ![before
05](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/98ef95a/before-05-threads-list.png?raw=true)
| ![after
05](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/98ef95a/after-05-threads-list.png?raw=true)
|

![▣ alone: every thread's outputs, 📌 in the 보기 column
head](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/ddeab1c/desk-lane-every-output.png?raw=true)
▣ with no tab open lists every thread's outputs; the pin is in the 보기
head when the 보기 column is the edge.

![A thread docked beside the chat, 터미널로
⌘J](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/ddeab1c/desk-lane-thread-pinned.png?raw=true)
A pinned thread: the chat narrows; ⌘J shows beside `터미널로`.

![An Agent tab of a Desk thread: Desk로
⌘J](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/ddeab1c/desk-lane-pane-return.png?raw=true)
The Agent tab of a Desk thread carries `Desk로` with ⌘J.

![Project lane: 📌 before ✕ in the Explorer
head](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/ddeab1c/project-lane-pin-tool-head.png?raw=true)
Project lane: the pin left the rail's bottom for the Explorer head.

![Project lane, documents alone: 📌 before the View area's
✕](https://github.com/yansfil/pr-assets/blob/main/hide/feat-desk-lane/ddeab1c/project-lane-pin-view-head.png?raw=true)
Project lane with the documents alone: the pin sits before the View
area's ✕.

</details>

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

- base `main` 09a5eaf, head 9beed04; CI on e7c7947 (the switch
before the review fixes) passed, run 41154765303
- review fixes: `verify-web.sh` exit 0 (web 2391, desktop 303);
`verify-cargo.sh lint` exit 0; `nextest -E 'test(/desk|remote_spawn/)'`
64 passed; desktop e2e `desk-switch.spec.ts` 1 passed; design contract
ok
- the switch: head ac33053
- switch: `bash scripts/verify-web.sh` exit 0 on ac33053 (web 2390,
desktop 302); `verify-cargo.sh lint` exit 0; `nextest -E 'test(/desk/)'`
38 passed; `desk-lane.spec.ts` 4 passed, s2 shortcut sheet 1 passed;
design contract ok
- `bash scripts/verify-web.sh` exit 0 on e5e4c5f (pnpm 10.14.0)
- `bash scripts/verify-cargo.sh lint` exit 0; `nextest -p herdr-core -E
'test(/desk|unseen_views|lane/)'` 81 passed
- e2e: `desk-lane.spec.ts` 3 passed; 11 pin-using specs 49 passed + 2
fixed and rerun passed

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