Skip to content

Wait for the states the close and disk sheets read before opening them once - #531

Merged
yansfil merged 2 commits into
mainfrom
test/e2e-waits-on-state
Oct 5, 2026
Merged

yansfil merged 2 commits into
mainfrom
test/e2e-waits-on-state

Conversation

@yansfil

@yansfil yansfil commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Refs #433

Summary

web e2e의 #433 allow 4개를 정리합니다. 셋은 sheet가 읽는 상태를 한 번 기다린 뒤 한 번 누르는 것으로 바꾸고, overview의 hover card 하나는 #433 표시를 떼고 고유 이유가 적힌 예외로 남깁니다. 제품 코드는 바뀌지 않았습니다.

  • close-subtree.spec.ts close sheet: sheet는 열리는 순간의 상태로 keyboard가 어디서 시작할지(Close all인지 Cancel인지) 정합니다. 상태가 아직 오지 않은 자식은 core의 close guard대로 Unknown입니다. 그래서 target의 자식을 펼치고 각 행의 status mark(Working, Question, Done, Idle)와 target 행 이름에 Unknown이 없음을 기다린 뒤, close chord를 한 번 누릅니다. 이전에는 sheet를 열고 닫기를 summary가 맞을 때까지 되풀이했습니다.
  • close-subtree.spec.ts Delete worktree: fixture branch는 main보다 앞선 것이 없어서 core가 그 행을 Inactive로 접습니다. 다만 focus된 checkout은 접지 않고, core가 처음 focus하는 checkout은 실행마다 달랐습니다(아래 Evidence). 그래서 main checkout을 먼저 눌러 focus를 정한 뒤 Inactive 1을 기다리고, 접힘을 한 번 열고 menu를 한 번 씁니다. 이전에는 메뉴를 여는 도중에 행이 접힐 수 있어 열고 고르기를 되풀이했습니다.
  • disk-cleanup.spec.ts: disk review는 core가 가진 agent 행을 읽고, project badge도 같은 행을 셉니다. 그래서 badge가 turn이 끝난 상태(done이나 idle 1)를 보이기를 기다린 뒤 review를 한 번 엽니다. 이전에는 review를 열었다 닫기를 되풀이했습니다.
  • overview.spec.ts leaveHoverCard: 아래 Review의 예외입니다.

Review

  • 판단해 주세요 (남긴 예외 1개): leaveHoverCard의 disable 이유를 "Radix hoverable tooltip arms its grace-area pointermove listener on the next render; no DOM state reports it, so a synthetic leave is repeated"로 바꿨습니다. checkout card와 issue preview는 Radix hoverable Tooltip입니다. 이 Tooltip은 pointerleave에서 grace area를 state로 세우고, 다음 render의 effect에서야 닫힘을 판정하는 document pointermove 감시를 붙입니다. 그 render 전에 온 합성 이동은 버려지고, render가 끝났음을 알리는 DOM 상태는 없습니다. Escape는 hover tooltip이 escape layer가 아니어서 overview에서 closeOverview로 가므로(web/src/keyboard.ts) 대신 쓸 수 없습니다.
  • 하지 않은 것: tooltip wrapper에서 hoverable card의 닫힘을 제품 쪽에서 다시 구현하는 것(B). 사람의 연속된 pointer 이동에서는 생기지 않는 합성 이동만의 경합이고, Radix의 grace area 동작(trigger와 card 사이를 지나는 동안 닫지 않음)을 대신해야 해서 범위가 큽니다.
  • 조심해서 볼 파일: web/e2e/close-subtree.spec.ts - close sheet test는 자식 행의 mark를 보려고 sidebar의 target 계보를 펼칩니다. sheet가 보는 것은 core의 행이라 펼침이 sheet에 닿지는 않습니다. Delete worktree test는 이제 main checkout을 연 Workspace 화면에서 sidebar menu를 씁니다.
  • 질문: core가 시작할 때 고르는 focus checkout이 Herdr의 focus workspace(w1)와 같은 상태에서도 실행마다 달랐습니다(부하 아래 계측한 8번 중 2번은 첫 snapshot부터 spawner의 checkout). 제품이 의도한 것인지 따로 볼 만한지 판단해 주세요. 이 PR은 test에서 focus를 정해 그 차이에 기대지 않습니다.

Evidence

  • 확인한 것: close-subtree.spec.ts 5개, disk-cleanup.spec.ts의 바뀐 test 통과(macOS, pinned Herdr, --retries=0). verify-web.sh web lint(test 크기 검사 포함), typecheck 통과.
  • 부하 반복 (macOS, yes 4개, 수정 전 spec과 수정 후 spec을 같은 build로 번갈아 10번씩, --retries=0):
    • close sheet와 Delete worktree 두 test: 수정 전 10/10, 수정 후 10/10.
    • disk review test: 수정 전 10/10, 수정 후 10/10.
    • 첫 버전(main focus 없이 Inactive 1만 기다림)은 같은 부하에서 Delete worktree가 7/10이었습니다. 실패한 실행을 계측하니 worktree.merged는 1초 안에 true가 됐지만 core의 focused_checkout_id가 첫 snapshot부터 그 feature checkout이라 접힘이 오지 않았습니다(Herdr의 focus workspace는 w1). main을 먼저 누르는 지금 버전은 계측 사본으로 부하 아래 15/15였습니다.
    • 수정 전도 흔들리지 않아, 고친 위험은 읽기로 판단한 위험입니다(재시도가 상태 대신 행동을 되풀이해 늦게 오는 상태를 가림).
  • 확인하지 못한 것: Linux와 Windows는 CI lane으로만 봅니다. 이 PR과 #529가 들어가면 e2e specs retry a whole interaction inside toPass or expect.poll #433 allow는 desktop native focus 3곳만 남습니다.

…m once

The close sheet picks where the keyboard starts from the states it opens
on, so the spec unfolds the target's children and waits for each row's
status mark before pressing the close chord once. The Delete worktree
step waits for the core to fold the checkout under Inactive, opens the
fold, and uses the menu once. The disk review reads the agents the core
holds, so it opens once the project's badge shows the turn over. The
overview's hover-card leave keeps its repeated move under its own reason:
Radix arms the grace-area listener on a later render that no DOM state
reports.
…e spec

The core never folds the focused checkout, and the checkout it starts
focused on varies between runs, so the fold the spec waits for did not
always come. Clicking main first gives the core a known focus, after
which the merged feature row always folds.
@yansfil
yansfil added this pull request to the merge queue Oct 5, 2026
@yansfil
yansfil merged commit 52c4996 into main Oct 5, 2026
27 checks passed
@yansfil
yansfil deleted the test/e2e-waits-on-state branch October 5, 2026 16:47
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.

1 participant