Skip to content

Run only the bundled Herdr and derive the API contract from the pinned binary - #3

Closed
yansfil wants to merge 3 commits into
mainfrom
herdr-runtime-owned
Closed

yansfil wants to merge 3 commits into
mainfrom
herdr-runtime-owned

Conversation

@yansfil

@yansfil yansfil commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • hide runs only the Herdr it ships. The installed-CLI search, the version floor and the selection_order policy are gone; the bundle's binary is started only when its digest equals the pin in herdr-bundle.json.
  • contracts/herdr-api.schema.json is what the pinned binary answers to herdr api schema --json, written by scripts/bump-herdr.sh <release-tag>. The separate sync script and herdr-core/src/version.rs are deleted.
  • scripts/fetch-herdr-runtime.sh downloads and verifies the pinned asset into a digest-keyed cache; both the release build and the dev build read it from there.
  • A protocol mismatch now says which two protocols disagree and how to recover (herdr server stop, reopen hide, or update hide). The status bar shows that message ahead of the last action error until Herdr connects.
  • Every child herdr process, the server included, is pinned to the socket the core reads through HERDR_SOCKET_PATH, so XDG_CONFIG_HOME can no longer move the server away from the socket hide watches.
  • The pin moves to preview-2026-08-31-b1ff4582e968 (protocol 21), and a new core test asserts the pinned Herdr declares every session.snapshot field the replica reads.

Result

  • User-visible outcome: hide starts and connects to its own Herdr; a foreign Herdr on the socket produces an actionable status message instead of a stalled window.
  • Reviewer should be able to confirm: the manifest is the only place the pin is written; the contract equals the pinned binary's schema output; the resolver refuses a binary with any other digest; the child environment always carries the socket path.
  • Not included: a runtime the shipped app can actually run on. See Human Review Focus.

Screenshots / Demo

Run artifacts stay outside the repository by project rule. Two screenshots were taken on 2026-09-06 from the dev bundle launched with an isolated HOME, --state-path and HERDR_SOCKET_PATH:

  • Against an isolated stable v0.8.2 server (protocol 20) the status bar reads "The running Herdr speaks protocol 20; this hide needs protocol 21. Stop it with herdr server stop and reopen hide ...".
  • With no server on the socket, hide started its bundled binary, the status bar read "Connected to Herdr" and one workspace with one pane rendered. That run used a local Herdr build carrying the required API, placed in the fetch cache with a temporary manifest that was not committed.

Human Review Focus

  • Product behavior or requirement interpretation: No published Herdr release runs this core. session_sync.rs requires host, event_sequence and lineage in session.snapshot, and remote.rs/domain.rs read lineage fields. Stable v0.8.2 is protocol 20; the pinned preview is protocol 21 but lacks those fields, so a real launch on this branch ends at snapshot is missing lineage. Upstream master is protocol 22 and also lacks them. The API hide depends on exists only as uncommitted changes in a local Herdr working tree. The new test the_pinned_herdr_promises_every_snapshot_field_the_replica_reads fails on this branch for exactly that reason and is meant to stay red until the pin question is decided.
  • Specific questions for reviewers: which runtime should the pin name? (a) publish the local Herdr build as a downloadable asset and pin it; (b) upstream the local Herdr changes and wait for a release; (c) make the core run on upstream's API and drop the lineage/host/event-sequence dependence. Nothing after this PR (typed schema generation, the mapping layer) can be built until one of these is chosen.
  • Risky files, flows, or edge cases: RuntimeEnvironment.swift (resolver and child environment), scripts/bump-herdr.sh (document substitution order), .github/workflows/herdr-update.yml (numeric prefix comparison against a preview pin).
  • Data, auth, security, privacy, or permission concern: the dev build now downloads the pinned asset once per pin into ~/Library/Caches/hide/herdr-runtime/<sha256>/, verified by digest and reported version.
  • Deployment, migration, rollback, or operational concern: users who ran hide against an installed Herdr of another version will see the mismatch message until they stop that server.
  • UX, copy, visual polish, or content judgment: the mismatch and missing-runtime copy in the status bar and Settings.

Product And Scope Result

  • PRD or issue: N/A (conversation-scoped refactor)
  • Acceptance result: mechanics verified; runtime decision open.
  • Out of scope: typed schema generation in build.rs; replacing serde_json::Value navigation in session_sync.rs, live.rs, remote.rs.

Implementation Notes

  • Completed: runtime-owned policy, pin-derived contract, fetch cache, mismatch messaging, socket pinning, contract field test, docs and workflow updates.
  • Deferred: the pin decision above; typed schema; mapping layer.
  • Added or changed beyond the original plan: the socket is now always set for children (found while reviewing the "same socket" claim); the contract field test (the schema gate was green while the app failed at runtime).

Evidence And Checks

Result Area Outcome Evidence
Product behavior Blocked The mismatch path and the self-start path were both exercised end to end on the dev bundle (see Screenshots). Self-start only succeeded with a local Herdr build; the committed pin stops at snapshot is missing lineage.
UI, browser, mobile, or desktop result Pass Status bar shows the mismatch message ahead of the last action error; Settings shows the bundled runtime's version, path and digest.
API, service, or external provider result Pass An isolated pinned server started with XDG_CONFIG_HOME set and HERDR_SOCKET_PATH overridden bound only at the override path; the schema it reports equals the committed contract (check-herdr-contract.sh --schema-only).
CLI, package, or library result Pass bump-herdr.sh converges (unchanged) on the pinned tag, regenerates a drifted contract, and refuses a mislabelled asset; fetch-herdr-runtime.sh returns the cached path on a digest hit.
Docs, content, generated media, or course result Pass README, docs/INSTALL.md, contracts/README.md, AGENTS.md, third-party notice updated; check-herdr-pin-single-source.sh passes.
Static checks, automated tests, build, or CI Fail (intended) cargo test -p herdr-core: 275 pass, 1 fail (the new contract field test, by design). ffi_contract: 30 pass (one flaky run under concurrent build, three clean reruns). swift test: 222 pass. check-capability-readers-off-lock.sh fails on main as well and is addressed by #1.
Security, accessibility, or performance result N/A

Review And Delivery Evidence

  • PR delivery status: draft until the runtime decision is made.
  • CI status: verify is expected to fail on the contract field test.

Risks, Rollback, And Human Review

The app now starts the Herdr it ships and nothing else. HerdrRuntimeResolver
verifies the bundled binary against the manifest digest and starts it on the
Herdr socket when no server is running there; a server that is already
running is joined when its protocol matches and refused with both revisions
and the `herdr server stop` remedy when it does not. The installed-CLI
candidate list, the version floor and the dead Rust selection code go with
this: the pin is exact, so there is nothing to compare.

The shell reads HERDR_SOCKET_PATH by the core's rule (absolute path or the
default), so the socket it starts a server on is the one the core reads.
While Herdr is disconnected the status bar keeps naming the connection
failure instead of the last action's error, which is what to fix.

contracts/herdr-api.schema.json is what the pinned binary answers to
`api schema --json`: scripts/bump-herdr.sh writes it in the same run that
moves the pin, accepts a release tag (stable or preview), takes the version
from the binary, and refuses to write when the asset does not verify.
scripts/sync-herdr-contract.sh, which copied the file from a Herdr checkout,
is gone. scripts/fetch-herdr-runtime.sh downloads the asset once per digest
for both build scripts, so the development bundle carries the same runtime
the release does. The weekly update workflow compares the numeric prefix of
the pin against the latest stable release so a preview pin is not proposed
back to the stable it was cut after.
The stable v0.8.2 asset speaks protocol 20 while the core requires 21, so
the shipped app could never use its own runtime. The preview build is the
only published asset at protocol 21; the contract is now what that binary
reports, so the schema gate holds by construction.

