Skip to content

Redesign checkout rows and persist purpose - #122

Merged
yansfil merged 13 commits into
mainfrom
prd/checkout-row-d
Sep 20, 2026
Merged

yansfil merged 13 commits into
mainfrom
prd/checkout-row-d

Conversation

@yansfil

@yansfil yansfil commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Related: PRD agents/prd/checkout-row-d/prd.md

Summary

  • Redesign the checkout sidebar row and Overview identity strip around checkout, lifecycle, pull-request, check, agent, and inactive states, including full review-state labels.
  • Persist checkout purpose across live Herdr workspace tokens and Git branch descriptions, with purpose entry during worktree creation and actionable partial-failure outcomes.
  • Emit the runtime-specific SessionStart purpose context from refreshed hook version 2, and document the ownership and fallback model.
  • Promote the approved badge and checkout component sheets into the design library while keeping shell values bound to HideTheme tokens.

Approved checkout row D board

Isolated native QA: collapsed, expanded, purpose sheet, and Overview header

Full Changes requested label in the narrow Overview header

Related

  • agents/prd/checkout-row-d/prd.md

Review focus

  • 사람이 판단할 것: 승인된 보드와 실제 row 및 Overview의 정보 밀도, 목적 입력과 부분 실패 문구가 운영 흐름에 맞는지 확인해 주세요.
  • 위험한 파일: herdr-core/src/workspace.rs, herdr-core/src/worktree_control.rs, herdr-core/src/runtime/session.rs의 목적 권위와 미러 수명주기, 그리고 Swift sidebar 및 Overview projection이 핵심입니다.
  • 리뷰어에게 묻는 것: 마지막으로 남은 live workspace가 목적 권위를 갖고, 생성 직후 token write 실패의 fallback은 프로세스 수명 동안만 유지하는 해석이 PRD의 D-09와 D-13에 맞는지 봐 주세요.

Risk surface

  • Runtime mutex: lock 안에서는 작은 map과 in-flight 상태만 복제하거나 갱신합니다. Git 및 Herdr 작업은 기존 task-operation worker로 넘기며, lock 안에서 서브프로세스나 블로킹 I/O를 수행하지 않습니다.
  • Snapshot wire: purpose와 원격 상태는 기존 revisioned navigator 및 remote-session snapshot에 포함됩니다. WorkspaceInfo.tokens는 wire 경계에서 보존되어 live workspace purpose를 투영합니다.
  • Ownership: live workspace가 있으면 Herdr token이 권위이고, workspace가 사라지면 Git branch description이 내구성 있는 fallback입니다. core가 두 저장소 사이의 미러와 사용자 작업 결과를 소유합니다.
  • Herdr contract: 배포된 v0.9.1 schema의 WorkspaceInfo.tokens와 CLI만 사용하며, pinned contract 검사가 통과했습니다.
  • Failure path: D-13의 부분 실패 문구를 sheet에 표시하고 row는 실제 fallback 값을 유지하며 진단 로그에 원인을 남깁니다. 재시도 가능한 입력은 sheet에 보존됩니다.
  • High-frequency path: session projection에서 작은 purpose 선택만 추가합니다. Git subprocess는 tick 또는 tab 전환 경로에 없고, 미러 작업은 기존 단일 task queue에서 상태 전이에만 생성됩니다.

