Repository navigation
refactor: draw the task row, plan, letter, PR, mission and @ parts from one shared set - #1905
Merged
Merged
Conversation
…om one shared set The sidebar's agent row, the session record's child rows and the PR card's timeline draw one SessionRowBody; the plan checklist moves into components; the record's letter head is LetterTag beside the sidebar and pane letter marks; a new MentionChip draws a session or project @name. A shared-parts gallery scene shows each part in its states.
yansfil
added a commit
that referenced
this pull request
Oct 30, 2026
… every state (#1907) Related: PRD session-docs-and-assistant (Desk 1차), node `ui` of mission-20. #1905 (shared parts) is merged; this PR's base is main. ## Summary Desk 1차를 화면에 연결하기 전에 사람이 먼저 리뷰할 수 있도록, 운영자가 확정한 최종 디자인(proposal-v2의 장면 1, 2, 2-1, 3-7)을 `web/src/components/desk`의 실제 부품으로 그리고 갤러리 `/gallery?scene=desk&state=<장면>`에 꾸민 데이터로 올렸어요. 부품은 값을 props로만 받고 store, WebSocket, hided를 부르지 않아요. 앱의 진짜 화면은 바뀌지 않아요. 세션은 어디서나 사이드바와 같은 상태 표시, 에이전트 로고, 제목으로 시작해요. 카드는 바탕 없는 두 줄이고 할 일은 줄 끝의 글자(`답하기 ›`)예요. 내 말만 말풍선이고, 스레드의 작업은 턴마다 한 줄로 접히고, 질문은 맨 아래 한 곳에만 있어요. 회색 버튼은 Desk 승인 카드의 `거절`과 `한 번 허용`뿐이고, 지난번에 만든 `soft` 버튼 변형은 지웠어요. 값의 이름은 desk wire(feat/desk-host 057da08)의 `desk`·`desk_live` 모양 그대로예요.  2 대화(밝음): 접힌 과정 줄 `생각 8초 · 세션 4개 읽음 · 스레드 3개 띄움`, 작업 중·물어봄·끝남 카드, 기존 세션에 편지로 맡긴 한 줄, 글자뿐인 `생각 중 · 3초`.  4 스레드 하나(어두움): pane 머리와 같은 두 줄 머리(계획 칩, 모델), 접힌 턴 `작업 · 파일 3 · 명령 4 ›`, 펼친 진행 중 턴, 편지·새 스레드 줄. ## Review - **판단해 주세요**: 장면마다 proposal-v2와 맞는지. 특히 2-1(현황 묻기)에서 Desk 답 속 세션 이름은 칩이 아니라 글이에요. reply 항목에 mention이 없어서 답의 Markdown 안에는 칩을 그릴 수 없어요. - **판단해 주세요**: 결과물 썸네일을 작은 고정 크기(새 토큰 `--size-desk-output-thumb` 88)로 바꿨어요. 핀 고정으로 레인이 넓어져도 커지지 않아요. - **판단해 주세요**: 덮는(핀 안 된) 레인은 채팅을 왼쪽으로 밀어요. 채팅 열에 레인 너비만큼 오른쪽 여백을 줘서 680 폭을 지키고, 방이 좁으면 채팅이 줄어요. - **조심해서 볼 파일**: `web/src/desk.ts` - 일 카드, reply, handed 편지, `desk_live`를 wire 이름으로 받아요(`mark`/`mark_read`, `sleeping`, ask `approval`·`blocked`, `failure`, 워커는 pane id, `thought_ms`·`steps`, `letter_kind`). wire와 다른 점 셋은 아래 Evidence에 적었어요. `threadTurns`가 스레드를 턴으로 나누고 작업을 센 수와 접어도 보일 부품을 골라요. - **조심해서 볼 파일**: `web/src/components/ui/button.tsx`, `docs/DESIGN_GUIDE.md` - `soft` 변형을 지웠어요. Desk 줄은 이제 "승인 카드의 두 답과 보내기만 `secondary`, 나머지 행동은 글자, Desk에는 `default` 버튼 없음"이라고 적혀 있어요. - **조심해서 볼 파일**: `web/src/PanePlanChip.tsx` - 칩의 모양(`planChipLook`)과 안쪽(`PlanChipFace`)을 꺼내 Desk 카드와 스레드 머리가 같은 계획 칩을 그려요. pane 머리의 DOM은 그대로예요. - **조심해서 볼 파일**: `web/src/MarkdownText.tsx` - `size="chat"`이 Desk 대화 글자(text-subhead, 줄 높이 1.625)를 줘요. 기본값은 그대로예요. - **원칙**: design #5 사이드바의 StatusMark, PlanChipFace, MissionChipView, DeviceChip, PrMark, SessionRow를 그대로 썼어요. #8 상자는 카드와 승인 카드에만 있고, 상태가 안 바뀌는 줄(맡김, 에이전트 바꿈, 막힘)은 상자 없는 한 줄이에요. engineering #1 안 쓰게 된 i18n 키 12개와 `soft`, 질문 칸 `row-sizes` 장면, 옛 `DeskHandedCard`를 같이 지웠어요. - **다른 화면**: 다른 화면의 라임 버튼을 secondary로 바꾸는 일은 승인된 후속 PR이고, 이 PR에서는 하지 않았어요. ## Evidence - **확인한 것**: 18개 장면 × 밝음·어두움 36장을 1440×880 Chromium으로 찍어 proposal-v2 장면과 나란히 대조했고 페이지 오류는 0이에요. - **확인한 것**: `node scripts/check-design-contract.mjs` 통과, `bash scripts/verify-web.sh` 통과(아래 기록). - **확인한 것**: `web/src/desk.test.ts` 12개, 새로 턴 나누기(메시지마다 새 턴, 답 앞 작업의 파일·명령 수, 접어도 보일 부품, 계획 변경은 빠짐). - **wire와 다른 점**: handed 항목에 상태 표시와 에이전트가 없어서, 화면이 pane id로 세션 칩을 찾아야 해요(`DeskChat`의 `sessions`). 못 찾으면 이름만 보여요. - **wire와 다른 점**: `mentions.sessions[].mark`가 `string`이고 `DeskMention`에 상태 표시와 에이전트가 없어요. 화면은 `RowMark`로 받고, 대화 속 세션 칩은 둘이 있을 때만 표시를 그려요. - **wire와 다른 점**: `mission.status`는 `string`, `nodes`가 있어요. 화면은 정해진 상태 다섯 개로 받고 노드 칸은 그리지 않아요(D-43). `failure` 코드는 받기만 하고 아직 문구가 없어요. 실패 줄은 `reason`으로 써요. - **확인하지 못한 것**: 실제 앱 연결, 키 동작(⌘J, Esc, ↵/⇥, 드래그), 긴 대화 스크롤과 큰 글자, 좁은 창, 스레드의 모델·편지 방향·명령 실행 시간(threads 노드의 `session_thread` 몫). 턴 시간(`작업 1분 12초`)은 데이터가 없어서 그리지 않았어요. - **확인하지 못한 것**: zh-CN·ja 글은 제가 옮긴 초안이라 사람 확인이 필요해요. <details><summary>추가 증거</summary>  2-1 현황 묻기  3 카드 상태 모음: 상태마다 오른쪽 칩 하나, 맡김 한 줄, 바꿈 줄, 막힘, 승인 카드와 답한 뒤 한 줄  5 스레드가 물을 때  6 Threads 목록  7 결과물이 스레드 옆에: 보기 칸 미리보기 탭, 고른 썸네일 테두리, ▣의 안 본 점  스레드 속 Hide 부품: 계획, 새 스레드, 보냄·받음 편지, 연 페이지, 미션 칩, PR  채팅 상태: 답한 승인 한 줄, 바꿈 줄, 알림 줄, 중단  스레드 상태 </details> <details><summary>Verification record</summary> - base main 50bc131 (merged into the branch, no rebase), head 70b74c4 - `bash scripts/verify-web.sh` exit 0 (pnpm 10.14.0, Node 24.22.1): web 268 files, 2349 passed, 3 skipped; desktop 28 files, 302 passed, 4 skipped; typecheck, lint, build - `node scripts/check-design-contract.mjs`: web token contract ok, contrast ok, agent logos ok, ui parts none above baseline - gallery capture: 18 states x Light/Dark at 1440x880 (s3 and chat-states at 1440x2300), 0 page errors </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
Desk will list sessions, plans, letters, PRs, missions and
@names the way the sidebar and the session record already do, so those six parts now come from one set inweb/src/components.Nothing on screen changes: the sidebar and the session record draw exactly as before.
SessionRowBody(session-row.tsx); the record keeps its own look throughsize="record".PlanChecklistmoves intocomponents/plan-checklist.tsx.LetterTag, beside the sidebar's and the pane header's letter marks inletter-mark.tsx.pr-mark.tsx,mission-chip.tsx) and are reused as they are.@chip: newMentionChip(mention-chip.tsx), a session or a project; no screen uses it yet.The new gallery scene
/gallery?scene=shared-parts: the six parts in their states, Light (left) and Dark (right).Review
@chip's colours, session blue and project green from the approved Desk mockup, as two new alias tokens (--mention-session=--file-blue,--mention-project=--file-green).size="record"vsrow); making them one is left to the Desk UI review.web/src/components/sidebar-agent-row.tsx- every sidebar row, memoized and on a high-frequency path; the change only wraps the same markup inSessionRowBodyand adds no store read.web/src/components/session-row.tsx- the newSessionRowBodyand its two sizes.SessionRowis extended rather than a sibling added; engineering 2 -MentionChiphas no props beyond what the mockup's session and project chips need; design 5 - one task row shape across screens.Evidence
node scripts/check-design-contract.mjspasses;bash scripts/verify-web.sh(typecheck, build, lint, unit tests for web and desktop) passes on the head commit.data-session-row*,data-record-*,data-agent-*,data-plan-*) are unchanged.SleepingSessionRowkeeps its own skeleton: its hint wraps the text column, whichSessionRowBodydoes not take.추가 증거
Session record, before (left) and after (right):
Projects sidebar, before (left) and after (right):
Verification record
bash scripts/verify-web.sh: passnode scripts/check-design-contract.mjs: pass