Conversation
- Refactor Gs1DatabarTool into BarcodeCard + parent component - Add card-based UI: add/remove up to 10 barcodes independently - Add bulk ZIP download (SVG + PNG per barcode) via jszip - Add jszip dependency and document in SPEC.md / decisions.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ignore-scripts: block malicious postinstall scripts - min-release-age=7: reject packages published within 7 days - save-exact=true: pin exact versions on npm install - README: npm install → npm ci for reproducible, lockfile-strict installs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deploying devtools with
|
| Latest commit: |
0794059
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a8159164.devtools-d9w.pages.dev |
| Branch Preview URL: | https://develop.devtools-d9w.pages.dev |
push to develop already fires via pull_request trigger when a PR is open. Keep push trigger only on main for post-merge validation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 26, 2026
Merged
fumtas1k
added a commit
that referenced
this pull request
May 2, 2026
…xt 必須を明示 レビュー [major] #1: applyProductionCsp が違反を実際に検知できる保証がない 点に対し、外部 origin の <script src> 注入で意図的に CSP 違反を発生させ guard.violations が確実に増えることを確認するメタテストを追加。これを 追加する過程で、default の `page` / `context` test fixture では page.route 介入が成立しない事象が発覚 (Astro dev server 経路で再現)。 従来 PR で追加したリグレッション防止テスト自体も実は CSP が効いておらず cfworker が eval しないので偶然 green になっていた状態だった。 両テストを browser.newContext() 経由の新規コンテキストに切り替え、 applyProductionCsp が初回ナビゲーションから確実に介入するように修正。 helper の JSDoc にこの制約を明記し、同じ事故を踏まないようにする。 合わせてレビュー [minor]: - CspGuard.dispose() を追加し、page.unroute / page.off で listener を解除 できるようにする (将来 fixture 化したときの hook) - 違反検出メッセージの正規表現が Chromium 固有である点を JSDoc 明記 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
4 tasks
fumtas1k
added a commit
that referenced
this pull request
May 2, 2026
…ト追加 (#233) * fix(config-converter): スキーマ検証を @cfworker/json-schema へ差し替え CSP unsafe-eval 違反を解消 Cloudflare Pages 本番で「JSON Schema で検証する」が CSP `unsafe-eval` 拒否でエラーになっていた。Ajv 8.x はスキーマを `new Function()` で JIT コンパイルする設計で、本番 CSP (script-src 'self' 'unsafe-inline') と非互換。 interpreter 実装で eval / new Function を使わない @cfworker/json-schema へ差し替え、CSP 緩和なしに同等以上の draft 4/7/2019-09/2020-12 対応を 得る。$schema URI から draft 検出(既定 draft-07)。formats は draft 規定の定義に従い ajv-formats なしで評価。 挙動差: 仕様準拠のため未知のキーワード (旧 strict:true 検出) は無視。 詳細・選定根拠は docs/decisions.md [061] を参照。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(csp): PRODUCTION_CSP を src/utils/csp.ts に集約し _headers と同期テスト追加 E2E ヘルパーから本番相当 CSP を再利用するため、_headers の CSP 文字列を TypeScript の定数 (PRODUCTION_CSP) として src/utils/csp.ts にミラーし single source of truth とする。 src/utils/__tests__/headers.test.ts に「_headers の Content-Security- Policy 値が PRODUCTION_CSP と完全一致する」アサーションを追加し、 片方だけ更新する事故を Vitest で即時検出する。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * test(e2e): 本番相当 CSP 注入ヘルパー applyProductionCsp と config-converter デグレ防止テスト追加 playwright.config.ts は npm run dev で起動し dev server は public/_headers を解釈しないため、本番でしか効かない CSP 違反 (今回の Ajv unsafe-eval) が CI 素通りしていた既知の穴を塞ぐ。 tests/e2e/helpers.ts に applyProductionCsp(page) を追加: - page.route で HTML 文書のレスポンスに PRODUCTION_CSP を注入 - console error / pageerror から CSP 違反メッセージを収集し assertNoViolations() で test failure へ昇格 tests/e2e/config-converter.spec.ts に「本番相当 CSP 下でも検証成功 し違反が出ない」シナリオを追加。Ajv 時代に発生した本番限定不具合を CI で確実に再現できることを実証。 射程は当初 config-converter のみ。他ツールへの拡大は別 issue で議論。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * docs(decisions): [061] config-converter CSP unsafe-eval 修正と検知ゲート追加を記録 決断 A (Ajv → @cfworker/json-schema 差し替え) と B (E2E に本番相当 CSP を注入するリグレッション検知ゲート追加) の選定根拠と却下案 (unsafe-eval 緩和 / Ajv standalone / @hyperjump/json-schema / wrangler pages dev / meta タグ) を整理。 [054] で「将来課題」とした dev/preview 非適用 CSP の検知穴を、 本決定で具体化して塞いだことを明記。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * docs(decisions): [061] から #176 の過剰参照を削除 #176 は CSP `'unsafe-inline'` 削減の親 issue で、本件 (`'unsafe-eval'` 拒否による Ajv 不適合) とは別ディレクティブの話。直接の関係はないため [061] の「関連 PR / issue」と「却下した選択肢」内の #176 への言及を削除し、 unsafe-eval 緩和却下の理由を「allow-list を緩める影響」に絞って書き直した。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(e2e): applyProductionCsp に陽性対照テストと dispose API + browser.newContext 必須を明示 レビュー [major] #1: applyProductionCsp が違反を実際に検知できる保証がない 点に対し、外部 origin の <script src> 注入で意図的に CSP 違反を発生させ guard.violations が確実に増えることを確認するメタテストを追加。これを 追加する過程で、default の `page` / `context` test fixture では page.route 介入が成立しない事象が発覚 (Astro dev server 経路で再現)。 従来 PR で追加したリグレッション防止テスト自体も実は CSP が効いておらず cfworker が eval しないので偶然 green になっていた状態だった。 両テストを browser.newContext() 経由の新規コンテキストに切り替え、 applyProductionCsp が初回ナビゲーションから確実に介入するように修正。 helper の JSDoc にこの制約を明記し、同じ事故を踏まないようにする。 合わせてレビュー [minor]: - CspGuard.dispose() を追加し、page.unroute / page.off で listener を解除 できるようにする (将来 fixture 化したときの hook) - 違反検出メッセージの正規表現が Chromium 固有である点を JSDoc 明記 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(schema-validator): 空 error 既定値と未対応 draft fallback 回帰防止テスト レビュー [nit] #4: cfworker の OutputUnit.error が null/undefined だった 場合、UI 側の `<strong>{path}</strong>: {message}` が `/path: ` で右辺空に 崩れる。toLegacyError に既定値「検証失敗(詳細なし)」を入れて UX を安定化。 レビュー [minor] #3: detectDraft は未対応 draft URI (例: draft-06) を silent に draft-07 へ fallback するが、現状テストで意図表明されていなかった ため、将来仕様変更時の意図確認用として draft-06 入力に対する fallback 挙動の回帰防止テストを 1 本追加。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * docs(decisions): [061] に follow-up issue #234 / #235 を追記 レビュー [nit] #6: 「他のツールへ広げるか否かは別 issue で議論」が issue 番号未記載で shared-agent-rules.md 6.4 章 (deferral 時は番号明記) に違反 していた。CSP gate 全 spec 展開の追跡として #234 を、cfworker 移行で 失われた未知キーワード等の検出能力を「スキーマ lint」として復活させる 追跡として #235 を、それぞれ該当箇所に引用追加。 レビュー [major] #2: Ajv strict 喪失の UX 後退に対し、UI 注記追加か追跡 issue 起票かの選択で issue 起票ルートを採用 (#235)。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
fumtas1k
added a commit
that referenced
this pull request
May 2, 2026
…iew) Should-fix #1 対応: - disabledBgMap / disabledBorderMap を Record から Partial<Record<Variant, string>> へ - 上書きが必要な variant (secondary の bg / primary・secondary の border) のみ定義 - fallback (bg=colors.bgSubtle, border=borderMap[variant]) を ?? で明示 - 'default / danger は borderMap と同値' のような暗黙的 noop 定義を排除 - 振る舞い不変 (561 件のユニットテストは全件 pass のまま)
4 tasks
fumtas1k
added a commit
that referenced
this pull request
May 3, 2026
* feat(ui): ActionButton に secondary variant を追加 (#231) DownloadButton 再構成の前段として、透過背景 + primary ボーダー/文字色の secondary variant を ActionButton に追加。 既存 default / primary / danger の挙動には影響しない。 * refactor(ui): DownloadButton を ActionButton の薄ラッパーに再構成 (#231) - 独自の onMouseEnter/onMouseLeave による background 直接操作を削除 - hover:opacity-90 className も削除 (ui-conventions 2.1 章と整合) - loading prop を新規追加 (ActionButton 経由で aria-busy / disabled 統合) - 未使用だった className prop を除去 - 既存呼び出し側 (QrCode/JanCode/Gs1Databar/JsonCsv/EncodingConverter/ ConfigConverter/qr-ticket GenerateTab/DownloadButtonGroup) は API 互換 * docs(plan): #231 DownloadButton ラッパー化の実装計画を追加 * fix(ui): ActionButton の disabled 時 styling を variant 別に分離 (#231 review) PR #236 review major 指摘 2 件 + minor 指摘 1 件への対応: - disabled 時の bg/border を disabledBgMap / disabledBorderMap で variant 別に上書き - primary disabled: border を bg と同色にして不可視化 (旧 DownloadButton primary の border:none 相当) - secondary disabled: 背景透過 + グレーボーダーを維持 (旧 DownloadButton secondary 復元) - default / danger は現状維持(リグレッションなし) - ActionButton.test.tsx に disabled 4 ケース、DownloadButton.test.tsx に 2 ケース追加してデグレを CI でガード * refactor(ui): ActionButton の disabled マップを Partial 上書き構造に整理 (#231 review) Should-fix #1 対応: - disabledBgMap / disabledBorderMap を Record から Partial<Record<Variant, string>> へ - 上書きが必要な variant (secondary の bg / primary・secondary の border) のみ定義 - fallback (bg=colors.bgSubtle, border=borderMap[variant]) を ?? で明示 - 'default / danger は borderMap と同値' のような暗黙的 noop 定義を排除 - 振る舞い不変 (561 件のユニットテストは全件 pass のまま)
fumtas1k
added a commit
that referenced
this pull request
May 3, 2026
レビュー指摘 #3 #4 への対応: - shared-agent-rules.md 6.2: 「`origin/develop` 起点を必ず明示」の理由(PR #154/#181 既知問題)と playbook 1.1 章へのポインタを追加 - playbooks/e2e-validation.md 2.1: ステップ 0 のコマンド列が広すぎたので説明文を表外の引用ブロックへ移動 - playbooks/pr-creation.md 4: PR 作成コマンドの一時ファイルパス例に `$TMPDIR/pr_body.md` を併記(`/tmp/claude/` も併記、permissions allow/ask の理由を明示) レビュー指摘 #1 (SSOT 明示) と #2 (参照チェッカ機械化) は別 issue で対応予定。
3 tasks
fumtas1k
added a commit
that referenced
this pull request
May 3, 2026
* docs(rules): playbooks/ と setup/ 配下にタスク手順書・環境セットアップを切り出す shared-agent-rules.md の肥大化対策として、以下 4 ファイルを新設: - docs/playbooks/pr-creation.md: ブランチ作成→検証→PR→マージの完全手順 - docs/playbooks/e2e-validation.md: E2E 実行手順・push 前チェックリスト・失敗判定 - docs/setup/plugins.md: Claude Code プラグイン install ガイド (Web silent fail / context7 403 / API キー) - docs/setup/gemini-policy.md: Gemini security policy symlink セットアップ 「常時必読の規約」と「タスク開始時に読む手順書」を物理的に分離し、 セッション毎に必要な情報量を減らすのが狙い。 * docs(rules): CLAUDE.md / GEMINI.md / shared-agent-rules.md を新ファイル参照型に圧縮 肥大化していた常時ロード対象ファイルを以下の方針でスリム化: - CLAUDE.md: 80→46 行。プラグイン install トラブル詳細を docs/setup/plugins.md へ移動 - GEMINI.md: 53→39 行。security policy symlink 手順を docs/setup/gemini-policy.md へ移動 - shared-agent-rules.md: 365→258 行。以下を移動: - 旧 3 章(E2E 実行手順)→ docs/playbooks/e2e-validation.md - 旧 6.2 / 6.2a(ブランチ作成詳細)と 3.2 親 push チェックリスト → docs/playbooks/pr-creation.md - 旧 8 章(UI 目視確認)→ docs/ui-conventions.md 3.1 章に統合 - 旧 10 章 → 9 章、旧 11 章 → 10 章、旧 12 章 → 11 章 に章番号を繰り上げ - agent-lessons.md の章番号参照を新番号に追従 各章末尾に「詳細手順 → docs/playbooks/X.md」のポインタを残して双方向リンク化。 * docs(rules): PR #240 レビュー指摘の軽微対応(「なぜ」補足 / 表幅 / TMPDIR 例示) レビュー指摘 #3 #4 への対応: - shared-agent-rules.md 6.2: 「`origin/develop` 起点を必ず明示」の理由(PR #154/#181 既知問題)と playbook 1.1 章へのポインタを追加 - playbooks/e2e-validation.md 2.1: ステップ 0 のコマンド列が広すぎたので説明文を表外の引用ブロックへ移動 - playbooks/pr-creation.md 4: PR 作成コマンドの一時ファイルパス例に `$TMPDIR/pr_body.md` を併記(`/tmp/claude/` も併記、permissions allow/ask の理由を明示) レビュー指摘 #1 (SSOT 明示) と #2 (参照チェッカ機械化) は別 issue で対応予定。
This was referenced May 3, 2026
fumtas1k
added a commit
that referenced
this pull request
May 7, 2026
…ld-key DRY-up #275 review feedback (#2 / #4) への対応: - JwtDecoder.tsx: section-jwt-${variant} の template literal を SECTION_CLASSES const map 化。grep 性向上 + 同 PR 内の FIELD_CLASSES pattern との一貫性確保 (review #4)。 - global.css `.uuid-field-key`: caption (font-size 以外) と同値の 4 値を 自前で持っていた self-contained 実装を、caption 継承 + font-size override に DRY-up。caption typography が将来変わったとき自動追従 (review #2)。 - UuidV7Generator.tsx: 上記の caption 継承に合わせ <span> の className を "text-muted uuid-field-key" → "caption text-muted uuid-field-key" に。 review #1 (.section-jwt-payload の hex token 化) は spec D2 に従い PR 6 cleanup へ deferr (decisions [067] 候補)。 review #3 (browser.newContext ラッパ helper 化) は別 issue 起票で PR 5 前段 infra PR として対応予定。 ref: #275 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
fumtas1k
added a commit
that referenced
this pull request
May 7, 2026
…ne style 撤去 + #262 partial (#275) * chore(spec): #176 B 案 PR 3 spec / plan / global.css foundation Phase 0: spec / plan 配置 + global.css @layer components に JwtDecoder + UuidV7Generator migration 用 class 16 件を追加。 追加 class: - section-jwt-{header,payload,signature} - jwt-json-{key,value} - jwt-pre / accent-link - text-warning / bg-warning-tint - uuid-field-{ts,ver,rand-a,var,rand-b} - uuid-field-{key,bits} Phase 1 (sonnet 並列) で JwtDecoder / UuidV7Generator + uuid-v7 E2E の migration を進める。 ref: docs/projects/issue-176-b-plan-progress.md Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(tools): #176 B 案 PR 3 — JwtDecoder.tsx inline style 撤去 Section component の accentColor prop を variant prop (header / payload / signature の discriminated union) に変更。expBadge / sigBadge の style オブジェクトを badgeClass 文字列に変更。<pre> typography を .jwt-pre class に集約。checkbox accent-color を .accent-link class に置換。 import { bodyEmphasis, caption, colors } from '@/utils/styles' を削除。 ref: docs/superpowers/specs/2026-05-07-issue-176-b3-jwt-uuid-design.md §1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor(tools): #176 B 案 PR 3 — UuidV7Generator.tsx inline style 撤去 FIELD_COLORS const を FIELD_CLASSES const に refactor し、ColoredUuid / FieldBreakdownPanel の動的色を class 切替で表現。inline style 20 件を @layer components の class + Tailwind utility に置換。 import { bodyEmphasis, caption, colors } from '@/utils/styles' を削除。 ref: docs/superpowers/specs/2026-05-07-issue-176-b3-jwt-uuid-design.md §2 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(e2e): #176 B 案 PR 3 — uuid-v7 spec に applyProductionCsp gate 追加 (#262 partial) PR 6 で style-src 'unsafe-inline' を削除した際の CSP 違反を能動検出する ため、tests/e2e/uuid-v7.spec.ts の全 test を browser.newContext() pattern に変更し applyProductionCsp(page) を goto 前に挿入。陽性対照 1 件追加 (script-src 違反で gate 動作確認、config-converter.spec.ts 既存 pattern 踏襲)。 ulid-generator 部分は PR 5 で対応して #262 close 予定。 ref: docs/superpowers/specs/2026-05-07-issue-176-b3-jwt-uuid-design.md §3 ref: #262 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(migration): MIGRATED_FILES に PR 3 対象 2 件追加 JwtDecoder.tsx / UuidV7Generator.tsx の inline style 撤去完了に 伴い progressive migration tracker に追加 (16 → 18 件)。 ref: docs/superpowers/specs/2026-05-07-issue-176-b3-jwt-uuid-design.md §5 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(tools,ui): #275 review 対応 — SECTION_CLASSES map 化 + uuid-field-key DRY-up #275 review feedback (#2 / #4) への対応: - JwtDecoder.tsx: section-jwt-${variant} の template literal を SECTION_CLASSES const map 化。grep 性向上 + 同 PR 内の FIELD_CLASSES pattern との一貫性確保 (review #4)。 - global.css `.uuid-field-key`: caption (font-size 以外) と同値の 4 値を 自前で持っていた self-contained 実装を、caption 継承 + font-size override に DRY-up。caption typography が将来変わったとき自動追従 (review #2)。 - UuidV7Generator.tsx: 上記の caption 継承に合わせ <span> の className を "text-muted uuid-field-key" → "caption text-muted uuid-field-key" に。 review #1 (.section-jwt-payload の hex token 化) は spec D2 に従い PR 6 cleanup へ deferr (decisions [067] 候補)。 review #3 (browser.newContext ラッパ helper 化) は別 issue 起票で PR 5 前段 infra PR として対応予定。 ref: #275 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * docs(progress): #176 B 案 PR 3 (#275) の状態と follow-up を反映 PR #275 がまだ open のため merge 後の chore PR 待ちにすると follow-up の persist が遅延する。本 PR 内で SoT を更新して PR 5 着手時に確実に拾えるようにする。 更新内容: - 進捗状況テーブル: PR 3 を 🔄 PR open + #275 link に変更、 scope に "+ #262 partial" を追記 - 着手済 PR の prerequisite / 同梱 issue 履歴: PR 3 (#275) を新設 - #262 (PR 内 partial、close は PR 5 で) - #276 (review 由来 follow-up、PR 5 前段 infra PR) - follow-up issue 処理タイミング表: タイトルを PR 1〜3 に拡張、 日付 2026-05-04 → 2026-05-07、#262 を "PR 5 で close" に更新、 #276 を新規行追加 - PR 6 必須チェックリスト: follow-up リストに PR 3 由来 (#276) を追加、 #262 description を partial 反映に更新 ref: #275 ref: #276 ref: #262 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
fumtas1k
added a commit
that referenced
this pull request
May 7, 2026
PR #278 review 提案 #1 への対応。helpers.ts の `applyProductionCsp` JSDoc が inline pattern を「使い方」として提示していたが、本 PR で導入した `withProductionCsp` ラッパが通常テストの canonical となったため、 読者が誤解しないよう以下を反映: - 冒頭に「low-level primitive — 通常テストは withProductionCsp を使うこと」 を `{@link withProductionCsp}` で明示 - 「使い分けの方針」セクションを新設し、通常テスト = withProductionCsp / 陽性対照メタテスト = 本関数 inline pattern と書き分け - inline pattern の使用例を陽性対照メタテストの canonical (`expect.poll(() => guard.violations.length).toBeGreaterThan(0)`) に変更 - 「ゲート自体の動作確認」言及先を 1 spec から 2 spec (uuid-v7.spec.ts / config-converter.spec.ts) に拡張 挙動変更なし、ドキュメンテーションのみ。
6 tasks
fumtas1k
added a commit
that referenced
this pull request
May 7, 2026
… を集約 (#278) * docs(test): #276 withProductionCsp ヘルパ集約の spec / plan を追加 PR 5 着手前の独立 infra PR として `tests/e2e/helpers.ts` に `withProductionCsp(browser, path, fn)` ラッパを追加し、PR 3 で `uuid-v7.spec.ts` / `config-converter.spec.ts` に増殖した 9 行 boilerplate を 1 行に集約する設計書と実装計画を配置。 陽性対照メタテスト 2 件は guard.violations を fn 内で polling する 特性上、ラッパに包めず inline pattern を維持する方針を spec に明示。 * feat(test): #276 withProductionCsp ラッパを helpers.ts に追加 `browser.newContext` + `applyProductionCsp` + `goto` + `waitForReactHydration` + 終端 `guard.assertNoViolations()` + `context.close` を 1 関数で集約するヘルパを追加。本コミットでは helper 追加のみで既存テストへの書換は行わない (Phase 1.5 で順次)。 陽性対照メタテストは `guard.violations` を fn 内で polling する 特性上、ラッパに包めない旨を JSDoc に明示。 * refactor(test): #276 uuid-v7.spec.ts の通常 5 件を withProductionCsp に集約 `browser.newContext` + `applyProductionCsp` + `goto` + `waitForReactHydration` + 終端 `guard.assertNoViolations()` + `context.close` の 9 行 boilerplate を削除し、`withProductionCsp(browser, '/tools/uuid-v7', async (page) => { ... })` 1 行に集約。 陽性対照メタテスト (`applyProductionCsp は実際に CSP 違反を捕捉する`) は `guard.violations` を fn 内で polling する特性上、ラッパに包めない ため inline pattern を維持 (1 文字も変更せず)。 import から `waitForReactHydration` を削除 (通常テストではラッパ内部 で呼ばれ、陽性対照では未使用)、`withProductionCsp` を追加。 * refactor(test): #276 config-converter.spec.ts のリグレッション防止 1 件を withProductionCsp に集約 `JSON Schema 検証パネル: 本番相当 CSP 下でも検証が成功し違反が出ない(リグレッション防止)` の 9 行 boilerplate を `withProductionCsp(browser, '/tools/config-converter', async (page) => { ... })` 1 行に集約。 Ajv `new Function` JIT による事故経緯のコメントは保持。`browser.newContext` 強制の理由付け段落はラッパの JSDoc に集約済みのため 1 行に圧縮。 陽性対照メタテスト (`applyProductionCsp は実際に CSP 違反を捕捉する`) は inline pattern を維持。`beforeEach` で `waitForReactHydration` を 使用継続するため import は 3 つすべて保持し、`withProductionCsp` を追加。 * chore(docs): #276 progress tracker を closed 状態に更新 (#278) PR 3 follow-up の `withProductionCsp` ラッパ helper 集約 (#276) は PR #278 で closed。SoT を 3 箇所同期更新: - 「着手済 PR の prerequisite / 同梱 issue 履歴」 PR 3 (#275) 節の follow-up entry - 「follow-up issue 処理タイミング表」 #276 行の状態 / 備考 - 「PR 6 必須チェックリスト」 PR 3 由来 line 中の #276 言及 * docs(test): #276 applyProductionCsp の JSDoc を low-level primitive 明示に改訂 PR #278 review 提案 #1 への対応。helpers.ts の `applyProductionCsp` JSDoc が inline pattern を「使い方」として提示していたが、本 PR で導入した `withProductionCsp` ラッパが通常テストの canonical となったため、 読者が誤解しないよう以下を反映: - 冒頭に「low-level primitive — 通常テストは withProductionCsp を使うこと」 を `{@link withProductionCsp}` で明示 - 「使い分けの方針」セクションを新設し、通常テスト = withProductionCsp / 陽性対照メタテスト = 本関数 inline pattern と書き分け - inline pattern の使用例を陽性対照メタテストの canonical (`expect.poll(() => guard.violations.length).toBeGreaterThan(0)`) に変更 - 「ゲート自体の動作確認」言及先を 1 spec から 2 spec (uuid-v7.spec.ts / config-converter.spec.ts) に拡張 挙動変更なし、ドキュメンテーションのみ。 * chore(docs): #279 #280 #281 を follow-up 表 / PR 6 必須チェックリストに追加 PR #278 review feedback で起票した 3 follow-up issue を progress tracker に登録、毎セッションでの自動リマインダ化。3 件いずれも event 駆動 / 低優先度のため deadline は持たないが、特に #281 は PR 5 着手前再確認の soft anchor が必要なため備考で明示。 - follow-up 表のタイトルを `... / PR #278 (infra)` 拡張 - table に 3 行追加 (#279 #280 #281) - PR 6 必須チェックリスト follow-up 言及行に「前段 infra PR (#278)」 を追加し、`PR #278 由来` 子バレットで 3 件 link
fumtas1k
added a commit
that referenced
this pull request
May 7, 2026
…GRATED_FILES 削除を明記 レビュー指摘 #1 (要対応): QrCode SVG 描画コンテナの w-50 h-50 を w-[200px] h-[200px] (arbitrary value) に変更。 w-50 h-50 は Tailwind v4 の `--spacing: 0.25rem` 下で 12.5rem に 展開され、ブラウザ root font-size が 16px のときのみ 200px になる。 ユーザが a11y 設定で root font-size を変更している場合 (例: 20px) は 250px に拡大されてしまい、原実装の固定 200px (`width: '200px'`, `height: '200px'`) と厳密に等価ではない。 arbitrary value w-[200px] h-[200px] は build 時静的 CSS となるため CSP-safe (PR 5a の `max-w-[400px]` と同 pattern)。固定 200px の 原意図を保持。 レビュー指摘 #3 (進捗 doc): PR 6 必須チェックリストの「MIGRATED_FILES を glob 化」項目に「glob 化後 array 自体は削除する (二重管理を避ける)」 を明示。 レビュー指摘 #2 (陽性対照 URL `.invalid` 化) は nit で reviewer 自身も skip 可と明言。3 spec (uuid-v7 / config-converter / ulid-generator) の一貫性を保つため本 PR では現状維持、別 PR で 3 箇所統一を検討。 検証: - astro check: 0 errors, 0 warnings - vitest: 731 passed (43 files) - e2e qr-code (5 件) + ulid-generator (6 件) 全 pass ref: #286 (comment) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
fumtas1k
added a commit
that referenced
this pull request
May 12, 2026
…unit test 追加 PR #407 レビュー指摘 #1 / #4 対応: - StatusIcon.tsx の warning variant 底辺ドットを 0 長 line + stroke round cap 依存から `<circle r="1.25" fill="currentColor" />` に置換。 PDF export / 古い WebKit でゼロ長 segment を skip する portability リスクを排除し意図も明示化 - StatusIcon / CloseIcon の unit test を新規追加。variant 別 SVG 切替 (polyline / line×2 / path+line+circle) / aria-hidden / size prop / className 継承の regression check で既存 UI コンポーネント test 規約と 整合 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
fumtas1k
added a commit
that referenced
this pull request
May 12, 2026
* feat(ui): StatusIcon / CloseIcon コンポーネントを追加 デバイス非依存の inline SVG アイコンコンポーネントを追加。 StatusIcon は success / error / warning の 3 variant を持ち、 CloseIcon は削除・閉じるボタン用の ✕ アイコン。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(tools): CharCount の絵文字を StatusIcon に置換 ✅ ❌ ⚠ を inline SVG (StatusIcon) に置き換え。 改行コード混在の ⚠ も warning variant の StatusIcon に変更し、 aria-hidden ラップなしで SR に読まれていた問題を解消。 ユニットテストのセレクタから ❌ を除去 (sr-only「不可」でマッチ)。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(tools): ConfigConverter / VerifyTab の絵文字を StatusIcon に置換 ConfigConverter のスキーマ検証成功 ✅ と、 VerifyTab のチケット検証結果 ✓ ✕ を StatusIcon に置き換え。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(tools): GenerateTab / Gs1Databar の記号を SVG に置換 GenerateTab のアコーディオン ▲▼ を chevron SVG (rotate-180 で切替) に、 行削除 ✕ を CloseIcon に置き換え。Gs1Databar の AI フィールド削除 ✕ も同様。 E2E セレクタを ▼ テキスト依存から role+name 取得に変更。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(pages): char-count.astro の説明文中の ❌ をテキストに置換 インライン絵文字 ❌ を <strong class="text-error">不可</strong> に変更。 React SVG コンポーネントのマウントが不要な説明文はテキスト表現で統一。 E2E セレクタを ✅ 絵文字依存から dt+dd ロケーターに更新。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(char-count): EncRow の inline-flex wrapper を削除し行高肥大を修正 inline-flex items-center で wrap すると baseline 計算が通常の inline span と 異なり dd.caption の line box が 23.8px を超えて拡張される問題を修正。 StatusIcon は inline-block align-middle を持つため、wrapper を外しても inline 配置でテキスト中央揃えは維持される。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * test(vrt): visual regression baseline を CI Linux runner で再生成 * fix(ui): StatusIcon warning dot を degenerate line から circle に + Icon unit test 追加 PR #407 レビュー指摘 #1 / #4 対応: - StatusIcon.tsx の warning variant 底辺ドットを 0 長 line + stroke round cap 依存から `<circle r="1.25" fill="currentColor" />` に置換。 PDF export / 古い WebKit でゼロ長 segment を skip する portability リスクを排除し意図も明示化 - StatusIcon / CloseIcon の unit test を新規追加。variant 別 SVG 切替 (polyline / line×2 / path+line+circle) / aria-hidden / size prop / className 継承の regression check で既存 UI コンポーネント test 規約と 整合 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * refactor(ui): GenerateTab の inline chevron SVG を ChevronIcon コンポーネントに抽出 PR #407 レビュー指摘 #2 対応: GenerateTab.tsx の accordion chevron (inline SVG 13 行) を `src/components/ui/ChevronIcon.tsx` に抽出。`open` prop で 180° 回転を 表現する API に揃え、StatusIcon / CloseIcon と粒度を一致させた 「アイコン規約整理 PR」の一貫性を確保する。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(a11y): VerifyTab / ConfigConverter の冗長 sr-only 接頭辞を削除 PR #407 レビュー指摘 #3 対応: StatusIcon の後に置いた `<span className="sr-only">期限切れ: </span>` 等が 直後の可視テキスト「有効期限切れ」と二重読み上げ (「期限切れ: 有効期限切れ」) を起こす a11y 退化を解消。 StatusIcon 自身は aria-hidden で読み上げ対象外、可視テキストが意味を 完結しているため sr-only 接頭辞を削除する。 対象: - VerifyTab.tsx: 「有効: / 期限切れ: / 無効: 」3 箇所 - ConfigConverter.tsx: 「成功: 」1 箇所 CharCount.tsx は「対応 10 byte」のように後続バイト数を含む意味があり sr-only テキストが必要なため変更しない (パターン分岐の理由は 本 PR の design rationale)。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * test(ui): ChevronIcon の unit test を追加 PR #407 再レビュー指摘の任意 observation 対応: `ChevronIcon` は前回指摘 #4 (StatusIcon / CloseIcon の test 追加) の 対象外だったが、後発で抽出した分 `open` prop による rotate 切り替えロジックを 持つため同等の unit test を追加し UI コンポーネント test 規約と完全に揃える。 7 ケース: - polyline 描画 / aria-hidden / currentColor - open=true で rotate-180 + transition-transform 付与 - open=false (default) で rotate-180 なし (transition は維持) - size prop (default 14) - className 継承 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This was referenced May 12, 2026
4 tasks
fumtas1k
added a commit
that referenced
this pull request
May 21, 2026
… を反映 レビュー対応: - should-fix #1: 陽性対照 #1 の `descenderApprox = 5` ハードコードを `Math.ceil(fontSize * 0.28)` の em 比に変更し fontSize 変更時の silent regression 穴を塞ぐ。コメントを「spec 下限の行動的検証」と「固定値 assertion」の責務分担として明確化 - should-fix #2: decisions [084] 「結果・トレードオフ」節に dark mode UI での白背景 rect 視覚調和トレードオフを 1 行追加 (decode 信頼性優先の意図明文化) - nice #1: `result.indexOf('>')` を `result.match(/<svg[^>]*>/)` に変更し SVG 属性値内に `>` を含むケースの誤切断 silent regression を防ぐ - nice #2: 白背景 rect に `data-role="bg"` 属性付与。E2E paddingwidth 陽性対照 filter を `fill === 'white'` から `data-role === 'bg'` に変更し、将来 bwip-js が `fill="white"` decorative rect を出すと誤除外する fragility を低減。unit test 陽性対照も併せて `data-role="bg"` を assert - nice #3: decisions [083] 「明確に否定された」結論行に `[084]` への forward reference を追加し過去 ADR を単独で読んだ保守者の誤認を防止 - nice #4: `quietZone = 9` (= 3X) を選択した経験則 (spec 下限 1X はマージン薄、12X 以上は視覚的に分離、3X は spec 3 倍マージンで頑健) をコメントとして残置 unit 42 件 (gs1-databar) / 全体 1310 件 / astro check 0 errors / format clean。 陽性対照の検知能力は全件維持または強化 (em 比化で fontSize 連動破綻、data-role anchor で identifier 強化)。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced May 24, 2026
fumtas1k
added a commit
that referenced
this pull request
May 28, 2026
整形・ツリー構築は再帰実装のため、極端に深いネストの JSON で RangeError (Maximum call stack size exceeded)になり、生の英語メッセージがエラー欄に 出ていた。processJson で RangeError を捕捉し「ネストが深すぎる」旨の日本語 メッセージに変換する。深いネスト入力での回帰テストを併設(レビュー指摘 #1)。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced May 28, 2026
Merged
This was referenced Jun 11, 2026
fumtas1k
pushed a commit
that referenced
this pull request
Jun 13, 2026
issue #663 PR レビュー指摘 #1 への対応。overlapResult は毎キーストローク再計算 されており、行エラー一覧の role="alert"(暗黙 assertive + atomic)がエラー継続中は 入力 1 文字ごとに全体を SR へ割り込み再読み上げしてしまう問題があった。 overlapInput を useDebouncedValue(300ms) で debounce してから計算することで、 打鍵が止まってから 1 度だけエラー一覧を更新する。エラー出現時の確実な通知 (role="alert")は維持しつつ、SR ユーザーへの chattiness を抑制する。 入力欄自体は即時の overlapInput を value に保つため打鍵応答は変わらない。
fumtas1k
added a commit
that referenced
this pull request
Jun 13, 2026
…665) * fix(a11y): aria/role 欠落を補完(JanCode/CidrCalculator/RegexMatchTester) issue #663 で検出した DADS 準拠監査の aria/role 欠落を補完する。 - JanCode: バーコード svg に role="img" を付与(QrCode と揃え、aria-label を accessible name として SR が確実に読めるようにする) - CidrCalculator: 重複検出モードの行エラー一覧に role="alert" を付与(親 aria-live の初期コンテンツ問題を回避し解析エラーを SR に確実に通知) - RegexMatchTester: クリック可能な mark に role="button" / tabIndex / aria-pressed / aria-label / onKeyDown を付与しキーボード・SR 操作可能にする 各修正に陽性対照 E2E を追加(属性・キーボード操作が外れると fail する設計)。 * fix(a11y): 重複検出の overlap 計算を debounce し role="alert" の冗長な再読み上げを抑制 issue #663 PR レビュー指摘 #1 への対応。overlapResult は毎キーストローク再計算 されており、行エラー一覧の role="alert"(暗黙 assertive + atomic)がエラー継続中は 入力 1 文字ごとに全体を SR へ割り込み再読み上げしてしまう問題があった。 overlapInput を useDebouncedValue(300ms) で debounce してから計算することで、 打鍵が止まってから 1 度だけエラー一覧を更新する。エラー出現時の確実な通知 (role="alert")は維持しつつ、SR ユーザーへの chattiness を抑制する。 入力欄自体は即時の overlapInput を value に保つため打鍵応答は変わらない。 --------- Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Jun 14, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.npmrcによるサプライチェーン攻撃対策を追加Changes
feat: GS1 DataBar 複数生成対応
BarcodeCardコンポーネントに分離し、親がカードリストを管理する構造に変更chore: サプライチェーン攻撃対策
.npmrcをプロジェクトルートに追加ignore-scripts=true: postinstall スクリプトによる任意コード実行を防止min-release-age=7: 公開7日未満のパッケージをブロックsave-exact=true: バージョン範囲の意図しない広がりを防止npm install→npm ciに変更(lockfile 厳守)docs
Test plan
npm run devで開発サーバーが起動するnpm run buildがエラーなく完了する🤖 Generated with Claude Code