Skip to content

Size every desktop e2e window inside the screen's work area through the fixture - #622

Merged
yansfil merged 2 commits into
mainfrom
fix/511-window-fits-work-area
Oct 6, 2026
Merged

yansfil merged 2 commits into
mainfrom
fix/511-window-fits-work-area

Conversation

@yansfil

@yansfil yansfil commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Refs #511

Summary

area cycle native(desktop/e2e/browser.spec.ts)가 main에서 857행으로 가끔(두 시도 모두 실패한 run 포함) 실패하던 원인은 test가 창을 CI 화면보다 크게 연 것이었습니다. 제품은 바뀌지 않습니다.

  • 원인: 이 test만 setSize(1280, 800)으로 창을 1024 point 폭의 CI work area보다 넓게 열었습니다.
    • macOS는 그 크기를 그대로 두다가, test 자신의 BrowserWindow.blur()가 창을 order out/back 할 때 work area 안으로 줄입니다.
    • 창이 줄어든 직후 두 View area의 page slot이 rect를 잃어 page가 숨고, blur로 취소된 hold의 page는 다시 보이지 않아 keyboard를 돌려받지 못합니다.
    • 창이 hold 전에 이미 줄어 있던 run은 통과합니다. 그래서 run마다 다르게 보였습니다.
  • 고침: desktop/e2e의 모든 창 크기 지정을 fixture로 옮겼습니다.
    • fitWindow(work area 안, 받은 크기를 단언): area cycle native, browser spec의 나머지 네 곳, agent-tab-groups, close-policy, terminal-links 세 곳, reveal-external.
    • 그대로 두고 lint 허용 주석에 이유를 적은 곳 두 군데:
      • desktop.spec.ts의 B8(재시작 뒤 창 위치와 크기 복원)은 정한 rect 자체가 test 대상입니다.
      • workspace-columns는 화면보다 넓은 body의 column 폭을 정수 CSS px로 단언하고, 창을 order out/in 하지 않습니다. page를 zoom해 맞추면 폭이 소수(480.06)가 되어 단언이 깨지는 것을 이 PR의 첫 CI가 보였습니다.
  • 재발 방지: e2e lint에 hide-e2e/window-size-through-fixture를 더해 desktop/e2e/fixture.ts 밖의 setSize/setBounds/setContentSize/setContentBounds를 막습니다. docs/TESTING.md 1단계에 규칙과 이유를 적었습니다.

