fix(ux): Phase 4 — ?s= 注文の受取先開示・掟 8 の a11y 名修正・Lighthouse 対象拡大・SIWE uri 束縛・決済ログ日次分割 (10 件) - #431
Merged
Merged
Conversation
…i 束縛・決済ログの日次分割 2026-09-02 コードレビュー Phase 4 (D1/D3/D4/D5/D6/D7/D11/C11/C12/C2)。 D1 (P1) MobileOrderView: 自己完結の ?s= 注文トークンは店名/アイコン/SNS/受取先を QR 作成者が自由に書けるのに受取先が一切表示されなかった。handle が無い経路にだけ shortAddress(config.receiver) と「QR に含まれる申告」である旨を出す。@handle 経路は不変。 D3 (P2) 注文メモは orderId (受注リレー + @handle) 経由でしか店主に届かないため、 ?s= 注文では入力しても届かない。textarea を handle && env.enableOrderRelay で閉じる。 D4 (P2) MobileOrderCartBar: カートトグルの aria-label が可視テキスト (点数 + ラベル + 総額) を上書きしていた (WCAG 2.5.3 / 掟 8)。aria-label を外し a11y 名を可視テキストから 導出する (aria-expanded は維持)。 D5 (P2) CopyableField: button の aria-label が可視ハッシュを落としていた + 汎用要素 (span) への aria-label は無効 ARIA。両方外し、sr-only テキストで補う。 D6 (P2) .lighthouserc.json に /ja/checkout (e2e fixture 由来の静的 URL) と /ja/scan を追加。 どちらも認証・flag 不要で描画される。color-contrast は off のまま。 D7 (P2) @handle の meta description が bio.slice(0, 90) でサロゲートを割っていた。 stripControlChars + truncateGraphemes (既存 export) に置換。 D11 (P3) 店舗情報の lucide アイコンを aria-hidden にし、項目名を sr-only テキストへ。 C11 (P3) 認証必須 GET (handle / order feed / order token / order calls / freee status) の 成功応答に Cache-Control: private, no-store を付与。 C12 (P3) SIWE の uri が未検証だった。domain と同じ許可リスト + https (localhost のみ http) を要求し、不一致は invalid_message で弾く。route は純粋コア呼び出しのままで変更なし。 C2 (P2) /api/log/payment: (1) errorMessage を 500 字で切詰め (拒否しない)、 (2) 日次パーティション openpay:payments:log:YYYYMMDD へ二重書き + TTL 400 日 (レガシー単一リストへの LPUSH は据え置き = export/stats 不変)、 将来 reader 用に lib/paymentLog へ paymentLogDailyKey / listPaymentLogKeys を追加、 (3) limiter key を hashIp(clientIp(req)) に変更 (IP_HASH_SECRET 未設定時のみ 従来の anonymizeIp に fallback・60/60 は不変)。 検証: typecheck / eslint(変更ファイル) / full vitest (461 files・9072 tests 全 pass) / next build 成功。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015CNMEwurCJNTrzvr2qypSd
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
背景
第 5 回全コードベースレビュー Phase 4 (a11y / UX / 観測)。実装 Opus 5 (worktree)・監査 Fable 5.1 (main へ rebase・full vitest・build・bundle 予算・実機スクショ)。
変更
MobileOrderView: 印刷 QR (?s=・handle 無し) の注文ページに「受取先 0x1111…1111」と「この店舗情報は QR に含まれる申告です。受取先をご確認ください」を店名直下に表示 (@handle 経路は不変)。偽ステッカー QR への識別材料.lighthouserc.jsonに /ja/checkout と /ja/scan を追加 (決済系ページが掟 8 のガード対象に。prod build で 200 を確認)Cache-Control: private, no-storelib/siwe.ts: SIWE の uri を domain と同じ許可リスト + https (localhost のみ http) で束縛/api/log/payment: errorMessage 500 字で切り詰め・日次キーopenpay:payments:log:YYYYMMDD(TTL 400 日) を追加書込 (legacy キーは不変)・limiter を hashIp(clientIp) に検証 (Fable 側)
npm run buildOK・bundle 予算据え置き (/pay 438/438・/tip 436/436)公開文言 (merge 前に確認をお願いします・MobileOrder namespace)
viewReceiverLabelja「受取先」/ en "Receiving address"viewReceiverNoticeja「この店舗情報は QR に含まれる申告です。受取先をご確認ください」/ en "Shop details come from the QR itself. Please check the receiving address."money-path 不変。
🤖 Generated with Claude Code
https://claude.ai/code/session_015CNMEwurCJNTrzvr2qypSd