Repository navigation
Cycle Ctrl+Tab within the focused Agent or View area and show which area holds the keyboard - #284
Merged
Merged
Conversation
System Events posts no flags-changed event for a held modifier, so no page saw Control come up and the release case failed for a reason the product does not have. The case now posts HID-tap key events, types digits that no input source composes, and covers a rebound Control+Option chord released while Option is still down.
A hold started from a native page moves the responder to the shell. A window blur cancelled the hold but left the keyboard in the shell when the window came back, and a release back on the origin of a panels or projects cycle never refocused the page. The host now refocuses the origin on the window's next focus, and the shell refocuses it whenever a release commits nothing.
Key events are posted only with a positive candidate pid checked against the frontmost process; cleanup can post modifier releases and nothing else. The blur step now checks the window's return refocuses the origin page.
…led away A hold whose area shrank to one tab, or whose daemon went away, ended without a release, so nothing refocused the page that started it and typing went to the shell. Release, Escape, blur and the menu now settle the native hold themselves, and any other end hands the keyboard back to the origin page.
The second native hold failed on CI as well as locally: the page took the keyboard, lost it to the shell a few milliseconds later while macOS finished activating the window, and the posted keys reached no page. The helper now accepts the page only once it keeps the keyboard in the key window.
…cycle # Conflicts: # web/src/shortcuts.test.ts
The browser's Alt+Backquote now cycles the focused area, so the s2 step expects that cycle with the same previous-tab candidate, the Overview return runs the global Recent Panels command from the palette, and the palette walk to the first project is bounded by the rows the palette shows, which now include the navigation commands.
A script-focused input keeps its caret at the start on CI, so the digit is not always appended.
…cycle # Conflicts: # desktop/e2e/browser.spec.ts # desktop/src/main/browser.ts # docs/BROWSER_DISPLAYS.md
yansfil
added a commit
that referenced
this pull request
Oct 1, 2026
…quests (#291) Related: PRD `agents/prd/cmdk-navigation/prd.md` · 선행 #283 (device rail) ## Summary - ⌘K가 명령 팔레트에서 이동 팔레트로 바뀝니다: 에이전트·프로젝트·checkout·기기·PR·이슈를 이름이나 `#번호`로 찾아갑니다. - 입력이 비어 있으면 앞에 있는 것과 이어진 것을 Overview 방식으로 보여 줍니다: 이슈, checkout 그룹의 PR과 에이전트 계보, 다른 checkout의 부모는 `↑ 부모` 한 줄. - 오른쪽 상세가 고른 행의 사실과 관계를 말하고, `GitHub에서 "…" 검색` 행만 코어의 새 `github_search`를 한 번 부릅니다. 입력 중에는 GitHub를 부르지 않습니다. - ⌘K의 명령은 `에이전트 시작…`만 남습니다. ⌘P는 ⌘↵로 옆에 열고, Area 포커스·크기 조절은 기본 키 없는 레지스트리 명령이 됩니다(BINDINGS_CAP 32).    ## Review - **판단해 주세요**: #284가 ⌘K에 넣은 순환 명령(최근 탭·패널)은 PRD B22대로 ⌘K에서 빠집니다. 키 없이 쓰던 전역 Recent Panels는 Settings에서 키를 지정하거나 데스크톱 메뉴로 실행합니다(overview e2e를 그렇게 바꿨고, 쓰던 곳이 없어진 `commandRequest`는 지웠습니다). - **판단해 주세요**: 빈 ⌘K에서 `여기` 행이 목록 맨 앞이 아니라 계보 안에 놓이는 배치가 읽기 좋은지(첫 이미지). - **판단해 주세요**: GitHub 검색이 `gh search` 두 번(`--repo` 반복, 질문은 단어별 인자)이라 한 저장소가 깨지면 전체가 실패하는 트레이드오프. - **조심해서 볼 파일**: `herdr-core/src/github.rs` - `run_gh` 허용 목록의 가변 길이 모양(`is_search_call`)과 저장소 해석(`gh repo view`)이 외부 호출 경계. - **조심해서 볼 파일**: `herdr-core/src/runtime/issues.rs` - 검색 워커 슬롯(최신 요청 하나만 대기, 오래된 답 버림, panic도 실패로 끝남). - **조심해서 볼 파일**: `web/src/SearchPalette.tsx`, `web/src/relations.ts` - 열 때 한 번 읽는 앞 상태와 계보 그룹 구성. - **질문**: 읽지 않은 프로젝트의 저장소 해석 결과를 실행 동안 기억할까요? 지금은 검색마다 `gh repo view`를 다시 부릅니다(후속으로 남김). ## Evidence - **확인한 것**: `sasu implement verify` PASS(cargo test 전체 + lint, 머리 `28773a3`). `github::tests`와 `runtime::tests::issues`(허용 목록, 저장소 해석, 슬롯 수명)가 포함됩니다. - **확인한 것**: web tsc·eslint·vitest 758개, desktop tsc·vitest, 디자인 계약 검사, Playwright cmdk(3)·palette·s2/s3/s6/s7 일부·start-panel·home·sidebar-shell, 데스크톱 attach/browser/session-labels. - **확인한 것**: 갤러리 장면(`/gallery?scene=search-palette`)으로 상태별 캡처를 밝은/어두운 테마로 떴습니다: 앞 에이전트, 짧은 관계, 입력 하나, 입력 결과, #이슈, #PR, GitHub 검색 중·결과·실패, 좁은 창. - **확인하지 못한 것**: 열 때의 한 번 읽기(스피너, ⚠) e2e, device-home e2e, 전체 e2e 스위트. 읽지 않은 프로젝트의 저장소 해석은 단위 테스트만 있고 실제 gh로 돌려 보지 않았습니다. - **확인한 것**: 재기반 뒤 데스크톱 e2e 전체 31개 중 26개 통과, 실패 하나(browser 스펙)는 고쳐 다시 통과. CI에서 실패한 `agent-tab-groups.spec.ts:8`은 새 명령이 기본 키가 없어(`browser: null, electron: null`) 키 입력을 가로챌 수 없고, 로컬 전체 실행에서 통과해 이 변경과 무관한 입력 유실로 봅니다. - **확인하지 못한 것**: 설치된 앱에서의 실사용 확인. `/Applications/hide.app`은 건드리지 않았습니다. - **생성물**: `design/hide-screens.pen`은 `scripts/pen-screens.mjs`가 만든 파일이며 Palette 시트만 바뀝니다. <details><summary>Verification record</summary> - PRD: `agents/prd/cmdk-navigation/prd.md` (sha256 9394ddc7400fa8208e638ccbdb780f4f709092740da38d8a1c472c37f1feb1f1) - Base e246d00 → head 28773a3, verified 2026-10-01T16:20:00.427Z: PASS - Verification report: `agents/runs/cmdk-navigation/verification-report.json` and `agents/runs/cmdk-navigation/verification-report.md`; source fingerprint 32ef9a7a3e1a791cedc08f4c2ba224cc83486c7d8cb4e9e3e2932d22280751fb - Suites: - S1: GREEN `bash scripts/verify-cargo.sh test` (exit 0) - S2: GREEN `bash scripts/verify-cargo.sh lint` (exit 0) - Reviews: Fidelity와 Code 리뷰를 머리 `2469f2e6`에, 수정분 `054502db`에 후속 리뷰를 했습니다. REVIEW_UNAVAILABLE 아님. - Fix now(고침): 읽지 않은 프로젝트를 건너뛰던 GitHub 검색, 여러 단어가 한 문구로 가던 질문, 저장소마다 호출하던 구조(2번 호출로), 좁은 창 기준 800px, 관계 줄 줄바꿈, ⌘↵의 IME 조합과 옆자리 없음 이유, 링크 호스트(github.com만). - 후속 리뷰 뒤 `2b67b65`: GitHub 원격이 없는 프로젝트는 건너뛰고, 그 외 해석 실패는 검색 실패로 끝냅니다. 이 커밋은 따로 재리뷰하지 않았습니다. - origin/main(#282, #290, #289)에 다시 올린 뒤: 충돌은 e2e 한 곳(격리 태그 유지)이었고, 데스크톱 browser 스펙의 패널 펼치기를 툴바 위치 메뉴로 고쳤습니다(내 변경이 부른 실패). - CI 첫 실행의 두 실패: web e2e `cmdk.spec.ts`는 ⌘K로 에이전트를 고른 직후 ⌘K를 다시 열어 입력하면 첫 글자들이 사라졌습니다(CI 트레이스: 입력칸에 `t`만 남음). 코어 답이 늦게 도착해 `PaneView`가 터미널로 포커스를 가져간 것이 원인이라 제품 쪽을 고쳤습니다: 팔레트가 키보드를 쥐고 있으면 늦은 포커스가 가져가지 않고, 팔레트가 닫힐 때 `restoreFocus`가 돌려줍니다. 테스트는 기다리지 않고 바로 다시 열어 입력 전체를 단언합니다. 로컬에서는 재현하지 못했습니다(트레이스와 코드 경로로 추정). - 두 번째 재기반(origin/main `e668d1ee`, #284 등): 충돌은 `search.ts`·`Palette.tsx`(#284의 순환 명령을 ⌘K에서 뺌), `menu.ts`, `shortcuts.test.ts`, 문서, `palette`/`s2` e2e였고 양쪽을 살려 풀었습니다(편집 가능한 명령 21개, 단축키 시트 42줄). - 병합 뒤 CI의 데스크톱 e2e 실패(`browser.spec.ts:655` area cycle native)는 flake가 아니라 이 PR이 만든 실패였습니다: #284에서 들어온 그 스펙이 ⌘K의 `Expand side panel` 명령을 눌렀고 이 PR이 그 명령을 없앴습니다. 툴바 위치 메뉴로 패널을 펼치게 고쳐 로컬에서 통과했고, 다른 `command:` 행·⌘K 명령 사용은 없는지 web/desktop e2e 전체를 검색했습니다(남은 것은 `command:start-agent`와 팔레트 열기·닫기뿐). - #294·#304 병합 뒤 `origin/main`을 merge해(rerun 아님) 새 CI 배치로 올렸습니다. 같은 패턴이 #282에서 들어온 sign-in popup 스펙에도 하나 더 있어 같은 방식으로 고쳤고, 두 스펙과 첫 browser 스펙 모두 로컬에서 통과했습니다(area cycle native는 `@needs-focus`라 화면을 다른 앱이 쥐면 한 번 실패했고 재실행에서 통과). 로컬 데스크톱 e2e는 `web/dist`와 `target/debug/hided`를 다시 빌드한 뒤 돌려야 합니다: 병합 전 빌드로 돌리면 #282의 새 탭 배치가 보이지 않아 popup 스펙이 거짓으로 실패했습니다. - `verify`의 cargo 스위트가 부하 중 두 번 `github::tests::gh_boundary_is_read_only_…`(`gh timed out after 1000 ms`, 이 PR이 건드리지 않은 1초 제한 테스트)로 실패했고 다시 돌리면 통과했습니다. - 데스크톱 e2e `session-labels.spec.ts:22`(`page.reload` net::ERR_ABORTED)는 이 PR이 건드리지 않은 main의 알려진 불안정 테스트입니다(#289). - Follow-up improvements(남김): 읽지 않은 프로젝트 해석을 기억하기, 상한을 해석 뒤에 적용하기, 시작 패널 포커스 경합(드물게 ⌘K Enter 뒤 텍스트 칸이 포커스를 못 받음), 계보에서 조부모 부모 표기와 다른 checkout 아래 후손 누락, 이슈 id에 프로젝트 없음, ⌘K 열기가 프로젝트를 주기 폴링에 등록함, `DETAIL_MIN_WIDTH` 토큰화, 열 때 읽기 실패 ⚠가 ⌘K가 부르지 않은 읽기까지 보임. - Evidence: none registered separately. - Changed paths: 146 (see Files changed) </details>
yansfil
added a commit
that referenced
this pull request
Oct 1, 2026
…e Agent area (#306) Related: Closes #301 (follows #284) ## Summary Agent 영역에 키보드가 있을 때 Ctrl+Tab과 Ctrl+Shift+Tab(브라우저에서는 ⌥`)이 이번 세션에 키보드가 들어갔던 agent pane을 최근 순으로 돕니다. 범위는 모든 기기, 프로젝트, checkout입니다. 한 줄은 pane 하나라서, 한 탭에 agent가 둘이면 두 줄로 나옵니다. agent가 없는 셸 pane은 목록에 나오지 않고, 셸 pane에서 누르면 가장 최근 agent pane으로 갑니다(운영자 결정). 놓으면 Agents 목록에서 고를 때와 같은 `focus_pane` 이벤트 하나로 그 pane의 기기, 프로젝트, 탭, pane이 앞에 오고 키보드가 그 pane으로 갑니다. View 영역의 Ctrl+Tab은 #284 그대로 그 영역의 탭만 돕니다.  ## Review - **판단해 주세요**: 방문한 pane만 나옵니다. 앱을 다시 띄운 직후에는 목록이 비어 있고, #284처럼 아직 가지 않은 탭을 뒤에 붙이지 않습니다. - **조심해서 볼 파일**: `web/src/App.tsx` - high-frequency path. 스냅샷마다 도는 관찰 조건에 `focused` 섹션 변경을 더했습니다. `share()`가 바뀌지 않은 섹션의 참조를 유지하므로 프레임마다 돌지는 않습니다. - **조심해서 볼 파일**: `web/src/areaCycle.ts` `agentOrigin` - 출발 pane은 Agent 영역이 그리는 탭(일반 탭 또는 delegated canvas)에서만 받습니다. 원격 기기가 앞에 있을 때의 경로는 코드로만 추적했습니다. - **조심해서 볼 파일**: `web/src/keyboard.ts` `commitCycle` - 출발점 판정을 다시 썼습니다. View, Recent Panels, Recent Projects의 판정은 이전과 같습니다. ## Evidence - **확인한 것**: 격리된 Herdr와 debug hided 위의 웹 e2e `recent.spec.ts`에서 beta의 Codex pane에서 fixture로 옮긴 뒤 ⌥`를 눌렀습니다. 목록 첫 줄은 현재 pane이고, 선택된 줄은 beta의 Codex(`beta · Terminal`, codex agent)였습니다. 놓으면 `focus_pane`이 한 번 나가고 beta 탭이 앞에 왔습니다. 위 이미지가 그때의 캡처입니다. - **확인한 것**: 데스크톱 e2e `keys.spec.ts`에서 agent를 띄운 세 탭 사이로 ⌃Tab 두 번, ⌃⇧Tab 왕복이 pane 단위로 움직이고, 놓을 때마다 `focus_pane`이 정확히 한 번 나갔습니다. 웹 `s2.spec.ts`에서는 셸 탭에서 ⌥`를 누르면 첫 탭의 agent pane이 첫 후보로 나오고, 방문한 셸 pane은 행으로 나오지 않습니다. - **확인한 것**: 단위 테스트 12개(`web/src/areaCycle.test.ts`)가 기기·checkout을 가로지르는 순서, 셸 pane 제외와 셸에서 시작할 때의 첫 후보, 원격 pane의 기기 칩과 `remote_control` 확정, 확정 중 지나가는 프레임을 방문으로 치지 않는 것, 닫힌 pane과 끝난 agent의 제거(누르고 있는 동안 출발 pane의 agent가 끝나도 남은 후보 유지), 그려지지 않은 탭의 pane 거부, delegated canvas를 확인합니다. - **확인한 것**: origin/main(#291, #300 포함)을 merge한 head에서 `scripts/verify-web.sh` 통과(웹 단위 785개, 데스크톱 81개, hcoord, typecheck, lint, build). 같은 head에서 웹 e2e `recent`, `s2`, `palette`와 데스크톱 `keys.spec` 전체를 다시 돌려 통과했습니다. 별도 리뷰(코드, 요구사항 충실도, 수정분 두 번)의 Fix now를 모두 반영했습니다. - **확인하지 못한 것**: 원격 기기(mini)를 앞에 둔 실제 화면 확인. 원격 pane은 단위 테스트로만 확인했습니다. - **확인하지 못한 것**: 데스크톱 `browser.spec.ts`의 `area cycle native`. 실제 HID 입력과 창 포커스가 필요해 로컬에서 돌리지 않았고 CI의 macOS runner에 맡깁니다. 이 경로는 View 전용이며 이번 변경이 건드리지 않았습니다. - **확인하지 못한 것**: 설치된 앱에서의 확인. `/Applications/hide.app`은 교체하지 않았습니다.
yansfil
added a commit
that referenced
this pull request
Oct 3, 2026
Related: #281, #284; `agents/prd/focus-treatment/prd.md` ## Summary - 사이드바·Explorer·Overview에서도 Ctrl+Tab으로 최근 Agent를 전환합니다. - 파일 View에 포커스가 있으면 기존처럼 그 영역의 파일 탭만 전환합니다. - 선택한 B안에 맞춰 전체 초록 외곽선을 없애고 활성 탭 밑줄을 foreground 색으로 표시합니다. - 분할된 터미널에서는 실제 입력 pane만 subtle-foreground 1px 선으로 구분합니다.  왼쪽은 기존 화면의 탭·pane 헤더를 각각 크롭한 모습이고, 오른쪽은 격리된 실제 데스크톱 앱의 분할 화면입니다. 전체 초록 외곽선 대신 활성 탭 밑줄과 입력 pane의 얇은 회색 선을 봐 주세요. ## Review - **판단해 주세요**: Light/Dark에서 중립 밑줄과 얇은 분할 pane 선으로 입력 위치를 충분히 구분할 수 있는지. - **조심해서 볼 파일**: `web/src/areaCycle.ts` - View 예외와 MRU origin을 구분하며, 키를 놓을 때 core 이벤트를 한 번 보냅니다. - **조심해서 볼 파일**: `web/src/PaneView.tsx` - 실제 터미널 입력 소유권에 따른 기존 outline 조건을 유지합니다. ## Evidence - **확인한 것**: 최신 통합 커밋의 verify·디자인 CI가 통과했습니다(Rust, Windows, Linux/macOS 웹·데스크톱 E2E 포함). - **확인한 것**: web 864·desktop 94(플랫폼 조건 skip 3)·hcoord 48 unit/35 E2E와 타입·lint·build가 통과했습니다. - **확인한 것**: 격리된 Herdr/hided에서 recent E2E, split/menu/zoom S2 2개, Electron background 키 검사 2개가 통과했습니다. - **확인한 것**: 실제 후보 앱에서 Dark/Light 분할·View 포커스와 zoom을 캡처했고, 브라우저에서도 두 테마를 확인했습니다. - **확인한 것**: 디자인 contract와 관련 검사 77개, 960/720px Light/Dark 기준 비교가 통과했습니다. - **확인하지 못한 것**: 물리 macOS 키 입력, 로컬 전체 Rust/전체 앱 E2E, Windows/Linux 수동 UI, release 설치 검사는 실행하지 않았습니다. - **생성물**: Pen library 재직렬화에 기본 fontWeight 표기가 포함됩니다. ID·56개 sheet는 유지했고 screen은 소유 generator로 갱신했습니다. <details><summary>추가 증거</summary>  최신 main과 통합한 실제 후보 앱에서, 사이드바 포커스의 Ctrl+Tab이 최근 Agent 목록을 엽니다.  실제 데스크톱 앱의 활성 탭 밑줄과 분할 pane 선입니다. 테스트 앱·daemon·Herdr는 모두 격리했고 종료했습니다.  왼쪽부터 승인 기준, 현재 Pen, 실제 웹 컴포넌트입니다. 같은 내용과 폭에서 활성 View 밑줄과 비활성 탭 선택을 비교했습니다. Light/Dark 각 960/720px에서 키보드 소유 영역 하나, 일정한 레이아웃, 필터 없는 콘텐츠를 검사했습니다. 최근 Agent E2E의 Overview 진입은 각 시스템에 등록된 Project home 단축키를 사용합니다. 최근 Agent E2E는 사이드바·Explorer·Overview, 파일 탭 1개/복수, 프로젝트 간 전환과 역방향 전환을 다룹니다. 누른 동안 preview는 선택 이벤트를 보내지 않고, modifier를 놓으면 한 번 적용하며 Escape로 취소합니다. 후보 앱의 정확한 PID/window를 캡처했고 background focus guard를 통과했습니다. Rust source, core ownership, wire, 입력 루프·subscription·timer·dependency는 변경하지 않았습니다. </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.
Fixes #269 · PRD
agents/prd/focused-area-tab-cycle/prd.mdSummary
Review
desktop/src/main/browser.ts- 네이티브 입력 경로, hold 시작 시 shell로 포커스 이동, blur 후 복귀(failure path).web/src/keyboard.ts- 모든 키가 지나는 high-frequency path, 확정과 원래 페이지 복귀 분기.web/src/viewFocus.ts,web/src/areaCycle.ts- 키보드 소유 영역과 순환 범위의 기준.Evidence
한국어 페이지에서 누르는 동안 같은 영역의 탭 둘만 미리보기에 나오고, 놓으면 view_layout 확정이 한 번, Page B가 포커스를 받고, 입력한 숫자가 Page B에 들어갔습니다.
key down control이 flags-changed 이벤트를 보내지 않아 어느 페이지도 Control 해제를 받지 못했습니다. spec을 HID 이벤트로 바꿨습니다.sasu implement verifyPASS(cargo test, lint). 최신 main(Keep sign-in popups' opener and ask before handing app links to macOS #282 팝업, Fix three flaky e2e tests, quarantine two behind issues, and time-limit verify #289, Start a new Workspace with the tool column hidden #290) 병합 뒤 web 754개, desktop 79개 단위 테스트와 browser.spec background 5개 통과.herdr-coregithub 1초 timeout,agent-context-labelsCLI 정지). 단독 실행은 각각 3/3 통과했습니다.Verification record
agents/prd/focused-area-tab-cycle/prd.md(sha256 2183ea4cfe03d8c6208a924c6b4a24614ef127dd7e54a0f37effca927bc4ee0b)agents/runs/focused-area-tab-cycle/verification-report.jsonandagents/runs/focused-area-tab-cycle/verification-report.md; source fingerprint 2a85ae2b459a6c4b4e556d04f4173dea162798e6f33c3fda859a961be891c0bcbash scripts/verify-cargo.sh test(exit 0)bash scripts/verify-cargo.sh lint(exit 0)