This does not make the shipped app work. The core also requires snapshot
fields (host, event_sequence, lineage) and methods that no published Herdr
carries; against this runtime it stops at "snapshot is missing lineage".
Those definitions exist only in an unreleased local Herdr working tree.
Which runtime to ship is a separate decision; reverting this commit returns
the pin to stable.
…ned snapshot carries the replica's fields

The shell forwarded HERDR_SOCKET_PATH only when the launch environment
carried one, so with XDG_CONFIG_HOME set the bundled server bound under
the XDG directory while the core watched ~/.config/herdr/herdr.sock.
childEnvironment now always sets the socket to the path the core reads.

The schema gate compares a protocol number, which is green for a Herdr
whose session.snapshot still lacks host, event_sequence and lineage. A
contract test now lists every top-level snapshot field the replica reads
and asserts the pinned Herdr declares each one required. It fails on
this branch on purpose: no published Herdr carries those fields.
@yansfil

yansfil commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #4, now merged as 2c7caf0. The merged PR includes this bundled-runtime policy and pins the app to the tested fork prerelease.

@yansfil yansfil closed this Sep 6, 2026
yansfil added a commit that referenced this pull request Sep 26, 2026
Related: #175 (PR 1/3) · `agents/prd/task-agents-views/prd.md` · 다음:
#178 Dependencies 모드, #179 기다리는 것 띠

## Summary

웹 Overview의 Tasks 보드가 체크아웃 중심이라 "어떤 일이 있고 어디까지 갔나"를 답하지 못했다.
코어가 프로젝트의 이슈를 출처 중립 태스크(`tasks`, 체크아웃의 `task_key`)로 스냅샷에 싣고, 웹은 그것만 읽어
다섯 열 Board와 태스크 칩을 단 Agents 뷰를 그린다.
All projects도 같은 Tasks · Agents 뷰를 갖고, 출처 없는 프로젝트의 에이전트는 보드 아래 한 칸에 모인다.
웹은 지금까지 GitHub 읽기를 요청한 적이 없어서, Overview와 All projects 보드가 열릴 때
`github_request`를 보낸다.

