Skip to content

웹 내비게이션: 사이드바는 범위, Sessions는 Overview 탭, 제목 아래 사실 한 줄 - #169

Merged
yansfil merged 5 commits into
mainfrom
feat/web-scope-navigation
Sep 26, 2026
Merged

yansfil merged 5 commits into
mainfrom
feat/web-scope-navigation

Conversation

@yansfil

@yansfil yansfil commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Summary

웹 셸 내비게이션을 "사이드바는 범위, 위쪽 탭은 보는 방식"으로 정리합니다. 승인된 보드 v5, v7의 PR (b)입니다.

  • 사이드바 Projects 목록 맨 위에 All projects 행(격자 아이콘, N projects)을 두고, 지금 가운데에 보이는 범위의 행 하나만 선택 표시를 합니다. All projects 화면이면 그 행, Overview면 그 프로젝트 행, Workspace면 체크아웃 행입니다.
  • 사용자에게 보이는 "Main"은 All projects가 됩니다(제목, Overview와 Workspace의 경로).
  • Sessions는 별도 화면이 아니라 Overview의 탭(Tasks · Agents · Sessions)입니다. 고른 탭은 페이지 상태라서 다른 프로젝트로 옮겨도 유지됩니다.
  • 제목 바로 아래 사실 한 줄: worktree 수, GitHub가 답한 뒤의 열린 PR, 디스크 용량, main이 뒤처졌을 때만 behind, merged가 있을 때만 N merged → 정리(누르면 Tasks의 머지됨 칸이 열립니다). All projects는 프로젝트 수와, 모든 프로젝트가 답을 줄 수 있을 때만 PR/merged 합계를 보입니다.

All projects, Dark. 사이드바 맨 위 행이 선택되어 있고 제목 아래에 프로젝트 수와 merged 합계가 있습니다

Overview의 Sessions 탭, Light. repo 프로젝트 행이 선택되어 있고 사실 한 줄에 디스크 284 KB와 merged가 보입니다

위: Pen 시트 Screen / Project Overview(Dark). 아래: e2e fixture로 띄운 실제 Overview(Dark)

Review

  • 판단해 주세요:
    • 선택 표시 규칙을 바꿨습니다. 이전에는 포커스된 체크아웃 행이 항상 칠해졌지만, 이제 Workspace 화면일 때만 칠해집니다. All projects나 Overview에서는 그 범위의 행 하나만 칠해집니다.
    • All projects의 열린 PR 합계는 GitHub가 모든 Git 프로젝트에 답했을 때만 나옵니다. GitHub 조회는 프로젝트별로 요청되므로 실제로는 자주 빠질 수 있습니다. 전체 조회를 추가하지는 않았습니다.
    • All projects의 N merged는 누를 곳이 없어서 → 정리 없이 사실로만 둡니다.
    • 디스크를 읽지 못하면 칸을 그리지 않고 이유는 진단 로그로만 갑니다(설계 원칙 13). 새로 고침 버튼은 없습니다.
    • "기다리는 것" 띠(보드 v7)는 의도적으로 후속 PR (c)로 남겼습니다.
  • 조심해서 볼 파일:
    • herdr-core/src/runtime/events.rs, runtime/projects.rs: Herdr/core ownership과 snapshot wire. card_measure_disk가 선택적 workspace_id를 받습니다. 로컬 Git 프로젝트면 모든 worktree와 공유 Git 디렉터리가 기존 디스크 요청에 합쳐지고, 그 밖의 id는 진단을 남기고 거절합니다. Swift 셸의 {}는 이전 의미 그대로입니다.
    • herdr-core/src/model.rs: snapshot wire. WorkspaceSnapshot.disk는 측정 전에는 wire에 없어서 Swift 스냅샷의 키가 그대로입니다.
    • 지정된 프로젝트는 데몬의 모든 창이 공유하고, Overview를 떠나도 남습니다. 그 뒤 catalog가 바뀌면 그 프로젝트 하나를 백그라운드에서 다시 잽니다. 측정은 기존 BackgroundRead에서 돌고 runtime mutex 밖입니다.
    • web/src/keyboard.ts: failure path. Overview의 Escape는 글자가 든 텍스트 필드에서는 건너뜁니다. 그래서 Sessions 검색은 첫 Escape로 비워지고 두 번째 Escape로 Overview를 떠납니다.
    • design/hide-screens.pen: 시트 이름 Screen / Main, Screen / Project Sessions는 파일 이름과 맞추려고 그대로 두고 내용만 바꿨습니다.
  • 질문: 사이드바의 All projects 행에 에이전트 수(12 projects · 11 agents, 보드 v5)도 넣을까요? 지금은 브리프대로 프로젝트 수만 있습니다.

Evidence

  • 확인한 것:
    • 고정 버전 Herdr와 격리된 hided로 e2e 40개 통과: overview, s8(Sessions), projects-sidebar, s6(All projects), s2, palette, s3. cargo build -p hided와 pnpm build 뒤에 돌렸습니다.
    • overview.spec.ts에 추가한 확인:
      • 프로젝트 행 클릭 시 그 행만 aria-current="page"이고, 체크아웃 행에는 표시가 없습니다.
      • 실제 측정으로 디스크 칸이 284 KB 형태로 채워지고, 1 merged → 정리를 누르면 머지됨 칸이 열립니다.
      • Sessions 탭이 열리고, All projects 행을 누르면 All projects가 열리며 그 행이 선택되고 3 projects와 1 merged가 보입니다.
      • 다른 프로젝트를 열어도 Sessions 탭이 유지됩니다.
    • s8.spec.ts는 Sessions 버튼 대신 탭으로 들어가도록 바꿨고, 검색에 글자가 있을 때 Escape가 검색을 비우는 기존 단계가 새 규칙을 확인합니다.
    • core 테스트 1개: workspace_id로 지정한 프로젝트의 디스크 요청 경로, 측정 중 표시, 합계, 원격과 없는 id 거절, {}와 payload 없음이 이전처럼 다시 재는 것.
    • scripts/verify-cargo.sh test, lint 통과. pnpm --dir web typecheck, lint, test(355개) 통과.
    • node scripts/check-design-contract.mjs, node 스크립트 테스트 53개, python 스크립트 테스트 39개, check-no-workstation-identity.sh 통과.
    • Light/Dark 앱 캡처를 Pen export와 나란히 놓고 대조했습니다(위 세 번째 이미지).
  • 확인하지 못한 것:
    • 실제 작업 데이터로 띄운 운영 앱 화면은 보지 않았습니다. 큰 저장소에서 디스크 측정이 걸리는 시간도 재지 않았습니다.
    • SSH 기기 프로젝트의 Overview는 디스크를 요청하지 않는다는 것을 코드와 core 거절 테스트로만 확인했습니다.
    • Swift 셸이 보내는 card_measure_disk {}는 core 테스트로만 확인했고 Swift 앱은 띄우지 않았습니다.
    • GitHub가 답한 상태의 PR 합계는 단위 테스트로만 확인했습니다. e2e fixture에는 GitHub가 없습니다.
  • 생성물: design/hide-screens.pen의 diff는 node scripts/gen-screens.mjs가 시트를 다시 쓴 결과입니다. 결과는 위 세 번째 이미지의 위쪽입니다.

AI tooling: 대부분 AI 도구. Pen export와 실제 캡처를 나란히 놓고 사실 한 줄의 순서, 탭 위치, 사이드바 선택 행을 눈으로 대조했습니다.

card_measure_disk takes an optional workspace_id. A local Git project named
this way joins the disk request with every worktree and the shared Git
directory, and each workspace snapshot carries its disk: the total once
every part is measured, the unavailable reason, and measuring while the
named project has not come back. The Swift shell's empty payload keeps
remeasuring the right panel's checkout.
The Overview's views are Tasks, Agents and Sessions, kept by the page, so
another project opens on the same view. The Sessions screen and the
Overview's Sessions button are gone. Main is titled All projects, in its
header and in every crumb. A facts line sits under each title: worktrees,
open PRs once GitHub answered, the disk the Overview asks the core to
measure, main behind origin, and merged worktrees, which open the Merged
column; All projects states the project count and the totals only when
every project can give its part. Escape in a search that holds text clears
it before it leaves the Overview.
An All projects row heads the list with the project count and opens All
projects. The row of the scope on screen is marked: All projects, a
project row on its Overview, or the focused checkout and its agent only
while a Workspace is in front, so one row carries the mark at a time. The
Overview e2e covers the marks, the Sessions tab, the view kept across
projects, the disk and merged facts, and Dark and Light captures.
UI_BEHAVIOR names All projects, the sidebar's selected row per scope, the
Overview's tabs and facts line with disk and merged, and the Escape rule
for a search holding text. ARCHITECTURE lists the three web screens and
the named-project disk measurement.
The Main sheet is All projects with its facts line, the Overview and
Sessions sheets share one header with the facts line and the Tasks,
Agents and Sessions tabs, and the Projects Sidebar sheet carries the
All projects row with herdr-ide selected on its Overview.
@yansfil
yansfil force-pushed the feat/web-scope-navigation branch from eceed2d to df42dea Compare September 26, 2026 07:33
@yansfil
yansfil merged commit a2a23ba into main Sep 26, 2026
7 checks passed
@yansfil
yansfil deleted the feat/web-scope-navigation branch September 26, 2026 07:51
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>
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