Skip to content

Cycle Ctrl+Tab within the focused Agent or View area and show which area holds the keyboard - #284

Merged
yansfil merged 23 commits into
mainfrom
prd/focused-area-tab-cycle
Oct 1, 2026
Merged

yansfil merged 23 commits into
mainfrom
prd/focused-area-tab-cycle

Conversation

@yansfil

@yansfil yansfil commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #269 · PRD agents/prd/focused-area-tab-cycle/prd.md

Summary

  • Ctrl+Tab과 Ctrl+Shift+Tab은 이제 키보드를 가진 Agent 또는 View 영역 안의 탭만 최근 사용 순서로 돌고, 다른 영역·checkout·Overview로 넘어가지 않습니다.
  • 영역은 device, checkout, 영역 종류, area ID 전체로 식별합니다. Agent와 View의 area ID가 겹쳐도 다른 영역을 고르지 않습니다.
  • 네이티브 브라우저 페이지에 키보드가 있어도 같은 순환이 됩니다. 호스트가 키 입력을 shell로 넘기고, 해제·Escape·blur를 한 번씩만 처리합니다.
  • 전체 Recent Panels는 기본 단축키가 없는 별도 명령으로 남고, 메뉴·팔레트·설정에서 영역 순환과 이름이 구분됩니다.
  • 키보드를 가진 영역은 탭 강조와 내용 경계로 표시하고, 다른 영역의 선택 탭은 읽을 수 있는 배경으로 남깁니다.

실제 Ctrl+Tab을 누른 채: 오른쪽 View 영역의 탭 둘만 미리보기에 나오고 왼쪽 Page A는 빠지며, 키보드 영역에 강조 경계가 보입니다

Review

  • 판단해 주세요: 포커스 표시. 강조색 경계와 탭 강조를 택했고 blur는 쓰지 않았습니다. #281의 pane 테두리와 Agent 영역에서 함께 보일 때 과하지 않은지 봐 주세요.
  • 판단해 주세요: 빈 ⌘K 명령 목록에 순환 명령 6개가 보입니다(B11 팔레트 접근). 빈 검색어에서는 숨길지 정해 주세요.
  • 판단해 주세요: 네이티브 hold 중 글자 키(Tab 외)는 페이지에 그대로 들어갑니다. shell hold와 다르게 둘지 정해 주세요.
  • 조심해서 볼 파일: 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 - 키보드 소유 영역과 순환 범위의 기준.
  • 운영자 수동 QA: 실제 Agent 터미널 pane에서의 Ctrl+Tab과 포커스 표시의 실제 업무 흐름 체감.

