Repository navigation
Add Home, device rail, Inbox, and cross-device start - #264
Merged
Merged
Conversation
Every start event (checkout start, new worktree, issue start, pull request hand-off) carries an optional model, validated to a CLI-safe id and passed as --model to agent.start. The last kind and per-kind model are stored in ui_state.agent_start, seeded once from the retired issue_settings default_agent. A first prompt refused as agent_blocked waits up to ten minutes for the question to be answered. Refusals and the task operation carry the request id of the surface that asked.
The device helper gains home_sync (protocol 10): it makes ~/hide with a marker naming the links Hide made, one symlink per registered project, and an `AGENTS.md` with `CLAUDE.md` linking to it. A ~/hide that is not Hide's is refused as home_conflict and never adopted, and only links still as Hide made them are ever removed.
A second observation demand, start_observing, lets the start panel, a start dialog or a phone's start sheet turn the provider catalog on without the Settings-only hook diagnosis. The web snapshot types gain the remembered agent choice, the Home flag and per-request answers.
agent_start_in_checkout now takes device_id and home. A Home start asks the device's helper to bring ~/hide in step with that device's registered projects, registers Home as a pinned home registration, opens the tab in Home's folder owner, and starts the agent with each linked project folder as an extra writable root. A device checkout's start opens its tab in the checkout's owner on that device's Herdr. Once a device has a Home, every registration change there syncs its links in the background and reports only to the diagnostic log. A ~/hide that is not Hide's refuses the start as home.conflict.
Herdr reports an agent sitting on a startup question (folder trust, sign-in) as idle and ready, and agent.prompt would type into that question. The first prompt now goes after -- as the CLI's positional prompt, which Claude Code and Codex CLI hold until their questions are answered. A prompt Herdr cannot pass as an argument (a line break) is refused before anything is typed, and only then is it typed once the agent answered ready.
The phone lists every device's Home and checkouts by id, sends the choice through the same agent_start_in_checkout event as the desktop, and waits beside its socket loop for the core's answer to its request id. A repeated id starts once.
Adds the --device-remote and --size-rail tokens, and redraws the Projects Sidebar, Menus and Overlays, Workspace and Mobile screens for the rail, the Home row, the remote band, the start panel and the phone start sheet.
…shell A registered remote device brings a rail of Inbox and device tiles; each tile's sidebar is its Needs You group, its Home row and its projects, and Home replaces the Overview row on every device count. The remote band marks a device's surfaces, and Recent navigation and search reach every device. The start panel (Cmd-N, and Start agent in the palette) starts a Claude Code or Codex CLI agent with a first prompt in the front device's Home or any checkout; New worktree, Start from an issue and hand-off use the same kind and model picker, and Settings > Issues loses its default agent.
A model the catalog does not list is still the one a start sends, on the desktop and the phone: the target's CLI decides, and hide never swaps it for the default. Test fixtures name /Users/example.
A ~/hide that is not Hide's is named where the operator opened Home, under that device's Home row, until the next start or a click on the row.
…one socket with its network The global start command follows the Workspace commands; This Mac alone has no device row. A phone that loses its network closes its socket at once, so the list and the start sheet show it is unreachable.
…ter launch The helper holds an exclusive lock on the account's home folder for each sync, so a start's sync and a registration change's, or two Macs' helpers on one device, each read the marker the other wrote. The runtime records a project set as sent only once it is, so the first registration change after launch is linked and a deferred sync is tried again.
Only an answer that leaves the outcome unknown keeps the id, so a resend lands once; after a refusal, tapping the button again is a new start.
Every first prompt travels as the agent CLI's own argument: line breaks as U+2028 and tabs as spaces, which Herdr passes through, and any other control character refuses the start. A typed prompt could answer a startup question the CLI shows first, which Herdr reports as ready. An agent that then fails to start puts its text back in the panel's draft.
…out read the late one Both start surfaces wait 90 s, past a device's Home sync and its tab. A phone that repeats a start whose wait ran out waits for that start's answer again and never dispatches it twice.
Settings holds the keyboard, so the start chord or command closes it and opens the panel; Settings counted as what was in front, so the target is the front device's Home.
Link names are compared case-insensitively and never take Home's own file names; a parent-suffixed name too long for the disk falls back to the folder's name, and a link the disk still refuses skips that project. The folder and its files are 0700 and 0600.
Home is no project, so the Workspace toolbar no longer repeats the Home folder as a project crumb; a checkout without a catalog row no longer shows two separators.
Runs against an isolated sshd and two private Herdr servers: the rail follows registration, a start aimed at the device's Home makes ~/hide there once the helper is ready and runs the agent on that device, a device checkout start lands there too, the Inbox chips device rows, and removing the device returns the front to this Mac.
The prompt travels as one command-line argument, which the OS caps near 1 MB with the environment; a larger one would fail inside the pane's shell where no one reads it, so the start fails first with the reason. Also say that the prompt can stay in the device shell's history.
The phone never read models_unavailable_reason, and the provider's own text can carry a path or stderr.
Such a name would be written into AGENTS.md as lines of its own and cannot be passed to the agent as a root, so the helper skips it with a log line and the core no longer filters roots itself. The helper also refuses a HOME that is not absolute.
A selection left over after the last device was removed made the start panel default to Home and brought the next rail back on the Inbox.
A registration change made while a device's helper was reconnecting waited for the next change or Home start; it now goes when the helper comes back. A device with nothing deferred is left alone, so launching still writes nothing.
…pens The prompt check ran in the agent worker, after the tab or worktree was made, so a refused prompt left an empty tab behind. Each start event now checks it first and refuses it as agent_start.invalid_prompt or worktree.create_invalid_prompt. The cap drops to 64 KB: Herdr types the command into the pane's shell, and macOS bash took 27 s for 76 KB and did not finish 300 KB within 60 s.
A deferred change no longer asks a down helper to connect on every UI state write; it asks once and waits for the helper. Each sync answer records the set it applied, so a newer set that took the lock first is sent again. A sync waits at most 20 s for the lock and answers busy.
The spec read the guide files as soon as the marker existed, while the same sync was still writing them; the tab opens only after the sync answers, which is when the operator can see the result.
# Conflicts: # design/hide-ui.lib.pen # docs/UI_BEHAVIOR.md # web/src/WorkspaceDialogs.tsx # web/src/actions.ts
yansfil
added a commit
that referenced
this pull request
Oct 29, 2026
…ir causes (#1833) Closes with-hide/hide-private#256 Closes with-hide/hide-private#244 Closes with-hide/hide-private#226 Closes with-hide/hide-private#267 Closes with-hide/hide-private#163 Closes with-hide/hide-private#266 Closes with-hide/hide-private#230 Closes with-hide/hide-private#264 Closes with-hide/hide-private#265 Closes with-hide/hide-private#212 Closes with-hide/hide-private#141 Closes with-hide/hide-private#282 Related: with-hide/hide-private#326 (제품 쪽 후속), #1811 ## Summary Windows에서 데스크톱 앱 시작·정리와 hided daemon 수명 테스트가 가끔 실패하던 것을 원인별로 고칩니다. 제한 시간과 재시도는 그대로입니다. 가장 잦던 실패(#256)는 job에서 처음 시작하는 Windows PowerShell과 새 `hided`의 cold 비용이 첫 테스트의 제한 시간 안에 들어간 것이었고, 테스트 전에 한 번 먼저 시작합니다. 정리 실패(#244 등)는 Playwright의 `app.close()`가 앱 프로세스가 끝나기 전에 돌아오는 것이었고, fixture가 그 프로세스의 종료까지 기다립니다. hided 테스트의 private Herdr는 pane shell까지 끝난 뒤에 폴더를 지웁니다. 나머지는 테스트가 잘못 기대하던 것(아직 없는 파일 읽기, delta 모양, 탭 선택 순서)을 계약대로 고쳤습니다. 제품 코드는 바뀌지 않습니다. 스크린샷 없음: 화면과 제품 코드를 건드리지 않음(e2e fixture와 테스트만). <details><summary>이슈별 원인과 처리</summary> - **#256** Add a project(Windows desktop job의 첫 테스트): Herdr는 cmd.exe pane에서 agent를 `powershell.exe -NoLogo -NoProfile -EncodedCommand`로 띄웁니다(Herdr v0.9.5 `interactive_shell_command`). desktop lane은 첫 테스트 전에 PowerShell을 한 번도 돌리지 않아, 첫 `agent start` 두 개가 46초(제한 30초) 걸렸고 이후 시작은 0.35초였습니다(run 40821395497). web lane은 globalSetup의 `endVctip`이 PowerShell을 먼저 돌려 이 실패가 없습니다. 10-23에는 같은 첫 테스트에서 job의 첫 `hided` 시작이 24초 걸려 "hided did not respond"가 됐습니다(run 39930517565, 평소 0.4-0.9초). -> 두 entry point가 같은 `prepareWindowsRun`으로 Herdr와 같은 형태의 PowerShell 시작과 `hided node --version`을 테스트 전에 한 번 하고 걸린 시간을 출력합니다. desktop에는 없던 `endVctip`도 함께 합니다. - **#244 #226 #267** "candidate exit unconfirmed": Windows에서 Playwright는 Electron을 cmd.exe 아래에서 띄우고(`shell: true`), `close()`는 앱의 디버그 파이프가 닫히면 context가 disposed되어 `TargetClosedError`를 삼키고 돌아옵니다(playwright-core 1.63). 기록된 프로세스(cmd.exe)는 그 뒤에 끝나고, cleanup은 바로 `exitCode`를 읽었습니다. -> fixture의 `close()`가 그 프로세스의 `exit`까지 10초 안에서 기다리고, 넘으면 pid를 말하며 실패합니다(home은 보존). - **#163** product analytics: `expect.poll`은 콜백이 던진 오류를 재시도하지 않습니다. daemon의 첫 저장 전에 `core-state.json`을 읽어 ENOENT로 즉시 실패했습니다. -> 없는 파일은 "아직 저장 안 됨"으로 읽고, 다른 오류는 그대로 던집니다. - **#266** handshake: semantic delta는 한 burst에서 바뀐 필드를 모두 싣습니다. 느린 runner에서는 시작 직후의 link backfill이 UI 변경과 같은 frame에 `navigator`를 실었습니다(실패 로그에 `backfill.done`). -> "navigator가 없다" 대신 "partial delta가 싣는 필드는 모두 그 reader가 가진 값과 다르고, 전체보다 적다"를 단언합니다. - **#230** hide-ai usage: usage child는 `fake-claude.cmd` -> `python`이고 그 step이 job의 첫 python 실행입니다(보통 0.9-3.7초, 나쁜 run 21-30초). -> TESTING.md Rust 규칙 8의 `stand_ins::ready_with_args`로 fake를 먼저 한 번 시작합니다(`FAKE_ENV` lock 안에서). - **#264 #265 #212** connect_stop: 이 step이 job의 첫 debug `hided` 시작입니다. 보통 0.8-1.2초, 나쁜 run은 세 테스트가 함께 10-18초, 그 재시도도 6-10초(첫 시작의 cold 비용이 끝나는 시점까지 기다린 것과 맞음). -> 같은 규칙으로 `hide connect` 전에 `hided node --version`을 한 번 시작합니다. - **#141** New tab: 새 탭은 선택되기 전에 먼저 그려집니다. 테스트는 탭 수가 늘고 선택이 draft가 아니면 선택된 탭을 읽었는데, 이전 탭 `w1:t1`도 그 조건을 만족해 이전 탭을 읽었습니다. -> 메뉴 단계가 이미 하듯 선택이 이전 탭을 떠날 때까지 기다립니다. - **#282** real_herdr: 마지막 실패는 fixture 폴더 삭제가 os error 32(다른 프로세스가 사용 중)였습니다. `PrivateHerdr::stop`은 server 프로세스만 기다렸고, Windows에서 pane shell(cwd가 fixture 안)이 server보다 오래 삽니다. -> server를 `OwnedChild`(Windows Job)로 시작하고, stop은 `capture_until`로 server와 그 트리 전체가 끝날 때까지 기다립니다(30초, 넘으면 트리를 끝내고 오류). </details> ## Review - **판단해 주세요**: 첫 시작을 미리 내는 세 곳(#256 #230 #264류)은 테스트가 재는 것과 무관한 cold 비용이라 TESTING.md 규칙 8을 따랐습니다. 다만 실제 PC의 첫 agent 시작·첫 hided 시작에서도 보일 수 있어 제품 쪽은 with-hide/hide-private#326으로 남겼습니다. - **판단해 주세요**: #266 단언은 원래 계약(UI 변경 delta는 바뀌지 않은 section을 싣지 않음)을 약하게 하지 않습니다. 예전에는 `navigator` 하나만 봤고, 이제는 실린 모든 필드가 바뀐 것인지와 전체보다 적은지를 봅니다. `navigator`는 실제로 바뀌었을 때만 실릴 수 있습니다. - **조심해서 볼 파일**: `hided/tests/it/support/private_herdr.rs` - 23곳이 쓰는 fixture의 stop이 이제 트리 종료까지 확인합니다(failure path: 남은 pane이 있으면 오류). - **조심해서 볼 파일**: `desktop/e2e/fixture.ts` - Playwright `ElectronApplication.close`를 감쌉니다(failure path: 끝나지 않는 프로세스는 10초 뒤 pid와 함께 실패, home 보존). - **조심해서 볼 파일**: `web/e2e/platform-fixture.ts` `prepareWindowsRun` - 두 e2e entry point의 Windows 준비 순서(PowerShell, hided, 마지막 compile 뒤 vctip). ## Evidence - **확인한 것 (원인)**: #256 실패 6건이 모두 job의 첫 테스트였고, 최근 30 run 중 1건 실패; artifact의 Herdr 로그로 첫 시작 46초/14.5초/이후 0.35초를 쟀습니다. - **확인한 것 (원인)**: #244의 반환 경로는 playwright-core 1.63 `ElectronApplication.close()`와 `launchProcess`(`shell: true`, `close` 이벤트) 소스로 확인했습니다. - **확인한 것**: `fixture-cleanup.unit.ts`의 새 두 테스트가 수정 전 코드(exit 대기 제거)에서 실패하고 수정 후 통과. desktop unit 28 files 295 passed. - **확인한 것**: desktop typecheck(e2e 포함), web/desktop lint, `verify-cargo.sh fmt-check` 통과. - **확인한 것 (CI 반복)**: 0c6740300에서 verify 40854250922를 두 번(attempt 1, 2) 돌려 둘 다 통과, 재시도 0, flaky 보고 없음. Windows desktop e2e 19/19 두 번(첫 테스트 포함), macOS desktop 58+61 두 번, Rust 6231/6231 두 번, Windows check와 Windows web e2e 통과. 미리 치른 첫 PowerShell 시작은 2.5-5.6 s, Windows usage 테스트 1회차는 첫 Python 시작이 20.7 s 걸렸지만 기한 밖에서 치러져 통과했습니다. - **확인한 것**: 2934e82b7의 #266 assertion은 Linux·Windows에서 결정적으로 실패했습니다(`rest`가 바뀌지 않은 delta는 `rest: null`을 보냄). 0c6740300이 그 frame을 건너뛰게 고쳤고, 위 두 번의 run에서 통과했습니다. - **확인하지 못한 것**: 이 Mac에서 Windows를 돌릴 수 없어 Windows 동작은 이 PR의 CI Windows job으로 확인합니다. 디스크 여유가 2-5 GB라 Rust 테스트(handshake, connect_stop, hide-ai)와 e2e는 로컬에서 빌드하지 못했고 CI로 확인합니다. <details><summary>Verification record</summary> - base: main d8da3e4 - head: 0c67403, verify 40854250922 attempt 1, 2 success - 범위에서 뺀 것(증거는 각 이슈 코멘트에): #214 #169 #254 #255 #280, #324(이번 원인은 트리 누락이 아님) </details>
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.
Related: PRD
agents/prd/home-device-rail/prd.mdSummary
~/hideHome을 만들고 등록 프로젝트 링크를 관리해, Home에서 탭과 에이전트를 시작할 수 있게 했습니다.~/hide를 덮어쓰지 않고 실패를 시작 위치에 표시합니다.원격 기기를 선택하면 Home 행과 에이전트가 같은 기기 맥락에 나타납니다.
시작 패널에서 요청을 적고 대상과 실행 종류를 고릅니다.
Review
herdr-core/src/runtime/home.rs,hide-host/src/home.rs,hided/src/mobile/start.rs- 원격 동기화, 실패 경로, 중복 시작 방지.hide-host/src/protocol.rs,web/src/settings.ts- 기기 설치 기능과 Home의 helper 계약 및 동의 문구.docs/UI_BEHAVIOR.md- 최신 Overview 갱신 동작과 Home의 기기별 범위를 함께 반영한 병합 문서.Evidence
design/hide-screens.pen과design/hide-ui.lib.pen에 Home, 기기 레일, 시작 패널 화면·컴포넌트를 반영했습니다.Verification record
agents/prd/home-device-rail/prd.md(sha256 bf4358cf83c8b54e230ee299ad480fe2437577e8760d5ff55d08eb95afe378b5)agents/runs/home-device-rail/verification-report.jsonandagents/runs/home-device-rail/verification-report.md; source fingerprint a5c6b28a98365f21e70c90037abca98643559b2e6c4c13afe13d738675e7459fbash scripts/verify-cargo.sh test(exit 0)bash scripts/verify-cargo.sh lint(exit 0)hide-kit/src/cli.rs명령 디렉터리 권한 검사는 후속 개선.