Repository navigation
Add web Settings and workspace management (S5) - #142
Merged
Merged
Conversation
Worktree deletion and starting the chosen agent in a created pane were executed by the Swift shell, so the web shell had no executor and any client could claim a removal finished. Both now run on the core worker that owns the request: - The close worker rechecks Git's registration, HEAD, branch, protected base, nested worktrees and dirt against the confirmed request, then runs non-force `git worktree remove` and `git branch -d` itself. The `worktree_removal_finished` event is gone; phases are closing, removing, finished, failed. Only a pane outside the set Herdr confirmed closed counts as appearing during the confirmation. - The creation worker starts the agent with `agent.start` after the creation is published and reports `agent_phase`/`agent_message` apart from it; a missing CLI fails before Herdr is asked, a transport failure is unknown, and `task_agent_retry` reuses the recorded pane. - A new branch name is checked with `git check-ref-format` before any worktree is created. - `retry_connect` makes a real new connection attempt for a device. - `ui_state.browser_shortcut_bindings` holds the web host's pane chords apart from the Swift host's, kept when a save omits it. - `create_pane` is refused while an SSH device is selected, so a split never falls back to this machine. - A hook install refusal is announced, and a saved AI choice reads as chosen without waiting for the next launch. The Swift shell now only reports the core's results.
hided sends a `daemon` frame after a valid handshake (version, pid, schema, state paths, Herdr binary and socket, idle policy) for Settings > General; it never carries the token. The core has one flag that runs the provider probe and the hook diagnosis while Settings > Agents is open. With several pages connected, the daemon now records each connection's `ai_settings.observing` as its own demand and moves the flag only on the first observer in and the last one out; a connection that closes releases its demand.
The four accents Settings offers were literals in the native sheet. The web sheet needs their values and swatches from the token authority, so they are AccentChoice tokens in HideTheme, design/tokens.json, the Pen map and the generated CSS.
The web shell gains the native Settings sections less Pet, opened from the sidebar gear or ⌥, and returning focus to the work on close: - General: the daemon, Herdr state with its cause, environment checks, recent diagnostics and a redacted Copy diagnostics. - Appearance: accent choices and interface font 11-17, applied from the core's ui_state and restored on reload; terminal and editor sizes stay their own. - Agents: CLI availability and sign-in, Background AI provider and model, and hook install behind a confirmation that names the file. - Devices: register, Test, Retry, select and remove SSH devices; with a device selected the shell shows its context instead of local tabs and sends no local pane command. - Shortcuts: record, apply and reset the seven browser pane chords, with Chrome-reserved, conflicting and modifier-less chords refused in the row; the window listener and the ⌘/ sheet read the same registry. Project and checkout rows get a ⋯ menu (also on right-click) for Pin/Unpin, New worktree, purpose and worktree deletion; each dialog reads only its own request's receipt. A created worktree's pane is focused once listed, and closing a dialog gives terminal focus back without reporting it as an operator move. The ui_state echo no longer carries the registration lists, which their own events own.
ARCHITECTURE covers the core-owned removal and agent start, the daemon frame and observation demand, web Settings and management, the selected device context and the per-host shortcut overrides. The hook, AI provider, design and contribution guides follow the changed behavior.
The sheet lists 27 commands now, and Settings is the eighth chord moved because Chrome keeps ⌘,.
The daemon frame arrives before the snapshot, and marking the page live on it ran the reconnect buffer reconciliation with no open documents, so a recovery draft was discarded. The frame is stored and the page turns live on the snapshot, as before.
- create_worktree accepts only the claude and codex agent kinds, since the kind reaches agent.start and runs in the new pane. - A task cannot take the slot while a created pane's agent start is still due, so its answer and Retry are not lost. - retry_connect compares the remote state `connected`, so a connected device is never torn down from a stale screen. - The daemon announces an observation change while its demand is locked, so two transitions reach the core in order. - The Agents tab declares its demand again after a reconnect.
… edits Typing into a remote pane leaves the core's terminal pane on that host's scoped id. Selecting this machine again, or losing the selected device, now hands the keyboard back to the local selected pane (or the focused checkout's active pane) and records terminal.keyboard_returned_local, so keys never keep flowing to the host the operator left while the local session is idle. Registering or removing a device rebuilt the whole catalog from registrations, which dropped every checkout's tabs until the next session publish. Device edits now rebuild only the device rows and keep each row's agent count. rebuild_catalog stays as test setup only.
The sidebar ends in a device switcher like the native picker: a chip naming the selected device opens one list of devices with their connection and agent count, arrow keys move focus, and Enter or a click selects. Selecting a connected device shows that host's projects, agents, visible tab and pane layout with live terminal output, following the tab the core attaches. Split, zoom, close, focus, tab create, switch and close go out as remote_control for that exact target with a fresh request id, from the host's scoped ids, and nothing is sent while it is not connected. Find, reopen, reorder and the file palette are refused with a notice rather than run on this machine, and the right panel says remote files are not available. A lost connection keeps the last layout on screen behind a stale banner with Retry. Selecting this machine again restores the local context without touching the remote work.
The last Test result stays under the device row after the connection changes, so "Connection test passed" beside "not connected" read as the current state. A finished test now names the time it ran.
HyunjunJeon
pushed a commit
to HyunjunJeon/hide
that referenced
this pull request
Nov 9, 2026
…ule (with-hide#2160) Closes with-hide/hide-private#580 Closes with-hide/hide-private#606 Closes with-hide/hide-private#607 Closes with-hide/hide-private#608 Closes with-hide/hide-private#609 Closes with-hide/hide-private#385 Closes with-hide/hide-private#386 Closes with-hide/hide-private#387 Closes with-hide/hide-private#240 Closes with-hide/hide-private#241 ## Summary Windows에서 기기 연결과 hook 시험의 첫 PowerShell 시작이 가끔 60-90 s 동안 아무 말 없이 멈췄습니다. 원인은 PowerShell이 처음 쓰는 명령(`Write-Output`, `New-Object`, `Add-Type`, `Test-Path`)을 찾으려고 설치된 모듈 전체(러너에서 약 260개)를 읽는 데 있었습니다. 모듈 목록 캐시를 쓸 수 없으면 한 번에 12-38 s가 걸렸습니다. 이제 기기 시작 스크립트는 자동 로드를 끄고 쓰는 모듈 하나만 이름으로 불러옵니다. 캐시 없이도 1 s 안쪽입니다. 제한 시간은 그대로입니다. 첫 시작이 기한을 넘기면 실패 메시지가 그 프로세스의 pid, 쓴 CPU 시간 대 경과 시간, 받은 캐시 경로를 말합니다. ## Review - **조심해서 볼 파일**: `hide-node/src/ssh/bootstrap.rs` - 실제 기기에 가는 래퍼입니다. 모든 로그인 셸의 따옴표 안에 들어가므로 따옴표 없는 형태로 썼고, 그 검사(`the_powershell_wrapper_holds_nothing_a_login_shell_reads_inside_quotes`)는 그대로 통과합니다. 자동 로드가 꺼져 있어 스크립트가 앞으로 Utility 밖의 cmdlet을 쓰면 그 자리에서 이름과 함께 실패합니다. - **조심해서 볼 파일**: `hide-platform/src/process.rs` - 새 사실 `cpu_time(pid)` 하나(macOS `proc_pidinfo` + 시간 기준, Linux `/proc/<pid>/stat`, Windows `GetProcessTimes`), 세 시스템 계약 시험 `processor_time_counts_a_process_s_work_and_not_its_wait`. - **판단해 주세요**: PowerShell 로그인 셸(DefaultShell=powershell)은 래퍼 전에 `exec`를 찾습니다. 캐시가 차가우면 그 한 번은 여전히 전체 모듈을 읽습니다(측정 38 s). POSIX 첫 문장 앞에는 아무것도 둘 수 없어 이 PR에서 다루지 않았습니다. - 반복 중 드러난, 이 PR이 바꾸지 않은 시험: with-hide/hide-private#636, with-hide/hide-private#637, with-hide/hide-private#638. Cursor hook의 같은 종류 후속은 with-hide/hide-private#630에 적었습니다. - 이 그룹에서 뺀 이슈(다른 원인): with-hide/hide-private#523, with-hide#532, with-hide#142. ## Evidence - **확인한 것**: 원인 측정(새 windows-latest 러너, 임시 workflow, run 42198773191, 42199406507): 캐시 없이 `Write-Output` 17.4 s, 다시 12.1 s, 넷 동시 32 s; 자동 로드 끄고 Utility import 후 `Write-Output`/`New-Object`/`Add-Type` 0.87 s. - **확인한 것**: 20회 반복, retries 0, 임시 push workflow(리뷰 전에 지움). run 42201192406: 러너 5대 x 4회, bootstrap windows_tests 20/20 통과(10회는 빈 캐시). run 42203347592: 새 러너 20대 x 1회, bootstrap windows_tests 20/20(10대는 빈 캐시), hide-agent-hooks `it`의 Windows 레인 선택(`hook_deadline|windows_hook_command|windows_scripts`) 20/20 통과. - **확인한 것**: 고친 두 줄을 지키는 Windows 시험: `the_start_script_runs_under_an_empty_module_cache_without_building_one`(빈 캐시에서 실제 스크립트가 캐시를 만들지 않음, import 줄)과 `a_cmdlet_outside_the_wrappers_import_fails_by_name_and_starts_no_search`(import 밖 cmdlet은 이름과 함께 바로 실패, 자동 로드 줄). PR의 run 42212770068에서 1.0 s, 3.6 s로 통과. 자동 로드 줄만 지운 임시 브랜치 run 42212808334에서는 두 번째 시험이 실패(`Get-Item`을 21 s 검색 끝에 찾음). - **확인한 것**: `cpu_time` 계약 시험 macOS 로컬과 Windows 러너(run 42203347592)에서 통과. clippy, fmt 로컬 통과. - **확인하지 못한 것**: 실패한 CI 회차에서 러너의 기본 캐시(`C:\PSModuleAnalysisCachePath`)가 왜 쓸 수 없었는지. 이제 캐시와 상관없이 기다리지 않으므로 고치는 데는 필요 없지만, 다시 멈추면 새 기한 보고가 이를 말합니다. - **확인하지 못한 것**: hooks lib 시험 `codex_daemon::tests::a_windows_codex_that_runs_node_answers_its_features`가 새 러너 20대 중 8대에서 실패(Node 첫 시작이 5 s 제품 기한을 넘김, PowerShell 아님, 이 PR과 무관): with-hide/hide-private#638. - **확인하지 못한 것**: Linux에서의 `cpu_time` 계약은 이 PR의 os contract 레인이 확인합니다. - **확인하지 못한 것**: 실제 Windows 기기 연결(ssh)은 돌리지 않았습니다. 같은 스크립트를 실제 `powershell.exe`와 네 로그인 셸로 돌리는 bootstrap windows_tests로 확인했습니다. <details><summary>Verification record</summary> - 임시 workflow 커밋: 023fd9f, 16699a3, 8bef1a4, ddbb606, 777f9fc; 제거 6ee02e1. </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:
agents/prd/web-shell-pivot-s5/prd.md(S5, after #141)Summary
웹 셸에서 Swift로 돌아가지 않고 Settings(General·Appearance·Agents·Devices·Shortcuts)와 진단을 보고, 프로젝트 pin·Workspace purpose·worktree 생성/삭제·원격 기기를 관리할 수 있게 했습니다.
사이드바 맨 아래 기기 전환기(native
HideDevicePicker형태)에서 연결된 SSH 기기를 고르면 그 host의 프로젝트·agent·보이는 탭·pane 배치와 실시간 터미널이 보이고, 입력과 split/close/zoom/focus/탭 명령은 그 host의 정확한 pane에만 갑니다.Swift만 하던 worktree 삭제 실행과 생성 후 agent 시작을 core 워커로 옮겨 두 셸이 같은 실행자를 쓰고, 클라이언트가 삭제 완료를 주장할 수 있던
worktree_removal_finished이벤트를 없앴습니다.hided는 핸드셰이크 뒤
daemon프레임을 보내고, Settings 관찰 플래그를 연결별 수요로 소유합니다.스크린샷은 격리 fixture(가상 기기 Studio Mac)에서 찍었습니다.
Review
remote_controlfocus_tab으로 host를 움직입니다.AccentChoice토큰으로 승격했습니다(design/tokens.json,HideTheme, Pen 변수 4개). 값은 그대로입니다.web/src/actions.ts- failure path, 원격 명령이 로컬 id나 로컬 대상으로 fallback하지 않는지(remoteHost,sendRemote,requestClose).herdr-core/src/runtime/terminal.rsreturn_keyboard_to_local_pane- Herdr/core ownership, 로컬로 돌아올 때 키보드 pane을 원격 id에서 되돌림.herdr-core/src/runtime/devices.rsrebuild_device_rows- 기기 등록/제거가 catalog 전체 재구성으로 로컬 탭을 비우던 문제를 기기 행만 갱신으로 바꿈.herdr-core/src/worktree_cleanup.rsremove_confirmed,worktree_control.rs- 되돌릴 수 없는 삭제 직전 재검사, lock 밖 Git 실행(runtime mutex).herdr-core/src/runtime/session.rstaskagent_phase- snapshot wire에 필드 2개 추가, Swift는 선택 필드로 디코드.hided/src/server.rs-ai_settings.observing분리와 연결 종료 시 수요 해제.focus_pane으로 명시합니다. core ingest가 pending focus를 직접 등록하는 편이 나을까요?Evidence
w1:p1만 닫히고 로컬w1:p1은 남음.terminal.keyboard_returned_local진단이 원격 id에서 로컬 pane으로 복귀를 기록.session.snapshot·agent.list·pane.updated구독만 쓰고remote_control은 사용자 요청 경로에서만 시작됨을 코드로 대조.verify-cargo.sh lint,verify-cargo.sh test1,098개 통과(실패 0), 신규 core 테스트 2개(로컬 복귀 키보드, 선택 기기 제거 뒤 로컬 탭 유지).pty단계가 통과했는데, 준비 안내에는 그 키에 PTY 할당이 금지돼 있다고 되어 있어 대조가 필요합니다.user-attachments대신 PR 작성자 계정의 secret gist에 올렸습니다(저장소에는 커밋하지 않음).HerdrApp.swift:241을 data race로 거부합니다(CI macos-15swift shell통과).acceptance_timeout_ends_cli_spawned_before_watcher간헐 실패(이번 실행은 통과), 설치 앱의 hook 설치 성공 경로(standalone hided는 helper 없음으로 거절).hide.browserhost가 조용히 종료됨(QA pane만--env PATH로 우회).70846bc커밋 본문에 agent 이름이 백틱 없이 있어check-no-attribution.py기본 범위가 실패합니다. force push 없이는 고칠 수 없어 그대로 둡니다.design/hide-ui.lib.pen은gen-pen.mjs가 accent 변수 4개를 추가한 diff입니다.B1-B24 범위 점검
Breaking change
worktree_removal_finished이벤트 제거,worktree_removal.phase의ready가removing으로 바뀜. 같은 커밋의 Swift 셸만 소비자이며 저장 상태·설치 경로는 그대로입니다.AI tooling: 대부분 AI 도구로 작성. 격리 Herdr 두 개와 Browser pane에서 모든 원격 흐름을 직접 조작하고 두 Herdr의 pane 목록·레이아웃을 매 단계 대조.
Verification record
efd4e13, head42c142e; S5 continuation commitscf10555,4e04744,5b080d1,42c142e.scripts/verify-cargo.sh lint0,scripts/verify-cargo.sh test0 (1,098 passed, 0 failed, 9 ignored).tsc --noEmit,eslint src e2e,vitest run165/165,vite build, Playwright 32/32 with Herdr 0.9.1.check-design-contract.mjs,design-controls.test.mjs,check-hide-design.mjs,check-no-workstation-identity.sh,check-capability-readers-off-lock.sh,check-harness-ignore-anchor.sh0;check-no-attribution.py --range 70846bc..HEAD0.check-shortcut-contract.sh,check-right-panel-sections.sh) fail at the pre-existingHerdrApp.swift:241under Swift 6.3.1; CI runs them on macos-15.