Commit Graph
45 Commits
Author SHA1 Message Date
DongHyeonka e54fbf2014 feat(presentation): 폼 저장 실패와 결과 불명 화면에 지원 참조를 보인다 (0929/08-04)
문제: 조회 실패는 failure.requestId를 "지원 참조"로 보이는데, 폼의
FormFailureStatus는 넘기지 않았다. 결과 불명 저장은 AsyncSurface의
indicator 분기라 실패 객체가 없고, 폼도 MAYBE_APPLIED 실패를 버렸다.
사용자가 가장 문의하고 싶은 경우에 줄 식별자가 없었다. 샘플의
contact-support 이동은 식별자를 버리고, 상태 페이지는 식별자처럼 보이는
고정 문자열 "REFERENCE-STATUS-DEMO"를 보였다.

고른 방법: 리뷰의 최소 개선 방향(기대 계약 고정)대로 했다.
- FormFailureStatus가 supportReference={failure.requestId}를 넘긴다.
- useAppForm이 MAYBE_APPLIED 실패도 보관하고 supportReference(현재
  보이는 상태 실패 또는 결과 불명 저장의 requestId)를 돌려준다. failure는
  여전히 상태 결과에만 값이 있어 FormFailureStatus가 결과 불명을 두 번
  그리지 않는다.
- AsyncSurface가 supportReference prop을 받아 결과 불명 indicator에서만
  보인다. 샘플 폼 페이지가 form.supportReference를 넘긴다.
- 샘플 contact-support 이동은 식별자를 history state로 넘기고(URL에
  넣지 않음), 상태 페이지는 받은 문자열만 보이고 없으면 줄을 숨긴다.
공개 API는 추가만 했다(useAppForm 반환 필드, AsyncSurface prop).
버린 대안: 결과 불명 식별자를 mutation 채널(application-query.ts)에
두기 — 재마운트 뒤에도 남지만 925줄 파일의 채널 구조를 바꾸고 08-03
(raw 경로 정리)과 겹친다.

위험·한계: 폼이 재마운트되면 결과 불명 배너는 mutation 채널에서
남지만 식별자는 사라진다(제출 값과 같은 수명). 서버가
x-correlation-id를 노출하지 않으면 식별자가 없다(0929 FOLLOW-UP 03-03).
결과 불명 화면에 줄 하나가 생긴다. 초기 JS는 이번 브랜치 전체 기준
202,520 → 202,631 B(예산 204,800 B).

