Repository navigation
Pane 헤더가 자기가 그리는 스냅샷 값만 구독하기 - #1111
Merged
Merged
Conversation
yansfil
added a commit
that referenced
this pull request
Oct 15, 2026
… behind one button (#1106) Related: PRD `agents/prd/session-record-redesign/prd.md` · main 0ba63d5(#1094, #1103, #1107, #1109, #1111 포함) 위에 리베이스함 · work-tab-pr-lens는 아직 들어오지 않음 · 판단을 끝난 일로 다시 여는 문제는 #1104 ## Summary - 세션 기록이 PR, 일 체크리스트, 받은 요청을 한 화면에 상태 단어 없이 보여 주고, 놓친 일은 해당 일 밑에 붙습니다. - 운영자가 한 말은 헤더의 말풍선 버튼 하나로 켜고 끕니다. 위임받은 기록에서는 받은 요청이 됩니다. - PR 표시는 어디서나 `#번호`입니다. 가족이 둘 이상인 루트는 번호 없이 개수만 보이고, Sessions 행의 놓친 일 깃발과 `● N`은 없어졌습니다. - 놓친 일은 Sessions 맨 위 `놓친 일 N` 그룹에서 열린 것만 한곳에 모읍니다. - Claude Code의 `/model` 같은 로컬 명령이 운영자의 요청으로 기록되던 문제(`//model`)를 읽는 쪽에서 고쳤습니다.   ## Review - **운영자 결정 (10-14)**: 하위 에이전트가 찾은 놓친 일은 루트 기록 맨 끝에 그 자식 이름과 함께 한 번만 보입니다. 펼친 자식 기록에는 다시 그리지 않습니다. - **운영자 결정 (10-14)**: 끝낸 일이라도 PR이 리뷰 중이면 반원으로 그리고 헤더 `done/total`의 끝난 수에 넣지 않습니다. 끝남은 PR 머지까지입니다. - **조심해서 볼 곳**: #1109와 겹친 Sessions 행과 기록의 자식 행 - 목록 행에는 로고 없이 상태 마크가 먼저 오고, 기록의 자식 행은 제품 이름을 툴팁과 스크린리더 글로만 냅니다. - **조심해서 볼 파일**: `hide-session/src/lib.rs`, `hide-session/src/conversation_cursor.rs` - 명령 기록은 답이 같이 읽히는 poll까지 되감아 기다립니다. 윈도 첫 줄이면 기다리지 않아 리더가 멈추지 않습니다 (failure path, 진행 보장). - **조심해서 볼 파일**: `web/src/SessionRecord.tsx` - 전면 재작성. `web/src/sessionWork.ts`의 `checklist()`가 요청 offset으로 일과 놓친 일을 잇습니다. - **비용 검토**: 상시 작업이나 고빈도 경로를 늘리지 않습니다. 명령 뒤 탐색은 사람이 친 슬래시 명령에서만, 첫 대화 기록에서 멈춥니다. - **운영자 결정 (10-14)**: 한 요청이 두 일에 묶이면 그 말풍선이 두 일 밑에 모두 보입니다. ## Evidence - **확인한 것**: `scripts/verify-cargo.sh` test 와 lint 통과. web 전체 1583개 테스트(리베이스 뒤), `tsc`, eslint, `check-design-contract`, `gen-screens` (이미 생성 결과와 같음, 17장). - **확인한 것**: 리베이스 뒤 격리한 hided와 Herdr에서 Playwright 6개 통과 (session-work-ledger, session-panel, session-tree, sidebar-status). 실제 세션에서 뽑은 명령 기록 fixture로 poll 경계마다 나눠 읽어도 한 번만 읽힘을 확인했고, 되감기와 윈도 경계 테스트는 수정을 빼면 실패합니다. - **확인한 것**: 갤러리 장면을 실제 브라우저로 찍어 Pen 내보내기와 비교했고, 기하 검사에서 넘침과 겹침이 없었습니다 (Dark/Light, 좁은 폭, 긴 한국어). - **확인하지 못한 것**: 말풍선 펼침/접힘은 jsdom에 레이아웃이 없어 단위 테스트가 없고 스크린샷으로만 확인했습니다. 영어 UI, 글자 크기 갤러리, 원격 기기, Windows/Linux, 설치된 앱 라이브 확인은 하지 않았습니다. - **확인하지 못한 것**: 다른 에이전트의 읽기 코드에 명령 모양 기록이 없다는 PRD의 고정 파일 확인은 하지 않았습니다. 폰 대화(`hided/src/mobile/conversation.rs`)와 Memory 읽기는 한 덩어리를 읽어 끝의 명령을 요청으로 볼 수 있고, 아직 갱신되지 않은 기기 helper는 `/model`을 계속 기록합니다. - **확인하지 못한 것**: 판단 실패한 최신 요청이 일하는 동안 `지금`으로 남습니다 (wire에 판단 실패 표시가 없음). - **생성물**: `design/hide-screens.pen`은 생성기로 만든 큰 바이너리 diff입니다. 위 이미지가 결과입니다. <details><summary>추가 증거</summary> Pen 비교와 나머지 상태(말 켜짐, Hide AI 꺼짐, 좁은 폭, Sessions 패널)는 실행 폴더에 로컬로 남겨 두었습니다. </details> <details><summary>Verification record</summary> - PRD: `agents/prd/session-record-redesign/prd.md` (sha256 b7ef799d1e86b3258699f96c692dadffcd4716b171113a150a45c6feb0b00c12) - Base 0ba63d5 → head 68592ae, verified 2026-10-15T01:26:47.515Z: PASS (S1 414.5 s, S2 7.3 s) - Verification report: `agents/runs/session-record-redesign/verification-report.json` and `agents/runs/session-record-redesign/verification-report.md`; source fingerprint ce473e6931ceba4784ffd35034e4d49570f34a930dfabf2bbb491ec7b0b151dc - Suites: - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0) - S2: GREEN `bash scripts/verify-cargo.sh lint` (exit 0) - Reviews (advisory): - Fidelity, head 1bd95fc: 3 Fix now (a child's missed item drawn twice, a bare PR number on the Factory card, no read time on a task's PR button), all fixed in bd379c5. Follow-ups listed in Review. - Code, head bd379c5: no lost or duplicated command found; 5 Fix now (hold without progress guarantee at the read-window edge, its missing test, blank Assigned work section, child `0/0` count, dead strings), all fixed in the next commit. - Follow-up Code, fix commit: 1 Fix now (the retry ignored a reply inside its own window), fixed in the head; a mutation of the fix fails the new test. - Rebase follow-up, `git range-diff 60416ee..5c79d9c 0ba63d5..68592ae`: 4 changed commits, each a conflict with #1109 resolved to its rules (Pen rows without `provider`, `SecondLine` owl prop as on main, record child row title tooltip and screen-reader product name instead of the logo, UI_BEHAVIOR row sentence). No new finding. - Evidence: 7 registered (6 screenshot, 1 log); paths are local to the run directory - agents/runs/session-record-redesign/shots/rest-d.png - agents/runs/session-record-redesign/shots/words-d.png - agents/runs/session-record-redesign/shots/missed-d.png - agents/runs/session-record-redesign/shots/off-d.png - agents/runs/session-record-redesign/shots/narrow-long-d.png - agents/runs/session-record-redesign/shots/panel-d.png - agents/runs/session-record-redesign/e2e.log - Changed paths: 33 (see Files changed) - Delivery: mode pr, branch `gen-prd/session-record-redesign`, base `main` </details>
yansfil
added a commit
that referenced
this pull request
Oct 15, 2026
## Summary 오늘 머지된 #1093, #1107, #1111이 쓸모없게 만든 코드를 걷어내고, 같은 일을 하던 두 군데를 한 곳으로 합쳤습니다. 화면과 동작은 그대로이고, 하나만 다릅니다: 원격 기기의 프로젝트가 GitHub 저장소를 갖지 않을 때, 이제 이 컴퓨터의 프로젝트와 똑같이 아무것도 그리지 않습니다. 전에는 기기 프로젝트의 체크아웃 카드에만 "origin이 GitHub 저장소를 가리키지 않는다"는 문장이 따로 떴습니다. ## Review - **판단해 주세요**: 기기 프로젝트의 "GitHub 없음"을 로컬과 같은 답(`available`, 사유 없음)으로 맞췄습니다. 웹이 `unavailable_reason`을 카드에 그리기 때문에 문장 하나가 사라지는 변화입니다. `failure_category`는 그대로라 로컬 이슈 기본값은 같습니다. - **조심해서 볼 파일**: `hide-project/src/lib.rs` - origin을 읽는 규칙 둘을 그대로 지켰습니다. `include`는 파일이 직접 적은 origin을 가리지 못하고(목록 전체만 "알 수 없음"), 이름 비교는 정확히 `origin`이라 `"Origin"`은 다른 remote입니다. - **조심해서 볼 파일**: `hide-host/src/worktrees.rs` - 자체 origin 파서와 읽기 상한 256 KiB가 사라지고 hide-project의 1 MiB 상한을 따릅니다. `ProjectWorktreesSnapshot.repository`가 이 값을 씁니다. - **조심해서 볼 파일**: `web/src/PaneHeaderBand.tsx` - 모듈 전역 캐시 대신 필드별 selector와 `useMemo`를 썼습니다. 세션 목록의 행 목록은 헤더와 같은 단일 슬롯 캐시를 공유합니다(둘 다 스토어의 `agents`와 `status.remote`를 넘김). ## Evidence - **확인한 것**: web typecheck, lint, `PaneHeaderBand`/`AgentSessions` 테스트(렌더 횟수 테스트 포함); `cargo fmt-check`, `lint`; hide-project, hide-host, herdr-core 전체 테스트(새 테스트 `a_node_repository_without_a_github_remote_draws_no_reason`, origin 규칙 둘을 hide-project로 옮긴 테스트); 정책 스크립트 4종과 attribution 검사. - **확인하지 못한 것**: 전체 테스트를 부하 속에서 돌렸을 때 `hided` 통합 테스트(`connect_build`, `mobile`, `node_session_activity`)가 실행마다 다르게 1~2개 실패했고, 단독 실행에서는 모두 통과했습니다. 이 변경과 닿는 코드가 아니며 원인은 찾지 못했습니다. herdr-core lib 테스트 하나도 첫 전체 실행에서 한 번 실패하고 재실행에서 통과했습니다. - **확인하지 못한 것**: `usage_ledger` 쪽 `fail_with` 정리(A4)는 호출부 11곳의 로그 모양이 바뀌어 이번에는 하지 않았습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
화면에 pane이 여러 개 떠 있으면, 이 pane과 상관없는 스냅샷 값(테마, 프로젝트 목록 같은 것)이 바뀔 때마다 모든 pane 헤더가 다시 그려지고 자식 목록을 처음부터 계산했습니다.
이제 헤더는 자기가 그리는 값(에이전트 목록, 자기 자식, 자식이 있을 때만 장치 연결 상태)만 구독합니다.
자식이 없는 pane은 에이전트가 바뀔 때도 계산이 한 번의 조회로 끝납니다.
보이는 동작은 그대로입니다.
Review
web/src/paneAgents.ts- 새 파일. 에이전트 목록·장치 상태를 "값이 안 움직이면 같은 참조"로 돌려주는 모듈 단위 캐시 한 칸씩이라, 참조가 바뀌어야 할 때 바뀌는지 봐주세요.web/src/PaneHeaderBand.tsx-usePaneChildren이 자식이 있는 pane에서만rest의 장치 슬라이스를 구독합니다.web/src/LinkSessions.tsx,web/src/Overlays.tsx- 같은 방식으로 좁힌 행 단위·상시 마운트 구독자입니다.rest구독자와 이유:StartPanel,SearchPalette,WorkspaceDialogs,DraftRecovery,factory/CreateSheet는 열려 있는 동안만 마운트됩니다.MainScreen,ProjectOverview는 화면 전체가rest의 여러 섹션에서 값을 만들어, 슬라이스로 나누면 화면 계산을 다시 쓰게 됩니다.PaneConnection은 연결이 끊긴 pane에만 뜨고, 같은 스냅샷에서 두 번 보내지 않는 장치가rest참조에 의존합니다.status.remote가 움직이면 자식이 있는 헤더는 다시 그려집니다(연결 상태가 합계에 쓰이므로 의도).Evidence
확인한 것: P=44 헤더(셸 30, 단독 에이전트 10, 부모 4×자식 3), 에이전트 126개, 에이전트 pane에 PR 칩 마운트. React Profiler +
paneChildren호출 수를 vitest(jsdom)에서 센 값, 같은 섹션을 10번 바꿨을 때:paneChildren호출 전 → 후ui_state.themenavigator.workspacesstatus.remote(무관한 장치 행 추가)확인한 것:
scripts/verify-web.sh전체(typecheck, lint, 1561 vitest, build) 통과. 로컬 e2e 22개 통과:s6,agent-tab-groups,agent-sleep,lineage-session,sidebar-status,link-graph,checkout-pr. 기존PaneHeaderBand.test.tsx는 수정 없이 통과하고, 렌더 횟수 회귀 테스트 하나를 더했습니다.확인하지 못한 것: 실제 앱 CPU·프레임 측정(jsdom 렌더 횟수만 쟀습니다). 전체 e2e 스위트는 CI에 맡깁니다.
useAgentStaleness의 스토어 셀렉터(PR 있는 에이전트마다 카탈로그 탐색)는 건드리지 않았습니다.