Evidence

  • 확인한 것: main 통합 및 CI 구조 inventory 수정 후 최종 head a6a7b27에서 Rust test, Swift test, Rust lint의 세 결정적 lane이 모두 통과했습니다. 통합 직전 제품 head 8c6907d의 개발 앱을 bundle id me.grab.hide.checkout-row-d, version 0.0.0-dev+8c6907d로 빌드했고 design contract와 Herdr v0.9.1 contract도 통과했습니다. 통합 충돌을 해결한 디자인 라이브러리는 다시 생성해 토큰 위반 0과 Component 22 계약을 확인했습니다.
  • 토큰 실측: 격리 서버에서 herdr workspace report-metadata <ws> --source <id> --token purpose=<value>를 실행해 80자 절단, source 간 마지막 writer 우선, 이긴 source가 지우면 key가 사라지는 동작을 확인했습니다.
  • 확인하지 못한 것과 그 이유: 실제 VoiceOver 낭독, 지원하는 두 런타임의 실제 SessionStart 전달, Herdr 0.9.0 원격, 주입한 부분 실패의 네이티브 화면은 자동화 안전 경계와 외부 런타임 조건 때문에 test 및 source contract로 확인했습니다. 제품 변경 head 8c6907d에서 정확한 앱 build를 확인했고, 이후 main 통합과 inventory 수정은 최종 Swift 검증 및 CI로 확인했지만 안전하지 않은 global input을 피하기 위해 최종 head 화면을 다시 조작하지 않았습니다.
  • 화면 증거: 격리된 private Herdr server와 임시 Git fixture에서 collapsed/expanded rows, 목적 sheet와 저장/재시작 fallback, pull-request 상태와 popover, stale 상태를 exact-window capture로 확인했습니다. 특히 09-wrapped-full-review-state.png와 10-wrapped-full-review-required.png에서 #118 Changes requested와 #119 Review required가 생략 없이 표시됩니다. 증거는 저장소 정책에 따라 로컬 run directory에만 보존했습니다.

AI tooling

  • 사람이 직접 작성 - [x] 일부를 AI 도구로 작성 - [ ] 대부분을 AI 도구로 작성

손으로 확인한 것: 승인 PRD 및 디자인 보드와 네이티브 캡처를 대조했고, 정확한 bundle id와 version, 검증 보고서의 head 및 결과, 두 리뷰 라운드의 발견과 처분을 확인했습니다.

Verification record
  • PRD: agents/prd/checkout-row-d/prd.md (sha256 7194feba6634e02ea4ce7dea685e24915b2cb5271b3343f881c69b757a08e1f5)
  • Base 5926dbb -> head a6a7b27, verified 2026-09-20T14:13:39.601Z: PASS
  • Verification report: agents/runs/checkout-row-d/verification-report.json and agents/runs/checkout-row-d/verification-report.md; source fingerprint f01d8ef812c70c6725740ca8f47532490e9fe451957df1b1bf2b284e0d01b84e
  • Suites:
    • S1: GREEN bash scripts/verify-cargo.sh test (exit 0, 503.0s)
    • S2: GREEN bash scripts/verify-swift.sh test (exit 0, 23.9s)
    • S3: GREEN bash scripts/verify-cargo.sh lint (exit 0, 3.7s)
  • Reviews:
    • Round 1 on 7adb5bf: Fix now findings for stale PR muting without a retained PR, double-failure creation fallback, nested-project purpose targeting, separate PR-glyph accessibility, and unsupported-remote help were fixed in 9103689.
    • Round 2 on 9103689: the B13/B14/B17 live-workspace authority and path-normalization finding was fixed in b1446b8; the B19 creation/mirror race was fixed with the PRD-minimum process-local fallback in 8c6907d.
    • Round 2 suggestion to persist suppression across restart and cap it was rejected because B19 and D-13 require only a closed sheet, fallback row value, diagnostic, and retry. Restart persistence would add unapproved state. It remains a follow-up candidate if a future requirement calls for restart durability.
    • Per explicit delivery direction, b1446b8, 8c6907d, the conflict-resolved main integration in 58a644f, and CI inventory fix a6a7b27 did not receive a fresh review round. The shipped head is covered by the final deterministic verification report; the product changes before main integration have exact-head contract/build logs.
    • The first CI run found CoreCheckoutPurpose missing from the existing bridge responsibility inventory. a6a7b27 registered the DTO, and its focused structure tests passed before the full verification rerun.
  • Evidence: 22 registered (13 screenshots, 9 logs), all local to agents/runs/checkout-row-d/ per repository policy.
  • Changed paths in the base-to-head verification scope: 89 (see Files changed, including changes integrated from main).

@yansfil
yansfil merged commit 77e666f into main Sep 20, 2026
5 checks passed
@yansfil
yansfil deleted the prd/checkout-row-d branch September 20, 2026 14:44
yansfil added a commit that referenced this pull request Sep 20, 2026
## Summary