![프로젝트 Tasks Board,
Dark](https://github.com/yansfil/pr-assets/blob/main/hide/task-agents-views/pr1/overview-tasks-dark.png?raw=true)
격리 Herdr + 가짜 `gh`(이슈 #2, #3): 백로그 #3, 이슈 #2가 머리인 카드, 태스크 없는 미추적 체크아웃,
질문 중 카드의 halo, 접힌 완료.

![All projects Tasks,
Light](https://github.com/yansfil/pr-assets/blob/main/hide/task-agents-views/pr1/all-projects-tasks-light.png?raw=true)
All projects: 모든 프로젝트 태스크를 한 보드에, 출처 없는 `fixture`는 보드 아래 한 칸.

![Agents 뷰,
Light](https://github.com/yansfil/pr-assets/blob/main/hide/task-agents-views/pr1/overview-agents-light.png?raw=true)
Agents: 에이전트마다 카드, 체크아웃 줄과 태스크 칩(없으면 "태스크 없음").

## Review

- **판단해 주세요**: All projects의 세 번째 탭을 보드처럼 `Sessions`가 아니라 기존 프로젝트 목록
`Projects`로 뒀다(All projects에는 세션 뷰가 없음).
- **판단해 주세요**: 빈 화면의 `GitHub 이슈 연결`은 연결 흐름이 아니라 `gh`의 사유와 `gh auth
login` 안내를 담은 팝오버다.
- **판단해 주세요**: 즉석 줄(main·폴더에서 일하는 에이전트)은 보드에 그려지지 않았지만 기존 행동이라 남겼다.
- **조심해서 볼 파일**: `herdr-core/src/model.rs` - snapshot wire: `tasks`,
`task_key`, `closes_task_keys`를 더하기만 했고 문자열 enum은 없다.
- **조심해서 볼 파일**: `herdr-core/src/runtime/issues.rs` - `sync_tasks`는
`Mutex<Runtime>` 안의 순수 투영이다(`gh` 호출 없음, 변화 없으면 publish 없음).
- **조심해서 볼 파일**: `herdr-core/src/tasks.rs` - failure path: 한 번 답한 출처는
실패해도 마지막 태스크와 사유를 유지, 못 읽은 적만 있으면 "연결 안 됨".
- **질문**: Q1 Dependencies는 Tasks 안의 모드로 충분한가(다음 PR에서 모드로 구현).
- **질문**: Q2 출처가 여럿일 때 All projects에서 섞을지 나눌지(지금은 GitHub 하나라 섞음).
- **질문**: Q3 40개 넘는 열은 앞 40개 + `스크롤 · N개 더 보기`, 열 안 스크롤로 뒀다. 충분한가.
- **질문**: Q5 All projects 사이드바 행의 에이전트 수는 이번에 건드리지 않았다.
- **질문**: Q6 All projects Board 카드의 프로젝트 이름은 그리지 않고 ID 툴팁(`GitHub · 프로젝트
· 브랜치`)에만 넣었다.
- **질문**: Q7 로컬 파일 태스크 형식은 정하지 않았다(스냅샷의 `source`는 문자열이라 어댑터만 더하면 된다).
- **질문**: Q8 백로그 카드에는 "에이전트 시작"이 없다. 준비 카드의 시작은
`claude`·`codex`·`terminal` 공급자를 고르는 기존 `agent_start_in_checkout`이다.
- **질문**: 기반이 확인되는 저장소에서는 자기 커밋 없는 브랜치가 머지됨으로 읽혀 "준비" 열에 카드가 거의 오지
않는다(기존 단계 규칙). 그대로 둘지.

## Evidence

- **확인한 것**: `verify-cargo.sh lint`, `verify-cargo.sh test`(herdr-core
810 외 전체 통과), `verify-swift.sh test`(533 통과, 스냅샷 디코딩 포함).
- **확인한 것**: web typecheck·lint·vitest 360개, `projectBoard.test.ts`가 다섯
열, 백로그, PR 칩 색, 한 PR이 두 이슈를 닫는 경우, 에이전트 2+N, 시작 조건, 실패 유지, 빈 상태, All
projects를 검증.
- **확인한 것**: `pnpm --dir web e2e` 전체 63개 통과(격리 Herdr 0.9.1, 한 worker).
CI에서 워크트리 수가 5초 안에 4가 되지 않아 옆 사실들처럼 20초를 기다리게 고쳤다.
`s2`·`s6`·`s8`·`wire.ts`는 All projects의 Projects 탭을 눌러 들어가게 고쳤다.
- **확인한 것**: `overview.spec.ts`를 격리 Herdr 0.9.1과 PATH에 둔 가짜 `gh`로 실행:
이슈가 태스크가 되고, `#2` 링크가 이슈 URL, 백로그, 미추적 체크아웃, All projects 보드와 출처 없는 칸, 뷰
유지.
- **확인한 것**: `check-design-contract.mjs`,
`hide-screens`·`pen-transplant`·`pen-gallery`·`design-scratch` node 테스트,
CONTRIBUTING의 check 스크립트 전부, `check-no-attribution.py`.
- **확인한 것**: Light·Dark 앱 캡처를 승인 보드(`board-final` 1·4·5)와 눈으로 비교: 열 구성,
카드 머리의 `#id`, 사실 칩, 에이전트 행, 태스크 없음, 빈 화면.
- **확인하지 못한 것**: 실제 GitHub 저장소 대상 라이브 확인. 이슈 읽기는 가짜 `gh`와 단위 테스트로만 확인했다.
- **확인하지 못한 것**: `design/hide-screens.pen` Screen 시트의 Pen 렌더링. 이 기기에 pen
CLI가 없어 export 비교를 못 했고 정적 검사만 통과했다.
- **확인하지 못한 것**: "에이전트 시작" hover는 단위 테스트(`canStart`)만: 픽스처에서 준비 열 카드를 만들
수 없었다(위 질문).
- **확인하지 못한 것**: 원격 기기 칩(B12)과 40개 넘는 열은 단위 테스트만, 원격 기기 라이브 확인 없음.
- **생성물**: `design/hide-screens.pen`은 `node scripts/gen-screens.mjs`가 쓴
것이다(`Screen / Main`, `Screen / Project Overview`).

**AI tooling**: 대부분 AI 도구. 승인 보드 이미지와 앱 캡처를 손으로 대조했다.
yansfil added a commit that referenced this pull request Sep 26, 2026
Related: #175 (PR 2/3) · #177 위에 쌓음 ·
`agents/prd/task-agents-views/prd.md` · 다음: #179 기다리는 것 띠

## Summary

Board는 어떤 일이 어디까지 갔는지 보여 주지만, 무엇이 무엇을 기다리는지는 보여 주지 않았다.
코어가 GitHub 이슈의 `blockedBy`를 한 번의 GraphQL 질의로 읽어 태스크의 `blocked_by`로 싣는다.
웹은 카드에 자물쇠 줄(자물쇠 + `#2`)을 달고, Tasks 탭 줄 오른쪽의 `Board | Dependencies` 모드로
같은 카드를 선행 관계 순서대로 왼쪽에서 오른쪽으로 그린다.
All projects에서는 카드 제목 위에 프로젝트 이름이 붙고, 프로젝트를 넘는 선행 관계도 간선으로 그린다.

![프로젝트 Dependencies,
Dark](https://github.com/yansfil/pr-assets/blob/main/hide/task-agents-views/pr2/overview-dependencies-dark.png?raw=true)
격리 Herdr + 가짜 `gh`(#3이 #2에 막힘): #2(진행 중)에서 #3(백로그, 자물쇠 + 흐림)으로 간선 하나, 범례
한 줄.

![All projects Dependencies,
Light](https://github.com/yansfil/pr-assets/blob/main/hide/task-agents-views/pr2/all-projects-dependencies-light.png?raw=true)
All projects: 제목 위 프로젝트 이름, 출처 없는 `fixture` 칸은 "의존 관계를 그릴 태스크가 없음".

![Board의 자물쇠 줄,
Light](https://github.com/yansfil/pr-assets/blob/main/hide/task-agents-views/pr2/overview-tasks-light.png?raw=true)
Board: 백로그의 #3 카드에 자물쇠 `#2`.

## Review

- **판단해 주세요**: 배치는 라이브러리 없이 직접 짰다(최장 경로 층 + 한 번의 barycenter 정렬, 60줄 남짓).
이유는 아래 "배치 라이브러리".
- **판단해 주세요**: 새 토큰 `--home-dependency-gap: 96`(층 사이 간격, 간선이 보일 자리).
DESIGN_WORKFLOW 5단계대로 승인이 필요하다.
- **판단해 주세요**: 막힘 흐림은 Dependencies에서만 적용했다. Board의 막힌 카드는 자물쇠 줄만 달고 흐리지
않다(승인 보드 2와 같음).
- **판단해 주세요**: 모드는 뷰처럼 페이지의 것이라 범위를 바꿔도 남는다(B9 기본값, 사용자 확인 전).
- **조심해서 볼 파일**: `herdr-core/src/github.rs` - Herdr 밖 호출: `run_gh` 허용
목록에 `query HideIssueDependencies {`만 더했다. 질의는 저장소별 한 번, 이슈당 blocker
20개까지다.
- **조심해서 볼 파일**: `herdr-core/src/runtime/projects.rs` - failure path: 의존
관계 읽기가 실패하면 이슈는 새로 읽은 값, blocker는 이전 값을 유지하고 출처에 실패를 적는다.
- **조심해서 볼 파일**: `herdr-core/src/tasks.rs` - snapshot wire: `blocked_by:
[{key, id}]`를 더하기만 했고 문자열 enum은 없다.
- **조심해서 볼 파일**: `web/src/TaskBoards.tsx` - 간선은 그려진 카드를
재서(`ResizeObserver`) 그린다. 값이 같으면 다시 그리지 않는다.
- **질문**: Q1 Dependencies는 Tasks 안의 모드로 충분한가(지금은 모드).
- **질문**: Q4 나중의 에이전트 Graph와 이 Dependencies를 같은 화면에서 토글할지 나눌지. 이번에는
Tasks 모드만 만들었다.
- **질문**: 범위 밖 blocker(다른 저장소, 등록 안 된 프로젝트)는 자물쇠 줄에만 `owner/repo#N`으로 남고
간선은 없다. 충분한가.
- **질문**: 순환(출처가 막아야 하는 경우)은 순환을 닫는 간선 하나를 빼고 그린다. 경고 표시가 필요한가.

### 배치 라이브러리

- dagre(`@dagrejs/dagre`)와 elkjs를 검토했다. 둘 다 노드 크기를 미리 받아 좌표를 돌려주는 방식이다.
- 이 카드는 HTML이고 높이가 에이전트 행과 제목 줄바꿈에 따라 달라서, 크기를 알려면 먼저 그려야 한다. 라이브러리를 쓰면
그리기 → 재기 → 배치 → 다시 그리기가 된다.
- 필요한 배치는 층 나누기와 층 안 순서뿐이라 열은 flex로 두고 간선만 잰다. elkjs는 번들이 1MB를 넘고 비동기다.
- 그래서 채택하지 않았다(engineering 6, 7). 태스크가 늘어 교차 최소화가 더 필요해지면 다시 검토한다.

## Evidence

- **확인한 것**: `verify-cargo.sh lint`, `verify-cargo.sh test`(1297 통과),
`verify-swift.sh test`(533 통과, 늘어난 스냅샷 필드 디코딩 포함).
- **확인한 것**: 코어 단위 테스트: 한 질의로 읽고 열린 blocker만 남김, `errors` 응답은 빈 답이 아닌
실패, 실패한 pass가 이전 blocker 유지, blocker의 key와 id(다른 저장소면 `owner/repo#N`).
- **확인한 것**: web typecheck·lint·vitest 363개. `projectBoard.test.ts`에 층
배치, 간선, 관계 없는 태스크, 미추적 체크아웃 제외, 프로젝트 간 간선, 범위 밖 blocker, 제목 대체,
barycenter 순서, 순환을 더했다.
- **확인한 것**: `pnpm --dir web e2e` 전체 63개 통과(격리 Herdr 0.9.1).
`overview.spec.ts`의 가짜 `gh`가 `api graphql`에 답해 #3이 #2에 막힌 경우를 Board 자물쇠,
Dependencies 층, 간선 `d`, 상태 단어, All projects 유지로 확인했다.
- **확인한 것**: 실제 GitHub에서 같은 모양의 질의(`modakbul-gongbang/hide` #171, #175,
읽기 전용)가 오류 없이 답했다. 실제 의존 관계가 없는 이슈라 빈 `nodes`였다.
- **확인한 것**: `check-design-contract.mjs`, design node 테스트 30개,
CONTRIBUTING의 check 스크립트 전부, Herdr 스키마 계약, python 스크립트 테스트,
`check-no-attribution.py`.
- **확인하지 못한 것**: 실제 저장소에서 `blockedBy`가 채워진 이슈로 라이브 확인. 채워진 응답의 파싱은 가짜
`gh`와 단위 테스트로만 확인했다.
- **확인하지 못한 것**: `design/hide-screens.pen`의 새 Dependencies 프레임 Pen 렌더링.
이 기기에 pen CLI가 없어 export 비교를 못 했고 정적 검사만 통과했다.
- **확인하지 못한 것**: 카드가 많을 때(수십 개, 여러 사슬) 간선 교차와 스크롤 성능. 픽스처는 사슬 하나다.
- **생성물**: `design/hide-screens.pen`, `design/hide-ui.lib.pen`,
`web/src/tokens.css`는 `gen-screens.mjs`, `gen-pen.mjs`,
`gen-tokens.mjs`가 쓴 것이다.

**AI tooling**: 대부분 AI 도구. 승인 보드 1·3의 Dependencies와 앱 캡처를 손으로 대조했다.
yansfil added a commit that referenced this pull request Oct 3, 2026
Related: #293 (batch 7, 항목 4)

## Summary

`pnpm --dir desktop package`가 macOS `hide.app`만 만들던 것을, 실행한 시스템의 패키지를
만들도록 넓혔습니다.
Windows x64는 폴더를 zip으로, Linux x64는 폴더를 tar.gz로 묶고 각각 `.sha256`을 붙입니다. 둘
다 서명하지 않습니다(운영자 결정 2026-10-03). macOS는 지금처럼 ad-hoc 서명입니다.
새 `package.yml`이 windows-latest와 ubuntu-latest에서 각 패키지를 만들고, 압축을 풀어 창 없이
띄워 봅니다(`smoke-package.mjs`). release는 이 워크플로를 불러 세 패키지를 한 draft에 올립니다.
smoke를 준비하다 Windows에서 `hide connect`가 성공할 수 없던 원인 세 가지를 고쳤습니다:
`hided.exe`가 아니라 `hided`를 찾았고, `/health`를 `/usr/bin/curl`로 물었고, detach한
`hided`가 CLI의 stdout 파이프를 상속해 호출자(데스크톱 앱)가 출력 끝을 영영 못 보게 됩니다.

```
ok checksum / unpack / bundled files / herdr --version / hide-host-helper-<os>-x86_64 --version
ok hide-agent-hooks doctor --json / Electron runs the bundled hcoord as Node
ok hide connect starts the bundled daemon / the daemon answers /health / serves the web shell it embeds / hide stop ends it
```

## Review

- **판단해 주세요**: 형식은 같은 도구(@electron/packager) 그대로 zip(Windows)과
tar.gz(Linux)입니다. 설치 프로그램(NSIS/MSIX)이나 AppImage/deb는 다른 도구가 필요하고, 서명 없이
얻는 것이 없어 뒤로 미뤘습니다. tar.gz는 실행 비트를 보존합니다.
- **판단해 주세요**: `package.yml`은 PR에서는 패키지에 들어가는 경로(`desktop/scripts/**`,
`desktop/package.json`, `desktop/resources/**`, Herdr pin과 fetch 스크립트,
`verify-cargo.sh`, 워크플로 자신)를 바꿀 때만 돌고 `verify`에 넣지 않았습니다. 콜드 release 빌드라
`windows check`의 몇 배가 들고, 일부 PR에서만 도는 검사는 required가 될 수 없습니다. 패키지는 7일간
artifact로 남아 실기 확인에 쓸 수 있습니다.
- **판단해 주세요**: Linux에서 마지막 창을 닫으면 앱이 종료됩니다(macOS만 창 없이 남음). 관례대로 두고
INSTALL과 ARCHITECTURE에 적었습니다. `hided`는 어느 쪽이든 계속 돕니다.
- **조심해서 볼 파일**: `hided/src/cli.rs` - failure path. `hide
connect`/`status`의 health 확인이 curl fork에서 이미 링크된 `ureq`(프록시 없음, 1초)로
바뀌었습니다.
- **조심해서 볼 파일**: `hide-platform/src/process.rs` - ownership. Windows
`detach`가 이 프로세스의 표준 핸들 상속 플래그를 끕니다(프로세스 전역 상태). 이후 `Stdio::inherit` 자식은
std가 상속 가능한 사본을 넘기므로 영향 없습니다. 실패는 `io::Result`로 올라가 `start_failed`가 됩니다.
- **조심해서 볼 파일**: `hide-kit/src/local.rs` - 화면 문구. macOS 밖에서는 This
machine 행이 "Hide installs its kit only from its macOS app, so it
installs nothing on this machine"을 보여 줍니다(이전 문구는 "설치된 앱으로 열라"는 거짓 안내).
- **조심해서 볼 파일**: `desktop/scripts/package.mjs` - macOS 경로를 공유합니다. 로컬에서
macOS 패키지를 한 번 만들어 서명, RunAsNode 확인, 아이콘, Resources 목록이 그대로인 것을 봤습니다.
- **조심해서 볼 파일**: `.github/workflows/release.yml` - 태그 없이는 돌릴 수 없습니다. 각
패키지가 artifact가 되고 `draft` 잡 하나가 체크섬 3개를 확인한 뒤 draft를 하나 만듭니다.
- **질문**: Windows/Linux 패키지는 kit(`hide` 링크, 훅, hcoord)을 설치하지 않습니다.
`hide_kit::bundled_kit_dir`가 `hide.app/Contents/Resources`만 알아보기 때문입니다.
같은 이유로 새 버전이 이전 버전의 `hided`를 교체하지 않고 거절하므로, INSTALL에 업데이트 전
`resources/hide stop`을 적었습니다. Electron 폴더 구조를 알아보게 할지는 #3(Windows 훅 명령)이
들어온 뒤 정하는 게 맞아 보입니다. 어떻게 할까요?
- **원칙**: #2 가장 단순한 형식(새 도구 없음). #3 창 없이 시작까지 증명된 패키지를 먼저, kit/설치기/서명은 그
위에. #4 다른 아키텍처는 거절, 빠진 파일은 이름으로 실패. #7 기존 packager, 시스템 tar, 이미 있는
`ureq`. #12 새 테스트와 smoke 모두 심은 버그로 수익을 확인. #14 smoke와 테스트는 시작한 데몬을 모든
경로에서 멈춤.
- hcoord는 macOS와 같은 `resources/hcoord/dist`로 넣었습니다. #3이
`hide-kit/src/hcoord.rs`에 Windows 런처를 넣어도 패키지 내용은 바뀌지 않고, kit이 Windows
패키지에서 켜질 때 런처가 쓰입니다.

## Evidence

- **확인한 것**: 새 `connect_stop` 테스트가 macOS에서 통과. `hided` 이름에 `.exe`를 붙이는
버그를 심으면 `start_failed`, health 확인을 깨면 `no_response`로 실패.
- **확인한 것**: 새 OS contract 테스트(detach한 자식이 부모 출력을 붙잡지 않음)가 macOS에서 통과.
자식에 stdout을 상속시키는 버그를 심으면 15초 뒤 실패. Windows에서의 결과는 아래 CI.
- **확인한 것**: smoke 스크립트를 로컬 debug 바이너리로 만든 Linux 구조의 가짜 tar.gz에 돌려 11개
확인 모두 통과. `hided`를 시작 못 하는 파일로 바꾸면 `hide connect` 단계에서 이름을 달고 실패.
- **확인한 것**: `HIDE_VERSION=0.0.0-local.1 pnpm --dir desktop package`로
macOS 패키지 생성(서명 검증 통과), 확인 후 출력과 `target/release` 삭제.
`/Applications/hide.app`은 건드리지 않음.
- **확인한 것**: `verify-cargo.sh lint`, 워크스페이스 테스트 57 suite, desktop
lint/typecheck/test, script suite, pin single-source 검사.
- **확인한 것**: 첫 push(head `5ff03f0d`)에서 `verify` run 37123328975 전부
green. `windows check`에서 `connect_stop` 통과(0.4초), `os contract
(windows)`에서 새 detach contract 통과.
- **확인한 것**: `package` run 37123328851 green. Windows: release 빌드
14m51s, 잡 17분, zip artifact 약 200 MB. Linux: 빌드 7m28s, 잡 9분, tar.gz 약
164 MB. 두 runner 모두 smoke 11개 확인 통과(`hide connect` -> `/health` -> 내장 셸
-> `hide stop` 포함).
- **리뷰(별도 subagent)**: Fix now 4건 모두 반영 - Windows 핸들 상속(위), smoke가
timeout으로 죽인 `hide`의 출력을 받아들이던 것, 사실과 다른 kit 안내 문구, Windows에서 WSL
`bash`가 잡힐 수 있는 소스 빌드(문서에 Git Bash 명시). 경로 필터 보강, `CARGO_BIN_EXE_hide`,
stop 실패가 원래 오류를 가리던 것도 반영.
- **확인하지 못한 것**: #344, #345 위로 rebase한 head `ff1730f5`에서 `verify`의 `web
e2e linux 2/6`이 두 번(재실행 포함) 실패. `cmdk.spec.ts:394`(프로젝트 3개,
`catalog.root_unresolved`)와 재실행 때 `new-tab.spec.ts:71`. 둘 다 main
`39000d6a`와 직전 head에서는 통과했고, 이 PR이 닿지 않는 경로라 #288에 기록. `package`는 이
head에서도 green(run 37125618484).
- **확인하지 못한 것**: 실제 Windows/Linux 기기에서 창을 띄운 적 없음(SmartScreen 화면,
chrome-sandbox 메시지, Herdr 서버 자동 시작 포함). release 워크플로는 태그가 없어 실행하지 않음.
- **확인하지 못한 것**: Windows 데스크톱 호스트의 경로/PATH 처리는 #2(별도 PR) 몫이라 이 패키지에 반영되지
않음.

Refs #293
yansfil added a commit that referenced this pull request Oct 6, 2026
## Summary

Issues 카드에는 GitHub 라벨이 이슈를 한 번 읽은 뒤에만 보였고, 보드를 라벨로 거를 방법도 없었습니다.
이제 열린 이슈 목록을 읽는 같은 `gh issue list` 호출과 같은 GraphQL 쿼리가 라벨을 함께 가져오고, 라벨은
task에 실려 snapshot으로 갑니다. Local 이슈의 라벨은 비어 있습니다.
카드와 List 행에는 GitHub 색으로 라벨이 최대 두 개 보입니다.
Issues 필터에는 `라벨` 선택이 추가됐습니다: 여러 개를 고를 수 있고, 고른 라벨 중 하나라도 가진 카드가 남으며, `필터
지우기`를 누르면 라벨도 함께 지워집니다.
보드의 어느 카드에도 라벨이 없으면 라벨 선택은 그려지지 않습니다.

![필터에서 ui를 고른 Board: 읽은 적 없는 #3에도 라벨이 있고, 팝오버의 라벨 칩에 카드 수가 붙으며 고른 칩은 켜져
있다](https://github.com/yansfil/pr-assets/blob/main/herdr-ide/issue-labels/4d10daf/filter-ui-picked.png?raw=true)

## Review

- **판단해 주세요**: 고른 라벨은 팝오버 안의 켜진 칩으로만 보이고, 헤더에는 필터 아이콘의 active 표시만 남습니다.
칩은 Agents 그래프 필터와 같은 ToggleGroup 모양입니다.
  헤더는 `overview-roomy-tabs`에서 다시 그리는 중이라 이 PR에서는 건드리지 않았습니다.
- **판단해 주세요**: 좁은 List 행에서는 라벨이 먼저 줄어들고, 그다음 사라지며, 제목은 그 뒤에야 잘립니다. 아래
900px, 720px 캡처를 봐 주세요.
- **판단해 주세요**: Pen은 바꾸지 않았습니다. `pen-screens.mjs`의 카드는 이미 `card.labels`를
최대 두 개 그립니다.
  필터 팝오버는 Pen에 그려진 적이 없고, 헤더는 병행 작업 영역이라 이번에 새로 그리지 않았습니다.
- **조심해서 볼 파일**:
- `herdr-core/src/tasks.rs`, `web/src/snapshot.ts`: snapshot wire가 바뀝니다.
task에 `labels`가 추가되고, 비어 있으면 생략됩니다.
- `herdr-core/src/issues.rs`: `home_issues.issues`가 같은 `IssueSnapshot`을
쓰기 때문에 라벨도 함께 실립니다. 웹은 이 값을 읽지 않습니다.
- `herdr-core/src/github.rs`: Herdr 밖의 `gh` 호출입니다. `issue list --json`에
`labels`가 추가되고, linked-issue 쿼리에 `labels(first:100)`가 추가됩니다. 호출 수와 프로세스
수는 그대로입니다.
- `herdr-core/src/github_store.rs`: 저장 파일 `github-snapshot.json`이 이제 라벨을
저장합니다. 라벨이 없던 시절의 파일도 그대로 복원됩니다.
- `web/src/ProjectOverview.tsx`, `web/src/MainScreen.tsx`: 병행 PR이 고치는
파일입니다. 여기서는 import 하나와 `labels` prop 한 줄씩만 바꿨습니다.
- **비용 검토**: 새 호출, 새 프로세스, 락 안의 작업은 없습니다. 늘어나는 것은 응답과 snapshot `rest`
섹션의 라벨 이름과 색뿐이고, 이슈당 100개가 상한입니다.

## Evidence

- **확인한 것**:
  - Rust: `verify-cargo.sh test` 전체와 `lint`(fmt, clippy)가 통과했습니다.
  - 새 Rust 테스트 세 가지:
- list 호출 JSON의 라벨이 task와 wire까지 도착합니다. hex가 아닌 색은 버려지고, 빈 라벨은 wire에서
빠집니다.
    - 번호로 읽은 linked issue도 라벨을 가집니다.
    - 저장 파일이 왕복하고, 라벨이 없는 옛 파일도 복원됩니다.
  - Web: `verify-web.sh`가 통과했습니다(web vitest 1036, desktop 154).
- 라벨 필터 규칙의 unit test: 고른 라벨 중 하나라도 있으면 남습니다. 라벨 목록은 이름순이고 카드 수가 붙습니다.
고른 뒤 카드에서 사라진 라벨도 목록에 남습니다.
- e2e `overview.spec.ts`가 통과했습니다. fake `gh`가 실제 gh 2.76.2 모양으로 라벨을 줍니다.
    - 읽은 적 없는 #3 카드에 `ui`가 보입니다.
    - `ui`를 고르면 카드가 2장 남고, 단어와 함께 걸면 AND로 줄어듭니다.
    - `필터 지우기`를 누르면 3장으로 돌아옵니다.
- 실제 화면: isolated hided, pinned Herdr, Chromium 조합의 e2e 캡처로 확인했습니다. 화면은
dark와 light, 폭은 1600, 900, 720px입니다.
    - 캡처 전용 fixture로 #4에 긴 라벨 세 개를 줬고, 이 fixture는 커밋하지 않았습니다.
    - 카드 머리는 한 줄로 유지되고, 세 번째 라벨은 생략되며, hover 때 카드 높이가 그대로입니다.
- **확인하지 못한 것**:
- Electron 창과 설치된 앱에서는 확인하지 않았습니다. 같은 web 번들을 Chromium e2e로 캡처한 것으로
대신했습니다.
- 실제 GitHub 저장소를 상대로 한 라이브 실행은 하지 않았습니다. 응답 모양은 이 저장소에 `gh issue list
--json labels`와 GraphQL을 직접 실행해 확인했고, 그 모양을 fixture에 썼습니다.
- 라벨이 하나도 없을 때 라벨 선택이 그려지지 않는 것은 unit 규칙(`boardLabels`가 `[]`)으로만 확인했습니다.
e2e에는 없습니다.
- Dependencies 모드와 All projects 범위에서 라벨 필터는 같은 `filterBoard`와 컴포넌트를
거치지만, 따로 캡처하지 않았습니다.
- 로컬 `cargo test` 첫 실행에서 `hide-platform` watch burst 테스트가 web 레인과 동시에
돌다가 한 번 실패했습니다. 단독으로 다시 돌리니 통과했고, 이 diff가 건드리지 않은 크레이트입니다.

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

List 1600px: 라벨이 제목 뒤에 두 개까지 붙습니다.
![List
1600px](https://github.com/yansfil/pr-assets/blob/main/herdr-ide/issue-labels/4d10daf/list-wide.png?raw=true)

List 900px: #4의 긴 라벨이 먼저 줄어들고, 제목은 그대로입니다.
![List
900px](https://github.com/yansfil/pr-assets/blob/main/herdr-ide/issue-labels/4d10daf/list-900.png?raw=true)

List 720px: 라벨이 사라진 뒤에 제목이 잘립니다.
![List
720px](https://github.com/yansfil/pr-assets/blob/main/herdr-ide/issue-labels/4d10daf/list-720.png?raw=true)

Board 900px, #2 hover: 버튼은 id 줄의 빈자리를 채우고, 카드 높이는 그대로입니다.
![Board
hover](https://github.com/yansfil/pr-assets/blob/main/herdr-ide/issue-labels/4d10daf/board-900-hover.png?raw=true)

</details>
yansfil added a commit that referenced this pull request Oct 19, 2026
## Summary

- 쉬는 중인 세션 pane에 들어가도 태스크 그룹이 접혀 있어 선택한 세션을 찾기 어려웠습니다.
- 상태별·프로젝트별 모두 해당 쉬는 중 그룹을 펼치고 선택한 태스크까지 스크롤합니다.
- 자식 pane 진입도 같은 태스크를 드러내며, 수동 접기는 포커스를 유지하는 동안 그대로 유지됩니다.

![프로젝트별: 쉬는 중인 pane에 들어가면 그룹이 펼쳐지고 선택 태스크가
보입니다.](https://github.com/yansfil/pr-assets/blob/main/hide/fix-reveal-resting-task/512720d/task-rest-light-project.png?raw=true)

## Review

- **판단해 주세요**: pane 진입 시 자동 펼침과 수동 접기 유지가 기대하는 탐색 흐름인지 확인해 주세요.
- **조심해서 볼 파일**: `web/src/TaskLens.tsx` - 포커스 진입과 반복 snapshot을 구분하는 UI
상태 경계입니다.
- **비용 검토**: 목록·포커스 변경 시 쉬는 중 태스크 소속을 선형 탐색하며, 진입당 로컬 fold 갱신은 최대 한
번입니다.
- 타이머·대기열·추가 I/O·core 알림은 없고 기존 페이지 상태를 재사용합니다(Engineering #7, Design
#3).

## Evidence

- **확인한 것**: 진입·자식 소속·상태 전환·수동 접기·재진입·그룹 전환·Overview 복귀를 포함한 TaskLens
13개 테스트가 통과했습니다.
- 320×600 패널의 실제 브라우저에서 Light/Dark와 두 그룹 방식을 확인했습니다. 화면 데이터는 gallery
fixture입니다.
- Node 24에서 web·desktop 타입 검사, lint, 단위 테스트, build와 design contract 검사를
통과했습니다.
- web 1,926개·desktop 235개 테스트 통과, 각 1개·4개는 기존 skip 조건에 따라 건너뛰었습니다.
- **확인하지 못한 것**: 설치된 앱, native daemon·PTY 통합, 다른 OS는 로컬에서 실행하지 않았습니다. 해당
CI 결과는 별도로 확인합니다.
- 기본 Node 26에서는 기존 모바일 연결 테스트 5개가 localStorage 환경 문제로 실패했고, 코드 변경 없이
Node 24에서 통과했습니다.

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

![상태별 Dark: 동일한 진입 동작으로 쉬는 중 그룹이
펼쳐집니다.](https://github.com/yansfil/pr-assets/blob/main/hide/fix-reveal-resting-task/512720d/task-rest-dark-status.png?raw=true)

</details>

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

- PRD: `agents/prd/task-rest-reveal/prd.md` (sha256
005a33a1c79ac7e65aa919888e046823328dafacb3c9867b5f92df9c7a811a94)
- Base 21813ed → head 512720d, verified 2026-10-19T06:08:35.937Z: PASS
- Verification report:
`agents/runs/task-rest-reveal/verification-report.json` and
`agents/runs/task-rest-reveal/verification-report.md`; source
fingerprint
cb5fe2e9398861367ebc434307e9af7c27f246438bf33b96722d6a1ac3d915fe
- Suites:
- S1: GREEN `bash agents/runs/task-rest-reveal/delivery-check.sh` (exit
0)
- Reviews: independent Code review covered the exact committed candidate
tree and the same light/project and dark/status evidence; Fix now: none;
Follow-up improvements: none required; no independent native runtime
run.
- Evidence: 2 registered (2 screenshot); paths are local to the run
directory
  - agents/runs/task-rest-reveal/task-rest-light-project.png
  - agents/runs/task-rest-reveal/task-rest-dark-status.png
- Changed paths: 4 (see Files changed)
- Delivery: mode pr, branch `fix/reveal-resting-task`, base `main`

</details>
@yansfil
yansfil deleted the herdr-runtime-owned branch October 19, 2026 06:51
yansfil added a commit that referenced this pull request Oct 23, 2026
…and its pull request (#1640)

Related: #1632 (practice-foundation, 이 PR의 base)

## Summary

연습 모드 5편 "찾고 다시 보기"를 더합니다. 어제 끝난 세션을 ⌘K에서 요청 속 단어로 찾고, 그 기록(요청들, 결과, 남은
것, 만든 PR)을 레인에서 읽고, `#3`으로 그 PR 카드를 열고, 끝난 태스크를 우클릭 메뉴로 '다시 볼 것'에 둡니다.
- 10단계, ⏎만으로 끝까지 갑니다. 단축키(⌘K)와 우클릭 메뉴는 진행하면서 보여 줍니다.
- 예시와 다른 단어(`clock`, `expiry`)로 찾아도 다음 단계로 갑니다. 검색 중 Esc로 팔레트를 닫아도 ⏎가 다시
열고, 빈 칸이면 예시를 쳐 주고, 글자가 있으면 강조된 행을 엽니다.
- 기록의 `세션 복구하기`를 누르면 연습 세계가 바로 답해서, 어제 세션이 새 탭의 pane으로 돌아옵니다. 복구 중 표시가
남지 않습니다.
- 지어낸 PR은 `https://example.com/...` 주소를 쓰고, `GitHub에서 보기`를 눌러도 연습 창 밖으로
나가지 않습니다.

![팔레트에서 PR을 고르는 단계: '예시' 칩이 행 제목 바로 뒤에 붙고 오른쪽 미리보기를 덮지
않음](https://github.com/yansfil/pr-assets/blob/main/hide/practice-ch5/c50c41d/ch5-prpick.png?raw=true)
![기록의 '세션 복구하기'를 누르면 어제 세션이 새 탭 pane으로
돌아옴](https://github.com/yansfil/pr-assets/blob/main/hide/practice-ch5/c50c41d/ch5-restored.png?raw=true)

## Review

- **판단해 주세요**: 복구 버튼은 거절 대신 완료로 답하게 했습니다(새 탭에 복구된 Codex 세션). 연습 중에 화면이 그
탭으로 넘어가지만, 다음 단계(⌘K로 PR 찾기)는 어디서든 이어집니다.
- **판단해 주세요**: 끝난 세션 두 개가 탭 2·3으로 보이는 것은 리뷰 판정대로 그대로 뒀습니다.
- **조심해서 볼 파일**: `web/src/practice/worlds/find.ts` - 셸이 읽는 스냅숏 칸(태스크 카드,
PR, pr_work, detail, workspace_view.open, task_operation, Hide AI 요약 켬)을
덧씌웁니다. 셸이 그 칸을 다르게 읽으면 이 장이 먼저 깨집니다. `findsLogin`·`findsPr`는 첫 글자가 아니라
온전한 단어에서만 단계를 끝냅니다(코치가 치는 도중 단계가 넘어가지 않게).
- **공용 변경은 이 PR에 없습니다**: 리뷰의 공통 실패는 practice-foundation 0454fe525에
올렸습니다. 연습 창 밖으로 나가는 길(window.open, 링크 클릭, 페이지 이동, 데스크톱 host 호출)을 페이지
경계에서 막고 세계에 기록(`practice/outside.ts`), 데스크톱 연습 창은 운영자 브라우저를 열지 않고 거절,
팔레트 안 단계의 ⏎ 규칙과 계약 검사(`worlds.test.ts`), '예시' 칩을 첫 글자 덩어리 뒤·요소 상자 안에 두기.
- **빠진 길**: Navigation API가 없는 브라우저(Firefox, 일부 Safari)에서는 셸이 스크립트로 시작하는
페이지 이동만 막지 못합니다. 링크·새 창·host 호출은 그대로 막힙니다. 셸에 그런 이동 코드는 지금 없습니다.

## Evidence

- **확인한 것**: `web/e2e/practice.spec.ts` 통과(격리 fixture, 이 브랜치와 공용 브랜치
각각). 공용 브랜치에는 이 장이 없으므로 공용 변경 단독도 통과.
- **확인한 것**: 개발 서버(ko, en, desktop host 주소)에서 브라우저로: type에서 `clock`을 직접
쳐서 pick으로 넘어감, pick·pr·prPick에서 Esc 뒤 ⏎만으로 회복해 PR 카드까지 감, e2e처럼 상태가 바뀔
때마다 ⏎를 바로 눌러도 끝까지 감, `세션 복구하기` 뒤 1.5초 안에 `login` pane이 생기고 버튼이 사라짐,
`GitHub에서 보기`와 PR 번호 버튼을 눌러도 브라우저 탭 수 그대로.
- **확인한 것**: `verify-web.sh` web typecheck·lint·test(242 files, 2060
passed)·build, desktop typecheck·test, `check-design-contract.mjs` 통과.
- **확인하지 못한 것**: Electron 창 안의 연습 창에서 직접 누른 결과(데스크톱 쪽은 코드로만 확인), 일본어·중국어
화면의 칩 자리, 작은 창과 실제 스크롤에서 칩 자리. Linux/Windows 레인은 CI에 맡김. e2e의 hided는 이
브랜치와 Rust 코드가 같은 practice-foundation 25438e9 빌드를 썼습니다(디스크 여유 728 MB로 이
worktree에서 빌드 못 함).

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

PR 카드 단계:

![card](https://github.com/yansfil/pr-assets/blob/main/hide/practice-ch5/c50c41d/ch5-card.png?raw=true)

단계: open(사이드바 검색, ⌘K) → type(`login`, 다른 단어도 됨) → pick(팔레트 ⏎) →
record(보기) → pr(⌘K + `#3`, 제목 단어도 됨) → prPick → card(보기) → star(우클릭 → 다시
볼 것으로 표시) → revisit(보기) → end. 팔레트 안 네 단계는 모두 command `search`를 가집니다.

</details>

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

- base: practice-foundation 0454fe5, head: c50c41d
- web: typecheck, lint, test(242 files / 2060 passed, 1 skipped), build
- desktop: typecheck, test
- web e2e: practice.spec.ts 1 passed (head c50c41d72의 트리, 공용 0454fe5
단독도 1 passed)
- design contract 통과

</details>
yansfil added a commit that referenced this pull request Oct 26, 2026
)

## Summary

연습 창에서 안내 카드의 [해 보기]를 마우스로 누르면, 화면이 그 클릭을 "키보드가 아무 데도 없음"으로 받아들였습니다.
그래서 1편 "에이전트 pane 닫기"(⌘W)는 닫을 pane이 없다고 보고 아무 일도 하지 않았고, 그 뒤 직접 누른 ⌘W도
마찬가지였습니다.
2편 "방금 있던 에이전트로 돌아가기"(⌃⇥)도 같은 이유로 출발할 pane이 없어 제자리에 머물렀습니다. ⏎로 진행하면 둘 다
됐기 때문에 환경마다 달라 보였습니다.
이제 안내 카드와 과제 카드를 누르는 일은 연습 화면을 누르는 일로 치지 않습니다. 키보드는 원래 pane에 남고, 화면에 열린
팝오버도 닫히지 않습니다(8편 `크게 ›` 단계가 같은 원인으로 한 번 더 눌러야 했던 것도 함께 풀림).

![1편 5/10 에이전트 pane 닫기: 해 보기를 마우스로 누르면 작업 중지 확인 시트가 뜨고 6/10으로
넘어감](https://github.com/yansfil/pr-assets/blob/main/hide/fix-practice-close-and-recent-chord/2cf364f/close-after-click.png?raw=true)
1편 5/10에서 [해 보기]를 마우스로 누른 직후: 작업 중지 확인 시트가 뜨고 6/10으로 넘어갑니다(전에는 5/10에
그대로).

## Review

- **조심해서 볼 파일**: `web/src/practice/PracticeCoach.tsx` - 안내 레이어 루트에
`data-keyboard-stays`, mousedown 기본 동작 막기, pointerdown 전파 막기. 셸의
`TitleRow`·`ExternalDisplay`가 쓰는 같은 방식입니다.
- **조심해서 볼 파일**: `web/e2e/practice.spec.ts` - 모든 편을 버튼으로 한 번 더 끝까지 진행하는
테스트 추가. 스택 시작 1회와 약 1.4분이 늘지만, 키보드 위치나 열린 팝오버에 기대는 단계가 어느 편에 생겨도 잡습니다.
- **판단해 주세요**: Tab으로 안내 버튼에 포커스를 옮기는 경로는 여전히 키보드 위치를
옮깁니다(`viewFocus.ts`는 `data-keyboard-stays`를 pointerdown에서만 봄). 셸 전체 규칙을
바꾸는 일이라 이 PR에서 뺐습니다.

## Evidence

- **확인한 것**: 원인 재현. vite 개발 서버의 연습 창(`host=electron&platform=darwin`,
데스크톱 앱과 같은 단축키)을 Playwright로 열어 1편 5/10에서 클릭은 그대로, ⏎·⌘W는 확인 시트로 진행. 2편
1/5도 클릭만 실패.
- **확인한 것**: 수정 후 같은 스크립트에서 1편 클릭·클릭 뒤 ⌘W, 2편 클릭·⌃⇥, 8편 `chip`→`large`를
버튼만으로 진행 모두 다음 단계로 넘어감.
- **확인한 것**: 새 e2e는 수정을 되돌린 빌드에서 `screen:close:4`에서 멈춰 실패, 수정 빌드에서 통과(격리
Herdr 0.9.5 + hided, macOS 로컬). 기존 ⏎ 전체 진행 테스트와 초대 테스트 2개도 통과.
- **확인한 것**: `verify-web.sh web test`(2156 통과), `web lint`, `web
typecheck`.
- **확인하지 못한 것**: 설치된 데스크톱 앱 연습 창에서의 실제 마우스 클릭. 운영자 앱을 건드리지 않으려고 브라우저에서
데스크톱 호스트를 대신 세운 연습 창으로 확인했습니다. ⌃⇥는 앱 메뉴에 단축키가 없고(cycle 명령은 accelerator
없음) 연습 창에 입력 가로채기도 없어 Electron 쪽 충돌은 코드로만 배제했습니다. 테스터 기기의 다른 앱이 ⌃⇥를 잡는
경우는 확인할 수 없습니다.
- **확인하지 못한 것**: 기존 ⏎ 테스트 둘(전체 진행, started over)이 macOS 로컬에서
`find:pr:9`(⌘K로 `#3` 찾기)에서 가끔 멈춥니다. 수정 전 base 빌드에서도 똑같이 멈춰 이 변경과 무관하며, 이
PR과 main의 Linux CI에서는 통과합니다.

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

- base `65a7eabe4`, 수정 커밋 `2cf364f49`, #1692 머지 후 main을 merge한 head
`7ce285223`(충돌은 #1692의 `delegate:mention` 단계와 문서 문장을 살려 해결)
- 변경 경로: `web/src/practice/PracticeCoach.tsx`,
`web/e2e/practice.spec.ts`, `docs/UI_BEHAVIOR.md`
- 독립 코드 리뷰 1회: Fix now 1건(버튼 테스트가 ⏎로 조용히 넘어갈 수 있음) 반영, Follow-up은 Tab
포커스 경로(위 Review).

</details>
HyunjunJeon referenced this pull request in HyunjunJeon/hide Nov 9, 2026
…ide#2152)

Closes with-hide/hide-private#466
Related: with-hide/hide-private#635 (paired docs/desk.md change)

## Summary

Desk가 시작한 세션의 탭을 `◆ Desk` 그룹으로 옮길 때, 그 탭이 지금 화면에 떠 있는 탭이면 화면이 비거나 다른 탭으로
바뀌었습니다.
옮긴 뒤에도 앞 그룹을 원래 그룹(Ungrouped)으로 되돌려 놓았기 때문입니다.
이제 옮기는 탭이 화면의 탭이면 앞 그룹이 그 탭을 따라 `◆ Desk`로 가서, 같은 탭이 화면과 키보드에 그대로 남습니다.
다른 탭을 옮길 때는 전과 같이 앞 그룹을 바꾸지 않습니다.
CI에서 37번 기록된 desk-lane B41의 120초 타임아웃이 이 문제였습니다.

스크린샷 없음: 바뀐 것은 화면이 그대로 남는다는 것이고, 달라 보이는 곳은 그룹 줄의 이름(Ungrouped -> ◆ Desk)
하나뿐이며 web 코드는 건드리지 않았습니다.

## Review

- **판단해 주세요**: 화면의 탭을 옮길 때 앞 그룹이 `◆ Desk`로 바뀌는 것이 "화면을 바꾸지 않는다"(desk.md
B20)의 올바른 해석인지. 대안은 그 탭을 화면에서 내려갈 때까지 옮기지 않는 것인데, 상태가 하나 더 생겨 고르지 않았습니다.
- **조심해서 볼 파일**: `herdr-core/src/runtime/desk/jobs.rs`
`desk_place_in_group` - runtime mutex 안에서 도는 publish
경로(`snapshot_delta_payload`)의 일부입니다. 추가 작업은 이미 잡은 view에서 active 탭 비교 한
번입니다.

## Evidence

- **멈춘 단계**: 실패한 CI 두 런(42148906445, 42147984313, Linux shard 4)의
error-context 둘 다 `desk-lane.spec.ts`의 `const front =
...[data-pane-view][data-focused="true"]...getAttribute`에서 120초를 다 썼습니다.
페이지 스냅샷: 사이드바엔 `◆ Desk > Tab 1`(fixture의 유일한 탭), 작업 영역은 `Ungrouped`의
"Start your first tab", 그려진 pane 없음. (lane은 trace zip을 올리지 않아 스냅샷과 hided
로그로 봤습니다.)
- **원인의 순서**: `refresh_desk_jobs`는 publish 끝에서 탭을 옮깁니다. 다음 publish의
`sync_agent_selection`이 먼저 돌면 앞 그룹이 포커스된 탭을 따라가 통과하고, 그 사이 엔진의 session
답이 먼저 오면 빈 그룹을 읽고 보이는 탭과 키보드 pane을 지워(`session.rs` empty_group 분기) 더는
따라갈 탭이 없어 영영 빈 화면이 됩니다.
- **확인한 것**: 새 런타임 테스트
`a_session_desk_started_in_the_tab_in_front_stays_on_screen_in_the_desk_group`이
main에서 실패(`left: (None, Some("w-order:t2"))`, 앞 그룹 Ungrouped에 다른 탭), 수정
후 통과. Desk 런타임 테스트 57개 통과.
- **확인한 것**: `desk-lane.spec.ts` 전체 `--repeat-each 20` (macOS 로컬,
`scripts/verify-web.sh web e2e`) 80/80 통과. 같은 반복을 main 코드로 B41만 돌린 것도
20/20 통과라, 로컬 macOS에서는 이 경합이 재현되지 않습니다.
- **확인한 것 (Linux, 수정 전후)**: 임시 PR 둘에서 desk-lane 네 테스트를 각각 20번씩, 재시도 없이
Linux 6 shard에 나눠 돌렸습니다. 둘의 차이는 이 수정 하나입니다.
  - 수정 있음 with-hide#2156, run 42209054020: Linux 80/80 통과, Windows e2e 80/80 통과.
- 수정 되돌림 with-hide#2157, run 42209058865: Linux 76/80, B41만 4/20 실패(#3, #8, with-hide#14,
with-hide#18). 넷 다 CI와 같은 `getAttribute` 120초 멈춤입니다.
  - 두 PR은 머지 없이 닫고 브랜치를 지웠습니다.
- **확인하지 못한 것**: 로컬 macOS에서는 main도 20/20 통과해 이 경합이 재현되지 않습니다(위 Linux 수정
전후로 대신 확인). Desk가 꺼져 있어도 배치가 도는 것은 문서가 막지 않아 이번 범위 밖으로 두었습니다.
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