Commit Graph
20 Commits
Author SHA1 Message Date
DongHyeonka b4ccadab77 feat(design-system): 제품이 싣는 글꼴을 토큰 계약에 선언하게 한다 (1101/12-04)
문제
첫 글꼴 규칙(check:design-system)은 --font-sans의 첫 글꼴이 일반
키워드이거나 검사하는 CSS 안의 @font-face로 실릴 때만 통과시킨다. 글꼴
패키지 import, @import url(…), index.html의 <link>로 싣는 글꼴은 볼 수
없어 실패한다. memento 토큰이 이미 이 규칙에 걸린다. 선언할 곳이 없으니
제품은 템플릿 소유 스크립트를 고치게 된다.

고른 방법
- token-contract.ts에 PRODUCT_LOADED_FONT_FAMILIES(템플릿은 빈 목록)를
  둔다. 제품은 토큰 계약 파일에서 자기가 싣는 글꼴 이름을 적는다.
- firstFontFamilyFailures가 세 번째 인자로 이 목록을 받아 @font-face로
  실은 글꼴과 같이 허용한다. check-design-system.ts가 목록을 넘긴다.
- 실패 메시지에 목록 이름을 넣어 어디에 선언하는지 알린다.
- docs/styling/design-system-platform.md 4.1절 표의 첫 글꼴 행을 고친다.
- 12-04의 (1)~(3)과 (5)는 e714c0d가 했다(deg·음수 색상각, 지원 형식을
  적는 포커스 메시지, -apple-system·BlinkMacSystemFont, 규칙 문서). 이
  커밋은 (4)만 한다.
버린 대안
- 패키지 import·<link>를 찾아 실제로 싣는지 판정: 진입점·CDN·번들러
  설정까지 봐야 해서 규칙이 커진다.
- 목록을 design-system/index.ts로도 내보내기: 앱 코드가 쓰지 않는다.

위험·한계
- 검사는 목록을 믿는다. 글꼴이 실제로 실리는지 보지 않는다. 주석과
  문서에 "모든 화면이 싣는 글꼴만 적는다"고 적었다.
- 실패 메시지 문구가 바뀐다. 문구를 단언하는 곳은
  tests/unit/design-system-rules.test.ts뿐이다.
- 새 공개 이름 PRODUCT_LOADED_FONT_FAMILIES가 생긴다.

검증
- RED: 새 테스트 "passes a family the product declares it loads, and only
  that one"이 실패(expected [ Array(1) ] to deeply equal []).
- GREEN: design-system-rules·oklch-contrast·design-system-contract
  22/22 통과.
- 실제 스크립트 probe: CSS 사본의 --font-sans를 "Pretendard Variable"로
  시작하게 하고 node scripts/check-design-system.ts → 빈 목록이면 새
  메시지로 실패(exit 1), 목록에 넣으면 PASS(exit 0). 저장소 CSS는 PASS.
- tsc(app·node·test), 바꾼 파일 eslint, verify-documentation-readiness
  PASS_SCOPED.

Refs: docs/reviews/2026-11-01-maturity-review/12-guardrails-ci.md 12-04
2026-11-03 01:24:31 +09:00
DongHyeonka 6dd4bc1c24 refactor(design-system): primitive를 컴포넌트마다 한 파일로 나눈다 (1101/08-08)
문제
primitive가 종류별 파일 5개(core·forms·overlays·navigation·feedback)에
모여 있다. 번들러는 export가 아니라 모듈 단위로 청크를
나눈다. 그래서 셸이 쓰는 Button·Drawer·Select와 같은 파일에 있는
Tooltip·Menu·Card 같은 갤러리 전용 primitive도 셸과 같은 청크로 간다.
다음 커밋(side effect 없음 선언)이 효과를 내려면 먼저 파일이 나뉘어야
한다.

고른 방법
- primitives/ 아래를 컴포넌트마다 파일 하나로 나눈다(32개). 본문은 원래
  줄을 그대로 옮기고 import만 새로 쓴다. ToastProvider·useToast는 한
  파일, 내부 타입 FieldCopy는 field.tsx에서 내보낸다.
