Skip to content

feat(design): establish executable Storybook viewer authority - #489

Draft
seonghobae wants to merge 31 commits into
mainfrom
feat/storybook-design-authority
Draft

seonghobae wants to merge 31 commits into
mainfrom
feat/storybook-design-authority

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 20, 2026 •

Copy link
Copy Markdown
Collaborator

Objective

Advance #476 with one bounded, development-only Figma–Storybook vertical slice for the existing WebFlux/static viewer. Production viewer.css remains runtime authority; this PR does not add customer data, runtime network authority, or a second production frontend framework.

Test-first sequence

Original RED checkpoint: f769dd11bd32f0ab19ad86c5c064cda838a4b472 added only the Buyer-readiness contract while the required Storybook/token/config files were absent.

DTCG review-repair RED 4937133b00f2657640994fbec62cde953efc5b67 proved sRGB components just outside [0, 1] were incorrectly accepted after rounding. GREEN bfccb02cf8d0b0a744911ac8947ad432bf176c8d validates component range before channel conversion while retaining the existing channel-range assertion.

Accessibility review-repair RED 4dead75656dc8f1f2a985a10e04cbf81123d97c3 added a contract requiring a named preview container to use a semantic, nameable role; the exact-head Storybook Design System workflow failed as expected. GREEN source commit accbe898f22d2ace9ea4cc02a5aa6c247c64be59 changes the named preview wrapper from an implicit generic div to role="region" while preserving aria-labelledby="preview-title". WAI-ARIA 1.2 defines generic as name-prohibited. Documentation commit bbbe0979107b5ac1942b6d0f37de4579655ac09e records the standards rationale and Figma traceability.

Current exact implementation head: bbbe0979107b5ac1942b6d0f37de4579655ac09e.

The implementation adds:

  • Web Components + Vite Storybook 10.5 development authority;
  • loading, ready, failed, not-found, invalid-document, network-error, keyboard-focus, busy/disabled, mobile-loading, and tablet-ready buyer states;
  • project-level a11y.test = 'error' with WCAG A/AA through WCAG 2.2 AA and axe best-practice tags;
  • Vitest Browser Mode + Playwright Chromium smoke/interaction tests;
  • reduced-motion and forced-colors evidence;
  • a DTCG 2025.10 color projection contract-tested against the shipped CSS values, including fail-closed component-range validation;
  • an exact-PR-head Storybook workflow using a reviewed checked-in package-lock.json and npm ci --ignore-scripts --no-audit --no-fund;
  • a repository AGENTS.md contract that explicitly registers Storybook Design System as a mandatory exact-head gate;
  • read-only workflow token permissions; and
  • APA 7 standards/traceability documentation.

The UI copy is action-oriented: loading explains that no action is required yet; every failure explains the next buyer action.

Fresh design evidence

The live Clearfolio Figma file UPIMvnjyP1sTXhIy1wqD02 was re-read and synchronized on 2026-08-27 against unchanged exact head bbbe0979107b5ac1942b6d0f37de4579655ac09e. Page 0:1, board 2:2 still exposes desktop loading/ready/failed, mobile loading, tablet two-pane, design-audit notes, local token authority, and Storybook buyer-state parity frame 10:2 for document-not-found, invalid-document, and network-error states.

The desktop loading/ready/failed screens and the 390px mobile loading screen now use the same buyer-state copy and next-action vocabulary as design/storybook/viewer-states.stories.js: busy loading keeps Try preview again and Download original visibly disabled while leaving Back to documents available; ready exposes Open document, Download original, and Back to documents; failed exposes Try preview again, Download original, and Back to documents and no longer presents a loading skeleton. The mobile action row wraps rather than clipping, and the preview guidance was explicitly reflowed and visually re-verified after synchronization.

The palette remains aligned with both design/tokens/clearfolio.tokens.json and production viewer.css: brand blue #034ea2, ink #102032, muted #5a6777, background #f6f7f9, panel #ffffff, line #d7dde6, danger #b42318, and focus #ff595a.

Code Connect component inventory was also rechecked on 2026-08-27 and remains unavailable because the current Figma account lacks the required Dev or Full seat on an Organization or Enterprise plan. This PR records that limitation instead of fabricating mappings; #476 explicitly permits that fail-closed path.

Current evidence status

On exact head bbbe0979107b5ac1942b6d0f37de4579655ac09e:

  • CI run 32681615488: terminal success;
  • Security Scan run 32681615532: terminal success;
  • SAST Semgrep run 32681615480: terminal success;
  • Storybook Design System run 32681615524: terminal success;
  • every currently returned inline review thread is resolved or outdated after the semantic-region repair; and
  • formal reviews remain COMMENTED/advisory only, with no qualifying independent human APPROVED review.

