Repository navigation
Keep a checkout's pull request on the row nearest its lineage root - #925
Merged
Merged
Conversation
A pull request on several rows gave its duty to whichever row on its branch's checkout came first in the sidebar order, which follows activity. An Observer and the implementor it spawned on one checkout therefore traded the PR chip, the fix/review verb and the header band as they took turns working, and while the implementor held it Sessions showed it nowhere, since Sessions draws one level of children. The duty now goes to the row nearest its lineage root on the branch's checkout, then to the session that printed the PR, then to the lowest pane id; a PR with no row on its checkout still goes to the session that printed it first.
Covers a deeper row whose session printed the pull request against a shallower one that did not, and two alike rows that must keep one holder in either order; names the rank tuple for Clippy and formats.
yansfil
added a commit
that referenced
this pull request
Oct 10, 2026
## Summary 같은 PR이 화면마다 다르게 보였다: 사이드바 아이콘은 주황, Sessions chip은 회색 `◷`, 카드는 생명주기 색, 보드와 Overview는 따로 그린 checks 표시와 주황 "변경 요청". PR 상태를 core 한 곳(`PrState::of`)에서 정해 체크아웃 PR, 검색 결과, 링크 패널에도 같은 값으로 싣고, web은 한 모듈(`web/src/prMark.ts`)과 한 컴포넌트(`components/pr-mark.tsx`)로 그린다. 모든 PR 표면이 상태 색 PR 아이콘과 `#번호`(여러 개면 `#924 +1`)를 그리고, 텍스트 글리프(◷ ✓ ✕ ⇥)와 화면별 색 표, 분류기, checks/review 문구 복사본, stale 계산 복사본은 지웠다. 색은 failed 빨강, pending 주황, mergeable 초록, draft 회색, merged 보라, closed 흐림으로 한 상태에 한 토큰이고, `--pr-open`은 `--pr-failed`, `--pr-mergeable`로 바뀐다. 운영자가 2026-10-10 승인한 시안 r1(1a-6a)대로이며, 승인 내용은 `docs/status-model.md`(Pull request visual states)와 `docs/UI_BEHAVIOR.md`에 적었다.  사이드바 에이전트 줄은 아이콘만 있던 PR에 번호가 붙는다(3a). 아래 접힌 블록에 Sessions, pane 헤더, Pen 시트가 있다. ## Review - **판단해 주세요**: 사이드바 에이전트 줄에 번호가 붙어 좁은 폭(320)에서 제목이 더 일찍 잘린다(위 이미지의 `P8 읽기 전용 준…`). 승인(3a)대로지만 실제 폭에서 괜찮은지. - **판단해 주세요**: pane 헤더의 Review/Merge 밴드도 같은 상태를 읽는다. Merge는 mergeable, Review는 pending일 때만 서고 밴드 색은 상태 색(failed 빨강, mergeable 초록, pending 회색)이다. 그래서 draft에는 두 밴드가 다 없고, checks가 도는 열린 PR의 밴드는 초록에서 회색이 된다. - **판단해 주세요**: PR 패널 머리의 상태 단어가 생명주기(열림/초안/머지됨/닫힘)에서 mark와 같은 상태 단어(CI 실패, 머지 가능 등)로 바뀌었다. - **조심해서 볼 파일**: `herdr-core/src/model.rs` - snapshot wire: `PullRequestSnapshot`을 손으로 쓴 `Serialize`로 바꿔 `state`를 덧붙인다. 필드 순서와 core 전용 필드 제외가 그대로인지. - **조심해서 볼 파일**: `contracts/snapshot-wire-enums.json` - 새 wire enum `pr_state`(6개). 체크아웃 PR `state`, `GithubSearchResult.pr_state`, 링크 패널 `state`가 더해지고, 읽는 곳이 없어진 `PrSummary.worst_count`, 검색 결과 `is_draft`는 wire에서 빠진다. - **조심해서 볼 파일**: `herdr-core/src/agent_state/sessions.rs` - 에이전트 PR 요약이 이제 draft를 센다(전에는 draft를 몰라 pending). Idle 순서에 draft가 merged 앞에 들어간다. - **질문**: Project Sessions의 세션 PR chip(`#N 만듦`/`#N`, `LinkSessions.tsx`)은 상태가 아니라 만듦/참여를 보라색으로 구분한다. core가 상태를 싣지 않아 이번 범위에서 뺐는데, 같은 mark로 바꿀지. - **조심해서 볼 파일**: `design/hide-ui.lib.pen`, `design/hide-screens.pen` - 스크립트로만 고쳤다(Pen 앱 저장 없음). 라이브러리 구조 diff는 Foundations, Agent tree parts, Agent graph box, PR hover card, Pane header 3개, Checkout row 1개, Overview group header 1개 노드로 한정된다. ## Evidence - **확인한 것**: core 상태 규칙 테스트(여섯 상태, draft가 failing checks보다 앞, changes_requested는 failed, checks 없음/unknown은 pass가 아님, wire에 `state`가 실림)와 wire enum 계약 테스트. - **확인한 것**: web `prMark.test.ts` 9개: 여섯 상태의 토큰과 아이콘, wire enum과 키 일치, review/checks 단어 색, 배지 단어, stale 문구, 에이전트 mark의 worst와 `+N`. - **확인한 것**: origin/main(#925, #926, #928 포함) 위로 rebase한 뒤 `verify-cargo.sh lint`, `verify-cargo.sh test`(46개 바이너리 3925개), `verify-web.sh`(web 1339개, desktop 162개), `check-design-contract.mjs`, workstation identity, attribution, harness, capability-readers, core-touches-no-machine 검사 통과. - **확인한 것**: pane 헤더 밴드 테스트에 passing checks의 draft가 Merge 밴드를 받지 않는 경우를 더했다. - **확인한 것**: rebase한 빌드로 web e2e 12개 spec(checkout-pr, sidebar-pr-start, overview-prs, overview, link-graph, cmdk, disk-cleanup, session-panel, projects-sidebar, sidebar-menus, graph-cross-project, agents-tab) 34개 통과. 격리된 pinned Herdr 0.9.3과 가짜 `gh`로 돌렸다. - **확인한 것**: before/after는 gallery scene(`projects-sidebar`, `session-panel`, `pane-header`)을 branch point와 이 브랜치에서 각각 띄워 같은 viewport로 찍었다. daemon이나 운영자 앱은 쓰지 않았다. - **확인하지 못한 것**: 설치된 앱이나 격리 fixture에서 실제 GitHub PR로 본 live 화면은 없다. 화면 확인은 gallery scene과 e2e의 가짜 `gh` 응답까지다. - **확인하지 못한 것**: Windows lane과 desktop e2e는 로컬에서 돌리지 않았다(CI가 돈다). - **생성물**: `design/hide-screens.pen`(20 MB)은 `gen-screens`가 다시 썼다. 결과는 아래 Pen 시트 이미지. <details><summary>추가 증거</summary> Sessions before(위)/after(아래): 텍스트 글리프와 테두리 chip이 상태 아이콘과 번호로.  pane 헤더 before(위)/after(아래): `#140✓` chip이 아이콘과 번호로.  사이드바 light before/after.  Pen `Component / Agent tree parts`: PR mark master와 여섯 상태, 여러 PR, 흐림, 포인터 아래, 좁은 변형.  Pen `Component / Agent graph box`: 테두리와 checks 표시 없는 PR mark, 변경 요청만 빨간 단어.  Pen `Component / PR hover card`: 배지는 아이콘만 상태 색, 단어와 Open PR은 글자색.  </details>
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
같은 워크트리에서 Observer와 그 자식 implementor가 함께 일할 때, PR이 붙는 줄이 "누가 더 최근에 움직였나"에 따라 둘 사이를 오갔습니다.
implementor(손자)가 PR을 가져가면 Sessions는 한 단계만 펼치기 때문에 그 PR이 어디에도 보이지 않았습니다(#898이 Graph view에는 있고 Sessions에는 없던 원인).
이제 PR duty는 그 브랜치 체크아웃의 줄 중 계보 루트에 가장 가까운 줄에 고정됩니다.
동점이면 그 PR을 만든 세션, 그다음 pane id 순서입니다.
브랜치 체크아웃에 줄이 없으면 예전처럼 PR을 가장 먼저 출력한 세션이 받습니다.
Sessions PR 칩, 사이드바 PR 아이콘, pane 헤더 칩과 Fix·Review·Merge 띠, verb, 자동 정리는 모두
duty하나를 읽으므로 함께 따라갑니다.Graph view와 PRs 탭처럼 PR을 브랜치로 찾는 화면은 바뀌지 않습니다.
Review
herdr-core/src/agent_state/work.rs- snapshot wire의duty값을 정하는 유일한 곳입니다. 세션 갱신마다 도는 경로지만 추가 작업은 링크된 PR당 비교 한 번입니다.Evidence
herdr-corenextest 전체 1887개 통과(첫 커밋), 이후request_view::tests16개, clippy-p herdr-core --all-targets -D warnings,cargo fmt --check통과.apply_lineage로 깊이를 계산하는 runtime 수준 테스트는 없습니다.