Repository navigation
fix: return commands to the terminal when a native page hides - #1650
Merged
Merged
Conversation
yansfil
added a commit
that referenced
this pull request
Oct 23, 2026
Related: #1650 ## Summary - 같은 CI job에서 반복하던 web 타입 검사와 desktop 준비 빌드를 줄입니다. - web CI와 기본 검증은 타입 검사를 포함한 build를 한 번 실행합니다. - desktop 목록은 빌드 없는 `e2e-list`로 조회하고, 실제 `e2e`는 항상 새로 빌드합니다. - 병합된 메뉴 수정을 main에서 한 번 반영해, 기존에 실패한 native 경로를 새 후보에서 다시 검사하도록 합니다. ## Review - **판단해 주세요**: web 타입 검사 소유자와 목록 조회·실행의 준비 경계가 단독 호출에서도 유지되는지 확인해 주세요. - **조심해서 볼 파일**: `scripts/verify-web.sh`, `pr.yml`, `desktop-e2e.yml`의 failure path와 shard 목록 일치 계약. - **범위**: main 대비 기존 6개 파일만 남고 내용도 이전 후보와 같습니다. 원칙 7의 기존 진입점 사용과 원칙 13의 반복 원인 제거를 따릅니다. - **검토 경계**: 이전 후보의 코드·단독 실행·실패 전달 리뷰를 재사용합니다. 새 후보의 통합 리뷰와 CI 판정은 별도입니다. ## Evidence - **현재 로컬**: 지정한 5개 CI 계약 suite를 병합 트리에서 한 번 실행해 142개가 통과했습니다. 커밋 트리와 검사 트리가 같습니다. - **계약 보존**: standalone web 타입 검사, 빌드 없는 desktop 목록, 실제 실행 전 빌드와 실패 전달이 유지됩니다. - **이전 관찰**: web 타입 검사 2→1회, desktop 빌드 3→1회 및 목록·실행 3회 유지 증거는 이전 후보에서 재사용합니다. - **기존 CI 실패**: [이전 run](https://github.com/with-hide/hide/actions/runs/39980804713)의 native new-tab은 첫 시도와 retry 모두 pane 제거에서 실패했습니다. - **취소 이력**: 다른 선택 테스트가 통과한 뒤, 이미 실패한 run의 대기 중 macOS package를 취소했습니다. 기존 실패가 통과로 바뀐 것은 아닙니다. - **현재 미검증**: 새 후보의 native E2E·패키지·각 OS 실행과 원격 CI는 아직 판정하지 않았습니다. 제품 빌드와 의존성 설치는 반복하지 않았습니다. - **원인 경계**: 메뉴 수정은 실제 keyboard-owner 전환 결함을 고쳤지만, 과거 같은 이름의 모든 실패 원인을 확정하지는 않습니다. <details><summary>Verification record</summary> - Original baseline: `d3bd8e01c886ce3601a5a1eebbfa6ac94b8ac814`. - Previous PR head: `9cd9e6d40c0d98595478ab4bbb91bd91b89dd433`; tree: `e3245aa0692a9bce2e7fde706263292d5eec9982`. - PR #1650: GitHub `MERGED` at `2026-10-23T18:44:58Z`; menu head `0041f7532edde656c830a631eb8d88c365621ddd`; merge/main `4fc9b8c83f09f355fa40b98443bd55de8be1e25d`. - Fetched and pinned main: `4fc9b8c83f09f355fa40b98443bd55de8be1e25d`; menu-head ancestry verified against both this SHA and fetched `origin/main`. - Current candidate: `73e70261a49527902d714a10b2baee64443f85af`; tree: `59707205a26ff0402d2a220f0e6ac18b87413882`. - Merge parents, in order: previous PR head and pinned main above. One normal merge, no conflict, no source edits beyond integrating main. - Current diff against pinned main: 6 original owned paths, 181 insertions and 9 deletions. All six file blobs equal the previous PR head's blobs. - Current check: `LC_ALL=C python3 -m unittest scripts.tests.test_ci_verification_entrypoints scripts.tests.test_verification_builds scripts.tests.test_ci_flaky_report scripts.tests.test_ci_plan scripts.tests.test_called_workflow_permissions`: 142 tests, exit 0, one execution on the exact committed tree. - The only real Cargo builds in that command are the existing dependency-free temporary fixture; no product Cargo/pnpm build, reinstall or native app/server access was performed. - Current static checks: `bash -n scripts/verify-web.sh`, `git diff --check` and staged diff check passed; attribution checked against the prepared body. - Previous independent source/entrypoint review: PASS at `9cd9e6d40c0d98595478ab4bbb91bd91b89dd433`, tree `e3245aa0692a9bce2e7fde706263292d5eec9982`; no code findings. Reused, not a current integration review. - Previous real web gate at that old tree: web 239 files, 2,047 passed / 1 skipped; desktop 23 files, 241 passed / 4 skipped. Previous contracts: 120 plus 53 reporter contracts. Reused, not rerun here. - Previous real discovery at that old candidate: 125 tests without desktop/dist, 68 planned and matched for shard 1/2; standalone no-match e2e built first and returned expected exit 1. Three realistic mutation checks detected duplicate typecheck, discovery build and swallowed prerequisite failure. Reused. - Separate combined dedup/retry contract run: 167 passed at `64643fa74b75b49ac8e28bf74ff523e1e95e4d7a`, reported by the conductor; reused historical evidence, not this candidate's run. - Prior CI run `39980804713` checked old head `9cd9e6d40c0d98595478ab4bbb91bd91b89dd433`: macOS desktop shard 1/2 and aggregate verify failed; run conclusion cancelled, macOS package cancelled. Original unchanged native new-tab scenario failed first attempt and retry at pane removal line 139. First logs, original ZIP and provenance are retained by the conductor. - The menu fix's original native scenario passed its first attempt at menu head `0041f7532edde656c830a631eb8d88c365621ddd`, per the conductor's handoff. This does not prove the current integration or every historical #1559 failure's cause; no issue is closed by this comparison. - Retries, timeouts, skips, filters, lanes, shard settings, reporter behavior and required gate results are unchanged by this PR. - Current-head remote CI and independent integration review remain UNVERIFIED and belong to the conductor. No extra CI rerun was requested. - Run artifacts remain local and ignored; no product UI diff is introduced by this PR against main. </details>
yansfil
added a commit
that referenced
this pull request
Oct 28, 2026
…dows shell never draws (#1810) Closes with-hide/hide-private#200 Related: with-hide/hide-private#116, with-hide/hide-private#117, with-hide/hide-private#154, with-hide/hide-private#312 ## Summary Linux desktop nightly가 매일 실패하던 원인을 고치고, Windows web e2e에서 첫 화면이 안 그려지는 flaky의 원인을 다음 실패에서 알 수 있게 기록합니다. - #200: Herdr 화면에는 줄바꿈 표시가 없어서, 줄 끝까지 꽉 찬 주소는 다음 줄 첫 단어로 이어진다고 읽습니다. Linux에서는 이 테스트의 pane이 정확히 29칸이고 `http://127.0.0.1:PORT/a.html`도 29자라, 다음 줄 `osc8`이 주소에 붙었습니다. 주소 다음 줄을 비워 폰트 폭과 무관하게 했습니다. - #116, #117(같은 증상 #123 #133 #146 #217): Windows에서 shell이나 프로젝트 줄이 20초 안에 안 그려집니다. 남은 증거로 원인을 확정하지 못해 이 PR에서 닫지 않습니다. `enterWorkspace`의 대기가 실패하면 페이지 상태, 각 요청의 응답, 응답 없이 끝난 요청(최대 32개, Chromium의 이유 포함)을 failure dump로 남깁니다. 통과한 테스트는 아무것도 출력하지 않습니다. - #154: #1650(4fc9b8c)이 이미 고쳤습니다. 이후 flaky 3건은 모두 그 수정이 없는 커밋이고 10-24 이후 재발이 없어, 근거와 함께 이슈를 닫았습니다. ## Review - **판단해 주세요**: #200의 제품 동작은 이 PR에서 고치지 않았습니다. 꽉 찬 URL 뒤에 상관없는 줄이 오면 운영자에게도 틀린 링크가 열리지만, 화면 격자만으로는 진짜 줄 넘김과 구분할 수 없습니다(이어지는 조각도 URL 문자로 시작). Herdr는 `recent_unwrapped`로 그 사실을 알고 있어서, 그것을 링크 판단까지 가져오는 일을 with-hide/hide-private#312로 남겼습니다. - **판단해 주세요**: #116/#117은 원인 수정이 아니라 진단 추가입니다. 분석은 #116, #117 코멘트에 있습니다. - **조심해서 볼 파일**: `web/e2e/wire.ts` - 모든 web spec이 지나는 길입니다. 대기를 감싸기만 하고 timeout, 재시도, 단언은 그대로입니다. - **조심해서 볼 파일**: `web/e2e/failure-dump.ts` - 실패한 요청 기록은 페이지마다 32개 상한이고 페이지가 닫히면 버립니다. 주소의 hash에 daemon token이 있어서 경로만 기록합니다. ## Evidence - **확인한 것**: 10-27 nightly 스크린샷(`terminal-url-menu.png`)에서 주소가 pane 오른쪽 끝에 정확히 닿고 다음 줄이 `osc8`로 시작합니다. 수정 전 9회 nightly가 모두 두 시도에서 받은 값 `.../a.htmlosc8`로 실패했습니다. - **확인한 것**: 361a08faa에서 nightly `lane=linux`를 두 번 dispatch했습니다(40718149961, 40718546910). 두 번 모두 desktop e2e linux 19/19 통과, 고친 테스트 첫 시도 통과, flaky 없음입니다. - **확인한 것**: 같은 커밋의 PR verify(40718258556)가 통과했습니다. 고친 테스트는 macOS와 Windows desktop e2e에서도 첫 시도에 통과했고, desktop·web e2e 모든 shard에 flaky가 없었습니다. - **확인한 것**: 9d7fd7c(실패 요청 버퍼)는 web e2e eslint, 타입 검사, `playwright test --list`(387 tests)가 통과했습니다. CI는 이 커밋에서 다시 돕니다. - **확인하지 못한 것**: 로컬 desktop e2e는 돌리지 못했습니다. 디스크 여유가 759 MiB라 debug build가 불가능해 실행 근거는 모두 CI입니다. - **확인하지 못한 것**: #116/#117의 원인. 다음 Windows 실패의 `[failure dump] shell start` / `project row` 줄이 근거가 됩니다. <details><summary>Verification record</summary> - Base: `8915cb3d8878` (origin/main at branch start) - Heads: `361a08faa` (spec fix and dump), `9d7fd7c38` (failed requests kept for the dump only) - Nightly dispatch `lane=linux` on 361a08f: run 40718149961 success; run 40718546910 desktop e2e nightly-linux success. Both: `✓ terminal-links.spec.ts:420:5 ... @platform`, `19 passed`, `no flaky test in this run`. - PR verify 40718258556 on 361a08f: success. desktop e2e macOS 1/2 and 2/2, windows desktop, web e2e linux 1-6/6, web e2e windows: each `no flaky test in this run`. - Before the fix: nightly runs 39158794370 through 40586138794 (9) failed `terminal-links.spec.ts` on both tries with `Received: ".../a.htmlosc8"`. - Local on 9d7fd7c: `eslint e2e/wire.ts e2e/failure-dump.ts` exit 0; `tsc --noEmit --strict` on both files exit 0; `playwright test --list` 387 tests in 119 files. - #154: last flaky comment 2026-10-23T19:16Z on commits without 4fc9b8c; main 115b63c run 40706855580 desktop e2e macos 2/2 `ok 72 new-tab.spec.ts:130`. </details>
yansfil
added a commit
that referenced
this pull request
Oct 29, 2026
…back runs (#1835) Closes with-hide/hide-private#127 ## Summary - Settings에서 언어를 고른 직후 글자 크기 slider에 End를 누르는 desktop 테스트 3개가 가끔 실패했습니다(#127: 17 대신 13). - 원인: 닫히는 언어 Select가 키보드를 자기 버튼에 돌려주는 일을 타이머로 미룹니다. 부하가 걸리면 그 타이머가 테스트의 `slider.focus()` 뒤에 돌아 End가 버튼으로 갑니다. - 제품 수정: Select가 닫힌 뒤 다른 컨트롤이 이미 키보드를 가져갔다면, 늦게 도는 반환이 그 focus를 빼앗지 않습니다. 아무것도 가져가지 않았으면 예전처럼 Select 버튼으로 돌아갑니다. 메뉴와 대화상자가 쓰는 같은 보호(`useReturnFocus`)를 Select도 거칩니다(`docs/UI_BEHAVIOR.md`: a delayed focus return from any layer leaves a newer control or layer's focus in place). - 테스트: 세 테스트는 그 반환이 끝난 상태(언어 버튼에 focus)를 기다린 뒤 키보드를 옮깁니다. 대기 시간, retry, lane은 그대로입니다. 스크린샷 없음: 키보드 focus가 어디로 가는지만 바뀌고 그려지는 화면은 같습니다. 이 묶음(mission-13 flaky2-mac-viewarea)의 10개 이슈 처리, 10-23~10-29 macOS desktop CI 기록 304회 기준: | 이슈 | 테스트 | 처리 | | --- | --- | --- | | #127 | pane-move 글자 크기 | 이 PR (304회 중 3회 재발) | | #157 | new-tab ⌘T/⌘W | #1650이 고침, 닫음 (마지막 실패 커밋은 #1650 이전) | | #177 | group-tabs 새 터미널 | #1493이 고침, 닫음 | | #178 | new-terminal | macOS 서명은 #1493이 고침; 10-28 Windows 서명이 남아 열어 둠 | | #249 #182 #175 #231 | lane drag, owl, area cycle, page note | 0회 재발, 고친 커밋 미확인: 원인 후보만 코멘트, 범위 밖 | | #129 | close-policy ⌘W | 1회: 후보 앱 main process가 멈춤(teardown도 실패), 범위 밖 | | #160 | agent-logo-peek | herdr fixture의 CLI 30 s 타임아웃(다른 spec에도 같은 서명), fixture 작업으로 넘김 | 의심했던 "data-pane-view 두 개"(#178)는 제품 결함이었습니다: 빈 그룹에서 연 새 터미널이 잠깐 Ungrouped에 놓여 두 pane이 같이 그려졌고, #1493이 core에서 고쳤습니다. ## Review - **조심해서 볼 파일**: `web/src/components/ui/select.tsx` - 모든 Select가 닫힐 때의 focus 반환 경로입니다. Select root가 열림 상태와 trigger를 context로 내려 주고, content는 `useReturnFocus(open, { target: trigger })`로 반환합니다. 호출자가 `onCloseAutoFocus`에서 `preventDefault`하면(`AddProjectDialog`의 host 변경) 그쪽이 이깁니다. - **조심해서 볼 파일**: `web/src/components/ui/layer.ts` - 모든 layer의 늦은 반환 보호. 반환 대상(trigger)을 감싼 surface가 focus를 가진 것은 "새 컨트롤"로 보지 않습니다. 고른 항목이 사라질 때 Settings 대화상자의 focus trap이 키보드를 대화상자 자체로 옮기는데, 첫 수정은 이것을 새 focus로 읽어 정상 닫힘에서도 trigger로 돌려주지 않았습니다(b72ba42 CI의 세 e2e 실패). - **조심해서 볼 파일**: `desktop/e2e/pane-move.spec.ts`, `restoration.spec.ts`, `project-settings.spec.ts` - 같은 원인을 가진 세 곳에 같은 대기를 넣었습니다. ## Evidence - **확인한 것**: macOS desktop CI 기록 609개 report(294개 커밋)에서 이슈별 재발을 셈. #127의 3회 모두 End 뒤 13 그대로. - **확인한 것**: 회귀 테스트 `web/src/components/ui/select.test.tsx`는 Settings처럼 대화상자 안의 실제 Select로 두 순서를 고정합니다. "고름 -> 새 컨트롤 focus -> 늦은 반환"은 수정 전 Select에서 실패(focus가 Select 버튼으로 감)하고 수정 후 통과합니다. "고름 -> 늦은 반환 -> trigger focus"(정상 닫힘)는 `layer.ts` 수정 없이 실패(focus가 대화상자에 남음, CI e2e와 같은 증상)하고 수정 후 통과합니다. 테스트는 고정 대기 없이 fake timer로 Radix의 늦은 반환 타이머를 명시 실행하고, 그 전후에 `onCloseAutoFocus` 호출과 focus를 단언합니다. root는 `afterEach`가 정리합니다. - **확인한 것**: `verify-web.sh` 전체 통과(web test 2251, desktop test 294, lint, typecheck, build). - **확인한 것**: `verify-web.sh desktop lint`, `desktop typecheck` 통과. - **확인하지 못한 것**: desktop e2e 로컬 실행. 디스크가 5 GiB라 debug 빌드를 하지 않고, 이 PR의 macOS desktop job과 같은 커밋 반복으로 확인합니다.
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
숨긴 페이지가 메뉴 명령의 대상으로 남아 터미널의 Close를 막는 키보드 소유권 결함을 고칩니다.
페이지 영역을 숨기는 프레임에서 소유권을 터미널로 돌려주고, 이미 다른 입력란이나 팝업으로 옮긴 키보드는 유지합니다.
with-hide/hide-private#154 조사 중 재현한 결함이며, 과거 native 실패와 같은 원인인지는 아직 확인하지 못했습니다.
기존 native 테스트의 pane 제거 단언을 유지하고 명령 대상, host 전달, core 응답, 확인창 전환 기록을 추가합니다.
실행 중인 격리 후보의 화면입니다. Close 원인 증명은 아래 상태 전환 회귀 검사로 구분합니다.
Review
WorkspaceScreen.tsx의 소유권 반환과actions.test.ts의 실제 xterm 회귀 사례입니다.new-tab.spec.ts와probe.ts의 관찰은 기존 흐름을 유지하며 내용·주소·경로를 기록하지 않습니다.Evidence
could not create image from window로 실패했습니다. Renderer 화면은 OS chrome·compositor·native 입력의 증거가 아닙니다.Verification record
Base:
e48ab7272c97513731ce0c0c89d94638cbeedd44Head:
0041f7532edde656c830a631eb8d88c365621dddDeterministic local checks (unchanged product source bytes; final spec cleanup checked separately):
bash scripts/verify-web.sh web test src/actions.test.ts src/viewFocus.ownership.test.ts: 18 PASS.bash scripts/verify-web.sh web test: 242 files, 2,069 PASS, 1 existing skipped.bash scripts/verify-web.sh desktop test src/main/browserSync.test.ts src/main/browser.test.ts src/main/menu.test.ts: 54 PASS.bash scripts/verify-web.sh web typecheck/web lint: PASS.bash scripts/verify-web.sh desktop typecheck/desktop lint: PASS, including final content-free trace projection.node scripts/check-design-contract.mjs: PASS.bash scripts/verify-web.sh web build/desktop build: PASS.node agents/runs/menu-close-pane-target/cleanup-fault-check.cjs: 18 PASS; the independent review reran the same fault boundaries.bash scripts/verify-cargo.sh cli: PASS; existing linker unwind-size warning retained.bash scripts/verify-web.sh desktop e2e close-policy.spec.ts --project=background --grep-invert @needs-focus --retries=0: 1 PASS without the optional OS capture.bash scripts/verify-web.sh desktop e2e new-terminal.spec.ts --project=background --retries=0: 1 PASS with a renderer screenshot.Baseline differential changed only WorkspaceScreen back to base while retaining the regression fixture: 2 failures, 3 passes; restored in finally.
The failing cases emitted no close_pane while the hidden View retained command ownership.
The fixed cases dispatch close_pane to the focused terminal; live tool/popup cases retain their new input.
Earlier fixture setup/typecheck failures are retained locally and excluded from cause evidence.
First historical failure artifacts from run 39962022683 are retained; later screenshot/retry success is not cause proof.
The original
bash scripts/verify-web.sh desktop e2e new-tab.spec.ts --retries=0remains locally unrun because its needs-focus path would activate a native app; normal PR CI owns that run.No installed app, operator pane, or operator server was manipulated.
Source/log SHA-256 identities are retained in the local run record; run artifacts are not committed.
Independent review: the product ownership change passed review; the P2 observation-cleanup finding was fixed and narrow review passed on the current head.
The original assertion Error object and stack remain the primary failure; every observer/app/fixture/Herdr cleanup is attempted and its failures are appended.
Candidate identity: binary build head
1014d71d7f17ae1f14837b50f72b9a84b7826031; current head differs only indesktop/e2e/new-tab.spec.ts, with identical product bytes.The captured candidate was PID 18418, its own worktree-local Electron executable, exactly one visible non-minimized window; the capture method is renderer-only.
The failed OS capture was candidate PID 14875/window 6622, private daemon 15054; its first-failure artifacts remain intact.
The same Close functional case passed only after the optional OS capture was excluded; this does not repair or certify the failed OS capture.
Accessibility and Screen Recording permission checks reported granted; the capture failure's cause remains unknown.
Owned candidate processes exited and the private socket was removed; installed operator app PID 90844 stayed unchanged.
The earlier CI head passed web/desktop checks, policy, design, Rust (including workspace_view and workspace_control close contracts); current-head CI is tracked separately in GitHub Checks.
No CI rerun or workflow dispatch was requested.
Principle 7: reuse keyboard ownership, existing probe and verification entrypoints.
Principle 13: repair the ownership transition instead of adding retries, sleeps or longer timeouts.