검증:
- RED: 새 테스트 6건이 수정 전 실패(form-foundation 2, async-surface 1,
  reference-page 3. 예: "Unable to find an element with the text: 지원
  참조: corr-save-500"). 새 e2e가 이전 빌드에서 실패(getByText('지원 참조:
  corr-save-500') not found).
- GREEN: 관련 3파일 70/70, tests/component·features·architecture
  59 files 336 tests 통과. e2e reference-save·reference-form·
  reference-route chromium·firefox·webkit 42/42. tsc app·test, eslint,
  check-i18n, check-design-system 통과.

Refs: docs/reviews/2026-09-29-maturity-review/08-presentation.md 08-04
2026-11-01 23:20:32 +09:00
DongHyeonka b9a8a1a6c2 test(presentation): 건너뛰기 링크·로딩 발표·사이드바 이름을 테스트로 지킨다 (08-09)
문제: 접근성 기본 장치 일부를 지키는 테스트가 없었다. 리뷰 변이 중
M3(건너뛰기 링크 대상을 #content로), M4(LoadingSurface의 aria-live
제거), M5(상태 화면 제목을 <p>로), M6(사이드바 aria-label 제거)가
component 211개를 모두 통과했다. e2e의 axe는 WCAG 태그만 돌려
best-practice인 skip-link 규칙이 빠지고, 건너뛰기 링크를 누르는 e2e도
없었다.

고른 방법: 리뷰의 최소 개선 방향 그대로 단언을 더했다.
- app-shell.test.tsx: 건너뛰기 링크 href가 main의 id와 같고, 이름 있는
  complementary 안에 주요 탐색이 있다.
- async-surface.test.tsx: LoadingSurface가 aria-busy와 aria-live="polite"를
  가진다.
- accessibility.spec.ts: 건너뛰기 링크 Enter 뒤 포커스가 main 안에 있다.
- M5는 08-05 커밋의 제목 수준 테스트가 이미 잡는다.
버린 대안: axe에 best-practice 태그를 켜기 — 이번 범위 밖의 위반까지
한꺼번에 게이트가 된다.

위험·한계: 사이드바 이름 "사이드바"는 위치를 말하는 이름이라 리뷰가
관찰로 남겼다. 테스트는 지금 이름을 고정하므로 이름을 바꾸면 테스트도
같이 바꾼다. M3 변이 빌드에서 e2e는 공용 실행 잠금이 길게 잡혀
돌리지 못했다(component 테스트가 M3를 잡는다).

검증(테스트만 추가라 RED는 변이로 확인):
- M3: app-shell landmarks 테스트 실패(1 failed | 221 passed)
- M4: loading surface 테스트 실패(1 failed | 221 passed)
- M5(state-surfaces.tsx 제목을 <p>로): 08-05 테스트 2건 실패
- M6: app-shell landmarks 테스트 실패(1 failed | 221 passed)
- 변이 없음: tests/component 222/222, 새 e2e chromium·firefox·webkit 3/3.
  tsc test 통과, eslint 통과.

Refs: docs/reviews/2026-11-01-maturity-review/08-presentation.md 08-09
2026-11-01 23:20:31 +09:00
DongHyeonka dda153b25e feat(presentation): 상태 화면과 오류 요약이 제목 수준을 받는다 (08-05)
문제: EmptySurface, TerminalErrorSurface, 접근 상태 화면, ErrorSummary의
제목이 h2로 고정돼 있다. Card(h3)나 상세 구획(h2) 안에 넣으면 그 안의
상태 문구가 카드 제목보다 상위 제목이 된다. /examples/states에서
h3 카드 안에 h2가 있었고, 섹션 h2 아래 접근 상태 화면도 h2였다.
상태 화면 제목을 <p>로 바꾸는 변이(M5)를 잡는 테스트도 없었다.

고른 방법: Card에 이미 있는 계약을 그대로 옮겼다. 위 네 컴포넌트에
headingLevel?: 2 | 3 | 4(기본 2)를 더하고, 이들을 그리는 AsyncSurface와
AccessSurface가 같은 prop을 넘긴다(그러지 않으면 가장 흔한 진입점에서
뒤집힘이 남는다). 타입은 state-surfaces.tsx의 HeadingLevel 하나에 둔다.
갤러리는 카드 안 상태에 4, 섹션 바로 아래 접근 상태에 3을 준다.
상태·오류 요약 CSS 선택자는 :is(h2, h3, h4)로 넓혔다. 공개 prop은 추가만
했고 기본값이 그대로라 기존 화면은 바뀌지 않는다. 버린 대안: 제목
수준 context(R7) — 모든 컨테이너가 제공자를 둬야 하고 Card의 prop
계약과 갈린다. Card의 인라인 2 | 3 | 4와 HeadingLevel을 합치는 것은
VD-05 재수출 경로를 건드려 이번 범위에서 뺐다.

위험·한계: 갤러리 화면이 바뀐다(카드 안 상태 제목 h4 16px, 접근 상태
h3 20px). 시각 골든은 오케스트레이터가 갱신한다. 실제 스크린 리더
제목 목록은 확인하지 않았다(접근성 트리 대신 component 단언).

검증:
- RED: async-surface.test.tsx 새 테스트 7건이 수정 전 실패(예: "expected
  [ <h2></h2> ] to have a length of +0 but got 1").
- GREEN: async-surface.test.tsx 31/31, tests/component 220/220(4회 반복
  통과, 부하 32에서 첫 실행 1건 실패 뒤 재현 안 됨). tsc app·test 통과,
  eslint 통과. e2e accessibility·typography·reference-form·reference-save
  chromium 27/27.

Refs: docs/reviews/2026-11-01-maturity-review/08-presentation.md 08-05
2026-11-01 23:20:31 +09:00
DongHyeonka d0f3993b60 fix(presentation): 검색값만 바뀌면 포커스·스크롤·진단을 건드리지 않는다 (08-02)
문제: RouteLifecycle이 pathname·search·navigationType을 effect 의존값으로
썼다. 그래서 URL에 묶은 필터를 바꾸면 포커스가 컨트롤에서 <main>으로
튀고, POP이 아니면 맨 위로 스크롤하고, route.changed를 한 번 더 남겼다.
이미 보고 있는 화면의 링크를 눌러도(React Router가 REPLACE로 바꿈)
navigationType만 바뀌어 같은 일이 났다. 템플릿은 필터를 URL에 두라고
권하므로 첫 목록 화면에서 바로 드러난다(WCAG 3.2.2).

고른 방법: 이동 판단을 route ID 또는 pathname 변경으로 좁혔다(리뷰 5.1
(B)). 포커스·스크롤·진단은 useEffectEvent로 옮겨 navigationType을 읽기만
하고 트리거로 쓰지 않는다. 검색값 변경에 맨 위가 필요한 화면(페이지
번호)은 그 화면이 직접 스크롤한다. routing 문서 6.3절에 규칙을 적었다.
버린 대안: (C) 라우트 계약에 searchChangeIsNavigation 선언 — 그런
라우트가 템플릿에 없고 생성기·문서까지 바뀐다. 필요해지면 (B) 위에
더할 수 있다. navigationType을 ref로 들고 있기 — 렌더 중 ref 쓰기라
React 19의 useEffectEvent보다 의도가 덜 드러난다.

위험·한계: 지금 검색값 변경을 이동으로 세던 대시보드가 있다면 수치가
준다. 실제 브라우저의 스크롤 유지는 jsdom이 스크롤을 건너뛰어 정적
확인만 했다. 테스트용 fixture 페이지에 URL에 묶은 select를 더했다.

검증:
- RED: router.test.tsx 새 테스트 2건이 수정 전 실패. 포커스가
  <main id="main-content">에 있었고 route.changed가 필터 테스트 1→3,
  링크 테스트 1→2로 늘었다.
- GREEN: router.test.tsx 11/11, tests/component 34 files 213 tests 통과.
  tsc(app, test) 통과, eslint(바꾼 파일) 통과,
  verify-documentation-readiness PASS_SCOPED.
- check:architecture는 pnpm 실행을 요구해 이 worktree에서 미실행.

Refs: docs/reviews/2026-11-01-maturity-review/08-presentation.md 08-02
2026-11-01 23:20:31 +09:00
DongHyeonka ba98048b29 test(design-system): Popover 포커스 반환 테스트가 전제를 먼저 만든다 (10-02)
문제: "Escape 뒤 포커스가 trigger로 돌아온다" 단언은 trigger를 클릭한
채로 Escape를 누른다. Popover는 열 때 포커스를 내용으로 옮기지 않으므로
포커스는 처음부터 끝까지 trigger에 있다. overlays.tsx의 Escape 처리에서
`triggerRef.current?.focus()`를 지워도(M15) 관련 테스트가 모두 통과한다.
내용 안의 버튼으로 Tab한 뒤 Escape를 누르는 키보드 사용자는 포커스를
잃어도 아무 테스트가 모른다(WCAG 2.4.3).

고른 방법: 열고 나서 Tab으로 내용 안의 "내부 작업" 버튼에 포커스를
옮기고, 그 버튼에 포커스가 있는지 먼저 단언한다. 그 뒤 Escape와 trigger
포커스 단언은 그대로 둔다. 리뷰 최소 개선안 그대로다.

위험·한계: 바깥 클릭으로 닫을 때의 포커스 반환(closeOutside)은 이
테스트가 보지 않는다. 이번 발견 범위 밖이다.

검증:
- RED(M15 적용): 변경 전 테스트 파일은 통과, 새 테스트는
  "expect(element).toHaveFocus()" 실패(design-system-platform.test.tsx
  trigger 단언).
- GREEN: 원본 overlays.tsx로 되돌리고 related overlays.tsx --run —
  23파일 152 passed.
- eslint(바꾼 파일), tsc -p tsconfig.test.json 통과.

Refs: docs/reviews/2026-11-01-maturity-review/10-tests-fast-layers.md 10-02
2026-11-01 23:18:45 +09:00
DongHyeonka de48db25d9 fix(router): context·feature 경계와 라우트 모듈 실패를 진단에 남긴다 (09-09)
문제: context gateway의 `ContextErrorBoundary`·`FeatureErrorBoundary`는
`onError`를 받지 않아 잡은 실패를 진단에 남기지 않고, 화면 지원 참조는
buildId뿐이다. 라우트 모듈이 청크 누락이 아닌 이유로 실패할 때(평가 중
throw, 15-01 뒤로는 기능 실행부 적재 실패)도 같은 화면만 그리고 기록이
없다. 안쪽 경계(`RenderErrorBoundary`) 밖에서 난 실패, 예를 들어 핸들의
route id가 레지스트리에 없거나 핸들에 라우트 codec이 없을 때는 사용자
신고로도 사건을 찾을 수 없다. 0929/08-05와 같은 결함이다.

고른 방법:
- `ScopedErrorBoundary`가 잡을 때 incident id를 만들어 `onError` 보고에
  넣고, 함수형 fallback에 같은 id를 넘긴다. 둘 다 추가 변경이다(기존
  ReactNode fallback과 `{scope, ownerId}`를 읽는 쪽은 그대로 동작).
- incident id 생성기를 `src/platform/errors/incident-id.ts`로 옮겨 두
  경계 계열이 같은 함수를 쓴다(platform은 presentation을 import할 수 없다).
- gateway가 두 경계에 `reportRenderFailure` 호출과
  `<buildId>:<incidentId>` 지원 참조를 넘긴다. context 경계는
  `component_boundary`를 "route"로 보고한다. 진단·텔레메트리 계약에
  context 값이 없고, 같은 gateway의 청크 복구 보고도 "route"를 쓴다.
- 비청크 적재 실패는 context 경계 안에서 다시 throw해 같은 보고 경로를
  탄다. route id는 URL의 등록 라우트, 없으면 context id다.

버린 대안:
- 세 곳을 presentation `RouteBoundary`로 바꾸기(0929/08-05 제안): 경계
  두 계열 통합(리팩토링 R4) 성격이고 context/feature 소유 범위 표시
  (`data-boundary`, testid)가 바뀐다.
- gateway가 URL마다 incident id를 하나 만들어 두 경계에 나눠 주기:
  두 경계가 같은 id를 공유해 사건 구분이 흐려진다.
- `component_boundary`에 "context" 추가: 진단·텔레메트리 계약과
  레지스트리 기준선을 바꾸는 일이라 이번 범위 밖이다.

위험·한계:
- `APP_SHELL`의 `errorElement`(0929/08-05가 함께 적은 곳)는 그대로
  buildId만 보이고 보고하지 않는다. React Router 오류 요소라 다른 방식
  (useRouteError + 마운트 시 보고)이 필요해 남겼다.
- 실패한 context 안에서 URL을 바꾸면 경계가 리셋되고 다시 throw해 방문마다
  한 번 보고한다.
- 화면 변화: context·feature 경계 실패 화면과 비청크 적재 실패 화면의
  지원 참조가 `build:incident` 형식이 된다. 시각 골든에는 없는 화면이다.
- 초기 JS +58 B gzip(202,748 → 202,806 B, 여유 1,994 B).

검증:
- RED: tests/component/context-boundary-diagnostics.test.tsx 3건(context
  경계: 미등록 핸들 id, feature 경계: codec 없는 핸들, 비청크 적재 실패)이
  모두 `Unable to find an element with the text: /^지원 참조:
  build-a:[0-9a-f]{8}$/`로 실패. 화면은 "지원 참조: build-a"였다.
- GREEN: 3건 통과. failure-boundary.test.tsx에 함수형 fallback이 보고한
  incident id를 받는지 1건 추가, `onError` 보고 기대값에 incidentId 추가.
- 회귀: tests/{architecture,platform,component,features,scripts,contract}
  95 files / 592 tests, tests/unit(pnpm을 띄우는 5개 제외) 164 files /
  1,929 tests 통과. tsc app·test 통과. 바꾼 파일 eslint 통과.
  check-architecture(shim), check-adapter-inventory, check-diagnostics,
  check-registries 통과.
2026-11-01 22:56:29 +09:00
DongHyeonka 298201f3ee perf(features)!: 기능 실행부를 초기 청크에서 떼어 라우트 진입 때 적재한다 (15-01)
문제
초기 JS는 203,572 / 204,800 B(gzip)였다. 생성 인덱스가 각 기능의
feature-module.ts를 정적으로 import하고, 그 파일이 계약(zod 스키마·mapper
포함), HTTP 계약 contribution, application input 팩토리, route codec까지
모두 끌고 왔다. 참조 모양 기능 1개를 더하면 +3,922 B가 늘어 첫 기능에서
예산을 넘었다.

고른 방법
- 기능을 두 부분으로 나눈다. 선언(FeatureModule: route 표, route runtime
  계약, invalidation, 문구, 부팅 때 release manifest와 맞춰 볼
  contractPackages)은 초기 청크에 남는다. 실행부(FeatureRuntime: V2 API
  계약, adapter contribution, contract contribution)는 feature-runtime.ts로
  옮기고 loadRuntime이 동적 import한다. route codec은 context-routes.ts의
  route handle에 실어 route와 함께 적재한다.
- 적재 시점은 그 기능의 route에 들어갈 때다. ContextRouteGateway가 route
  모듈과 함께 application.features.load(featureId)를 부르고, 끝난 뒤에
  화면을 그린다(공개 포트에는 load만 추가). 들어온 URL의 기능은 route
  모듈과 병렬로 적재해 왕복을 늘리지 않는다. 런타임 설정으로 꺼진 기능은
  적재하지 않는다.
- 조립부는 기능별 로더를 만든다(installed-feature-adapters.ts). contract
  registry는 기능이 적재될 때마다 전체를 다시 합쳐 검증한다
  (installed-contract-contributions.ts). 선언하지 않은 contract package를
  적재하면 거절한다.
- 모든 실행부를 한꺼번에 읽는 registry(V2 API, contract contribution)는
  installed-feature-runtime-registries.ts의 async 함수로, Node·테스트·
  registry 거버넌스용 상수는 top-level await 모듈 loaded-feature-runtimes.ts로
  둔다. src에서 후자를 import하면 새 아키텍처 규칙
  boot-does-not-load-every-feature-runtime이 막는다. 플랫폼 구성 화면은
  route 로더에서 async 함수를 불러 결과를 prop으로 받는다.
- vite.config.ts에 청크 그룹 2개를 둔다. rolldown은 부팅 그래프와 lazy
  청크가 같이 쓰는 모듈을 importer 집합마다 따로 청크로 뗀다. 그대로 두면
  기능마다 선언 청크가 하나씩 늘고(기능당 +1,471 B), 실행부와 공유하는
  플랫폼 모듈(HTTP executor, contract runtime, zod)이 6개 청크로 쪼개져
  템플릿 자체가 +438 B 커졌다. feature-declarations는 모든 기능의 선언을,
  feature-platform은 실행부가 같이 쓰는 부팅 모듈을 한 청크로 묶는다.
  render-boot-failure.tsx가 쓰는 모듈은 feature-platform에서 뺀다(09-03:
  애플리케이션 그래프가 평가 중 던져도 실패 화면은 떠야 한다).

버린 대안
- 부팅 때 feature 청크를 미리 동적 import하고 기다린 뒤 렌더: 분류기는
  lazy로 세지만 첫 렌더 경로의 바이트는 그대로다. 예산을 속이는 것이라
  버렸다.
- 실행부 일부만 지연(adapter와 contribution만): 모두 같은 zod 스키마를
  공유해 줄지 않았다. 실측 +4,031 B로 오히려 늘었다.
- 선언과 실행부를 같은 lazy 청크(context-routes)에 두기: 기능당
  -60 B 수준이라 그룹 없이 목표에 못 미쳤다.
- 페이지 문구까지 실행부로 옮기기: 기능당 약 300~450 B를 더 줄이지만
  i18n catalog를 런타임 등록 구조로 바꿔야 해 이번 범위에서 뺐다.
- boot.tsx를 별도 진입점으로 추가: 분류기가 boot의 동적 import를 모두
  초기로 세어 218,303 B가 됐다.

위험·한계
- FeatureModule 모양이 바뀐다. 다운스트림 기능은 feature-runtime.ts로
  실행부를 옮겨야 한다(BREAKING CHANGE).
- 기능 계약 간 중복(operation, schema, contribution) 검사가 부팅이 아니라
  그 기능의 적재 시점과 Node 검사(loaded-feature-runtimes를 읽는 스크립트·
  테스트)로 옮겨 간다.
- 기능 route에 처음 들어갈 때 실행부 청크(약 5 KB gzip)를 받는다. 플랫폼
  구성 화면은 모든 기능의 실행부를 받은 뒤 그린다. lab 게이트(FE-GATE-026)가
  재는 화면이라 LCP가 조금 늘 수 있다. 측정하지 않았다.
- 청크 그룹은 rolldown 자동 분할을 일부 대신한다. feature-declarations가
  비면 기능당 증가 상한 테스트가 실패한다. feature-platform이 비면 템플릿
  총량(약 2 KB)만 늘고 번들 예산 검사가 잡는다.
- config/contracts/registry-baseline.json의 FE-REG-API/SCHEMA source는 아직
  installed-feature-contracts.ts다. 승인 digest가 걸려 있어 소유자 재승인
  때 고친다. check-registries는 통과한다.
- 예산 안에 들어가는 참조 모양 기능은 약 3개다. 플랫폼 자체가 예산의
  98.8%다.

수치 (vite build, classifyViteJavascript + gzipSync 기본 수준)
- 템플릿: 203,572 B(13파일) -> 202,361 B(16파일), -1,211 B
- 참조 복사본 +1: 207,494 B(+3,922) -> 203,102 B(+741)
- 참조 복사본 +2: 210,818 B(+3,324) -> 203,750 B(+648)
- 참조 복사본 +5: 205,629 B
- lazy JS: 23,516 B -> 28,204 B

검증
- RED: node scripts/run-vitest.ts run tests/unit/feature-shape-growth.test.ts
  "adds at most 1 KiB ... (15-01)" 실패: expected 3934 to be less than or
  equal to 1024
- GREEN: 같은 테스트 통과(+741 B)
- node scripts/run-vitest.ts run tests/unit: 168파일 2,383 통과
- node scripts/run-vitest.ts run tests/component tests/features
  tests/integration tests/contract tests/runtime-schema tests/architecture
  tests/platform tests/recipes (security-followup-archive 제외, pnpm 호출):
  109파일 787 통과
- npx tsc --noEmit: app, node, test, recipes, web-worker, service-worker 통과
- npx eslint 바뀐 파일 통과
- check-architecture.ts(pnpm exec 대신 eslint를 부르는 shim): PASS, 새 규칙이
  boot.tsx의 import를 거절하는 것 확인
- check-adapter-inventory, check-registries, verify-documentation-readiness,
  check-ci-contract: PASS
- e2e Chromium 전체(pnpm 없는 build-frontend + vite preview, 별도 포트):
  55 통과
- storybook build 성공
- 미실행: Firefox·WebKit e2e, 시각 회귀, lab 성능(FE-GATE-026),
  pnpm 경로의 check:bundle, test:system

BREAKING CHANGE: FeatureModule은 id, contracts(선언), routes, messages,
  loadRuntime만 가진다. adapters, contractContributions와 V2 API 계약
  (apiOperations, schemas, runtimeSchemas, mappers)은 defineFeatureRuntime으로
  만든 feature-runtime.ts로, route codec은 context-routes.ts의 route handle
  codecs로 옮긴다. contracts에는 contractPackages를 추가한다.
Refs: docs/reviews/2026-11-01-maturity-review/15-performance.md 15-01,
  16-structure-patterns.md 9절
2026-11-01 21:57:53 +09:00
DongHyeonka c03bf020c9 test(setup): Testing Library 대기 기한을 전역 한 곳에서 정한다 (0929/10-01)
문제
lazy route 화면을 findBy*·waitFor 기본값(1초)으로 기다리는 테스트가 1코어
부하에서 코드와 무관하게 떨어진다. 수정 전 재현에서
runtime-application.test.tsx:65 "Unable to find role=heading name=Clean
Architecture Frontend"와 reference-production-vertical.test.tsx:103
"Unable to find role=button name=로그인 시작"이 났다. 두 DOM 모두
route-loading(aria-busy) 상태였다. 지난 리뷰는 router.test.tsx:244-250도
같은 이유로 실패했다고 적었다. React 19는 Suspense를 풀 때마다 실제 300ms
타이머(FALLBACK_THROTTLE_MS)를 기다린다. context route 표와 lazy 페이지를
거치는 화면은 렌더링 전에 1초 중 600ms를 쓴다. 이 사정을 아는 파일만
호출마다 { timeout: 5000 }을 붙이거나(7개 파일 13곳) 파일 단위로
configure를 바꿨다(reference-page). 새 테스트 작성자는 이 규칙을 알 방법이
없다.

고른 방법
tests/setup.ts에서 configure({ asyncUtilTimeout: 5_000 })를 한 번 정하고,
같은 값을 반복하던 호출·파일 단위 override를 지웠다. findBy*·waitFor는
DOM 변화가 오면 바로 끝나므로 기한은 멈춤을 알리는 용도뿐이다. 10초 테스트
제한의 절반이라 진짜 멈춤은 여전히 Testing Library의 DOM 덤프와 함께
실패한다. 기한을 늘리는 방식이라 고른 이유를 setup에 주석으로 남겼다.

버린 대안
- 가짜 시계: Testing Library는 Jest의 가짜 타이머만 알아본다
  (jestFakeTimersAreEnabled가 jest 전역을 본다). Vitest 가짜 타이머에서
  waitFor는 자기 타이머가 멈춰 끝나지 않는다. MSW와 user-event도 실제
  시계로 돈다.
- route chunk를 테스트에서 미리 import하기: chunk를 받아도 React의 300ms
  reveal 타이머와 렌더링 비용은 그대로 기한 안에 남는다. 테스트가 route
  모듈 목록을 따로 알아야 한다.
- 실패한 파일에만 timeout 붙이기: 지금 상태와 같다. 다음 lazy 화면
  테스트에서 같은 실패가 반복된다.

위험·한계
- 기다리다 실패하는 테스트는 실패까지 1초가 아니라 5초 걸린다. 부재를
  findBy·waitFor의 실패로 확인하는 테스트는 없다(grep으로 확인).
- 가짜 타이머를 쓰는 테스트의 waitFor는 이 값과 무관하다(가짜 시간).

검증
- RED(수정 전, taskset -c 0 + 같은 코어의 바쁜 이웃 1개, --maxWorkers=4,
  component·features·integration·platform/cardinality): 3회 중 1회 위 두
  테스트 실패.
- GREEN(같은 조건): 대상 6개 파일 6회, 넓은 묶음 5회 모두 통과. 바쁜
  이웃 2개로 3회 돌렸을 때도 이 커밋이 다루는 테스트는 모두 통과했다.
  넓은 묶음 한 번의 시간은 RED 91~111s(실패가 몰린 209s 회차 제외)
  -> GREEN 86~88s다.
- 기본 코어: tests/unit·component·integration 212파일 2,734개, features·
  platform·architecture·contract·runtime-schema 60파일 403개 통과.
  tsc -p tsconfig.test.json, 바꾼 파일 eslint 통과.

Refs: docs/reviews/2026-09-29-maturity-review/10-tests-fast-layers.md
2026-11-01 21:23:10 +09:00
DongHyeonka 5008013db2 fix(design-system): 표 스크롤 영역에 표 제목으로 이름을 붙인다 (UI-08)
표를 감싼 스크롤 영역이 키보드 포커스(tabIndex 0)를 받지만 역할과
이름이 없었다. 스크린 리더가 이름 없는 정지점으로 읽었다.

영역에 role="region"을 주고 caption을 aria-labelledby로 연결했다.

위험: 없음. 시각 변화가 없다.
검증: 이름 있는 region을 요구하는 컴포넌트 테스트가 고치기 전 실패했고,
고친 뒤 통과했다(design-system-platform.test.tsx 10/10).
2026-11-01 18:34:28 +09:00
donghyeon-kaandClaude Opus 5.5 51685503d0 test(bootstrap): pin the composition's telemetry wiring for a failed Service Worker start (06-05)
Only the optional host was tested, so removing the composition line that hands
it the telemetry port kept every test green. The real composition with an
ACTIVE selection and a failing first install now must emit one event, and the
recipe doc names what the template still leaves unwired.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 14:05:59 +09:00
donghyeon-kaandClaude Opus 5.5 91de7cf481 build(release): bump the template version to 0.2.0 (F-13, 14-04)
package.json and public/release-manifest.json carry the version the
release manifest reports; the three tests that build a manifest for the
installed app use the same value. Test fixtures that pin 0.1.0 as an
arbitrary release stay as they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 13:36:47 +09:00
donghyeon-kaandClaude Opus 5.5 67117cc5a5 fix(forms): show unavailable save failures as a status, not an input error (F-10)
Save failures outside sign-in, permission and retry still went into
ErrorSummary under "review the entered information". They now reach
FormFailureStatus with their own copy and action; the unused copy is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 13:11:25 +09:00
donghyeon-kaandClaude Opus 5.5 cef6744299 fix(presentation): leave modified pagination clicks to the browser (08-12)
The page links prevented every click, so Ctrl/Cmd/Shift-click changed the page
in place instead of opening a new tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 13:06:01 +09:00
donghyeon-kaandClaude Opus 5.5 a5fff8f4b7 fix(presentation): draw query access failures with the access surfaces (08-11)
AsyncSurface drew auth-required, forbidden and not-found query failures with
its own copy while the gallery used AccessSurface. Both now use one set, and
a state surface without a handler shows no dead button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 13:03:27 +09:00
donghyeon-kaandClaude Opus 5.5 ee9b09563a fix(presentation): re-translate form errors on locale change (08-10)
The form kept translated strings in state, so errors already on screen stayed
in the old language. It now keeps message keys and translates on render.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 12:58:46 +09:00
DongHyeonkaandClaude Opus 5.5 b7fc7e53ce fix(presentation): show a support reference on failure screens (08-07)
Route render, unrecovered chunk and query failure screens now show the id
a user quotes to support, and the render diagnostic records the same id as
correlation_id. The route failure page also offers a reload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 00:32:12 +09:00
DongHyeonkaandClaude Opus 5.5 4c27a9cb0a Merge lane I: app core, feature assembly and build input fixes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 23:42:29 +09:00
DongHyeonkaandClaude Opus 5.5 fc8142b2b9 fix(bootstrap): offer a retry on boot failures a reload can fix (09-10)
A config or manifest request that failed or timed out left only an error code
on screen. The boot shell now explains and offers a "try again" button for
those codes; it never reloads on its own, so the reload-once rule holds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 23:27:14 +09:00
DongHyeonkaandClaude Opus 5.5 69e40f106f fix(bootstrap): report unexpected boot errors without a console call (09-04)
check:diagnostics refuses direct console use in src. The development report of
an unclassified boot error now goes through reportError, which still lands in
the browser console.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 23:25:24 +09:00
DongHyeonkaandClaude Opus 5.5 aca949042f fix(bootstrap): report unclassified boot failures as BOOT_UNEXPECTED_FAILURE (09-04)
Any error the loaders did not classify was shown as BOOT_CONFIG_FAILURE and
dropped. It now shows BOOT_UNEXPECTED_FAILURE with the build id and error class,
logs the original in development, and a schema failure lists the rejected key
names (bounded, never values).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:58:29 +09:00
DongHyeonkaandClaude Opus 5.5 9c8a5f417a fix(bootstrap): show the boot error shell when the app graph fails to evaluate (09-03)
A module that threw while evaluating stopped main.tsx before boot() ran, so the
static loading shell stayed up. The entry now imports the app (boot.tsx)
dynamically and renders the shell on rejection; the shell reads boot messages
without the feature catalog. The preload helper gets its own chunk so lazy
chunks do not import the per-build entry, and the bundle budget counts the
entry's dynamic imports as initial JS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:54:40 +09:00
DongHyeonkaandClaude Opus 5.5 a8111f7647 fix(features): apply VITE_PRODUCT_FEATURES in the index generator (09-02)
The bundle applied the selection at runtime while Node build scripts and the
context router ignored it, and a typo only failed in the browser. The generator
now imports only the selected features and rejects unknown ids (D-9); declared
ids stay in the index for NOT_INSTALLED reporting. Default build modules are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:29:51 +09:00
DongHyeonkaandClaude Opus 5.5 9894a70f04 fix(forms): give sign-in, forbidden and retry-later save failures their own state (08-01)
Every non-input save failure became "unavailable" under the "review the entered
information" summary, with no sign-in button. useAppForm now reports
reauth-required, forbidden and retry-later with the failure, and
FormFailureStatus shows each one's copy and action outside ErrorSummary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:22:58 +09:00
DongHyeonkaandClaude Opus 5.5 dfb1b9e0ee fix(query): resend an unknown-effect write with its original idempotency key (03-01, 08-03)
A save whose response was lost minted a new key on the next submit, and the
screen let the user declare "not applied" without evidence. The same canonical
input now reuses the unknown admission's intent; the screen offers "send the
same request again" and a list refresh link instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 22:09:28 +09:00
DongHyeonkaandClaude Opus 5.5 991da882e2 test(platform): run platform tests on a test-only feature, not the sample (14-01)
Six platform tests imported or named the removable reference feature, so
FE-GATE-020 failed on typecheck, unit, coverage, home smoke and residue.
Router surfaces now install tests/helpers/fixture-feature.tsx by mocking
the generated indexes; the rest use neutral names or read the installed
modules. test:sample-removal passes 13/13.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 21:18:39 +09:00
DongHyeonkaandClaude Opus 5.5 5848493580 fix(presentation): show a disabled query as idle instead of empty (R3-4)
A disabled query (no data, no error, not fetching) fell through
deriveAsyncState to "empty", so AsyncSurface rendered the
"no items" copy before the query had even started.

- AsyncState.base gains "idle" for "not started / waiting on a
  precondition". A completed empty result (`[]`, `""`, `null`) stays
  "empty"; a real first load stays "initial-loading".
- AsyncSurface renders an optional `idle` slot for idle, else nothing
  (no skeleton, no aria-busy, no empty copy, no children).

Consumer-facing: AsyncState["base"] union adds "idle" (additive);
AsyncSurface gains an optional `idle` prop. No in-repo exhaustive
switch over base needed changes.

RED (before the fix, node scripts/run-vitest.ts on the two files):
  application-query-bridge > disabled query: expected 'empty' to be 'idle'
  async-surface > derives base state 4 ({}): expected 'empty' to be 'idle'
  async-surface > idle renders neither loading nor empty:
    toBeEmptyDOMElement() received the empty-copy section
  Tests 3 failed | 25 passed (pins for first load, [] and null empty passed)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 15:14:11 +09:00
DongHyeonkaandClaude Opus 5.5 40659de7ec fix(release): share one reload-once guard between chunk and boot recovery (Q-6.9-9)
Chunk recovery kept its own guard: marker keyed by the release pair, no
TTL, trusted write().ok. Round 1 fixed the boot guard (key-independent
marker within a TTL, read-back check) but the chunk copy still reloaded
on every failure when replicas alternated A->B, B->A.

platform/release gains createReloadOnceGuard (the round-1 boot rule,
now with a refusal reason); createReleaseMismatchRecovery wraps it with
unchanged boot semantics (marker within TTL blocks regardless of key,
markCoherentBoot clears), and decideChunkRecovery uses it over its own
CHUNK_RELOAD_GUARD key, keeping its reason vocabulary. Application ->
platform is allowed by .dependency-cruiser.json; platform may not import
application, so the guard lives in platform.

Behavior change (chunk only): a second reload within the TTL is refused
even for a different release pair, and a marker that does not read back
is guard-write-failed. tests/component/context-route-gateway.test.tsx
used a preferences stub that dropped writes; it now persists them.

Verified: tests/unit/chunk-recovery.test.ts characterization (read/write
failure, same pair, invariants) green before the change; alternating
pair test RED before, green after. Boot tests unchanged and green;
FE-RB-002 drill PASS; test:integration PASS; all gates PASS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 13:58:35 +09:00
DongHyeonkaandClaude Opus 5.5 e119eb667a fix(bootstrap): show a static boot shell until the first render (Q-6.9-8)
Boot awaits runtime config (5s budget), the release manifest (5s) and
contract-set checks before its first render, and #root was empty the
whole time with no busy state. index.html now ships a static loading
status (role="status", aria-busy="true", the existing state-surface
loading class) inside #root; createRoot's first render — the app or the
BootErrorShell — replaces it.

Verified: tests/component/bootstrap-shell.test.tsx reads index.html
(RED before: no busy status) and checks the first React render removes
the shell; `pnpm build` keeps the shell in dist/index.html with the
render-blocking CSS link. All gates pass; test:reference-feature's
production-vertical test timed out once on "로그인 시작" and passed on
rerun (timing flake, unrelated file).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 13:58:35 +09:00
DongHyeonkaandClaude Opus 5.5 72b1a72c81 fix(presentation): localize default fallbacks and keep SearchField focus (Q-6.8-13c)
The render boundary's default fallback reads the current locale instead
of formatting ko-KR, and resolveMessage's "message unavailable" fallback
comes from the requested locale's catalog (ko-KR only as a last resort).
SearchField's clear button moves focus to the input before it unmounts,
so focus no longer drops to the body.

tests/unit/i18n-contract.test.ts expected the Korean fallback for en-US,
which encoded the bug; it now expects the English copy and keeps a ko-KR
case. New component cases for the boundary fallback and SearchField
(RED: 3 failed before the change); lane gates pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 13:44:38 +09:00
DongHyeonkaandClaude Opus 5.5 cc1c7d879c fix(presentation): single-flight form submit and clean state before navigation (Q-6.8-13b)
useAppForm holds one submission from validation to outcome, so a second
submit during an async refine returns the running submission instead of
submitting again (the pending ref used to be set only after
safeParseAsync). A successful save commits its settled values with
flushSync before submitForm resolves, so a navigate() right after the
save meets a clean form and the dirty guard does not ask to discard.

Verified with two new form-foundation cases (RED: submit ran twice; the
discard dialog blocked navigation) and the lane gates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 13:44:38 +09:00
DongHyeonkaandClaude Opus 5.5 11eb0dc0e0 fix(presentation): platform routes ignore unknown query parameters (Q-6.8-13a)
D-16. The platform `none` codec strips unknown keys instead of rejecting
them, so `/?utm_source=x` or an OAuth callback parameter no longer renders
"invalid address". The canonical redirect keeps the query of a route whose
search codec is `none`, so the URL itself is not rewritten.

router.test.tsx used `/examples/ui?unexpected=1` as its invalid-address
case, which encoded the old behavior; it now uses the reference list with
`?limit=invalid`. New router case (RED before the change) checks the page
renders and the URL keeps `?utm_source=mail`; lane gates pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 13:44:38 +09:00
DongHyeonkaandClaude Opus 5.5 22d4e8a29d fix(presentation): window pagination links and stop nesting its landmark (Q-6.8-12)
Pagination links only the first and last page, the current page and its
neighbours, with an aria-hidden ellipsis for a longer gap and the page
itself for a one-page gap, so 5000 pages render five links instead of
5000. Inside CollectionPage, whose slot already is the pagination `nav`,
Pagination renders a labelled group instead of a nested `nav`; on its own
it stays a navigation landmark.

Verified with tests/component/pagination.test.tsx (RED: 3 of 5 failed
before the change) and the lane gates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 13:44:38 +09:00
DongHyeonkaandClaude Opus 5.5 21233e8d9b fix(presentation): describe the tooltip trigger and close it with Escape (Q-6.8-11)
Tooltip injects `aria-describedby` into its focusable child (merged with
any existing value) instead of a non-focusable wrapper span, and Escape
hides the tooltip until the next hover or focus (WCAG 1.4.13). The
listener is on the document so a hovered, unfocused trigger closes too.

Verified with tests/component/tooltip.test.tsx (RED: 3 of 3 failed before
the change) and the lane gates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 13:44:38 +09:00
DongHyeonkaandClaude Opus 5.5 38db97a564 refactor(presentation): route status screens share one surface family (Q-6.8-10)
Route-level loading (Suspense fallback, context gateway, chunk check) now
renders LoadingSurface, which gains optional visible copy; route-level
auth-required, integration-required, invalid-address, disabled-feature,
failure and 404 screens render StatusPage, which gains an optional
`surface` marker and children slot. Visible copy, h1 headings, data-surface
markers and alerts are unchanged; the 404 home link is a router link.
The unlabelled context gateway loading now has an accessible name.

Session buttons in the shell, the auth-required screen and the auth example
share useSessionAction: one pending/failed state and sign-in returns to the
current URL including its hash (the auth example dropped the hash).
PageActionBar keys actions by position so a pending label does not remount
the pressed button.

The home and platform overview release loaders now handle a rejected
summary instead of showing "checking" forever.

Pinned first with tests/component/route-status-surfaces.test.tsx (RED: auth
example hash and both loaders; loading, auth-required, shell session and
404 link characterized before the change), plus the lane gates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 13:44:38 +09:00
DongHyeonkaandClaude Opus 5.5 a535db6ea1 fix(presentation): render design-system links through the router (Q-6.8-9)
LinkButton, Breadcrumbs items and page link actions accept an additive
`to` target rendered as a router Link, so in-app links keep the router
basename and navigate without a document reload. `href` still renders a
plain anchor. Pagination builds its page links from the current search
(router location, or the document URL outside a router) and only replaces
`page`, so other search parameters survive.

Verified with tests/component/design-system-links.test.tsx (RED: 5 of 6
failed before the change) and the lane gates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 13:44:38 +09:00
DongHyeonkaandClaude Opus 5.5 7022a1efd0 fix(presentation): key the context gateway and recover its chunk failures (R-8.7)
(a) ContextRouteGateway had no key, so React Router reused one instance
across sibling contexts. On a context A -> B move the first render still
held A's routes, matched B's URL against them and mounted NOT_FOUND, which
reported route.changed(NOT_FOUND) and moved title/focus once. The gateway
element is now keyed by the context id.

(b) A rejected loadRoutes() always showed RouteFailureSurface, so a
routes module missing after a deploy never reached recoverChunk. A chunk
load failure is now rethrown inside a ChunkRecoveryBoundary keyed on the
chunk of the registered route the URL names (the routes module has no
manifest entry of its own; recoverChunk needs one to decide
reload-once). Other load errors still show RouteFailureSurface.

Verified: new tests/component/context-route-gateway.test.tsx mocks the
app with contexts cut from the real reference routes. RED "never matches
a new context's URL against the previous context's routes" (NOT_FOUND
reported) and "sends a failed routes-module download through chunk
recovery" (navigation.reload never called after a release change) failed
before and pass after. check:architecture, check:types:app,
check:types:test, lint, test:component, test:reference-feature pass;
test:unit passes except the pre-existing removal-fixture test (needs
generated artifacts/ files absent from a fresh worktree).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:39:51 +09:00
DongHyeonkaandClaude Opus 5.5 ddf74ed6e9 fix(presentation): keep preferences above the scope fence, dispose routers (R-8.3)
LocaleProvider and ThemeProvider lived inside AppRouter, below the
server-state scope fence (and below QueryClientProvider keyed by
generation). A session change (FENCED -> READY) unmounted and remounted
them, so their live state was thrown away and re-read from storage. The
browser router was created in useMemo and never disposed, so every
remount (and StrictMode's double useMemo) left a popstate listener behind.

- New presentation/providers/preference-providers.tsx: persisted
  LocaleProvider + ThemeProvider (the wiring T45 added to AppRouter).
- bootstrap/runtime-application.tsx: ApplicationProvider >
  PreferenceProviders > ServerStateGenerationProvider > AppRouter, so the
  fence only remounts session-scoped UI.
- AppRouter no longer mounts Locale/Theme. It creates the router in the
  effect that disposes it: a disposed router never listens to history
  again, so useMemo + cleanup would break back/forward under StrictMode's
  replayed mount.
- Tests that mount AppRouter directly now wrap it in PreferenceProviders
  (router, chunk-recovery-boundary, app-shell, product-feature-switch,
  locale-platform, reference-feature reference-page).

Verified: RED "keeps locale state across a session scope fence and
disposes routers" (RuntimeApplication, demo sign-in, storage cleared after
choosing en-US) came back in Korean before and passes after; with the
providers hoisted but no dispose it fails on popstate listeners (4 added,
0 removed). check:architecture, check:types:app, check:types:test, lint,
test:component, test:reference-feature pass; test:unit passes except the
pre-existing removal-fixture test (needs generated artifacts/ files absent
from a fresh worktree).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:39:51 +09:00
DongHyeonkaandClaude Opus 5.5 e5ef6ba236 fix(presentation): persist the chosen locale in preferences (R-8.3)
The locale lived only in LocaleProvider state, so every remount (reload,
or the scope fence after a session change) started again from ko-KR.
The theme already persisted through preferences.setColorScheme; the
locale now uses the same path (D-5):

- contracts/storage-keys.ts: LOCALE key next to COLOR_SCHEME
  (localStorage, public-preference, opaque-string-v1).
- application preferences port: additive getLocale()/setLocale(). The
  application treats the tag as opaque; presentation owns the locale
  list and normalizes what it reads back.
- LocaleProvider: optional onLocaleChange; the provider stays
  storage-free so standalone uses and tests are unchanged.
- AppRouter mounts LocaleProvider from the stored locale and persists
  changes (T46 moves this above the scope fence).

Verified: RED "stores the chosen locale and starts the next mount from
it" failed before (nothing written to LOCALE) and passes after.
check:architecture, check:types:app, check:types:test, lint,
test:component pass; check:registries PASS (compatibility unchanged from
baseline); test:unit passes except the pre-existing removal-fixture test
(needs generated artifacts/ files absent from a fresh worktree).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:39:51 +09:00
DongHyeonkaandClaude Opus 5.5 b1a8269d65 fix(presentation): land focus on the new page after drawer navigation (R-8.6)
Navigating from the mobile drawer left focus on the menu button. The
route's main.focus() ran while the modal drawer was still open (the page
is inert then, so the call is ignored), the shell closed the drawer one
commit later, and the Dialog's deferred restore moved focus to the menu
button.

