feat(console): Build Doctor drawer — self-serve 'what actually landed?' for AI builds#2020
Merged
Merged
Conversation
…?" for AI builds
Adds a Build Doctor button (build-agent conversations only) to the AI
build page header. It opens a right-side drawer that calls the admin
build-debug endpoint (objectstack-ai/cloud) and renders the
reconciliation: what the agent CLAIMED vs what is LIVE in sys_metadata.
The chat renders the agent's self-report ("已搭好"), never what actually
landed — so a build that silently dropped a change (a confirm card no
turn applied) reads as success. The drawer surfaces exactly that:
- PROPOSED-BUT-ORPHANED: a changes_proposed card that evaporated.
- CLAIMED-BUT-MISSING: said applied, isn't live.
plus de-noised verify_build (platform sys_*/cloud_*/ai_* hidden), pending
actions, and a collapsed timeline. Read-only; same-origin cookie auth, no
DB credentials — the diagnosis a founder used to do by hand-querying two
databases now happens in the browser.
Distinct from useReconcileOnError (ADR-0013 D2 stream-failure recovery):
this reconciles the BUILD against live metadata, not a transport drop.
- buildDebugApi.ts: typed client for GET /conversations/:id/debug.
- BuildDebugDrawer.tsx: the Sheet drawer + rendering.
- AiChatPage: Build Doctor button (showDebug=isBuildAgent) + drawer wiring.
type-check clean; app-shell suite green (929) incl. 2 new drawer tests
(orphaned render + endpoint call). Needs the cloud service-ai debug
endpoint deployed; absent it the drawer shows an empty state.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
Why
The AI build chat renders the agent's self-report ("已搭好"), never what actually landed. A build that silently drops a change — e.g. an approval flow proposed as a
确认修改card that no later turn applied — reads as success while the artifact never reachessys_metadata. Today, diagnosing that means a founder hand-querying two databases with production credentials.This adds the browser-side, self-serve half: a Build Doctor drawer.
Pairs with the cloud server endpoint
GET /api/v1/ai/conversations/:id/debug(service-ai).What
A Build Doctor button (🐛) appears in the build page header for build-agent conversations only. It opens a right-side
Sheetthat calls the debug endpoint and renders the reconciliation:changes_proposedconfirm card that evaporated (the headline failure the chat can't show).sys_*/cloud_*/ai_*hidden from the verdict), pending actions, and a collapsed timeline.Read-only; same-origin cookie auth (mirrors
fetchConversation); no DB credentials.Files
buildDebugApi.ts— typed client + report types.BuildDebugDrawer.tsx— the drawer + rendering.AiChatPage.tsx— Build Doctor button (showDebug = isBuildAgent) threaded throughChatPane, drawer rendered alongsideShareDialog.Test
type-checkclean;app-shellsuite green (929), incl. 2 new drawer tests (orphaned-proposal render + endpoint-call assertion).Rollout
.objectui-shain cloud to pin this commit.🤖 Generated with Claude Code