Repository navigation
fix: show a created tab the session listed before its answer - #2187
Merged
Merged
Conversation
The core's own engine lists a new tab before it answers the creation, so the session that shows it can reach the core first. The answer then moved the keyboard to the new pane but left the old tab as the visible one, because no later session was left to project it: a split sent from the new pane found no focused pane in the visible tab and sent nothing. The answer now projects the visible tab in the same step, as every other writer of it does. Three tests wait for the state they assert instead of the first snapshot that shows it: a reopened tab's sidebar number settles when it returns to its old place, a pane moved into a new tab shows its screen once its view attaches, and an agent start in the sidebar tab test gives up inside the test's own timeout with the core's task slot and diagnostics attached.
This was referenced Nov 7, 2026
HyunjunJeon
pushed a commit
to HyunjunJeon/hide
that referenced
this pull request
Nov 9, 2026
…ide#2214) Closes with-hide/hide-private#686 ## Summary main의 macOS desktop e2e에서 링크 테스트가 매번 실패한 것은 제품 고장이 아닙니다. 테스트가 이제 없는 이벤트 이름을 세고 있었습니다. #2182가 터미널 클릭 이벤트 이름을 `terminal_click`에서 `terminal_mouse`(누름과 뗌)로 바꾸면서 web e2e만 고쳤고, macOS에서만 도는 desktop e2e는 옛 이름으로 남았습니다. 옛 이름의 개수는 늘 0이라 "클릭이 안 갔다" 확인은 헛통과하고 "클릭이 갔다" 확인만 실패했습니다. 이 PR은 옛 이름을 읽던 세 곳을 지금 이벤트로 고칩니다. 같은 일이 다시 생기지 않게 막는 검사는 후속 이슈 with-hide/hide-private#695로 넘겼습니다. 스크린샷 없음: 화면 변경 없음(테스트 두 파일만 바뀜). ## Review 원인과 같은 원인의 경로 표 (원인: with-hide#2182 `696ebfb2e`의 이벤트 이름 변경이 macOS 전용 desktop e2e에 전해지지 않음) | 경로 | 증거 | 고친 곳 | | --- | --- | --- | | `desktop/e2e/terminal-links.spec.ts:148` 링크 테스트 (5곳) | main run 42366515497부터 6번 연속 :297에서 `Expected 1, Received 0` | `terminal_mouse.press`로 셈 | | 같은 파일 :423 메뉴 테스트 (2곳) | "클릭 안 감" 확인뿐이라 늘 0으로 헛통과 | `terminal_mouse.press`로 셈 | | `web/e2e/sidebar-tab-groups.spec.ts:101` | f10985994에서 없어진 `sidebar_tab_expanded`를 "0번"으로 확인하는 헛통과 | 줄 제거 (보내는 코드가 없음) | | 부류: `countSent`가 모르는 kind에 0을 답하고, daemon이 받는 kind 목록이 한 곳에 없음 | 이름이 바뀌어도 그 spec이 도는 레인의 양성 확인에서만 드러남 | 이 PR 밖: with-hide/hide-private#695 (계약 파일 단일 출처, core·hided 시험, ci-plan 연결) | | 제품 클릭 전달 (web, hided, core, holder) | `onMouseDown`은 링크 위 누름을 보내지 않고, 평문 클릭은 press와 release로 보냄 (`web/src/terminals.ts`) | 변경 없음: 정상 | | `web/e2e/shard-durations.json`의 옛 s2 제목 | 실행 기록으로 만드는 생성 표라 옛 제목은 시간 값만 잃음 | 변경 없음: 다음 재생성 때 정리 | - **판단해 주세요**: 원인은 테스트 쪽 가정(옛 이벤트 이름)입니다. 제품의 클릭 경로는 with-hide#2182 설계대로 동작하므로 제품 코드는 바꾸지 않았습니다. - **판단해 주세요**: 처음에 넣었던 Rust 소스 문자열 검사 lint는 리뷰에서 기각됐습니다(payload guard 오탐, 타입 fallback 오탐, core·hided만 바뀐 PR에서 미실행). 그래서 뺐고, 바른 설계를 #695에 적었습니다. 이 PR의 최종 diff는 테스트 두 파일뿐입니다. ## Evidence - **확인한 것**: `terminal_mouse`의 `action`은 문자열이라 `countSent`가 `terminal_mouse.press`로도 셉니다(`web/e2e/wire.ts`). 평문 클릭 한 번은 press 하나입니다. - **확인한 것**: `verify-web.sh web lint`, `desktop lint`, `desktop typecheck` 통과. - **확인한 것**: macOS desktop e2e: 이 브랜치의 nightly(`lane=macos`) run 42383537743, job 128436010935(nightly-macos 2/2)에서 `terminal-links.spec.ts:148`이 첫 시도에 통과했습니다(with-hide#59, 9.2s, 재시도 없음). 같은 파일의 :384와 :529도 통과했습니다. - **확인한 것**: PR verify run 42383933982(`f32014cec`) success. - **확인하지 못한 것**: 이 PR의 CI는 macOS 경로가 바뀌지 않아 desktop e2e macos를 건너뜁니다. 위 nightly는 `f23808302`에서 돌았고, 그 커밋의 두 spec 파일은 최종 head `f32014cec`와 같습니다. - **확인하지 못한 것**: 같은 shard에서 `session-workflow.spec.ts:14`가 재시도까지 실패했습니다. 이 diff 밖의 테스트이고, 이미 flaky로 추적 중이며(with-hide/hide-private#515) main run 42366515497과 42369516392에서도 실패했습니다. <details><summary>Verification record</summary> - 마지막 통과 main run 42365938221 (`579eca5ec`), 첫 실패 42366515497 (`1a59917c6`). 그 사이 커밋 with-hide#2187, with-hide#2182, with-hide#2192 중 클릭 경로를 바꾼 것은 #2182뿐입니다(#2182의 main run은 취소). - 실패 run 42366515497, 42369516392, 42370631622, 42373345663, 42374340972, 42377545266 모두 :148이 재시도까지 실패. </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.
Closes with-hide/hide-private#476
Closes with-hide/hide-private#187
Closes with-hide/hide-private#140
Closes with-hide/hide-private#534
Related: with-hide/hide-private#518 (원인 미확정, 아래 Review), 반복 측정용 임시 PR #2188과 #2189
Summary
제품 버그였습니다. 운영자 화면에서도 같은 순서가 오면 생깁니다 (새 탭을 만든 직후 분할을 눌러도 아무 일도 일어나지 않음).
코어의 엔진은 새 탭을 목록에 올린 뒤에 답하므로, 그 목록이 답보다 먼저 코어에 닿을 수 있습니다.
그러면 답은 키보드를 새 pane으로 옮기는데 보이는 탭은 옛 탭에 남고, 뒤에 와서 바로잡아 줄 세션도 없어서, 분할이 "보이는 탭에 포커스된 pane 없음"으로 아무것도 보내지 못했습니다.
답이 키보드를 옮길 때 보이는 탭도 같은 걸음에 옮기도록 고쳤습니다 (
settle_selection_projection, 다른 모든 보이는 탭 쓰기가 이미 하는 일).나머지 e2e 세 건은 첫 스냅숏을 읽던 곳을 상태가 맞을 때까지 기다리게 하고, 한 건은 실패 덤프를 붙였습니다.
Review
session_resume_control_changed로 에이전트 시작이 실패한 흔적만 있어서, 시작을 시험 제한 안에서 포기하고 코어 상태를 덤프로 남기게만 했습니다. 마감(11월 11일) 전에 덤프가 쌓이는지 봐야 합니다.hide-core/src/runtime/session.rs- 새 탭 답마다 한 번Mutex<Runtime>안에서 도는 투영이고 고빈도 경로는 아닙니다.web/e2e/named-tab-stays.spec.ts,web/e2e/pane-move.spec.ts- 시간을 늘린 곳은 없고 상태를 기다리게만 바꿨습니다 (docs/TESTING.md의 flaky 정책).Evidence
a_created_tab_the_session_listed_before_its_answer_is_the_visible_tab_at_the_answer는 고치기 전에 "세션이 먼저 온 순서"에서 실패하고(체크아웃이 새 탭을 보이지 않음) 고친 뒤 두 순서 모두 통과합니다.verify는 전부 통과했고 Linux 6샤드와 Windows web e2e 어디에도 재시도 표시가 없습니다.hide-corelib 시험 3957건 통과,fmt --check,clippy -D warnings, webeslint와 e2e 크기 검사 통과.@platform시험이 없어 "No tests found"로 실패했고, 이는 측정용 설정 탓입니다.hide-corelib 시험 2건(worktree_control프로세스 목록, pid 4294967294 읽기 실패)이 이 macOS 호스트에서 실패합니다. 이 변경이 닿지 않는 곳이고 main에서는 돌려 보지 않았습니다.Verification record
fix/flaky-split-new-tab,verify실행 42361324449scripts/verify-cargo.sh test-scoped -p hide-core --lib,fmt-check,clippy -p hide-core --lib --tests -- -D warnings,eslint와check-e2e-test-size.mjsci-probe/flaky-split-repeat(수정 포함, 실행 42361424674)와ci-probe/flaky-split-control(main 그대로, 실행 42361444556)