Uh oh!
There was an error while loading. Please reload this page.
feat(console-ai): edit-mode empty state distinct from magic-flow build (ADR-0057 A1.b) - #2476
Merged
Merged
Conversation
…d (ADR-0057 A1.b) When the build surface is opened to edit an existing app (?package=X), the empty-state guidance was still the magic-flow 'describe an app to build' copy + from-scratch starters — wrong for editing a bound app. Now the build surface has two empty states, keyed on editPackageId: - magic flow (no ?package=): 'Build with AI' + build-a-CRM/tracker starters. - edit mode (?package=X): 'Editing "<app>"' + 'what would you like to change… I'll modify this app in place' + change-oriented starters (add a field / object / dashboard / automation). App name comes from metadata (editAppLabel); falls back to a generic 'Edit this app' title until metadata loads, so a raw package id (app.xadv) never flashes. agentEmptyState + buildAgentSuggestions gain the edit branch and are exported + unit-tested (8 cases). Empty state stays string-props into ChatbotEnhanced — no plugin-chatbot change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Follow-up to #2466 / #2474 (ADR-0057 Amendment A1.b). Epic #2409.
Problem
The build surface has one empty state — the magic-flow "Build with AI / describe an app" copy + from-scratch starters ("Build a sales CRM…"). But when it's opened to edit an existing app (
?package=X, via the switcher or Edit-with-AI), that guidance is wrong: the user isn't building from scratch, they're changing a bound app.Fix
The build surface now has two empty states, keyed on
editPackageId:?package=): unchanged — "Build with AI" + build-a-CRM/tracker/support-desk starters.?package=X): "Editing """ + "What would you like to change? I'll modify this app in place — add a field, object, view or automation, or adjust what's already there." + change-oriented starters (add a field / add an object & relate it / add a dashboard / add an automation).Details:
editAppLabel); until it resolves, the title falls back to a generic "Edit this app" — a raw package id (app.xadv) never flashes.agentEmptyState+buildAgentSuggestionsgain the edit branch, are exported, and unit-tested (8 cases: magic vs edit title, named vs generic, ask-agent unaffected, edit vs magic starters, default-false).editPackageId(URL-explicit), which can't collide with A1.b bind-on-create: re-key adds?package=only after the build lands (conversation non-empty), when the empty state is already gone.ChatbotEnhanced— no plugin-chatbot change. (A richer context-chip slot could come later; this keeps the first version in objectui.)Out of scope (noted for later): referencing the app's real object names in starters ("Add a field to Customer"), and the composer placeholder.
Tests
New
editModeEmptyState.test.ts(8 cases); related suites green (deriveBoundPackageId,AiChatPage.hydration,useDeferredFirstSend— 29 total);tsc --noEmitclean.🤖 Generated with Claude Code