메뉴 바의 `hide > Settings…`에서 **Agents 탭을 누르면 앱이 죽습니다** (SIGTRAP,
`HideAgentSettings.body` → `EnvironmentObject.error()`: "No
ObservableObject of type ShellModel found").
Settings scene은 별도 창이라 메인 창이 주는 `.environmentObject(model)` 아래에 있지 않은데,
Agents 탭이 모델을 `@EnvironmentObject`로 읽었습니다. 창 안에서 여는 Settings 시트는 메인 창
아래라 멀쩡했고, 같은 이유로 Shortcuts 탭의 keycap(`HideKeycap`, 메인 창과 공유)도 scene에서는
트랩합니다.

- `HideSettingsScene`이 Settings scene의 내용이 됩니다: `HideSettingsView`에 메인
창과 같은 모델 환경을 붙여, 메인 창과 공유하는 컨트롤이 두 호스트 모두에서 모델을 찾습니다.
- `HideAgentSettings`는 다른 다섯 탭처럼 `model:`을 명시적으로 받습니다.
- 새 테스트가 여섯 탭 전부를 scene이 그리는 그대로(`HideSettingsScene`) 렌더링합니다. 환경 없이
`HideSettingsView`만 그리면 같은 트랩으로 테스트 프로세스가 죽는 것을 첫 실행에서 확인했습니다.

2026-09-10 `fd5fe385`부터 있던 결함이고, #122의 회귀가 아닙니다 (`HideSettings.swift`,
`HerdrApp.swift`는 #122 이전 설치 빌드 `123f6aa`와 동일).

## Review

- **판단해 주세요**: 시트와 scene이 같은 환경을 갖게 하는 위치로 `HideSettingsScene`(뷰 하나)을
골랐습니다. `HerdrApp`의 `Settings {}` 안에 `.environmentObject`만 붙이는 것보다 테스트가
scene 구성을 그대로 잡을 수 있어서입니다.
- **조심해서 볼 파일**:
`macos/Tests/HerdrMacOSTests/SettingsSceneTabsTests.swift` - NSWindow를
만들고 닫는 테스트라 `isReleasedWhenClosed = false`가 빠지면 이중 해제로 전체 테스트 프로세스가
SIGSEGV로 죽습니다 (실제로 두 번 겪고 고쳤습니다).

## Evidence

- **확인한 것**: 설치된 `0.0.0-dev+77e666f`에서 메뉴로 Settings를 열고 Agents 탭 클릭 →
프로세스 종료, 크래시 리포트 2건 동일 프레임 (`HerdrMacOS-2026-09-20-235823.ips`,
`HerdrMacOS-2026-09-21-001253.ips`). Settings 열기만, 접근성 트리 읽기만은 15초 관찰에서
안 죽음. `scripts/verify-swift.sh test` 522개 통과.
- **확인하지 못한 것**: 고친 빌드로 설치해 메뉴 Settings > Agents / Shortcuts를 실제 클릭하는 것.
머지 후 앱 교체 시 확인합니다.

**AI tooling**: 대부분 AI 도구. 크래시 리포트의 프레임과 두 호출 지점(`HerdrApp.swift`
Settings scene, `ShellRootView.swift` 시트)을 손으로 대조했습니다.
yansfil added a commit that referenced this pull request Sep 21, 2026
## Summary

- 설치된 df17cfd 앱에서 상태줄에 `Snapshot decode failed`가 고정되고 새 pane이 열리지 않으며
전체가 느려지는 문제를 고칩니다.
- 원인: core는 체크아웃 purpose의 `PullRequestTitle` origin을
`pull_request_title`로 내보내고, 셸은 `pr_title`만 알았습니다 (#122 이후).
- PR 제목으로 purpose가 정해진 체크아웃이 하나 생기자 스냅샷 전체 디코드가 실패했고, 셸은 마지막 성공 프레임에
멈췄습니다.
- 셸 값을 고치고, core가 스냅샷에 내보내는 문자열 enum 9개를
`contracts/snapshot-wire-enums.json`에 고정해 양쪽 suite가 검사합니다.
- 실패한 디코드는 알림마다 같은 `bridgeError` 문자열을 다시 publish해 셸 전체를 초당 약 60회
재구성했습니다. 변경이 있을 때만 publish하고, 메시지에 coding path와 값을 담습니다.

## Review

- **판단해 주세요**: 계약 파일을 `contracts/`에 두고 Rust·Swift 테스트가 같은 파일을 읽는 방식이 맞는지
(Herdr API 계약과 같은 자리).
- **조심해서 볼 파일**: `macos/Sources/HerdrMacOS/CoreBridge.swift` - snapshot
wire 채널의 failure path. `bridgeError` 쓰기 18곳이 change-only publisher 하나로
모였고, 두 곳은 `??` 체인이 인자 안으로 들어갔습니다.
- **조심해서 볼 파일**: `herdr-core/src/model.rs` - 테스트만 추가. 각 enum의 variant
목록은 exhaustive `match`로 묶여 있어 variant 추가 시 컴파일이 먼저 실패합니다.

## Evidence

- **확인한 것**: 실행 중인 df17cfd 앱에 lldb로 붙어 `DecodingError.dataCorrupted` 경로
`rest.navigator.workspaces[0].checkouts[4].purpose.origin`, 값
`pull_request_title`을 읽었습니다.
- **확인한 것**: 같은 앱의 launch trace 20초에서
`reopen_closed.window_menu.installed`가 1,236회(= core objectWillChange
횟수), `core.snapshot.refresh`는 0회였습니다.
- **확인한 것**: Rust `wire_enum_tests`는 계약을 `pr_title`로 바꾸면 실패하고, Swift
`SnapshotWireEnumTests`는 셸 값을 `pr_title`로 되돌리면 두 테스트 모두 실패합니다 (mutation
후 원복).
- **확인한 것**: `verify-cargo.sh lint`, `verify-cargo.sh test -p herdr-core
--lib` 624 passed, `verify-swift.sh test` 533 passed, design contract
PASS.
- **확인하지 못한 것**: 이 브랜치 빌드를 설치해 같은 상태에서 상태줄이 걷히고 pane이 열리는 것. 운영 중인 앱을
교체해야 해서 설치는 별도로 진행합니다.
- **확인하지 못한 것**: publish 횟수 감소를 baseline/candidate로 재지 않았습니다. 디코드가 성공하면
실패 경로 자체가 사라지므로 이 변경은 다음 계약 불일치 때의 완화입니다.

**AI tooling**: 대부분 AI 도구. lldb 출력, 두 suite의 mutation 실패, 계약 파일의 값을 손으로
대조했습니다.
yansfil added a commit that referenced this pull request Oct 28, 2026
Closes with-hide/hide-private#147
Closes with-hide/hide-private#270
Closes with-hide/hide-private#161
Closes with-hide/hide-private#122
Closes with-hide/hide-private#168
Closes with-hide/hide-private#172
Closes with-hide/hide-private#195
Closes with-hide/hide-private#197

## Summary

Five of the most frequent web e2e flakes are fixed at their cause, and
one of them was a product race.
When a folder inside a repository was added as a project, one update
could draw it apart from its repository, with no tabs and under "No
agents", for about 10 ms.
The core now builds that update from path answers that already place the
new project.
The other four were tests that waited on the wrong thing, and four more
issues with the same tab failure close with them.
#287 needed no code, because its spec was deleted with Factory in #1437.

스크린샷 없음: no `web/src`, `site/` or `design/` change; the only product
change is in the core's catalog build.

## Review

- **판단해 주세요**: #270 is fixed in the core, not in the test helper. The
in-between update was wrong (the project shown apart from its
repository, empty, under No agents), so `showProjectRow` is unchanged.
- **판단해 주세요**: the graph still remounts every card when it switches from
plain layers to the placed layout. The switch waits on the asynchronous
layout worker, up to `LAYOUT_TIMEOUT_MS` (3000 ms), so a click in that
window can be lost. This PR only makes the test wait for `layered`; the
product defect is with-hide/hide-private#317.
- **판단해 주세요**: the #122 test now opens the record by focusing the row
(`focus-within`), so it checks the focus path and no longer checks the
hover reveal.
- **조심해서 볼 파일**: `herdr-core/src/session_sync/coordinator.rs`, the
catalog build on the session-sync thread (high-frequency path). The
change only chooses between two path indexes already in hand. When the
coordinator's own answers place every registration (the usual case),
nothing changes.
- **비용 검토**: each update adds one `knows()` lookup per local
registration on at most two indexes, with no new reads, timers or
fan-out.

## Evidence

- **확인한 것**: the 8 tests behind these issues passed 20 repeats each on
42aa932 (160 passed, 0 failed). This is evidence for 42aa932; the
commit after it changes docs only.
- **확인한 것**: a scratch probe (not committed) that read the wire frames
reproduced the #270 update before the fix and saw 0 of 31 after it.
- **확인한 것**: the new core unit test proves that a pending answer makes
the catalog build from the path index that places every registration. It
does not prove the screen frame; the probe above is the screen-level
evidence.
- **확인한 것**: CI on 7d6ee3b passed in every lane that ran, and no lane
reported a flaky test.
- **확인하지 못한 것**: clippy and the full Rust and web suites did not run
locally (the disk had 0.8-1.8 GiB free); CI ran them. The Windows form
of #161 is checked only in CI.

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

**Issues**

| Issue | Flakes | Cause | Fix |
| --- | --- | --- | --- |
| #270 s4 registered subfolder History | 17 | Product: while the node's
path answer was pending, the coordinator built the catalog from answers
that predate the new registration and overwrote the creation's correct
publish; the helper then clicked the vanished fold |
`paths_to_build_from` in the coordinator |
| #147 plan-review | 24 | The graph draws cards in plain layers, then
mounts them anew once placed; `boundingBox()` read a removed card
(`null`) | Wait for `data-dependency-layout="layered"` (`placedBoxes`);
mission-map had the same read |
| #161 checkout-owner linked worktree | 15 | `waitForTerminal` took the
strip's selected tab as the expectation; the canvas drew the new tab
while the strip still selected the old one | The expected tab comes from
Herdr (`createdTabs`), all 9 callers |
| #168 #172 #195 #197 | - | Same `Expected: old tab / Received: new tab`
signature, same helper | Same fix |
| #122 session-work-ledger report letter | 1 | Hover-only record button:
a child nesting under the root moved the row away from a still pointer |
Reveal the buttons by focusing the row (`focus-within`) |
| #287 Factory questions | 21 | The spec was deleted with Factory in
#1437 (cc80696) | Closed with that evidence, no code |

**Repeat run (c2)**

- Commit: 42aa932 (head 7d6ee3b adds docs only).
- Machine: macOS, one worker, debug hided with the core fix, pinned
Herdr 0.9.5.
- Command: `scripts/verify-web.sh web e2e e2e/plan-review.spec.ts
e2e/mission-map.spec.ts e2e/checkout-owner.spec.ts e2e/s4.spec.ts
e2e/session-work-ledger.spec.ts e2e/herdr-coexistence.spec.ts
e2e/last-tab-leaves-checkout.spec.ts e2e/s2.spec.ts --grep "<the 8
tests>" --repeat-each 20`
- Result: 160 passed, 0 failed, 19.4 min.
- The other tests the helper change touches (checkout-owner,
session-work-ledger, sidebar-menus, overview-device, s2 tab switch)
passed once each, 15 in all.

**#270 probe (not committed)**

- It logged the fold and the core's `no_agent_projects` from wire
frames, with the real test's Git setup.
- Before the fix, every batch of 12-20 runs (5 batches) had at least one
publish of `registered` at its bare path with 0 tabs beside `fixture`
and under No agents. One batch was counted exactly: 2 of 20.
- After the fix: 0 of 31.

**Static checks**

- `verify-cargo.sh test -p herdr-core --lib`:
`catalog_path_tests::a_pending_answer_builds_from_the_paths_that_place_every_registration`
passes.
- `web typecheck`, `web lint` (e2e size budget included) and `cargo fmt
--check` pass.

**CI on 7d6ee3b**

- Passed: verify, gate, plan, policy checks, rust workspace, web and
desktop checks, static-design, windows check, os contract linux and
windows, remote mailbox, web e2e linux 1-6 of 6, windows e2e, desktop
e2e macos 1-2 of 2, desktop e2e windows.
- Skipped by path filter: agent CLIs, agent journey, agy contract, omp
SDK contract, os contract macOS, package, windows wsl.
- No lane reported a flaky test.

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