Repository navigation
Add ⌘1-9 tab and ⌥1-9 agent chords with modifier hold keycaps in the desktop app - #206
Merged
Merged
Conversation
…desktop app The registry gains select_tab_1..9 (⌘n, the nth tab of the strip in front) and select_agent_1..9 (⌥n, the nth row the Agents list draws); the browser column has none, since Chrome keeps ⌘1-9. Holding ⌘ or ⌥ alone for 150 ms floats the number of each tab or agent row at its top right as a keycap; releasing, adding a modifier, losing the window, opening a layer or pressing a key during the hold clears it. The hold is a pure state machine (hints.ts) fed by the window listener, and the numbers are the screen order (numbering.ts). The ⌘/ sheet folds each family into one row, Settings lists them read-only, and a pane chord bound onto ⌘n is refused by that command's name.
… in the UI and architecture guides An Electron spec drives ⌘2, an empty ⌘3, the ⌘ and ⌥ holds (delay, release, a key during the hold, losing the window) and ⌥2 against a private Herdr and hided, asserting the tab strip and the agent rows keep their geometry while the keycaps show; a browser spec asserts no keycap, no tab switch and the sheet's not-on-this-host rows. UI_BEHAVIOR.md and ARCHITECTURE.md carry the new behavior and the registry's Electron-only numbered column.
…t on teardown, and cover a layer opening mid-hold The keyboard listener narrows on the numbered-command type guard so the command switch needs no list of the eighteen ids; ending a hold that never started publishes nothing; unmounting the listener clears the revealed family; and the Electron spec now opens a tab's context menu and the Settings sheet while ⌘ is held and asserts the keycaps go.
… idle hint reference The digit takes the close control's corner while ⌘ is held; the control keeps its space and returns on release. The hold state's idle modifier set is one shared value, which the listener reads to skip a clear with no hold, and the unit test now pins that by reference.
The ⌘/ sheet now folds Select tab 1-9 and Select agent 1-9 into one row each, so the S2 flow expects 30 rows; neither is a Chrome move, so the eight moved chords stay.
yansfil
added a commit
that referenced
this pull request
Sep 27, 2026
…th (#208) Related: PRD `agents/prd/sidebar-typography/prd.md` ## Summary - Projects 사이드바의 글자가 크기·굵기 단계 없이 비슷해 프로젝트, 체크아웃, 에이전트가 한눈에 갈리지 않았습니다. - 보드 v7에서 고른 E-mid로 맞췄습니다: 13/600 · 12/400 · 11, 행 높이 프로젝트 36 · 체크아웃 32/48 · 에이전트 28/44, 헤더는 10/500 문장형. - 체크아웃은 purpose가 있을 때만 두 줄이고, 이름의 첫 `/`까지 접두사는 흐리게 그립니다. - 사이드바는 Appearance 글자 크기를 따르지 않고, 오른쪽 가장자리를 끌어 220-440 너비를 정하며 코어 `ui_state.sidebar_width`에 저장됩니다(더블클릭은 292). - Pen 라이브러리 네 마스터와 Screen / Projects Sidebar, 문서 세 개를 같은 수치로 고쳤습니다.  ## Review - **판단해 주세요**: 대표 이미지에서 11px 둘째 줄(purpose, 시간)이 충분히 읽히는지. - **판단해 주세요**: 드래그 중에는 사이드바만 가운데 위로 겹쳐 따라오고 가운데와 터미널은 놓을 때 한 번 리사이즈됩니다(포인터 이동마다 PTY 리사이즈를 막으려는 해석). - **판단해 주세요**: Agents 목록의 그룹 헤더도 같은 10/500 문장형이 됐습니다(같은 마스터 O79KF). - **판단해 주세요**: D-10은 `--size-compact-agent-row-vpad` 삭제였지만 Pen `Component / Agent identity`가 참조해 남겼습니다. - **조심해서 볼 파일**: `herdr-core/src/runtime/events.rs` - runtime mutex 안의 `ui_state_update`; 범위 밖 값은 `last_error`가 아니라 diagnostic으로 거부. - **조심해서 볼 파일**: `herdr-core/src/persistence.rs` - 저장 형식에 `sidebar_width` 추가, serde default로 이전 저장을 292로 읽음. - **조심해서 볼 파일**: `web/src/sidebar.tsx` `SidebarEdge` - high-frequency path; pointermove는 nav의 CSS 변수만 바꾸고 이벤트는 놓을 때 하나. - **조심해서 볼 파일**: `scripts/gen-tokens.mjs` - 생성 규칙 `.interface-scale-exempt`가 text 토큰을 배율 1로 다시 선언(변수는 선언된 곳에서 풀리므로 nav에 배율만 두면 무효). ## Evidence - **확인한 것**: 갤러리 12장(dark/light × 220/292/440 × reference/long)을 보드 v7 E-mid, Pen 헤드리스 export와 대조. - **확인한 것**: 배율 1.25 갤러리 캡처가 배율 1 캡처와 바이트까지 같음(`cmp`); e2e가 글자 크기 17에서 사이드바 글자 크기와 행 기하가 기본값과 같음을 단언. - **확인한 것**: 격리된 hided + private Herdr e2e가 드래그 중 `ui_state_update`와 `terminal_resize` 0회, 놓을 때 1회, 220/440 경계, 새로고침 유지, 더블클릭 292를 단언. - **확인한 것**: 코어 테스트 3개(재시작 후 유지, 보낸 값 거부는 로그로, 저장된 범위 밖 값은 292로 열림), vitest 402, `verify-cargo.sh test`/`lint`, `verify-web.sh`, `check-design-contract.mjs` 통과. - **확인하지 못한 것**: Electron 데스크톱 창은 띄우지 않았습니다. 실제 앱 캡처는 격리된 hided가 서빙한 셸을 Playwright Chromium으로 찍은 것입니다. - **확인하지 못한 것**: 전체 e2e는 66d55015에서 72/73(글자 크기 대기 race 1건)였고, 수정 뒤에는 사이드바 두 스펙만 다시 돌렸습니다. - **확인하지 못한 것**: 리사이즈 핸들의 키보드 경로는 PRD 비목표라 없습니다. - **병합**: main의 #207이 체크아웃 둘째 줄에 raised-from 부모를 더해, 둘째 줄은 purpose나 그 부모가 있을 때만 그립니다(에이전트만으로는 한 줄). - **생성물**: `design/hide-ui.lib.pen`, `design/hide-screens.pen`, `web/src/tokens.css`는 스크립트 생성 diff입니다(라이브러리는 base JSON에 스크립트로 이식, 구조 diff로 네 마스터와 변수만 바뀜 확인). <details><summary>추가 증거</summary>  </details> **AI tooling**: 대부분 AI 도구 - 행 높이와 글자 단계는 사람이 Pen 보드 v1-v7에서 고른 E-mid이고, 캡처를 그 보드와 대조했습니다. <details><summary>Verification record</summary> - PRD: `agents/prd/sidebar-typography/prd.md` (sha256 313f696f0cb07ff06dc982ba76c6672046c1fb60a9bc9506a8e8f21b15f975b4) - Base 7b1ae02 → head 2ddba7f, verified 2026-09-27T15:31:35.649Z: PASS - Verification report: `agents/runs/sidebar-typography/verification-report.json` and `agents/runs/sidebar-typography/verification-report.md`; source fingerprint 50839c1f5b8c2d8bcd34c1e2e9eb459947cb3ac5536e007468d4477f126f4529 - Suites: - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0) - S2: GREEN `bash scripts/verify-cargo.sh lint` (exit 0) - Reviews: - Fidelity @ 66d5501: PASS, B1-B16 MET; D-10 편차(`--size-compact-agent-row-vpad` 유지)는 수용; Fix now 없음. - Code @ 66d5501: FAIL, Fix now 2건. (1) `--size-compact-agent-row-vpad` 삭제 요구: 유지, Pen `Component / Agent identity`(HXWFK) 패딩이 참조하고 그 마스터는 D-11의 네 장 밖. (2) `--size-control-regular` 고아: 522b2dac에서 삭제. - Code 후속 @ 8f6a005 (diff 66d5501..8f6a005): PASS, 두 처분과 e2e 대기 수정 확인. - Fidelity 후속 @ 8f6a005 (diff와 실제 앱 캡처 6장): PASS, Fix now 없음; 커서 모양은 캡처가 아니라 e2e의 computed style로 증명됨. - 병합 후속 @ ebe843e (origin/main의 #205 병합, diff 8f6a005..ebe843e): PASS, 사이드바 변경과 겹치는 경로 없음, 충돌 해소 편집 없음. - 병합 후속 @ 2ddba7f (origin/main의 #206/#207/#209 병합, 충돌 4건 해소): PASS, Fix now 없음. #206 hold 키캡과 #207 raised-from·기기 칩 유지; 체크아웃 둘째 줄은 purpose 또는 raised-from 부모가 있을 때만(에이전트만으로는 한 줄, D-04 유지). Follow-up: PRD D-04 표현에 raised-from 확장 반영(사람 승인 필요). - Evidence: 22 registered (21 screenshot, 1 log); paths are local to the run directory - agents/runs/sidebar-typography/evidence/gallery/sidebar-dark-220-reference-x1.png - agents/runs/sidebar-typography/evidence/gallery/sidebar-dark-220-long-x1.png - agents/runs/sidebar-typography/evidence/gallery/sidebar-dark-292-reference-x1.png - agents/runs/sidebar-typography/evidence/gallery/sidebar-dark-292-long-x1.png - agents/runs/sidebar-typography/evidence/gallery/sidebar-dark-440-reference-x1.png - agents/runs/sidebar-typography/evidence/gallery/sidebar-dark-440-long-x1.png - agents/runs/sidebar-typography/evidence/gallery/sidebar-light-220-reference-x1.png - agents/runs/sidebar-typography/evidence/gallery/sidebar-light-220-long-x1.png - agents/runs/sidebar-typography/evidence/gallery/sidebar-light-292-reference-x1.png - agents/runs/sidebar-typography/evidence/gallery/sidebar-light-292-long-x1.png - agents/runs/sidebar-typography/evidence/gallery/sidebar-light-440-reference-x1.png - agents/runs/sidebar-typography/evidence/gallery/sidebar-light-440-long-x1.png - agents/runs/sidebar-typography/evidence/gallery/sidebar-dark-292-reference-x1.25.png - agents/runs/sidebar-typography/evidence/pen/psb-sidebar-l.png - agents/runs/sidebar-typography/evidence/pen/psb-sidebar-d.png - agents/runs/sidebar-typography/evidence/e2e/projects-sidebar-dark.png - agents/runs/sidebar-typography/evidence/e2e/projects-sidebar-light.png - agents/runs/sidebar-typography/evidence/e2e/projects-sidebar-large-font.png - agents/runs/sidebar-typography/evidence/e2e/sidebar-width-dragging.png - agents/runs/sidebar-typography/evidence/e2e/sidebar-width-440.png - agents/runs/sidebar-typography/evidence/e2e/sidebar-width-220.png - agents/runs/sidebar-typography/evidence/e2e/full-run-before-race-fix.txt - Changed paths: 130 (see Files changed) </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.
Related:
agents/prd/electron-digit-shortcuts-hints/prd.mdSummary
focus_tab; ⌥n opens the nth row the Agents list draws, exactly as clicking it; an empty number does nothing.web/src/components/ui/keycap.tsxoverlay in popover tokens; it takes the close control's corner on a tab and moves nothing.Review
web/src/keyboard.ts- 창 keydown capture 리스너(high-frequency path)에 modifier 추적이 더해짐; 키 하나당 Set lookup 하나, 상태 변화가 있을 때만 publish.web/src/shortcuts.ts-MACOS_RESERVED에서 ⌘1-9를 뺐고 레지스트리가 그 chord를 소유; 저장된 macOS set이 ⌘n을 쓰면 여전히 통째로 기본값으로 떨어지지만 진단 문구가 바뀝니다.web/src/navigation.ts-agentTree가 sidebar.tsx에서 옮겨와 사이드바와 ⌥n이 한 목록을 읽습니다.Evidence
focus_tab1회, ⌘3(빈 번호) 0회, 딜레이 전 놓으면 키캡 0, ⌘ 홀드에 탭 키캡 2개(1, 2)와 탭·Rename 입력·+ 버튼 박스 불변, 놓기·홀드 중 ⌘2·blur·컨텍스트 메뉴·Settings 열림 각각에 키캡 0, ⌥ 홀드에 행 키캡 1·2와 제목·fold slot 박스 불변, ⌥2에focus_pane1회, ⌥3 0회, Light 테마 캡처.check-design-contract.mjs, sealed suite(cargo test·lint) PASS.screencapture -l이 거부되어 캡처는 CDP 렌더러 이미지입니다; 합성된 네이티브 창은 CI 아티팩트나 설치 후 확인이 필요합니다.blur이벤트), 실제 키보드로 Electron이 ⌘n을 페이지에 먼저 넘기는지(Playwright chord로만 확인; 메뉴 가속키는 없음), 툴팁과 키캡이 좁은 탭에서 동시에 뜨는 경우, 장치가 앞에 있을 때의 ⌘n 회귀 테스트.추가 증거
AI tooling: 대부분 AI 도구; 사람이 대조할 것은 대표 이미지의 키캡 위치와 Review의 세 판단 항목.
Verification record
agents/prd/electron-digit-shortcuts-hints/prd.md(sha256 75217108929150d772e1db1603e2e30c14f18004359c96cb5be735e92f0b5ff8)agents/runs/electron-digit-shortcuts-hints/verification-report.jsonandagents/runs/electron-digit-shortcuts-hints/verification-report.md; source fingerprint accbabd3deaa0734e8d5468c9bf849ff68cd8544cd4dfb949ee30da0d23470b0hide-agent-hooks/tests/hook_deadline.rs(a 1.5 s wall-clock bound, untouched here) while a reviewer's vitest ran beside it; it passed in isolation (0.28 s) and on the rerun recorded above.bash scripts/verify-cargo.sh test(exit 0)bash scripts/verify-cargo.sh lint(exit 0)isNumberedCommandinstead of 18 switch cases,endHoldskips an idle hold, teardown resetsui.hint. Not taken: a real OS-level blur in the e2e (syntheticblurevent kept).NO_MODIFIERSreference in a test (taken in bb57299), the doublenumberedCommandlookup (kept, commented), the human ruling above.