feat(F0AiChatTextArea): neutral credit warning with CTA icon - #5268
feat(F0AiChatTextArea): neutral credit warning with CTA icon#5268daviz-fct wants to merge 3 commits into
Conversation
The soft credit warning banner above the composer used the info palette, which read as a system notice rather than a passive nudge. It now uses the neutral tokens, and the "Get credits" CTA accepts an optional icon so hosts can mark it as an upsell. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
🔍 Review policy: FeatureThe PR title starts with Required approvals
How this was decided
Policy source: |
✅ No untranslated copy addedEvery user-visible string in this PR comes from the i18n layer. Codebase total unchanged at 133. |
✅ No New Circular DependenciesNo new circular dependencies detected. Current count: 0 |
✅ Storybook docs — no pages lostEvery page reachable on ✏️ 31 updated ✏️ Updated — 31 page(s)/story/stories across 2 file(s)The source file behind each of these changed. Detection is per file, so editing one story flags its siblings too.
Links point at the public Storybook, which is built from Snapshot of the Storybook index (docs pages + stories) compared against |
🔍 Visual review for your branch is published 🔍Here are the links to: |
📦 Alpha Package Version PublishedUse Use |
✅ No breaking public API changesNo public exports were removed, renamed, or had existing props/types changed in a breaking way compared to Comparing
|
♿ Accessibility (axe) — components changed in this PR7 issues across 6 stories — all non-blocking (
Scope: only stories in the files/component folders this PR changed. It can't yet flag downstream ripple from shared-code/token changes, or diff against |
Coverage Report for packages/react
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
Description
The soft credit warning banner that sits above the chat composer was painted with the info palette, which made a passive nudge read like a system notice. It now uses the neutral tokens, and the "Get credits" CTA takes an optional icon so hosts can mark the action as an upsell.
Type of change
Screenshots (if applicable)
Implementation details
feat: swap the credit warning banner from the info palette to the neutral one
Which tokens
bg-f1-background-info→bg-f1-background-secondaryandtext-f1-foreground-info→text-f1-foreground-secondary, matching the neutral status pattern already used elsewhere (e.g.F0Tagstatusneutral).The
formBorderoverride drops fromborder-f1-border-infotoborder-f1-border, which is the border the composer form already carries by default, so the banner no longer tints it. The key is kept in the config so a futurehardlevel can still override it.feat: add an optional
getCreditsIcontoAiChatCreditWarning, rendered to the left of the "Get credits" labelWhy a prop instead of hardcoding the icon
The banner is host-driven: the CTA can point at billing, at a plan upgrade, or at an admin asking to raise an employee cap, so the icon belongs to the host. The prop is optional, so current consumers are unaffected and the button keeps rendering label-only when it is omitted.
chore: use the
Upsellicon in theF0AiChatTextAreaand Cocreation credit warning stories