Skip to content

feat: 淺色模式(light mode)支援#4

Open
kiki830621 wants to merge 5 commits into
mainfrom
idd/1-feat-light-mode
Open

feat: 淺色模式(light mode)支援#4
kiki830621 wants to merge 5 commits into
mainfrom
idd/1-feat-light-mode

Conversation

@kiki830621

Copy link
Copy Markdown
Member

Refs #1

Summary

色板抽成 CSS custom properties,依 prefers-color-scheme 自動跟隨系統深淺外觀;canvas 線條色由 cssColor 純函式解析(含 fallback)。不採 light-dark() 函數以保舊瀏覽器相容。

Checklist

  • Diagnose
  • Implement (2 commits)
  • Verify (run /idd-verify feat: 淺色模式(light mode)支援 #1)
  • Verify-gated: post-verify PASS = ready to merge → after merge, run /idd-close to finalize this issue (manual gate + closing summary; no auto-close trailer)

Generated by /idd-all on PR path. Do NOT add a GitHub close trailer (Closes/Fixes/Resolves) — IDD discipline requires manual /idd-close after merge to enforce checklist gate + closing summary.

kiki830621 and others added 2 commits July 16, 2026 12:30
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mac-trackpad-test Ready Ready Preview, Comment Jul 16, 2026 5:10am

Request Review

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kiki830621

Copy link
Copy Markdown
Member Author

Verify Report — PR #4(Round 1)

Engine

manual fan-out (4 lens Agents + sequenced DA, model: sonnet, file-based output) + Codex (gpt-5.5 xhigh, run_in_background)。Workflow backend 不可用(Fable session pacing guard),per #207 fallback。

Freshness

凍結 SHA b29b090;期間僅一筆 docs-only delta(c886a7b,README.md +4 行,doc-guard hook 要求)——程式碼路徑零變更,ensemble verdicts 對 code diff 仍有效。

Aggregate

FAIL — 1 blocking, 4 in-scope fix, 2 follow-up

要求覆蓋率

4 項 Expected:3 FULLY + 1 PARTIALLY(對比可讀性未全數達標)

Findings(合併後)

# Severity Finding Source Action
1 MEDIUM 淺色模式 3 處低於 WCAG AA 4.5:1——--text-dim(#6e6e73) on --inset(#e5e5ea) = 4.04、.ok(#248a3d) on card = 4.40、.pinchtarget 白字 on --blue(#007aff) = 4.02。requirements lens 的「全過 AA」係漏驗 inset 背景,經 DA 精算仲裁推翻 codex + agents:devils-advocate Blocking(違反 Expected(2) 對比可讀)
2 MEDIUM .pinchtarget 新增 hardcode #ffffff 未走變數系統(且為深色 inherit→#ffffff 的微小偏移) codex + agents:regression+requirements In-scope fix
3 MEDIUM trail canvas 線條色 mount 時解析一次,執行中切系統主題不同步(全專案無 matchMedia listener) codex + agents:requirements+logic Follow-up → 已建 #5
4 LOW --thresh 深色值 rgba(...,0.67) 非舊值 #f2f2f7aa 逐字等同(0.6667 vs 0.67) codex + agents:regression In-scope fix
5 LOW theme.ts SSR guard 分支零測試覆蓋;inline fallback 分支經實測不可達、註解因果錯誤 agents:logic In-scope fix
6 INFO trail.ts canvas 繪圖路徑零測試覆蓋(jsdom 無 canvas,pre-existing 慣例非本次退步) agents:logic + DA 不動
7 secrets/外部資源/DOM 注入/prompt injection 全 PASS;非色彩規則逐位元同值;深色 16 變數與舊 hex 完全一致 agents:security+regression(DA 反駁不成立)

Process Gaps

requirements lens 的 WCAG 驗算漏查 inset 背景配對(結論被 DA 推翻)——ensemble 對抗機制按設計運作。

Next

依 unattended verify-fix loop:修復 blocking + in-scope findings → commit → Round 2 驗證。

…、theme 簡化 (#1)

- 淺色 --text-dim #5a5a5f(inset 上 5.46:1)、--green #1d7a3d(5.39:1)、--blue #0071e3(白字 4.70:1)
- .pinchtarget 色改 var(--on-accent)(深 #f2f2f7 還原舊 inherit 值/淺 #ffffff)
- 深色 --thresh 還原 #f2f2f7aa 逐字同值
- 新增 tests/contrast.test.ts:WCAG 對比機械迴歸鎖(雙色板 × 10 配對)+ 深色 hex 回歸鎖
- theme.ts 移除不可達 inline fallback、修正註解因果、補 SSR guard 測試

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ion state 出版控 (#1)

- verify R2 finding:3.0 例外原同時套用兩主題,light 回退風險 → per-theme {dark:3.0, light:4.5}
- 深色 3.0 例外註解補 launch 基線證據(main 的 .pinchtarget 無 color 屬性、繼承 #f2f2f7 = 3.27)
- .claude/.idd/{state,attachments} 為 session 產物,移出版控並 gitignore(issue-runs 與 local.json 依 IDD 契約保留)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kiki830621

Copy link
Copy Markdown
Member Author

Verify Report — PR #4(Round 2,delta)

Engine

Codex (gpt-5.5 xhigh) delta 複驗 + 機械 WCAG 迴歸鎖(tests/contrast.test.ts,21 assertions)+ 全套件 68 tests + build。R2 為 R1 blocking 修復的針對性複驗(R1 已跑 4 lens + DA + Codex 六方全審)。

Freshness

R2 凍結 fcbfa6d;後續兩筆 delta:5de7389(測試門檻收緊 + session-state 出版控,無 src 變更)。機械 gates 於最終 HEAD 重跑全綠。

Aggregate

PASS — 0 blocking

R1 blocking 覆核(Codex 重算)

配對 新值 對比 結果
--text-dim on --inset #5a5a5f on #e5e5ea 5.46:1
.ok green on card #1d7a3d on #ffffff 5.38:1
pinch 白字 on --blue #ffffff on #0071e3 4.70:1

WCAG 公式實作經 Codex 獨立覆核正確。

R2 findings 處置

Codex finding 判定 處置
light on-accent 門檻應鎖 4.5(3.0 例外讓回退漏網) 成立 已修:per-theme 門檻 {dark: 3.0, light: 4.5}(5de7389)
dark .pinchtarget 應為 #ffffff/3.27 非 pre-existing 反駁成立:Codex 只見 R2 delta,其「舊值 #ffffff」是本 PR R1 自己引入的;launch 基線(main).pinchtarget 無 color 屬性、繼承 body #f2f2f7(=3.27)。--on-accent: #f2f2f7 正是還原 launch 深色外觀 不改;註解已補基線證據
.claude/.idd session state 進版控 成立 已修:state/attachments 出版控 + gitignore(issue-runs/local.json 依 IDD 契約保留)

殘留 follow-up

Verdict: verify-gated PASS — ready to merge(merge 後跑 /idd-close 結案,勿用 auto-close trailer)

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