fix(frontend): show loading state on home "Create agent" button#5475
Merged
ashrafchowdury merged 3 commits intoJul 24, 2026
Merged
Conversation
The Framer site carried GA4 (G-368ZWZSH5D, recovered from the archive and matching .env.example); the rebuild shipped only PostHog, so GA flatlined at cutover. Same gates as PostHog: real domain, indexable production build, DNT honored. The production workflow sets the public ID. Claude-Session: https://claude.ai/code/session_013Qe1Vf2yvj33BVd5W1q7HB
fix(website): restore GA4 alongside PostHog (analytics continuity)
…during agent creation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe create-agent flow now propagates a ChangesAgent creation loading flow
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant AgentIntentActions
participant StripHome
participant useAgentHomeActions
User->>AgentIntentActions: Submit create-agent action
AgentIntentActions->>StripHome: Invoke handleCreate
StripHome->>AgentIntentActions: Set loading state
StripHome->>useAgentHomeActions: Await onCreate
useAgentHomeActions-->>StripHome: Return createAgent result
StripHome->>AgentIntentActions: Reset loading on failure
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
Railway Preview Environment
Updated at 2026-07-24T15:06:13.505Z |
ardaerzin
self-requested a review
July 24, 2026 09:46
ardaerzin
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
On the agent home page, clicking "Create agent" gave no feedback for a moment. Creating an agent is a multi-step async round-trip (mint an ephemeral app, commit it, stash the first-run seed, then navigate to the playground), so the button sat unchanged until navigation kicked in. The silence read as a dead click and left people unsure whether anything was happening.
Changes
The primary button now spins and swaps its label from "Create agent" to "Creating agent" while the create is in flight, then the page navigates to the new agent's playground.
The wiring:
useCreateAgentalready returned a success boolean, butuseAgentHomeActions.onCreatediscarded it withvoid. It now returns that promise.StripHomeholds aloadingstate, sets it before awaitingonCreate, and threads it down throughStripComposerto the sharedAgentIntentActionsbutton. On success the page navigates away, so the spinner stays up through navigation; it only resets on failure. That avoids flashing the label back to "Create agent" during the navigation gap. A re-entry guard (plus antd disabling the button whileloading) blocks a double-submit.The shared flag prop is named
loading(state-describing, matches antd Button's own prop) rather thancreating. That rename is whyAgentConversation.tsxappears in the diff: it's the other consumer ofAgentIntentActions.Before: click, then nothing visible until the playground opens.
After: click, the button shows a spinner and "Creating agent" until the playground opens.
AgentIntentActionsis also used by the playground onboarding composer, which already passed the in-flight flag, so it gets the same "Creating agent" label swap for free.Tests / notes
eslintclean on all touched files.AgentComposer, "Continue in IDE") is a separate composer and was left untouched.What to QA