- PaginationLandmarkContext는 pagination-landmark.ts로 따로 둔다.
  page-templates.tsx(StatusPage, 초기 청크)가 이것만 읽는데, Pagination과
  같은 파일이면 Pagination 코드가 초기 청크로 간다.
- design-system/index.ts의 export 이름은 그대로다(값 71개, 타입 36개를
  전후 비교). components/ui/*.ts 재수출, page-templates.tsx,
  common-patterns.tsx는 새 경로를 가리킨다. .dependency-cruiser.json의
  page-templates 예외는 출발 파일 기준이라 그대로 맞다.
버린 대안
- 셸이 쓰는 것과 나머지 두 파일로 나누기: 제품 셸이 Tooltip 하나를
  쓰면 나머지가 다시 초기 청크로 간다.

위험·한계
- 이 커밋만으로는 번들이 바뀌지 않는다. 배럴이 다시 내보내는 모듈은
  side effect가 있다고 보고 모두 초기 청크에 남는다(초기 JS 16개 청크,
  203,818 → 203,824 B). 다음 커밋이 같이 있어야 효과가 난다.
- primitives/ 안의 파일 경로를 직접 import하던 다운스트림 코드는 경로를
  바꿔야 한다. 공개 경계(index.ts)는 그대로다.

검증
- 원래 5개 파일의 import 아래 본문 줄이 새 파일에 빠짐없이 한 번씩
  있다(줄 다중집합 비교).
- tsc(app·node·test) 통과, 바꾼 파일 eslint 통과.
- node scripts/run-vitest.ts run tests/component: 35파일 228/228 통과.
- 빌드(flock): 초기 JS 16개 청크 203,824 B, ui-tooltip 등 갤러리 클래스는
  여전히 초기 청크에 있다(예상대로).

Refs: docs/reviews/2026-11-01-maturity-review/08-presentation.md 08-08
2026-11-03 01:24: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 6fc77bb71f fix(design-system): h2·h3·h4에 제목 단계 크기와 굵기를 준다 (08-04)
문제: theme.css가 넣는 Tailwind preflight가 제목의 크기·굵기를 본문으로
되돌린다. base.css는 h1 크기와 h2 줄 간격만 정해, 6개 라우트 모두
h2·h3이 16px/400으로 본문과 같았다. 구획을 훑어볼 수 없고, 제품마다
제목 크기를 따로 만들게 된다.

고른 방법: 리뷰의 최소 개선 방향대로 primitive에 --font-size-xl(1.25rem)
·--font-size-2xl(1.5rem)을 더하고, semantic에 제목 단계 토큰
(--font-size-heading-2/3/4, --font-weight-heading = semibold)을 둔 뒤
base.css에서 h2·h3·h4에 적용했다. 컴포넌트 제목(카드 h3, 상태 화면
h2)은 자기 수준의 기본 스타일을 그대로 받는다. 제품은 semantic 토큰
값만 바꿔 단계를 조정한다. 값(24/20/16px, 650)은 1.2배 안팎의 단계로
골랐다. 버린 대안: 컴포넌트마다 크기를 주기 — 같은 값이 여러 곳에
흩어진다. token-contract 필수 목록에 추가 — 다운스트림 토큰 파일이
바로 실패하고, 결과는 아래 e2e가 지킨다.

위험·한계: 화면이 바뀐다. 시각 골든(app-shell, state-surfaces 등)은
오케스트레이터가 갱신한다. 상태 화면이 카드(h3) 안에서 h2로 더 크게
보이는 문제는 08-05가 다룬다. 값 자체는 디자인 결정이라 바꿀 수 있다.

검증:
- RED: 새 tests/e2e/typography.spec.ts가 수정 전 chromium에서 실패
  (h2 16px, h3 16px: "Expected: > 16, Received: 16").
- GREEN: 같은 spec chromium·firefox·webkit 3/3 통과. accessibility·i18n·
  ui-gallery·app-shell·responsive·theme·design-system-interactions·
  compact-smoke + typography chromium/chromium-compact 32/32 통과(별도
  playwright 설정, vite preview, pnpm 없이 빌드).
- check-design-system PASS(48 tokens). 시각 회귀는 미실행.

Refs: docs/reviews/2026-11-01-maturity-review/08-presentation.md 08-04
2026-11-01 23:20:31 +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
DongHyeonka 8576ce16c7 fix(design-system): --font-sans가 실제로 그려지는 글꼴을 가리키게 한다 (UI-05)
토큰이 Inter로 시작했지만 Inter를 불러오는 코드가 없었다. Inter가
없는 기기는 자기 글꼴로 그렸고, Inter에는 한글이 없어 한국어는 처음부터
Inter로 그려지지 않았다.

토큰을 시스템 UI 글꼴과 플랫폼별 한국어 글꼴 목록으로 바꿨다(사용자
결정). 한글 웹폰트 배포는 버렸다. 전송량과 글꼴 파일 관리가 생기고,
중립 템플릿에서는 서비스가 브랜드 글꼴로 바꾸면 되기 때문이다.
check:design-system이 첫 글꼴이 기본 키워드도 아니고 @font-face로 싣지도
않으면 실패한다.

위험: OS마다 글꼴 모양이 다르다. 시각 테스트 실행 환경의 글꼴 고정은
아직 남았다(UI-05 후반).
검증: 바꾸기 전 검사가 Inter를 보고했고, 바꾼 뒤 통과했다.
2026-11-01 18:34:28 +09:00
DongHyeonka bfa7dd9188 fix(design-system): 색 혼합을 oklab으로 해서 무채색이 색상각을 끌어오지 않게 한다 (UI-02)
라이트 테마에서 현재 메뉴 배경이 파랑이 아니라 분홍으로 그려졌다.
color-mix(in oklch, action 14%, panel)에서 panel이 oklch(1 0 0)으로
색상각 0을 명시해, 보간된 색상각이 255에서 345로 끌려갔다.

15곳의 혼합을 모두 in oklab으로 바꿨다. oklab에는 보간할 색상각이
없다. 흰색을 oklch(1 0 none)으로 바꾸는 방법은 버렸다. 앞으로 생길
무채색 토큰마다 같은 규칙을 기억해야 하기 때문이다.
check:design-system이 oklch·lch·hsl·hwb 혼합을 실패로 처리한다.

위험: 섞인 색이 미세하게 달라진다. 시각 골든을 갱신했다.
검증: 바꾸기 전 검사가 15곳을 보고했고, 바꾼 뒤 통과했다.
2026-11-01 18:34:28 +09:00
DongHyeonka 35b183b64f fix(design-system): 라이트 포커스 링이 모든 표면에서 3:1을 넘게 한다 (UI-01)
라이트 --color-focus가 흰 패널에서 2.33:1, surface-muted에서 1.95:1로
WCAG 1.4.11 기준(3:1)에 못 미쳤다. 포커스 링은 컨트롤에서 3px 떨어져
그려지므로, 대비를 따질 인접색은 컨트롤 뒤의 표면이다.

라이트 포커스를 oklch(0.52 0.15 230)으로 바꿨다. 가장 낮은 대비가
4.24:1이다. 다크는 그대로다. check:design-system이 두 테마에서 포커스
토큰과 표면 토큰 8종의 대비를 계산하고, 3:1 미만이면 실패한다.
안팎 이중 링은 버렸다. 한 색으로 충분하고 링 모양이 바뀌지 않는다.

위험: 포커스 링 색이 진해져 시각 골든이 바뀐다(별도 커밋에서 갱신).
검증: 토큰을 바꾸기 전 검사가 라이트 표면 8종 모두에서 실패했고,
바꾼 뒤 통과했다. 계산식은 브라우저 실측값 2.33:1과 일치한다
(tests/unit/oklch-contrast.test.ts).
2026-11-01 18:34:28 +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
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 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 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 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 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
donghyeon-ka 6c52cdb916 feat: 기능 추가 과정중 2026-07-30 15:58:20 +09:00
donghyeon-ka 98d4fd4960 feat: harden test and registry evidence 2026-07-26 17:15:26 +09:00
donghyeon-ka 5173b6c8d6 feat: add diagnostics and telemetry runtime 2026-07-26 16:42:27 +09:00
donghyeon-ka 668bf05b48 feat: add internationalization message platform 2026-07-26 16:17:39 +09:00
donghyeon-ka 13f28ef811 feat: add design system platform 2026-07-26 15:49:07 +09:00