The aggregate commit status is not treated as all-passing: CodeRabbit still reports pending / Review queued on this exact head, while Devin is terminal-success. The active organization ruleset currently requires one qualifying approving review, stale-review dismissal on push, review-thread resolution, and the central required-workflow set; GitHub therefore continues to report the PR as mergeable_state=blocked.

The prior Devin aria-labelledby concern is treated as a valid standards defect despite the predecessor axe run being green: WAI-ARIA 1.2 makes the generic role name-prohibited, so the source supplies a semantic region role and an executable regression.

A normal review request for team independent-reviewers previously returned HTTP 422 because that team is not a collaborator of ContextualWisdomLab/clearfolio; #321 owns that provisioning gap. No author review, advisory bot review, stale review, synthetic evidence, or OrganizationAdmin bypass substitutes for the qualifying independent human approval.

Scope boundary

#334 and other viewer lifecycle/accessibility branches remain untouched. Before every further write, recheck protected base, this exact branch head, overlapping PRs, review threads, active-writer evidence, and live protection/ruleset behavior. This PR must not merge until all then-live required gates remain terminal-success and a qualifying independent human approval exists through the normal protected path.

Refs #476, #321

Summary by CodeRabbit

  • 새 기능

    • Storybook 기반 디자인 시스템 미리보기와 Chromium 브라우저 테스트 환경을 추가했습니다.
    • 모바일·태블릿 뷰포트 및 접근성 검사를 지원합니다.
    • 브랜드 색상과 UI 스타일을 관리하는 디자인 토큰을 추가했습니다.
    • 로딩, 오류, 문서 없음 등 뷰어 상태별 화면과 액션을 구성했습니다.
  • 버그 수정

    • 복구할 수 없는 상태에서 불필요한 재시도·다운로드 버튼을 제거했습니다.
    • 로딩 중에도 문서 목록으로 돌아갈 수 있도록 개선했습니다.
  • 문서

    • 디자인 시스템 운영 기준과 검증 범위를 문서화했습니다.
  • 테스트

    • 디자인 토큰, 접근성, 반응형 화면 및 주요 뷰어 상태를 자동 검증합니다.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026 •

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0f1192da-2317-4904-92d5-02937cb7c828

📥 Commits

Reviewing files that changed from the base of the PR and between bbbe097 and 62a53f8.

📒 Files selected for processing (2)
  • design/storybook/viewer-states.stories.js
  • docs/design-system-authority.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/design-system-authority.md

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Storybook 검증 구성을 추가했다. 디자인 토큰, Storybook 설정, 문서 뷰어 상태 스토리, Vitest 브라우저 테스트, PR 워크플로와 계약 검증 스크립트를 연결했다.

Changes

Storybook 디자인 시스템

Layer / File(s) Summary
디자인 토큰 및 프로젝트 계약
design/tokens/clearfolio.tokens.json, package.json, docs/design-system-authority.md, AGENTS.md, CLAUDE.md
DTCG 2025.10 색상 토큰과 Storybook 프로젝트 구성을 추가했다. 운영 범위와 PR 검증 기준을 문서화했다.
Storybook 및 Vitest 실행 구성
.storybook/main.js, .storybook/preview.js, .storybook/vitest.setup.js, vitest.config.js
Storybook 애드온, 뷰포트, 접근성 규칙, 스타일, 프로젝트 어노테이션과 headless Chromium 테스트 구성을 추가했다.
문서 뷰어 상태 스토리
design/storybook/viewer-states.stories.js
로딩, 준비, 오류, busy 상태의 렌더링과 액션을 추가했다. 반응형 뷰포트와 키보드·접근성 상호작용 테스트를 구성했다.
설계 시스템 검증 및 PR 워크플로
scripts/test_storybook_design_system.py, .github/workflows/storybook.yml
토큰, Storybook 설정, fixture, lockfile, 뷰포트와 PR head를 검증한다. PR에서 계약 테스트, Storybook 빌드와 브라우저 테스트를 실행한다.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: 🟡 Moderate · up to 62a53

This PR adds a development-only Storybook viewer-state authority and validation workflow without changing production document access. The current head has successful automated checks, but merging remains blocked because the protected branch lacks a qualifying independent human approval, and previously identified contract-test execution and traceability-documentation issues still require owner follow-up.

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant npm
  participant unittest
  participant Chromium
  participant Storybook
  GitHubActions->>npm: lockfile 기반 npm ci 실행
  GitHubActions->>unittest: 디자인 시스템 계약 테스트 실행
  GitHubActions->>Chromium: Chromium 설치
  GitHubActions->>Storybook: Storybook 빌드 및 --run 테스트 실행
  Storybook-->>GitHubActions: 브라우저 테스트 결과 반환
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 2 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 실행 가능한 Storybook 뷰어 기준을 수립한다는 주요 변경을 정확하고 간결하게 설명합니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/storybook-design-authority

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot]