- app-shell.tsx: drawer links close the drawer on click, so the modal is
  closed before the route commits and the route can take focus.
- core.tsx (Dialog): the deferred restore only runs while focus is still
  unclaimed (body/null or inside the dialog). React usually commits the
  navigation before setTimeout(0) fires in a browser; without this the
  restore would take focus back from the new page. Escape still returns
  focus to the trigger, because focus is inside the dialog then.

Verified: new tests/component/app-shell.test.tsx emulates modal
inertness (jsdom has no showModal/inert). RED "hands focus to the new
page when a drawer link navigates" ended on the menu button before and
passes after; "still returns focus to the menu button when Escape closes
the drawer" passes. New Dialog test "does not pull back focus that moved
out of a closed drawer" fails without the core.tsx guard. check:architecture,
check:types:app, check:types:test, lint, test:component pass; test:unit
passes except the pre-existing removal-fixture test (needs generated
artifacts/ files absent from a fresh worktree).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:39:51 +09:00
DongHyeonkaandClaude Opus 5.5 5e7cee1476 fix(presentation): run the route lifecycle on every route surface (R-8.5)
RouteLifecycle lived inside the route content, which ProtectedRoute,
InvalidRouteSurface and DisabledFeatureSurface never render. On those
screens document.title kept the previous page's title, focus stayed on the
link the user left (screen readers got no page-change cue), and no
route.changed diagnostic was recorded.