Review

  • 판단해 주세요: 화면보다 넓은 창을 원하던 test(agent-tab-groups 1920, close-policy 1600, terminal-links 1600)는 1024 폭으로 바꿨습니다. 이 test들의 대상은 폭과 무관하다고 봤습니다(가장자리 drag, wide step은 zoom 0.6으로, 많은 열은 zoom 0.3으로).
  • 조심해서 볼 파일: web/eslint-rules/hide-e2e.mjs - 새 규칙은 이름만 봅니다(어떤 객체든 .setSize( 등). web e2e에는 해당 호출이 없습니다.

Evidence

  • 확인한 것 (원인): TEMP 증거 PR(TEMP evidence run for #511 (do not merge) #620, 머지 안 함)에서 이 spec만 macOS runner 하나로 반복했습니다.
    • 수정 전: 150회 중 16 실패(30회 중 2, 40회 중 7, 40회 중 3, 40회 중 4). 실패 때 shell의 sync 기록은 blur 직후 모든 rect가 256 px 왼쪽으로 옮겨지고(창 폭 1280 -> 1024), 다음 frame에 두 page slot의 rect가 없어지는 것을 보였습니다. 실패 뒤 창 content 폭은 1024였습니다.
    • 실패 run은 hold 시작 때 창이 1280 폭이었고(overlay가 page를 덮지 않는 기하), 통과한 run은 이미 1024 폭이었습니다.
  • 확인한 것 (수정 후): fitWindow(app, WINDOW)로 연 같은 test 40회 40 통과, 다른 run에서 6회 6 통과.
  • 확인한 것: verify-web.sh desktop typecheck, desktop lint, web lint 통과. 규칙에 setSize를 하나 심으면 lint가 그 줄을 오류로 냅니다.
  • 확인한 것 (첫 CI): 폭을 바꾼 agent-tab-groups, close-policy, terminal-links 세 test, reveal-external, browser spec의 background test가 통과했습니다. workspace-columns는 zoom으로 맞춘 폭이 소수가 되어 두 시도 모두 실패해 원래 크기로 되돌렸습니다.
  • 확인하지 못한 것: @needs-focus spec은 운영자 화면을 쓰므로 로컬에서 돌리지 않았고, 이 PR의 desktop e2e lane으로만 확인합니다.
  • 확인한 것 (고정 재현): fitWindow로 연 뒤 hold 직전에 창을 native로 1280x800으로 만들면 6회 6 실패, 같은 assertion과 같은 모양(256 px 이동 뒤 slot 없음, 실패 뒤 창 폭 1024).
    • CSS 폭만 zoom으로 1280에서 1024로 좁히면 6회 6 통과해, slot은 macOS가 창 자체를 줄일 때 사라집니다. 그 뒤 slot이 왜 사라지는지는 이 PR에서 가리지 않았습니다.
창 복귀 뒤 rail 'This Mac' focus (이 PR 밖)
  • 실패 run에서 창이 돌아온 뒤 shell의 DOM focus가 rail의 'This Mac' tile에 있고 그 tooltip이 열려 있었습니다.
  • 통과한 45회 모두 같았습니다(page는 native keyboard를 가짐). 그래서 이 실패의 원인은 아닙니다.
  • hold 전과 중에는 shell의 focus가 page slot에 있고, test의 blur() 직후(창이 돌아오기 전) 이미 rail tile에 있습니다. 창 복귀 때의 focus 복원이 아니라 blur()의 order out/back에서 생깁니다. 실제 앱 전환에서도 생기는지는 확인하지 않았습니다.

…he fixture

area cycle native opened its window at 1280x800 on a 1024-point CI screen. macOS kept that size until the test's own blur ordered the window out and back, clamped it then, and the narrower body dropped both View areas, so the page owed the keyboard was never shown again. Every desktop spec now sizes its window with fitWindow, or fitCssWidth for a layout wider than the screen, and the e2e lint refuses setSize and setBounds outside desktop/e2e/fixture.ts. Refs #511.
Zooming the page to fit a wider body into a CI screen gives fractional column widths (480.06), and the spec asserts whole CSS pixels. The spec never orders its window out and in, so macOS keeps the size; each call says so in a line allow, and the unused zoom helper goes.
@yansfil
yansfil merged commit b3a1ba7 into main Oct 6, 2026
13 checks passed
@yansfil
yansfil deleted the fix/511-window-fits-work-area branch October 6, 2026 07:45
yansfil added a commit that referenced this pull request Oct 8, 2026
Related: yansfil/sasu#30 (`/ship merge`가 이 검사를 매 머지마다 돌리고 출력을 보여 주게 하는
쪽)

## Summary

Hide와 GitHub은 PR과 이슈를 `Closes #N` 같은 closing keyword로만 잇는데, 10-06~07에
이슈를 끝낸 PR 7개(#607 #612 #614 #622 #631 #634 #712)가 이 줄 없이 머지됐고 이슈는 손으로 닫혀
연결이 남지 않았습니다.
이제 `scripts/premerge-check.py`가 닫는 이슈가 없는 PR에 머지 명령 바로 위에서 알림을 한 줄 찍습니다.
막지는 않습니다. 이슈 없이 시작한 PR(PRD 작업, CI·문서 변경)도 많기 때문입니다.

```
note: #454 closes no issue. If it finishes one, put `Closes #<issue>` on the body's Closes line before merging (editing the body does not rerun `verify`); with no issue, merge as it is.
#454 may merge now: gh pr merge 454 --merge --match-head-commit a1eda76...
```

## Review

- **판단해 주세요**: 알림만 하고 막지 않는 수준이 맞는지. 막으려면 "이슈 없음"을 PR 본문에 명시하는 규칙이 따로
필요합니다.

## Evidence

- **확인한 것**: 실제 PR로 실행. 이슈를 닫는 #781에는 알림 없음, 닫는 이슈가 없는 #454에는 위 알림이 찍히고
머지 가능 판정은 그대로.
- **확인한 것**: `test_premerge_check.py`에 알림 유무 테스트 1개 추가, `scripts/tests`
206개 통과, `check-no-attribution` 통과.
- **확인하지 못한 것**: PR을 만드는 순간의 알림은 없습니다. 머지 직전에만 알려서, 그때 본문을 고치는 흐름입니다.
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