Evidence

  • 확인한 것: 격리 후보 앱에서 실제 HID 키 입력으로 기본 Ctrl+Tab을 두 번 확인했습니다(수정 전과 현재 소스).
    한국어 페이지에서 누르는 동안 같은 영역의 탭 둘만 미리보기에 나오고, 놓으면 view_layout 확정이 한 번, Page B가 포커스를 받고, 입력한 숫자가 Page B에 들어갔습니다.
  • 확인한 것: 이전에 실패하던 해제 검사는 제품 결함이 아니었습니다. System Events의 key down control이 flags-changed 이벤트를 보내지 않아 어느 페이지도 Control 해제를 받지 못했습니다. spec을 HID 이벤트로 바꿨습니다.
  • 확인한 것: sasu implement verify PASS(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개 통과.
  • 확인한 것: web e2e s2·overview·palette·recent를 로컬에서 통과시켰습니다. ⌥`가 영역 순환이 된 데 맞춰 기대한 순환 종류와 개수만 바꿨고 대상은 그대로입니다.
  • 확인한 것: 리뷰 Fix-now 4건(blur 후 복귀, 확정 없는 해제의 복귀, 영역 축소로 끝난 hold의 복귀, 테스트 입력 안전장치)을 고치고 각각 단위 테스트를 추가했습니다.
  • 확인한 것: CI macOS runner에서 실제 HID로 두 번째 hold의 Escape 취소가 통과했습니다. 선택과 키보드 소유가 유지되고, 원래 페이지로 포커스가 돌아와 입력이 도달했습니다. 이전 실패는 spec 헬퍼가 macOS 활성화 중의 포커스를 믿은 탓이었습니다.
  • 확인한 것: 같은 CI 케이스의 뒤 구간도 통과했습니다. 창 blur로 취소되면 창이 돌아올 때 원래 페이지가 키보드를 받고, 재바인딩한 Ctrl+Option+Tab은 Option을 누른 채 Control만 놓아도 한 번 확정되며, 이어서 입력한 숫자가 고른 페이지에 들어갑니다.
  • 확인하지 못한 것: 실제 Agent 터미널 pane, 브라우저 shell의 Alt+Backquote, 좁은 창·패널 상태 전체와 light/dark 실제 앱 캡처, idle/driven 성능 측정은 이번 head에서 돌리지 않았습니다.
  • 확인하지 못한 것: 로컬 verify에서 이 PR과 무관한 테스트 두 개가 부하 중 한 번씩 실패했습니다(herdr-core github 1초 timeout, agent-context-labels CLI 정지). 단독 실행은 각각 3/3 통과했습니다.
Verification record
  • PRD: agents/prd/focused-area-tab-cycle/prd.md (sha256 2183ea4cfe03d8c6208a924c6b4a24614ef127dd7e54a0f37effca927bc4ee0b)
  • Base 8d9919f → head 7d48bc2, verified 2026-10-01T12:18:44.278Z: PASS
  • Verification report: agents/runs/focused-area-tab-cycle/verification-report.json and agents/runs/focused-area-tab-cycle/verification-report.md; source fingerprint 2a85ae2b459a6c4b4e556d04f4173dea162798e6f33c3fda859a961be891c0bc
  • Suites:
    • S1: GREEN bash scripts/verify-cargo.sh test (exit 0)
    • S2: GREEN bash scripts/verify-cargo.sh lint (exit 0)
  • Reviews:
    • Code (5ffb88a): Fix now 3 - blur-cancelled hold left the keyboard in the shell (fixed 01f416f), a release on the origin of a panels/projects cycle never refocused the page (fixed 01f416f), test input failed open without a candidate pid (fixed 084469b). Follow-up: menu items show no chord, a modifier pre-check before matchHost on native pages, native hold not cancelled on shell reload, typed non-chord keys reach the page during a native hold.
    • Fidelity (5ffb88a): no Fix now; earlier D1 design-guide inventory fixed in 5ffb88a. Listed runtime evidence still missing (second native hold, rebound release, Agent PTY, Alt+Backquote shell, theme/panel matrix, idle/driven measurements).
    • Focused recheck (4b7c12c): closed the three Code items; Fix now 1 - a hold reconciled away (area shrank to one tab) left the keyboard in the shell (fixed a3ae674). No conflict with Show which pane holds the keyboard, its agent and zoom, and add a terminal menu #281's pane outline.
    • CI on a3ae674: desktop e2e failed at the second native hold (page focus lost to the shell during macOS activation; spec focus helper now waits for stable focus, 0713510); web e2e s2/overview/palette still expected the old Alt+Backquote and palette contents (updated 31a3c56, 110c48a).
    • CI rerun on 110c48a: the second native hold passed (Escape kept selection and owner, focus returned, a typed digit reached the page); only the caret-position check failed and now checks the landing only (4e3b3ab). Background flakes seen once: session-labels (passed 2/2 locally), s7 side document (passed 3/3 locally).
  • Evidence: 51 registered (24 log, 21 file, 6 screenshot); paths are local to the run directory
    • agents/runs/focused-area-tab-cycle/collected/implementation-2f5ad90b/web-unit-2.log
    • agents/runs/focused-area-tab-cycle/collected/implementation-2f5ad90b/desktop-unit-2.log
    • agents/runs/focused-area-tab-cycle/collected/implementation-2f5ad90b/desktop-focused-1.log
    • agents/runs/focused-area-tab-cycle/collected/implementation-2f5ad90b/design-review/report.json
    • agents/runs/focused-area-tab-cycle/collected/implementation-06cd7ed2/desktop-focused-fixes.log
    • agents/runs/focused-area-tab-cycle/collected/implementation-06cd7ed2/desktop-unit-fixes.log
    • agents/runs/focused-area-tab-cycle/collected/implementation-06cd7ed2/focus-fixes-focused.log
    • agents/runs/focused-area-tab-cycle/collected/implementation-06cd7ed2/design-review/report.json
    • agents/runs/focused-area-tab-cycle/collected/current-b61e4918/full-web-b61e4918.log
    • agents/runs/focused-area-tab-cycle/collected/current-b61e4918/cargo-lint-b61e4918.log
    • agents/runs/focused-area-tab-cycle/collected/current-b61e4918/cargo-test-b61e4918.log
    • agents/runs/focused-area-tab-cycle/collected/current-b61e4918/design-tests-b61e4918.log
    • agents/runs/focused-area-tab-cycle/collected/current-b61e4918/design-contract-b61e4918.log
    • agents/runs/focused-area-tab-cycle/collected/current-b61e4918/script-tests-b61e4918.log
    • agents/runs/focused-area-tab-cycle/collected/current-b61e4918/pane-reader-b61e4918.log
    • agents/runs/focused-area-tab-cycle/collected/current-b61e4918/native-review-dispositions.md
    • agents/runs/focused-area-tab-cycle/collected/current-b61e4918/design-review/report.json
    • agents/runs/focused-area-tab-cycle/collected/native-slot-1-b61e4918/test-7.log
    • agents/runs/focused-area-tab-cycle/collected/native-slot-1-b61e4918/provenance.jsonl
    • agents/runs/focused-area-tab-cycle/collected/native-slot-1-b61e4918/native-events.json
    • agents/runs/focused-area-tab-cycle/collected/native-slot-1-b61e4918/01-documents.json.result
    • agents/runs/focused-area-tab-cycle/collected/native-slot-1-b61e4918/02-terminal.json.result
    • agents/runs/focused-area-tab-cycle/collected/native-slot-1-b61e4918/slot-cleanup.json
    • agents/runs/focused-area-tab-cycle/collected/native-slot-1-b61e4918/area-native-preview.png
    • agents/runs/focused-area-tab-cycle/collected/native-slot-1-b61e4918/area-native-readable.png
    • agents/runs/focused-area-tab-cycle/collected/native-slot-1-b61e4918/area-native-document-preview.png
    • agents/runs/focused-area-tab-cycle/collected/native-slot-1-b61e4918/area-native-document-reverse.png
    • agents/runs/focused-area-tab-cycle/collected/native-slot-1-b61e4918/failure-06cd7ed2/test-3.log
    • agents/runs/focused-area-tab-cycle/collected/native-slot-1-b61e4918/failure-caa7fb42/test-6.log
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/actual-native-d38-attempt8.log
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/01-documents.json.result
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/02-terminal.json.result
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/03-rebinding-menu.json.result
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/native-events.json
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/hid-batches.jsonl
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/provenance.jsonl
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/rebound-responder.jsonl
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/rebound-area-before-release.png
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/rebound-area-after-release.png
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/release-distinction.json
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/cleanup.jsonl
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/fixture-cleanup.json
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/runner-completion-attempt8.json
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/phase-close-audit.json
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/phase-close-receipt.txt
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/build-readiness.json
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/slot-attempt8.json
    • agents/runs/focused-area-tab-cycle/collected/d38-native-attempt8-closed/tab-genuine-clicks.jsonl
    • agents/runs/focused-area-tab-cycle/collected/fcee7150-source-only/fixture-carry-fcee7150-source-audit.json
    • agents/runs/focused-area-tab-cycle/collected/fcee7150-source-only/code-fcee7150-source.md
    • agents/runs/focused-area-tab-cycle/collected/fcee7150-source-only/fidelity-fcee7150-source.md
  • Changed paths: 193 (see Files changed)

yansfil added 23 commits October 1, 2026 01:29
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
yansfil merged commit e668d1e into main Oct 1, 2026
8 checks passed
@yansfil
yansfil deleted the prd/focused-area-tab-cycle branch October 1, 2026 13:47
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).

![에이전트 앞에서 빈 ⌘K: 이슈, checkout 그룹의 PR과 에이전트 계보, 오른쪽
상세](https://github.com/yansfil/pr-assets/blob/main/hide/cmdk-navigation/2b67b65/01-agent-relations-light.png?raw=true)

![GitHub에서 검색 결과
(다크)](https://github.com/yansfil/pr-assets/blob/main/hide/cmdk-navigation/2b67b65/08-github-results-dark.png?raw=true)

![좁은 창:
목록만](https://github.com/yansfil/pr-assets/blob/main/hide/cmdk-navigation/2b67b65/10-narrow-light.png?raw=true)

## 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 그대로 그 영역의 탭만 돕니다.

![Agent pane에 키보드를 둔 채 ⌥`를 누른 상태: 목록 제목이 Recent Agent panes이고, 현재
pane(fixture의 Agent one) 다음에 다른 프로젝트 beta의 Codex가 선택되어
있습니다](https://github.com/yansfil/pr-assets/blob/main/hide/agent-ctrl-tab-global/225aae2/agent-panes.png?raw=true)

## 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 선으로 구분합니다.

![포커스 표시 전후
비교](https://github.com/yansfil/pr-assets/blob/main/hide/focus-treatment/a970b79/focus-before-after.png?raw=true)
왼쪽은 기존 화면의 탭·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>

![사이드바에서 최근 Agent
전환](https://github.com/yansfil/pr-assets/blob/main/hide/focus-treatment/91d663a/recent-agents-from-sidebar.png?raw=true)
최신 main과 통합한 실제 후보 앱에서, 사이드바 포커스의 Ctrl+Tab이 최근 Agent 목록을 엽니다.

![실제 분할 pane
포커스](https://github.com/yansfil/pr-assets/blob/main/hide/focus-treatment/a970b79/native-split-focus.png?raw=true)
실제 데스크톱 앱의 활성 탭 밑줄과 분할 pane 선입니다. 테스트 앱·daemon·Herdr는 모두 격리했고 종료했습니다.

![Dark 기준 디자인
비교](https://github.com/yansfil/pr-assets/blob/main/hide/focus-treatment/a970b79/design-focus-dark.png?raw=true)
왼쪽부터 승인 기준, 현재 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ctrl+Tab을 포커스된 Agent·View 영역 안에서 순환하고 활성 영역을 표시

1 participant