This comment was marked as resolved.

github-advanced-security[bot]

This comment was marked as resolved.

github-advanced-security[bot]

This comment was marked as resolved.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

The agent generated fixes only for .github/workflows/ files, which cannot be committed due to permission restrictions. Please apply these changes manually.


⚠️ 1 file(s) could not be committed — the agent does not have permission to push to .github/workflows/. Please apply these changes manually:

.github/workflows/storybook.yml — 1 change:

Lines 27–51
         with:
           node-version: "24"
 
-      - name: Resolve exact direct development dependencies
-        run: npm install --package-lock-only --ignore-scripts --no-audit --no-fund
-
-      - name: Emit reviewable lock bootstrap
-        shell: bash
-        run: |
-          printf '%s\n' LOCKFILE_B64_BEGIN
-          base64 -w0 package-lock.json
-          printf '\n%s\n' LOCKFILE_B64_END
-
-      - name: Upload generated lock for checked-in review
-        uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
-        with:
-          name: storybook-package-lock-${{ github.event.pull_request.head.sha }}
-          path: package-lock.json
-          if-no-files-found: error
-          retention-days: 1
-
-      - name: Install development dependencies from generated lock
+      - name: Install development dependencies from committed lock
         run: npm ci --ignore-scripts --no-audit --no-fund
 
       - name: Run executable design-system contract tests

github-advanced-security[bot]

This comment was marked as resolved.

@opencode-agent opencode-agent Bot added area: auth Authentication, authorization, identity, or tenant isolation area: ui-ux Frontend, interaction, design, or user experience priority: medium Normal-priority or P2 work status: draft Draft pull request type: feature New or expanded product capability labels Aug 22, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Collaborator Author

2026-08-27 fresh Figma ↔ Storybook parity repair on unchanged exact head bbbe0979107b5ac1942b6d0f37de4579655ac09e:

  • Re-read live Figma UPIMvnjyP1sTXhIy1wqD02 / 0:1 / 2:2 and exact-head design/storybook/viewer-states.stories.js plus runtime viewer.css.
  • Found real design drift in the Storybook-parity Figma states: Document not found, Invalid document, and Network error still carried a loading skeleton even though exact-head Storybook renders .skeleton only for state === 'loading'.
  • Removed the stale skeleton layers from Figma nodes 10:25, 10:49, and 10:73, renamed those preview-content frames to their actual states, and visually re-checked the not-found screen. Loading remains the only skeleton state. Buyer next-action copy/buttons and the eight runtime token values remain unchanged and aligned.
  • Current Git source/PR head did not move; no source write was needed.

Merge evidence remains fail-closed. Repository CI, Security Scan, SAST Semgrep, and Storybook Design System are terminal-success on this head, and all returned inline threads are resolved/outdated. However, the required central strix check 97679647446 is terminal failure on this exact head, so the PR is not merge-ready. That Strix run predates the central fix .github#1350, which merged on 2026-08-26 and repairs the observed NVIDIA-NIM → direct-OpenAI GPT-5.4 function-tool reasoning contract. The old failed run is not reclassified as passing; fresh current-central Strix evidence is still required.

Live organization ruleset 18156473 also requires one qualifying approval, stale-review dismissal on push, and thread resolution. No self-approval or admin bypass is used.

@seonghobae
seonghobae marked this pull request as draft August 27, 2026 21:04
@seonghobae
seonghobae marked this pull request as ready for review August 27, 2026 21:04
@seonghobae
seonghobae marked this pull request as draft August 27, 2026 23:09
@seonghobae
seonghobae marked this pull request as ready for review August 27, 2026 23:10
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

Devin Review

Comment thread .github/workflows/storybook.yml
Comment thread scripts/test_storybook_design_system.py
@opencode-agent

opencode-agent Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: 62a53f84f91c968b91e2c7bed4bce1c4cef72fac

@seonghobae
seonghobae marked this pull request as draft September 6, 2026 15:11

Copy link
Copy Markdown
Collaborator Author

Current lifecycle authority를 다시 맞춥니다. PR body는 아직 bbbe0979107b5ac1942b6d0f37de4579655ac09e를 current exact implementation/evidence head로 적고 있지만 live head는 62a53f84f91c968b91e2c7bed4bce1c4cef72fac이며, 두 head 사이에는 3개 정상 descendant와 design/storybook/viewer-states.stories.js, docs/design-system-authority.md의 추가 delta가 있습니다. 따라서 predecessor workflow IDs를 current-head evidence로 전용해서 Ready로 둘 수 없습니다.

