Skip to content

feat(chat): deep-link the blocked card's upgrade CTA to the Plan Picker - #291

Merged
aimeritething merged 2 commits into
mainfrom
feat/chat-upgrade-cta-deep-link
Aug 24, 2026
Merged

feat(chat): deep-link the blocked card's upgrade CTA to the Plan Picker#291
aimeritething merged 2 commits into
mainfrom
feat/chat-upgrade-cta-deep-link

Conversation

@aimeritething

Copy link
Copy Markdown
Member

What

When Free trial messages run out, the chat's blocked card shows an "Upgrade plan" CTA. It used to push a bare /billing, leaving the user to find the plan picker themselves. It now navigates to /billing?mode=upgrade, so the Plan Picker dialog opens on arrival — the same tested deep link the App Sidebar upgrade button already uses.

  • The counter card's "View plans" keeps landing on the Plan view without opening the picker: with turns remaining the intent is browsing, not buying.
  • Both chat CTAs now record the billing return route first, so the Billing Area close button lands back on the project the user was chatting in, remounts the pane, and clears blocked per ADR-0065 (previously it fell back to the sidebar's last entry point or home).
  • The allowance's user-visible label is unified as "Free trial messages" across every surface (chat cards, the 402 response, the Plan view's allowance card). It was previously "Free messages" in chat and "Free assistant messages" in billing; CONTEXT.md now fixes the label and retires both older variants.

Commits

  1. feat(ui) — label rename across chat + billing surfaces, tests, and CONTEXT.md.
  2. feat(chat) — CTA deep link + return-route recording, with destination-level test assertions.

Testing

  • bun check clean.
  • Focused suites green: chat billing cards 6/6, free-turns section 4/4, billing plan 15/15, chat API route 43/43.
  • Pre-existing failures unrelated to this branch (reproduced on clean main): the preview-canvas-perf typecheck error, 4 cross-file isolation failures when the three billing/chat interaction suites run together, and 2 app-sidebar.test.ts failures.

🤖 Generated with Claude Code

https://claude.ai/code/session_019AvJNCVneDGm5wbnK7uScT

aimeritething and others added 2 commits August 23, 2026 21:52
…al messages"

The same allowance was named two ways: the chat cards said "Free
messages" while the Plan view said "Free assistant messages". Unify
every user-visible surface — chat cards, the 402 response, and the Plan
view's allowance card — on "Free trial messages", which ties the
allowance to the Active Free Trial and explains why upgrading lifts the
limit. CONTEXT.md's Free Chat Turns entry now fixes this label and
retires both older variants.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019AvJNCVneDGm5wbnK7uScT
The chat billing cards were the only upgrade entry that pushed a bare
/billing: the user landed on the Plan view and had to find the picker
themselves, and with no recorded return route the Billing Area close
button fell back to the sidebar's last entry point or home.

The blocked card's "Upgrade plan" now navigates to /billing?mode=upgrade
so the Plan Picker opens on arrival — the same tested deep link the App
Sidebar upgrade button uses. The counter's "View plans" keeps landing on
the Plan view without opening the picker: with turns remaining the
intent is browsing, not buying. Both CTAs record the return route first,
so closing the Billing Area lands back on the project, remounts the
pane, and clears `blocked` per ADR-0065.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019AvJNCVneDGm5wbnK7uScT
@aimeritething
aimeritething merged commit bf94ea2 into main Aug 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant