refactor(payment): Pay/Checkout/Tip の送信ガードをフォーム別の純関数に、手数料内訳を行モデルに (R14・掟 15) - #632
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
cipherwebllc
force-pushed
the
fix/r6-a2c-checkout-binding
branch
from
September 24, 2026 14:40
776e6c8 to
2c45570
Compare
…4・掟 15)
第 6 回レビュー Phase 6 の R14 (F14・F8)。3 フォームの canSubmit/paymentReady 系の式を
lib/paymentFlowGuards/{pay,checkout,tip}.ts のフォーム別 policy に移す (12/11/12 宣言・
byte 単位で同一・意図的な差 = Tip の route 限定ロックと完了後の許可と動的 standard engine 待ち、
Checkout の受付中は canSubmit だけ閉じて await 後に再確認、Pay の FX 期限)。手数料の内訳行は
components/PaymentBreakdownRows.tsx の行モデルと breakdownRow() で同じ Row/InfoTooltip を
同じ位置に返す (ラベル・金額・wrapper は各フォームに残す)。旧コードで採った pin: 真理値表
(harness だけ変更)・送信 43 行×3・競合 (double click / await 中の chain 切替・切断・同店 hold)・
ja/en の内訳 snapshot 144・呼び出しの省略記法と UI 出力の固定。
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc
cipherwebllc
force-pushed
the
fix/r6-r14-payment-guards
branch
from
September 24, 2026 21:55
7b47d1c to
591a0d3
Compare
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.
概要
第 6 回レビュー Phase 6 (完全リファクタ) の R14 です (指摘 F14・F8)。挙動を変えない抽出だけです。
#607 (A2c) の上に積んだ PR で、base は A2c のブランチです。A2c の merge 後に main へ付け替わります。
送信ガード
PaymentForm・CheckoutForm・TipFormの送信可否の式を、フォーム別の純関数lib/paymentFlowGuards/{pay,checkout,tip}.tsに移しました (型だけtypes.tsで共有)。各フォームは自分の policy を毎 render で 1 回呼びます。canSubmitだけを閉じ、paymentReady(A2c の同じ店の停止を含む) は onSubmit が await の後に読み直します。Pay は FX の期限を見ます。手数料の内訳行
components/PaymentBreakdownRows.tsxに行モデル{label, value, tooltip?, strong?}とbreakdownRow()を置き、同じ<Row>/<InfoTooltip>を同じ位置に返します。ラベル・金額・wrapper は各フォームに残し、Checkout のモバイル gasless の gas 行は従来どおり出しません。手数料の計算や文言のセットは共有していません (掟 14)。固定と検証 (base = A2c @ 776e6c8)
🤖 Generated with Claude Code
https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc