Skip to content

Migrate AI to Vercel AI Gateway + UI improvements#795

Merged
rob-gordon merged 8 commits intodevfrom
robgordon/ai-gateway-migration
Feb 13, 2026
Merged

Migrate AI to Vercel AI Gateway + UI improvements#795
rob-gordon merged 8 commits intodevfrom
robgordon/ai-gateway-migration

Conversation

@rob-gordon
Copy link
Member

Summary

  • Migrate AI endpoints to Vercel AI Gateway — replace direct OpenAI calls with @ai-sdk/openai gateway provider across all /api/prompt/* endpoints, enabling model routing and observability
  • Improve AI toolbar UX — single-undo for AI prompt/convert, undo button in toolbar, restore theme/layout on Cmd+Z, preview AI edit diffs in graph renderer, better textarea styling
  • Fix playful-mindmap template — remove loop-de-loo edges (unbundled-bezier kink), fix giant 192px edge text, replace green edges with neutral gray, use standard .color_* classes so right-click color menu works
  • Add comprehensive CLAUDE.md — full project documentation including examples, themes & layouts section

Test plan

  • Verify AI prompt, convert, and edit features work end-to-end with the gateway
  • Test undo (Cmd+Z) after AI operations restores previous text, theme, and layout
  • Load playful-mindmap template — confirm smooth bezier edges, correct text sizing, working right-click color menu
  • Run pnpm -F app test -- --watchAll=false (unit tests)
  • Run pnpm -F api check (API type check)

🤖 Generated with Claude Code

rob-gordon and others added 8 commits February 11, 2026 11:49
Remove @ai-sdk/openai dependency and use plain model strings routed
through the Vercel AI Gateway via Cerebras. Simplifies provider config
to a single string swap and eliminates pro/free API key splitting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add improved system prompts with shared syntax/pitfalls constants,
remove unused AI packages from app (ai, @ai-sdk/openai, openai v3),
drop hardcoded model override in edit endpoint, update .gitignore,
and add project docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… focus

Replace the shared Textarea component (which wrapped in a padded Box) with
a plain textarea that fills edge-to-edge. Container border transitions to
blue on focus instead of a separate focus ring.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously, pressing Cmd+Z after a prompt/convert AI operation required
two undos — the first landed on a meaningless template intermediate state.
Fix by only setting theme meta (not text) during template load, so Monaco
gets a single undo entry. Also adds an explicit undo button to the AI toolbar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Intercept Cmd+Z in capture phase before Monaco to route through the
custom undo stack when no user edits have occurred since AI. Clears
Monaco's undo stack after AI completes so it can't independently undo
just text while leaving meta (theme, layout) unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When reviewing an AI edit diff, the graph now renders the proposed
(modified) text instead of the original, so users can visually
evaluate the edit before accepting or rejecting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document the templates system, FFTheme schema, available layouts,
Cytoscape CSS pipeline, utility classes, screenshot generation, and
how templates integrate with the AI pipeline and chart creation UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ane sizing

Remove unbundled-bezier edge kink, fix giant 192px edge text (12 → 0.875),
replace green edges with neutral gray, and use standard .color_* classes
so right-click color menu works.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flowchart-fun Ready Ready Preview, Comment Feb 13, 2026 0:03am

Request Review

@rob-gordon rob-gordon added this pull request to the merge queue Feb 13, 2026
Merged via the queue into dev with commit cc579e0 Feb 13, 2026
5 of 6 checks passed
@rob-gordon rob-gordon deleted the robgordon/ai-gateway-migration branch February 13, 2026 00:18
rob-gordon added a commit that referenced this pull request Feb 13, 2026
* feat: Add dynamic page titles using react-helmet (#791)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>

* chore: version fix

* Aesthetic refinement — surface polish, typography, and micro-interactions (#793)

* feat: Apply pricing page aesthetic refinements

Implement 8 changes from the aesthetic refinement guide:
- Shift primary accent from purple to blue (5 explicit spots)
- Warm background from pure white to off-white (#FAFAF7)
- Increase vertical spacing on pricing page sections
- Replace stock SVG illustrations with Phosphor duotone icons
- Mute company logos to grayscale with hover restore
- Soften FeatureBreakdown borders with blue tint
- Update footer CTA copy to be more aspirational
- Remove misleading hover lift from testimonial cards

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: Site-wide aesthetic refinement — blue accent, consistent styling

Apply the site-wide "Confident Calm" aesthetic spec:

Color system:
- Shift all primary interactive elements from purple to blue across
  the entire app (header CTA, AI toolbar, editor buttons, checkout,
  sandbox warning, paste overlay, Edit with AI popover, CTA buttons)
- Chart file icons from purple to neutral gray (folders stay blue)
- Warning banners from orange/yellow to subtle blue tint
- Feature breakdown borders, pro column, and icons to blue
- Pricing page header gradient, label, and footer to blue
- Dark mode pricing highlights grid to blue-tinted

Surfaces refined:
- Header Pro button: purple gradient → blue gradient
- AI Toolbar: all purple accents → blue (wand icon, mode pills, submit)
- Checkout: trust badges and plan borders → blue
- Testimonials: quote icon, hover states, CTA → blue
- Success page: AI icon and confetti colors → blue
- ShareDialog spinner: standardized to highlight color

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: Aesthetic pass 2 — surface polish, typography hierarchy, and micro-interactions

Header: visual weight separation between primary nav and utility nav items,
solid blue CTA button with scale-on-hover. Typography: PageTitle tracking-tight,
SectionTitle font-semibold with muted color. Card wrappers for Settings, Account,
and Feedback pages. Settings: blue active state for language/theme buttons,
styled About links and Support section. Account: refined subscription copy,
ghost Log Out button, outlined Change Email button. Feedback: card wrapper,
top-aligned layout, constrained width, warmer copy. Charts: blue-tinted hover
states, show-on-hover three-dot menus, sandbox arrow animation. New Chart: warning
replaced with muted text line, blue radio button accents. Blog: editorial date
styling. Pricing page: fade-in-on-scroll animations for sections below the fold.
Global focus-visible ring for accessibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: Header CTA uses true blue (#2563eb), utility nav bumped to neutral-500

The tailwind config has a custom blue scale where blue-600 is #4750f3
(deep indigo), not standard Tailwind blue. The CTA now uses explicit
hex values (#2563eb/#1d4ed8) for an unmistakably blue button. Utility
nav items bumped from text-neutral-400 to text-neutral-500 — clearly
readable without hovering, quieter than primary nav but not invisible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: Header CTA stretches to full header height

Added self-stretch so the Pro CTA fills the header bar instead of
floating as a smaller pill. Content stays vertically centered via
flex items-center.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: Unify header nav styling, fix invisible Settings language button

Remove utility nav differentiation so all header items share the same
visual weight. Fix active language/appearance buttons disappearing behind
card by changing z-index from -1 to 0, and use explicit #2563eb for the
active state to avoid the custom indigo blue-600.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* feat: Redesign pricing page with aspirational layout and updated content (#794)

Restructure the pricing page to lead with outcomes and social proof
instead of a video demo. New sections: hero with diagram screenshots,
pull quote, outcome cards, before/after demo with syntax-highlighted
code, side-by-side Free/Pro comparison, and rewritten FAQ with
objection-handling questions. Updates Tailwind blue/green color scales
and migrates inline hex overrides to utility classes. Includes i18n
translations for all 8 languages.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* Migrate AI to Vercel AI Gateway + UI improvements (#795)

* feat: Migrate AI endpoints to Vercel AI Gateway

Remove @ai-sdk/openai dependency and use plain model strings routed
through the Vercel AI Gateway via Cerebras. Simplifies provider config
to a single string swap and eliminates pro/free API key splitting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: Include broader AI gateway transition changes

Add improved system prompts with shared syntax/pitfalls constants,
remove unused AI packages from app (ai, @ai-sdk/openai, openai v3),
drop hardcoded model override in edit endpoint, update .gitignore,
and add project docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style: Improve AI toolbar textarea — remove inner padding, use border focus

Replace the shared Textarea component (which wrapped in a padded Box) with
a plain textarea that fills edge-to-edge. Container border transitions to
blue on focus instead of a separate focus ring.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: Single-undo for AI prompt/convert and add undo button to toolbar

Previously, pressing Cmd+Z after a prompt/convert AI operation required
two undos — the first landed on a meaningless template intermediate state.
Fix by only setting theme meta (not text) during template load, so Monaco
gets a single undo entry. Also adds an explicit undo button to the AI toolbar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: Restore theme/layout on Cmd+Z after AI operations

Intercept Cmd+Z in capture phase before Monaco to route through the
custom undo stack when no user edits have occurred since AI. Clears
Monaco's undo stack after AI completes so it can't independently undo
just text while leaving meta (theme, layout) unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: Preview AI edit diff in graph renderer

When reviewing an AI edit diff, the graph now renders the proposed
(modified) text instead of the original, so users can visually
evaluate the edit before accepting or rejecting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: Add Examples, Themes & Layouts section to CLAUDE.md

Document the templates system, FFTheme schema, available layouts,
Cytoscape CSS pipeline, utility classes, screenshot generation, and
how templates integrate with the AI pipeline and chart creation UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: Fix playful-mindmap template — smooth edges, standard classes, sane sizing

Remove unbundled-bezier edge kink, fix giant 192px edge text (12 → 0.875),
replace green edges with neutral gray, and use standard .color_* classes
so right-click color menu works.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* feat: Update Pro pricing from $4/mo to $6/mo ($48/yr) (#796)

Update all hardcoded price references across UI components and pricing
pages. New Stripe prices created for dev environment. Old price IDs
added to OTHER_VALID_STRIPE_PRICE_IDS for subscriber grandfathering.
Restores openai@3.2.1 for autotranslations script. All locale files
updated via extract + autotranslations + compile pipeline.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* chore: version feature

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant