Skip to content

사이드바: primary 체크아웃을 맨 위로, 상태 마크를 한 크기로 - #168

Merged
yansfil merged 3 commits into
mainfrom
fix/sidebar-primary-first-marks
Sep 26, 2026
Merged

yansfil merged 3 commits into
mainfrom
fix/sidebar-primary-first-marks

Conversation

@yansfil

@yansfil yansfil commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Related: #167 후속, 탐색 개편 첫 PR

Summary

  • 체크아웃 목록이 활동 순서만 따라서, 프로젝트의 primary 체크아웃(main)이 최근에 쓴 워크트리 아래로 밀려났습니다.
    이제 primary가 활동과 상관없이 맨 위에 오고, 나머지는 기존 활동 순서를 따릅니다. 비활성 접기는 그대로입니다.
  • ●와 ○는 폰트에서 서로 다른 크기로 그려져서, 같은 목록 안에서 원 크기가 달랐습니다.
    이제 StatusMark 컴포넌트 하나가 고정 박스 안에 점과 링을 같은 지름(--size-status-mark)으로 그립니다.
    ? ! × ✓ ~ ⊘는 같은 박스 안의 글리프입니다.
    에이전트 행, 자식 목록 팝오버, 체크아웃 둘째 줄 요약, pane 관계 칩이 모두 이 컴포넌트를 씁니다.
  • Pen 라이브러리의 Agent identity와 Checkout row 마스터도 같은 점/링/글리프 구조를 갖습니다.
    Screen / Projects Sidebar는 main을 맨 위에 둡니다.

Pen Screen / Projects Sidebar: main이 맨 위, 마크 네 종류가 한 박스

웹 Dark/Light: 체크아웃 요약의 링, 기다리는 루트의 링과 배지의 점이 같은 지름

Pen(왼쪽)과 웹(오른쪽)의 마크 열 위치 대조

Review

  • 판단해 주세요:
    • primary 우선 정렬을 셸이 아니라 core sort_projects에 넣었습니다. 순서를 정하는 곳이 core이고, pinned 우선도 같은 자리에 있습니다.
    • 그래서 Swift 앱의 사이드바 순서도 함께 바뀝니다. macos/ 코드는 건드리지 않았습니다.
      웹만 바꾸려면 셸이 다시 정렬해야 하는데, 그러면 순서를 정하는 곳이 둘이 됩니다.
    • primary 판정은 기존 비활성 접기와 같은 !is_worktree && path == project.path입니다. 사용자가 직접 primary를 지정하는 기능은 이 PR 범위 밖입니다.
    • 체크아웃 둘째 줄의 마크는 예전에는 늘 색 점이었습니다. 이제는 core가 주는 기호(?, ✓ 등)를 에이전트 행과 똑같이 그립니다.
  • 조심해서 볼 파일:
    • herdr-core/src/project_context.rs - ownership: core 정렬 규칙이 두 셸에 동시에 적용됩니다. 비활성 접기의 primary 판정도 같은 helper로 옮겼습니다.
    • design/hide-ui.lib.pen - Pen CLI로 저장하면 무관한 노드까지 정규화되고 일부 값이 깨졌습니다.
      그래서 HEAD JSON에 의도한 변경만 스크립트로 적용했습니다. 옛 마크 노드를 가리키던 override 41개를 점/링/글리프로 옮겼습니다.

Evidence

  • 확인한 것:
    • verify-cargo.sh test, lint 통과.
      새 core 테스트: 활동이 가장 오래된 primary가 맨 앞에 오고, 프로젝트의 최근 활동 값은 그대로입니다.
    • pnpm --dir web typecheck, lint, test(353개) 통과. 웹 토큰 검사 통과.
    • projects-sidebar.spec.ts는 첫 체크아웃이 primary인지 확인합니다.
      sidebar-status.spec.ts는 기다리는 루트의 링과 배지 점의 bounding box가 같은지 확인합니다.
      둘 다 고정 버전 Herdr와 격리된 hided로 돌렸고 통과했습니다.
    • 나머지 web e2e 12개 spec(overview, palette, s2, s3, s4, s6, s7, s8, shell, theme, weekly-usage, pane-scroll-find), 61개 테스트도 같은 조건에서 통과했습니다.
    • Dark/Light 캡처에서 링과 점의 지름이 같고, ?와 ✓가 같은 박스 안에 있는 것을 확인했습니다. Pen과 웹의 마크 열 위치도 맞습니다(위 세 번째 이미지).
    • gen-pen, gen-screens(다시 돌려도 변경 없음), check-design-contract.mjs, 스크립트 테스트 53개, check-no-workstation-identity.sh 통과.
    • CONTRIBUTING의 check 스크립트 12개와 python 스크립트 suite(39개) 통과.
    • 라이브러리를 HEAD와 구조 diff로 비교했습니다. 바뀐 것은 마크 박스 두 개, 상태 셀 override, 토큰 변수 하나뿐입니다.
  • 확인하지 못한 것:
    • 바뀐 순서를 Swift 앱에서 직접 띄워 보지 않았습니다. swift test lane은 CI 결과에 맡깁니다.
    • 라이브러리는 Pen 데스크톱 앱에서 열어 보지 않았고, CLI export로만 확인했습니다.
    • 실제 작업 데이터로 띄운 운영 앱 화면은 확인하지 않았습니다.
  • 생성물: design/hide-screens.pen의 diff는 node scripts/gen-screens.mjs의 출력입니다. 결과는 위 첫 번째 이미지입니다.

AI tooling: 대부분 AI 도구. Pen export와 웹 캡처를 나란히 놓고 마크 지름과 열 위치를 눈으로 대조했습니다. 라이브러리 diff도 HEAD와 구조적으로 대조했습니다.

The core sorts each project's checkouts with the primary checkout first
and the rest by activity, so the list starts at the one checkout that
never folds. Both shells draw the core's order.
StatusMark draws the core's working and idle marks as a dot and a ring of
one diameter (--size-status-mark) and every other mark as its glyph in the
same box. Agent rows, the descendant badge, the children list, the pane's
child chips and the checkout's second line all use it.
The Agent identity and Checkout row masters hold a dot, a ring and a glyph
in one mark box, sized by --size-status-mark, and every override that named
the old glyph now enables the one it draws. The Projects Sidebar screen puts
main first, as the core now orders it.
@yansfil
yansfil merged commit 54f792c into main Sep 26, 2026
7 checks passed
@yansfil
yansfil deleted the fix/sidebar-primary-first-marks branch September 26, 2026 07:23
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