fix(ai): drop 'wallet app' from fintech triggers (Apple Wallet pass UI)

The previous wallet-pass fix only removed 'wallet pass' but left
'wallet app' in the fintech phrase list. That still routes Apple-Wallet
contexts like "Apple Wallet app for boarding passes", "wallet app pass
viewer", or a bare "wallet app" brief to a fintech style guide — none
of which want banking aesthetics.

Restrict wallet right-side triggers to phrases that are unambiguously
fintech: 'wallet payment(s)' and 'wallet connect'. Real fintech briefs
that center on a wallet almost always qualify it ('crypto wallet app',
'payment wallet flow', 'digital wallet onboarding') and those still
trigger via the left-side modifier list.

Verified:
- Apple Wallet app passes / wallet app pass viewer / generic wallet app
  all fall back to neutrals (no fintech force)
- crypto wallet / crypto wallet app / digital wallet / payment wallet /
  wallet payment(s) / wallet connect all still trigger fintech
- Other fintech (budget tracker, crypto trading) unchanged
This commit is contained in:
Fini 2026-04-29 09:50:51 +08:00
parent 88766e5c61
commit 291e39e653

View file

@ -456,12 +456,16 @@ function inferTagsFromPrompt(prompt: string): string[] {
// "budget tracker", "expense tracker") still match without forcing
// fintech onto every UI that mentions a budget.
// Wallet phrase triggers: every left-side modifier is unambiguously
// financial. The right-side patterns ("wallet app/payment/connect") are
// also financial — but `wallet pass` is deliberately excluded because
// it's the generic iOS feature for boarding passes, event tickets,
// gift cards, and vaccination cards, none of which are fintech UI.
// financial. Right-side patterns are intentionally restricted to
// `wallet payment(s)` and `wallet connect`, which are unambiguous
// fintech contexts. We deliberately exclude `wallet app` and
// `wallet pass`: both occur in Apple Wallet briefs that are about
// boarding passes, event tickets, gift cards, vaccination cards, or
// generic-iOS pass viewers — those are not fintech UI and shouldn't
// route to a fintech style guide. Real fintech briefs almost always
// qualify the wallet ("crypto wallet app", "payment wallet flow").
if (
/\b(crypto|digital|payment|hot|cold|hardware|web3)\s+wallet\b|\bwallet\s+(app|payment|connect)\b/.test(
/\b(crypto|digital|payment|hot|cold|hardware|web3)\s+wallet\b|\bwallet\s+(payments?|connect)\b/.test(
lower,
)
) {