Skip to content

웹: ⌃Tab은 모든 체크아웃의 탭과 View 디스플레이를 도는 Recent Panels - #172

Merged
yansfil merged 3 commits into
mainfrom
web-recent-panels
Sep 26, 2026
Merged

yansfil merged 3 commits into
mainfrom
web-recent-panels

Conversation

@yansfil

@yansfil yansfil commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Related: Closes #171

Summary

데스크톱 앱의 ⌃Tab(브라우저 ⌥)은 포커스된 체크아웃의 Herdr 탭만 돌았습니다. 이제 **Recent Panels**가 이 머신의 모든 프로젝트·체크아웃에 걸쳐 Herdr 탭과 View 영역 디스플레이(file, diff, browser)를 하나의 최근 사용 순서로 돕니다. 행을 커밋하면 그 표면이 자기 체크아웃에서 이벤트 하나로 앞으로 나오고(필요하면 Workspace 전환), 디스플레이면 키보드가 그 안으로 들어갑니다. ⌥Tab은 **Recent Projects**로 남되, 체크아웃 단위가 아닌 프로젝트 단위로 돌고 각 프로젝트의 마지막 표면을 복원합니다. 명령 이름(recent_panel`, "Next recent panel")은 registry 하나에서 바뀌어 Shortcuts 시트와 데스크톱 메뉴가 같이 읽습니다.

Recent Panels: 각 행은 에이전트 상태 마크 다음에 어떤 에이전트인지(Codex, Claude)를 보여 주고, 에이전트가 여럿인 탭은 중립 >_ 마크, 파일은 자기 마크

Recent Projects: 각 행은 복원할 마지막 표면과 체크아웃을 보여 줍니다

Review

  • 판단해 주세요: "사용 중인 표면"의 정의. 키보드가 View 영역 안이면(또는 Views only) 활성 디스플레이, 아니면 보이는 Herdr 탭입니다. 사이드바·팔레트 포커스와 에이전트 상태 변화는 방문이 아닙니다.
  • 판단해 주세요: 행 마크. 한 에이전트 탭은 상태 마크 다음 AgentMark(사이드바 에이전트 행과 같은 순서·간격), 에이전트가 없거나 여럿인 탭은 탭 스트립의 중립 >_ 마크. 다른 행은 빈 상태 칸을 두어 제목 열을 맞춥니다.
  • 판단해 주세요: Recent Projects가 체크아웃 행에서 프로젝트 행으로 바뀌었습니다(스펙: 한 저장소의 두 체크아웃은 한 프로젝트). 복원할 표면이 없는 프로젝트는 기존처럼 focus_checkout.
  • 판단해 주세요: 원격 장치 표면은 Recent Panels 순서에 넣지 않았습니다(다른 컨텍스트에서 웹이 커밋할 방법이 아직 없음). 장치가 앞에 있으면 기존처럼 그 장치의 보이는 체크아웃 탭을 돕니다. Follow-up: 원격 탭·디스플레이를 순서에 합치기.
  • 조심해서 볼 파일: herdr-core/src/runtime/events.rs - Herdr/core ownership. focus_checkout에 display_id, focus_tab에 focus_device를 더했습니다. 모르는 디스플레이는 아무것도 옮기기 전에 거절(view_layout.unknown_display)합니다.
  • 조심해서 볼 파일: web/src/App.tsx - high-frequency path. 스토어 구독은 navigator/workspace_view 참조가 바뀔 때만 관찰하고, 방문 기록은 core 포커스 시그니처가 바뀔 때만 합니다. 표면 수에 비례한 O(n) 작업입니다.
  • 조심해서 볼 파일: web/src/recent.ts - 커밋 중간 프레임(체크아웃은 도착, 키보드는 아직)을 방문으로 세지 않도록 expectSurface로 대기합니다. 거절, 다음 입력(체인 명령·수식키 제외)에서 풀립니다.

Evidence

  • 확인한 것: 헤드리스 Chromium web e2e 전체 64개 통과(격리된 HOME, 전용 Herdr 소켓, 핀된 herdr 0.9.1, core 변경 후 target/debug/hided 재빌드). 새 web/e2e/recent.spec.ts가 교차 체크아웃 디스플레이 커밋(focus_checkout 1회, display_id 포함, 키보드가 View 영역으로), 탭 복귀(focus_tab 1회), ⌥Tab 마지막 표면 복원, Escape 무커밋, 행 마크(Codex·Claude 행의 상태 마크와 에이전트 마크, 여러 에이전트 탭의 중립 마크, 파일 마크, 접근성 레이블의 에이전트 종류)를 확인합니다.
  • 확인한 것: verify-cargo.sh test 전체 통과, 새 core 테스트는 알 수 없는 디스플레이가 체크아웃을 옮기지 않음과 Agents only에서 View 영역이 다시 보임을 확인합니다. verify-cargo.sh lint, web/desktop typecheck·lint·unit(web 365개, desktop 36개), CONTRIBUTING의 check 스크립트 13개와 design contract 통과.
  • 확인한 것: 네이티브 서브에이전트 리뷰 2개(Code, Fidelity). Fix now 3건 모두 반영: 장치가 앞에 있을 때 ⌥` 회귀 복구, core에서 체크아웃 이동 후 에러가 나도 디스플레이 포커스를 따라가게, 체인 키다운이 커밋 대기를 풀지 않게.
  • 확인하지 못한 것: 데스크톱 Electron e2e(desktop/e2e/keys.spec.ts, ⌃Tab 경로와 ⌥Tab이 이제 focus_tab을 보내도록 갱신)는 운영자 화면을 차지하므로 로컬에서 돌리지 않았습니다. CI에 맡깁니다.
  • 확인하지 못한 것: Swift 셸 테스트(verify-swift.sh)는 로컬에서 돌리지 않았습니다. 새 필드는 serde default라 Swift가 보내는 이벤트 모양은 그대로입니다.
  • 확인하지 못한 것: 원격 장치가 앞에 있을 때의 ⌥`는 unit 테스트만 있고 실제 SSH 장치로는 확인하지 않았습니다.

AI tooling: 대부분 AI 도구. e2e 캡처와 core 테스트 결과를 직접 대조했습니다.

@yansfil
yansfil merged commit 5b78702 into main Sep 26, 2026
7 checks passed
@yansfil
yansfil deleted the web-recent-panels branch September 26, 2026 13:10
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.

web: ⌃Tab walks Recent Panels across every surface, ⌥Tab stays Recent Projects

1 participant