Skip to content

refactor(qr): QR 生成画面を金額・受取先・設定・プレビューの節に分割し URL 導出は親に残す (R11b) - #618

Merged
cipherwebllc merged 1 commit into
mainfrom
fix/r6-r11b-qr-generator
Sep 24, 2026
Merged

cipherwebllc merged 1 commit into
mainfrom
fix/r6-r11b-qr-generator

Conversation

@cipherwebllc

Copy link
Copy Markdown
Owner

概要

第 6 回レビュー Phase 6 (完全リファクタ) の R11b です (指摘 F14)。挙動を変えない抽出だけです。
1,425 行の QrGenerator (支払い QR の作成画面) を 691 行にし、表示の節を components/qr/ に移します。

module 行数
QrAmountSection.tsx 277
QrReceiverSection.tsx 138
QrSettingsSection.tsx 290
QrPreviewSection.tsx (下部 bar・空状態を含む) 226
QrSummaries.tsx 56
qrDownload.ts 51
  • 原本の行範囲をそのまま写したので、字下げと export 以外は同一です。原本の 1,425 行はすべて行き先を確認しています。
  • 次は親に残しました: hydration、支払い URL・EIP-681・gas の導出、着金の監視、前回 QR の保存、qrRef、プレビューの modal と印刷/download、すべての状態。
  • 親が 600 行を超えるのは、残る約 90 行が「移さない」対象か controller の処理だからです。

公開文言・DOM・生成する支払い URL・localStorage は変わりません。

固定と検証 (base = main に rebase 済み)

  • 支払い URL の完全一致 fixture 15 件 (宛先・金額・chain・gas・分割・FX・cross-chain の opt-out) を追加しました。宛先・金額・chain・gas・分割・FX のどれを誤っても落ちます。
  • 次も固定しました: 節ごとの DOM (ja/en)、10 種類の再描画での要素の同一性とフォーカス、下部 bar の再描画条件、modal の再表示、FX の期限、SVG/PNG の download と印刷。
  • 固定したテストは、旧実装でも同じ file のまま通ります (33/33)。
  • DOM の hash は、第三者の SVG (lucide の icon と QR の path) の中身を除いて取っています。icon の版を上げても落ちず、自前の class や属性の変更は検出します。
  • 別セッションの Opus 5.5 のレビュー: approve-with-fixes → 修正済み。わざと壊した変更 18 通りを試し、テストが検出することを確認しました。
  • typecheck 0 / eslint 0 / full vitest 14,122 pass / build OK (/create 349 kB・+1 kB・予算内) / 実 Lua は対象外

既存の挙動 (本 PR では変えない・B-R11d)

  • 親を再描画するたびに、QR の modal が dialog に focus を戻します。
  • 下部 bar の再描画の effect は、bar の初回表示では動きません。
  • 固定から金額指定に切り替えると、金額入力が作り直されます。
  • FX の期限切れは注意表示だけです。

🤖 Generated with Claude Code

https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
openpay Ignored Ignored Preview Sep 24, 2026 10:38am UTC

Request Review

第 6 回レビュー Phase 6 の R11b (F14)。1,425 行の QrGenerator を 691 行にし、金額・受取先・
設定・プレビュー・要約の節と download helper を components/qr/ に移す (原本の行範囲を
そのまま写し、字下げと export 以外は同一)。hydration・支払い URL/EIP-681/gas の導出・
着金監視・前回 QR の保存・qrRef・プレビューの modal と印刷/download は親に残す。
支払い URL の完全一致 fixture (宛先・金額・chain・gas・分割・FX・cross-chain の opt-out) と
節ごとの DOM・再描画での同一性を旧実装で固定した。

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc
@cipherwebllc
cipherwebllc force-pushed the fix/r6-r11b-qr-generator branch from e808f7c to b0bf91e Compare September 24, 2026 10:38
@cipherwebllc
cipherwebllc merged commit 21b4725 into main Sep 24, 2026
9 of 10 checks passed
@cipherwebllc
cipherwebllc deleted the fix/r6-r11b-qr-generator branch September 24, 2026 13:14
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