RegisteredRoute is now a thin wrapper that renders RouteLifecycle first and
the former body (renamed RouteSurface) after it, so every branch gets title,
main focus and telemetry, and the lifecycle effect still runs before the
page heading's focus effect.

Verified: RED "runs the route lifecycle on the {authentication-required,
invalid-route, disabled-feature} surface" (focus left on a nav link, then a
history navigation) all failed before with the home title still set and
pass after. check:architecture, check:types:app, check:types:test, lint,
test:component, test:reference-feature pass; test:unit passes except the
pre-existing removal-fixture test (needs generated artifacts/ files absent
from a fresh worktree).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:39:51 +09:00
DongHyeonkaandClaude Opus 5.5 938882dbd3 fix(presentation): keep locale changes out of the route-change effect (R-8.4)
RouteLifecycle ran title, main focus, scroll-to-top and reportRouteChanged
in one effect that depended on message/resolve, which the LocaleProvider
recreates on every locale change. Changing the language therefore moved
focus off the language select (main, then the h1), scrolled to the top
and reported a route change, against the routing doc's "locale change
re-renders the title and copy only" contract.

The title now has its own effect (locale-dependent). Focus, scroll and
telemetry run on pathname/search only; location.key is dropped, so a
hash-only move (skip link, error summary #field) no longer re-runs them.

Verified: RED "changes only the title and copy when the locale changes"
failed before (focus moved off the locale select) and passes after; it
also checks document.title and the route.changed count. check:architecture,
check:types:app, check:types:test, lint, test:component pass; test:unit
passes except the pre-existing removal-fixture test (needs generated
artifacts/ files absent from a fresh worktree).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:39:51 +09:00
DongHyeonkaandClaude Opus 5.5 3b3765cc49 fix(presentation): stop reporting a disabled query as loading (R-8.8)
useApplicationQuery passed TanStack's isPending as isInitialLoading. A
disabled query without data is pending (fetchStatus "idle"), so dependent
queries waiting on a prerequisite showed a skeleton and aria-busy forever.

Two changes were needed:
- application-query.ts passes isPending && fetchStatus !== "idle". The
  review suggested isLoading, but with the default networkMode "online" an
  offline first load is "paused" (isFetching false), and isLoading would
  stop showing it as loading.
- deriveAsyncState fell back to "initial-loading" whenever there was no
  data, no failure and no load, so the signal fix alone still produced
  initial-loading (checked). The fallback is now "empty". This also stops a
  query that resolves to null from looking like it loads forever.

Verified: RED "does not report a disabled query without data as loading"
failed with base "initial-loading" before and passes after; "still
reports a real first load as loading, including a paused offline one"
guards the other direction. check:architecture, check:types:app,
check:types:test, lint, test:component pass; test:unit passes except the
pre-existing removal-fixture test (needs generated artifacts/ files absent
from a fresh worktree). test:reference-feature also passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:39:51 +09:00
DongHyeonkaandClaude Opus 5.5 900659b32c fix(presentation): classify WebKit and Vite CSS preload chunk failures (R-8.2)
isChunkLoadFailure only knew the Chromium/Firefox wording, so Safari's
"Importing a module script failed." and Vite's "Unable to preload CSS for …"
were treated as ordinary render defects and never reached recoverChunk.
Both strings are now recognized.

Vite dispatches vite:preloadError and, unless a listener calls
preventDefault(), rethrows the same error into the dynamic import. That
rejection reaches the route's ChunkRecoveryBoundary, so no listener in
bootstrap/main.tsx was added: a listener that reloads would bypass the
reload-once guard, and one that prevents the default would swallow the
error.

Verified: RED "recognizes the WebKit module failure and the Vite CSS
preload failure" (false) and "recovers when Vite rethrows a
vite:preloadError into the lazy import" (recover not called, no failure
surface) failed before and pass after. check:architecture,
check:types:app, check:types:test, lint, test:component pass; test:unit
passes except the pre-existing removal-fixture test (needs generated
artifacts/ files absent from a fresh worktree).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:39:51 +09:00
DongHyeonkaandClaude Opus 5.5 ad2b733ae9 fix(presentation): reset chunk recovery per route and offer a reload (R-8.1)
React Router 7 reuses the rendered-route instance between sibling routes,
so ChunkRecoveryBoundary kept its error/support state after the user left
the failed route and every later page showed "화면 자산을 복구하지 못했습니다"
until a manual browser reload. The boundary is now keyed by routeId, and
the support surface has a user-started "한 번 새로고침" button.

Verified: RED "clears a failed route chunk when the user moves to a sibling
route" (failure surface still rendered after navigating to /examples/ui)
and "offers a user-started reload on the failure surface" (no button) both
failed before the fix and pass after. check:architecture, check:types:app,
check:types:test, lint, test:component pass; test:unit passes except the
pre-existing removal-fixture test, which needs generated artifacts/ files
absent from a fresh worktree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:39:51 +09:00
donghyeon-ka 6f6c48ebb7 refactor: 도메인이 100개 1000개씩 늘어나도 유지보수 쉬운 구조로 변경 2026-09-24 00:42:21 +09:00