Uh oh!
There was an error while loading. Please reload this page.
feat(ai-build): event-driven blueprint-design progress (live "Designing…" panel) - #2042
Merged
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
…d-plan flow propose_blueprint now streams a reconciled `data-blueprint-progress` part while it drafts the plan; the chat renders a live "Designing…" panel whose object chips appear one-by-one (label + field count), with summary / extend target and a seq-driven liveness cue — superseding the rotating-hint placeholder and yielding to the authoritative "Proposed plan" card when the tool result lands. Falls back to the existing placeholder with no events (zero regression). Wired via the shared streaming converter (uiMessageToChatMessage), which both the full-page AiChatPage (useObjectChat) and the floating chatbot route through; the data part is transient, so reload still shows the persisted Proposed-plan card (no hydration-path change needed). Adds 12 unit tests (event→data mapping + event→render) and was browser-verified end-to-end via a recorded event stream. Refs cloud#657, cloud#655 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
xuyushun441-sysforce-pushed
the
claude/quizzical-shannon-5b4788
branch
from
June 28, 2026 02:36
14fc3bf to
a1c9d15CompareContributor
✅ 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.
What
Renders the blueprint-design streaming half of the AI Build "magic" flow. cloud#657 (Refs cloud#655) ships the backend: while
propose_blueprintdrafts the plan — a tens-of-seconds, otherwise-opaque LLM call — it now emits a progressive, reconcileddata-blueprint-progresspart along the agent SSE stream. This PR is the frontend renderer: objects appear one-by-one in a live "Designing…" card instead of a spinner + rotating placeholder, then the card hands off to the authoritative "Proposed plan" the instant the tool result lands.Before this PR (#2036/#2039) the wait was a purely presentational "Designing your app…" + rotating-copy placeholder. This upgrades it to real, event-driven progress, keeping that placeholder as the no-event fallback.
Event contract (same mechanism as
apply_blueprint'sdata-build-progress, reconciled in place by stableid){ "type": "data-blueprint-progress", "id": "blueprint-progress", // stable id → client replaces the prior frame"data": { "phase": "designing"|"done", "summary": "招聘管理系统", // optional, appears progressively"appLabel": "招聘管理", // optional (no appLabel in extend mode)"targetApp": "recruiting", // extend mode only"objects": [{ "name": "candidate", "label": "候选人", "fields": 5 }], "counts": { "objects": 3, "views": 2, "dashboards": 1 }, "seq": 7// monotonic liveness signal } }How it's wired (detect → route → converter → render)
mapMessages.ts:extractBlueprintProgress(parts)lifts the latest reconciled frame;uiMessageToChatMessageputs it onChatMessage.blueprintProgress(mirrorsextractBuildProgress). This is the shared streaming converter that both the full-page AI Build surface (AiChatPage→useObjectChat) and the floating console chatbot already route through — so one wiring point covers both surfaces.ChatBlueprintProgress+ChatMessage.blueprintProgressinChatbotEnhanced.tsx.BlueprintProgressPanel: object chips (label +fields), summary / extend badge revealed progressively,seq-drivenLivenessIndicator. Rendered at message level next toBuildProgressPanel.proposedPlanyet; the moment thepropose_blueprintresult lands it yields to the authoritative "Proposed plan" card. While the panel is up, the runningpropose_blueprint's rotating-hint row is suppressed in the activity strip (the panel supersedes the placeholder).AiChatPage.hydratedMessagesToChatMessagesonly sees persisted history, anddata-blueprint-progressis transient likedata-build-progress— never persisted. On reload the persisted "Proposed plan" card is the record, so no synthesis is needed there (unlikebuildProgress, whose "Built X" panel had no other persisted form).Graceful degradation / zero regression
No
data-blueprint-progressevents (older cloud / non-streaming turn) → no panel, and the existing rotating-hint "Designing your app…" placeholder behaves exactly as before.Tests (12 new)
mapMessages.test.ts(event→data): full mapping, reconcile-to-latest-frame,phase:done+ extend target, malformed-object/field filtering, phase default, counts-drop, absence.ChatbotEnhanced.test.tsx(event→render): chips with label+field-count + summary + counts line, chips accruing across frames, placeholder superseded when events present, placeholder fallback with no events, hand-off to the Proposed-plan card, extend-mode badge.plugin-chatbotsuite green (154 tests, 8 files). No new type errors / lint errors from the change.Browser verification (recorded event stream)
Drove
ChatbotEnhancedthrough a scripteddata-blueprint-progresssequence in a real browser and captured each state:Shipping note
This is the objectui half. To actually ship the streamed UX end-to-end it still needs the deploy-chain pins bumped: framework
.objectui-shapin bump → cloud re-pin (per the standard objectui deployment flow). cloud#657 is already merged.🤖 Generated with Claude Code