Fresh review inventory에도 qualifying APPROVED review는 없고 모두 COMMENTED입니다. 62a53f84...의 CodeRabbit/Devin commit status는 success이고 current-head Actions generation도 다시 조회했지만, body의 exact-head traceability와 Figma/browser evidence가 live head를 가리키도록 먼저 갱신되어야 합니다. 이 때문에 Ready→Draft로 복구했습니다.

GREEN acceptance: current 62a53f84...의 3-commit intervening delta를 명시적으로 review하고, current-head Storybook/browser/a11y evidence와 workflow run IDs를 body에 code-current하게 갱신하며, live Figma evidence가 실제로 이 head와 parity인지 재확인하고, normal ruleset 경로에서 qualifying independent current-head APPROVED review를 받으세요. 이전 bbbe097... evidence는 historical predecessor evidence로만 남겨야 합니다. source-neutral re-kick, author approval, bot advisory review, ruleset bypass로 대체하지 않습니다.

@seonghobae seonghobae added the enhancement New feature or request label Sep 7, 2026 — with ChatGPT Codex Connector
@opencode-agent

opencode-agent Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: 62a53f84f91c968b91e2c7bed4bce1c4cef72fac

@opencode-agent

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: 62a53f84f91c968b91e2c7bed4bce1c4cef72fac

Copy link
Copy Markdown
Collaborator Author

Design assurance exact-head acceptance — 62a53f84f91c968b91e2c7bed4bce1c4cef72fac

This head keeps CI 33131612863, Security 33131612856, Semgrep 33131612872, and Storybook 33131612876 terminal GREEN. That evidence does not establish executable CTA behavior:

  • design/storybook/viewer-states.stories.js renders three enabled <button> elements but contains zero handler, link, or navigation bindings. The play blocks assert visibility, enabled/disabled state, and one Tab focus only; they never activate Open/Download/Retry/Back.
  • Protected-base runtime authority is src/main/resources/static/assets/viewer/viewer.js (blob a998675c74da585656bdf0fb168e6645582a6dcf), which owns guarded fetch, retry/poll cancellation, same-origin artifact links, popup failure recovery, and browser lifecycle. The Storybook clone neither imports nor composes that behavior.
  • The PR body still labels bbbe0979… as the current exact implementation/evidence head, so its run inventory is stale for live 62a53f84….

Acceptance before Ready/merge:

  1. Compose the product-owned viewer object/component or a versioned adapter around its public contract; do not maintain a presentation-only innerHTML clone as behavioral authority.
  2. Current-head Chromium tests must activate pointer and keyboard CTAs and prove the real effects: retry request/poll generation and abort cleanup; safe Open behavior; exact download URL/filename/error path; Back navigation and focus; double-activation/busy/race handling.
  3. Add touch plus desktop/mobile/intermediate screenshots, reduced-motion/forced-colors, offline/permission/stale/retry/busy states, and ko/en/ja/zh/vi/es/de/fr wrapping evidence. A structured exact-value alternative must remain available.
  4. Update docs/product-technical-gap-baseline.md, design authority/ADR, CHANGELOG, and PR body to the exact repairing head and runs.

Because this requires the canonical runtime/viewer boundary rather than a cosmetic story edit, I am preserving the current delta and keeping the PR Draft.

@opencode-agent

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: 62a53f84f91c968b91e2c7bed4bce1c4cef72fac

@opencode-agent

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: 62a53f84f91c968b91e2c7bed4bce1c4cef72fac

@opencode-agent

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: 62a53f84f91c968b91e2c7bed4bce1c4cef72fac

@opencode-agent

opencode-agent Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: 62a53f84f91c968b91e2c7bed4bce1c4cef72fac

@opencode-agent

opencode-agent Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: 62a53f84f91c968b91e2c7bed4bce1c4cef72fac

@opencode-agent

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: 62a53f84f91c968b91e2c7bed4bce1c4cef72fac

@opencode-agent

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: 62a53f84f91c968b91e2c7bed4bce1c4cef72fac

@opencode-agent

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: 62a53f84f91c968b91e2c7bed4bce1c4cef72fac

@opencode-agent

Copy link
Copy Markdown
Contributor

Scheduled review-feedback autofix for this PR head.

  • Head SHA: 62a53f84f91c968b91e2c7bed4bce1c4cef72fac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: auth Authentication, authorization, identity, or tenant isolation area: ui-ux Frontend, interaction, design, or user experience enhancement New feature or request priority: medium Normal-priority or P2 work type: feature New or expanded product capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants