Repository navigation
chore(i18n): 画面に描かれていない smart account の error の文を消す (PR-28a) - #1094
Merged
cipherwebllc merged 1 commit intoNov 13, 2026
Merged
Conversation
第 10 回レビューの片づけ (user 裁定 2026-11-12)。 IncompatibleSmartAccountError の i18nKey の 7 つの名前は、PaymentForm・TipForm・CheckoutForm の namespace に同じ名前の文を持っていた (3 namespace × 7 key = 21 個・ja と en)。3 フォームは i18nKey を errorPristineNoBootstrap かどうかの判定にだけ使い、文は SmartAccountFallback の namespace から出す (components/SmartAccountFallbackBanner.tsx)。どの画面も、この 21 個を引いていない。 - messages/ja.json と en.json の 3 namespace から 7 key ずつ消す (各 21 行・ほかの行と並びは同じ) - コードの i18nKey の型・値・判定は変えない (lib/accountDetection.ts は説明のコメントを足すだけ) - tests/lib/i18nKeys.test.ts の「3 namespace にある」の検査 2 つを、「7 つの名前の文がどの namespace にも無い」 の検査 1 つに替える (名前はコードに残るので、未使用の検査は文が戻っても落ちない) - docs/DEPLOY_CHECKLIST.md 9.6 と docs/plans/tip-widget-parity-plan.md の、この文への参照を今の姿に合わせる Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
cipherwebllc
deleted the
chore/r10-pr28a-remove-unrendered-sa-error-messages
branch
November 13, 2026 16:35
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.
何をするか
第 10 回レビューの片づけ PR-28a (user 裁定 2026-11-12: 消す)。画面に描かれていない smart account の error の文を、messages から消す。
IncompatibleSmartAccountError(lib/accountDetection.ts) のi18nKeyの 7 つの名前は、PaymentForm・TipForm・CheckoutFormの namespace に同じ名前の文を持っていた (3 namespace × 7 key = 21 個・ja と en で計 42 行)。3 フォームはi18nKeyを'errorPristineNoBootstrap'かどうかの判定にだけ使い、文はSmartAccountFallbackの namespace から出す (components/SmartAccountFallbackBanner.tsx)。どの画面も、この 21 個を引いていない。t(saError.i18nKey …)で描いていたのは c1a64ff で、021d847e (未対応 Smart Account の standard モード fallback) で banner に替わってから、描く所が無くなっていた (git log -S"t(saError.i18nKey" -- components)。変わること / 変わらないこと
変わること
PaymentForm・TipForm・CheckoutFormから、下の 7 key を 1 行ずつ消す (各 file 21 行)。変わらないこと
i18nKeyの型 (IncompatibleSmartAccountI18nKey)・値・error の message・errorPristineNoBootstrapの判定は触っていない。lib/accountDetection.ts の差分はコメントだけ。消した key (ja の文つき)
3 namespace とも 7 key 全部を消した。en も同じ 21 個を消した。
PaymentForm
errorIncompatibleSmartAccounterrorMav2DisablederrorMav2KaiaPolygonerrorMetaMaskKaiaerrorPristineNoBootstraperrorChainNo7702errorMetaMaskGaslessUnavailableTipForm
errorIncompatibleSmartAccounterrorMav2DisablederrorMav2KaiaPolygonerrorMetaMaskKaiaerrorPristineNoBootstraperrorChainNo7702errorMetaMaskGaslessUnavailableCheckoutForm
errorIncompatibleSmartAccounterrorMav2DisablederrorMav2KaiaPolygonerrorMetaMaskKaiaerrorPristineNoBootstraperrorChainNo7702errorMetaMaskGaslessUnavailable残した key
無い (候補の 21 個は全部、描かれていないと確かめて消した)。
7 つの名前は、ja/en とも この 3 namespace にしか無かった (入れ子も含めて全 namespace を歩いて数えた: ja 21・en 21。別の namespace に同名の key は無い)。画面が出す
SmartAccountFallbackの 8 key (bannerTitle・bannerBody・switchButton・tipOnlyTitle・tipOnlyBody・pristineTitle・pristineBannerBody・pristineTipBody) は触っていない。描かれていないと確かめた方法
検索の範囲は
components/ lib/ app/ hooks/ i18n/ tests/ e2e/ scripts/(key の名前はdocs/ packages/ public/も)。出力は file に書いて全部読んだ (head で切っていない)。grep -rnE "errorMetaMaskKaia|errorMav2KaiaPolygon|errorIncompatibleSmartAccount|errorChainNo7702|errorPristineNoBootstrap|errorMav2Disabled|errorMetaMaskGaslessUnavailable"i18nKey:の値と型 (lib/accountDetection.ts・lib/smartAccount/metamask.ts・mav2.ts・hooks/useSmartAccount.ts)・(b) 3 フォームのsaError.i18nKey === 'errorPristineNoBootstrap'(PaymentForm.tsx:1269・CheckoutForm.tsx:1921・TipForm.tsx:1048)・(c) コメント・(d) tests・docs。t('error…')の形は 0 件i18nKeyを読む所grep -rnE "\.i18nKey|\bi18nKey\b\s*[,}]|\[['\"]i18nKey['\"]\]" components app hooks lib(HistoryToolbar・税区分の別のi18nKeyを除く)grep -rlE "(useTranslations|getTranslations)\(\s*['\"](PaymentForm|CheckoutForm|TipForm)['\"]"と、namespace を変数で受ける所 (useTranslations(namespace)= OnrampCta・config.namespace= EntitlementPaywall・opts.name.namespace= lib/routeMetadata.ts)'Pro' | 'CsvPass'、routeMetadata の呼び出しは 3 namespace を渡さない。OnrampCta は literal の 3 key だけを引くgrep -nE "\b(t|tp|tc|tu|…)(\.rich|\.has|\.raw|\.markup)?\(\s*[^'\"[:space:]]"foreignSettlementTitleなど)・t(relayErrorKey(…))(戻り値の型はerrorRelay…の 6 つだけ = lib/relay/relayErrorMessage.ts)・t(`storeDevice.previous.${…}`)とt(`storeDevice.error.${…}`)(入れ子の key) だけ。tcはCircleErrors・tuはUrlErrors・HistoryRow と PayerReceiptDetail の変数の key はHistory・PayerReceiptの translatorgrep -nE "\bt=\{t\}|\bt:\s*t\b|[(,]\s*t\s*[,)]"phaseLabel(standard.phase, t)・checkoutPhaseLabel(standard.phase, t)の 2 つ。中は literal のbtnStandard…・btnSendingだけ\bt[A-Za-z]{0,12}(\.rich|\.has|\.raw|\.markup)?\(\s*+ backtick) と、'error…' +の連結errorから始まる名前を組み立てる所は 0 件 (あるのは上のstoreDevice.error.だけ)t.has・t.raw・t.markupgrep -rnE "\bt[A-Za-z]{0,12}\.(has|raw|markup)\("t.raw('urlExample')の 1 件だけnamespace.keyの形・createTranslator・useMessages・getMessagescreateTranslatorは tests の別の namespace・getMessagesは i18n/clientMessages.ts の namespace 単位の pick だけ)docs packages public messagesで grepSmartAccountFallbackの別の文 (残す) だけ。tests・e2e が文を待っている所は 0 件grep -rnE "IntlMessages|AppConfig|declare module ['\"]next-intl|declare module ['\"]use-intl"build の出力でも確かめた: 消した文の断片 (「段階公開中です」・
rolled out gradually) は.next/static(client の JS) にも.next/server/app(prerender) にも無い。消し方の確かめ
行を落とすだけの script で消し、HEAD (8c1a317) の JSON から 3 namespace × 7 key を消したものと、作業ツリーの JSON が
JSON.stringifyで一致することを確かめた (ほかの namespace・key・値・並びが同じ)。7 つの名前は、どの namespace にも (入れ子にも) 残っていない。既存のテストを変えた所
tests/lib/i18nKeys.test.ts
i18n: smart account 互換性エラー (3 form 名前空間 × ja/en)(6 key × 3 namespace × ja/en が非空の文字列) と、i18n: errorMetaMaskKaia (3 form 名前空間 × ja/en)(3 namespace だけにあり、Kaia のほかのチェーンの名前を出さない)。どちらも、消した key が「ある」ことを名前で縛っていたので、そのままだと落ちる。i18n: smart account 互換性 error の文は messages に無い (描くのは SmartAccountFallback)。7 つの名前の文が、ja/en のどの namespace にも無いことを縛る。i18nKeyの値としてコードに残るので、文が戻ってもその検査は落ちない。未使用の検査の一覧・許可リスト (DYNAMIC_KEY_PATTERNS・UNUSED_PUBLIC_COPY_PENDING) に、この 7 key は載っていなかったので、そちらは触っていない。TipForm.errorMav2Disabled) ja/en に戻すと、足した検査の 2 件だけが落ちる (Tests 2 failed | 975 passed (977)・「使われていないキーが無い」は通ったまま)。戻して diff が空なことを確かめた。tests/lib/smartAccount/mav2.test.ts はコメントだけ (「他 chain を案内する」という説明を今の姿に)。assert と test の名前は変えていない。
検証
./node_modules/.bin/tsc --noEmit./node_modules/.bin/eslint(tests/lib/i18nKeys.test.ts・tests/lib/smartAccount/mav2.test.ts・lib/accountDetection.ts)Test Files 5 passed (5)・Tests 1077 passed (1077)・exit 0Test Files 926 passed (926)・Tests 25585 passed (25585)・exit 0node scripts/check-bundle-budget.mjs --build(中でnpm run build= next build・本番 flag のベクター)[OK]bundle の実測
変わらなかった。main 8c1a317 と この PR の head 56e9d73 を、同じ worktree で順に
node scripts/check-bundle-budget.mjs --buildで build し、.next/app-build-manifest.jsonの route ごとの JS を gzip (level 9) して足した。globalThis.SENTRY_RELEASE={id:"56e9d73f…"})。webpack の runtime と 9406 の中身の差は、変更前の chunk が次の build で上書きされて残っていないので、比べていない。PaymentFormとSmartAccountFallbackの今ある文 (「ガス代見積の取得に失敗しました」など) は.next/staticに 0 件で、.next/server(prerender の .rsc / .html) にある。messages は server の layout からNextIntlClientProviderに渡る (i18n/clientMessages.ts の namespace 単位の pick)。確かめられなかったこと
user に見てほしい点
🤖 Generated with Claude Code
https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc