Skip to content

Keep one failing card from blanking the whole window - #1052

Merged
yansfil merged 3 commits into
mainfrom
fix/blank-window-render-failure
Oct 13, 2026
Merged

yansfil merged 3 commits into
mainfrom
fix/blank-window-render-failure

Conversation

@yansfil

@yansfil yansfil commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Summary

PR #1051의 체크아웃이 이슈 두 개를 닫으면서 설치된 앱 창 전체가 검게 변했습니다.
닫는 이슈 쪽 두 번째 카드가 빈 에이전트 목록에서 체크아웃 트리가 고른 에이전트(wN1:p2)를 찾다가 예외를 던졌고, 처리되지 않은 렌더 예외가 React 루트 전체와 core 소켓을 내렸습니다.
재시작해도 같은 스냅샷이 매번 다시 던져서 창은 계속 비어 있었습니다.

  • 두 번째 카드는 PR 칩만 들고, 에이전트는 체크아웃이 작업하는 이슈 카드에만 남습니다(D-07, 12a4d4d 전의 동작).
  • 창의 부분(상단 줄, 알림 줄 각각, 사이드바, 중앙 화면, 오버레이 각각, 브라우저 표시 브리지)마다 렌더 경계를 두었습니다. 한 부분이 실패해도 나머지와 소켓은 유지되고, 다음 스냅샷이나 페이지 상태 변화에 다시 그립니다.
  • 사이드바와 중앙 화면은 그 자리에 이 영역을 그리지 못했습니다. 다음 변경 때 다시 그립니다. 한 줄을 보이고, 실패는 진단 로그에 부분별로 한 번 남습니다. 배너는 없습니다.
같은 실제 스냅샷 화면
main (887cb763) 창 전체가 빈 배경
이 PR 사이드바와 Home이 정상으로 그려짐
이 PR + 카드 수정만 되돌림 사이드바와 상단 줄은 그대로, 중앙에만 실패 줄

Review

  • 판단해 주세요: 실패 줄 문구와, 알림 줄·오버레이·브라우저 브리지는 실패하면 자리에 아무것도 그리지 않는(진단만 남기는) 선택이 맞는지.
  • 조심해서 볼 파일: web/src/App.tsx - 소켓을 가진 App 바로 아래에 경계를 두어 렌더 실패가 연결을 끊지 않게 함; web/src/RenderBoundary.tsx - 실패한 동안에만 두 스토어를 구독하고 다음 변경에 다시 그림(failure path).
  • 비용 검토: 정상일 때 추가 구독과 작업은 없습니다. 실패한 부분만 두 스토어를 구독하고, 진단 목록만 바뀐 변경은 무시하며, 그 밖의 변경마다 그 부분을 한 번 다시 그립니다. 같은 오류의 진단은 다시 그려질 때까지 한 번만 남깁니다(진단 목록은 기존 200개 상한).

Evidence

  • 확인한 것: 운영 중인 hided에서 렌더러가 아닌 클라이언트로 읽은 실제 스냅샷 프레임(snapshot 2.5 MB + delta)을 헤드리스 Chromium의 셸 빌드 세 개에 그대로 재생했습니다(위 표). main 번들은 Agent scope references a missing row: wN1:p2를 던지고 루트가 비었습니다.
  • 확인한 것: projectBoard.test.ts의 새 테스트는 main 코드에서 그 예외로 실패하고 이 PR에서 통과합니다. RenderBoundary.test.tsx 6개는 페이지 상태 구독이나 중복 기록 방지를 빼면 해당 테스트가 실패하고, 리뷰에서 나온 두 결함(StrictMode 재마운트 뒤 재시도 안 함, 두 실패 부분이 서로의 진단으로 무한 갱신)은 이전 커밋에서 실패하는 것을 확인했습니다.
  • 확인한 것: bash scripts/verify-web.sh(web·desktop typecheck, lint, test, build)와 node scripts/check-design-contract.mjs 통과, 리뷰 반영 뒤 web 유닛 1499개 재통과.
  • 확인한 것: 별도 리뷰 에이전트의 Fix now 2건(StrictMode 구독, 문서의 "한 번" 표현)을 반영했습니다. 진단 목록 변경을 재시도에서 뺀 것은 리뷰의 후속 제안을 이번에 함께 처리한 것입니다.
  • 확인하지 못한 것: 데스크톱 창에서의 네이티브 캡처. 변경은 web 셸뿐이라 Electron 창 동작은 CI desktop e2e에 맡겼습니다. 렌더러 콘솔과 셸 진단이 데스크톱 로그(desktop.log)에 남지 않는 기존 공백은 이 PR 범위 밖입니다.

…s agents

A checkout whose pull request also closes another issue draws a second
card for that issue with the pull request and no agents (D-07). Since the
card took its named agents from the checkout's core tree, that second card
looked the tree's picks up among its own empty rows and threw, which
unmounted the whole shell and left the window blank. A card now carries
the checkout's rows and tree together or nothing.
An error React did not catch unmounted the whole shell, the component that
owns the core's socket included, so one inconsistent card left the window
blank and disconnected, and a reload drew the same snapshot and failed
again. Each part of the window now has its own boundary under the socket's
owner: the sidebar and the center screen show one quiet line in their
place, the top row keeps its drag strip, and a notice, an overlay or the
browser displays' bridge is left out. The failure is a diagnostic once
until the part draws again, and the part is drawn again on the next change
to the snapshot or the page's state, listened for only while it is down.
A boundary began listening for the next change only when it caught, so
StrictMode's simulated remount dropped the listener of a part that failed
on its first draw and it never drew again. The listening now follows the
failed state. A change to the diagnostic list alone no longer draws a
part again: two parts failing with a new message each time drew each
other on every diagnostic until React stopped the update loop.
@yansfil
yansfil merged commit de851a1 into main Oct 13, 2026
20 checks passed
@yansfil
yansfil deleted the fix/blank-window-render-failure branch October 13, 2026 07:59
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