From 291e39e653fac84af38699aca082f65845a1c135 Mon Sep 17 00:00:00 2001 From: Fini Date: Wed, 29 Apr 2026 09:50:51 +0800 Subject: [PATCH] fix(ai): drop 'wallet app' from fintech triggers (Apple Wallet pass UI) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../services/ai/orchestrator-prompt-optimizer.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/web/src/services/ai/orchestrator-prompt-optimizer.ts b/apps/web/src/services/ai/orchestrator-prompt-optimizer.ts index 77286ee5b..5705b9c6e 100644 --- a/apps/web/src/services/ai/orchestrator-prompt-optimizer.ts +++ b/apps/web/src/services/ai/orchestrator-prompt-optimizer.ts @@ -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, ) ) {