Repository navigation
feat(ai-build): the plan and result cards draw the v2 rows cloud declares, and step names read as sentences (objectui#12724) - #12947
Conversation
…ares (objectui#12724) The plan card reads `propose_blueprint`'s `planCard`: one chip per field with the format constraint in mono type and a dashed suggested chip, the name-field line, one intent line per view (`planCard.views`, or `viewIntents` from a producer that predates the card), the assumptions as a list, and the sample-data line. The result card reads the turn's latest `checklist` (`apply_blueprint`, then `verify_build`): the passed/total chip, the verified lines in two columns, and the two doors fed by `checklist.app` and `checklist.packageId`. Each row keeps phase 1's shape when its key is absent. The packs' `chatbot.tool.*` values become sentences in every language (cloud#2927 Target 3); the `en` title-caser pin retires and a test holds that no value equals its tool id or that title-case. The producer's schema is vendored as a test fixture from objectstack-ai/cloud 69632617, and every card fixture is checked against it. Claude-Session: https://claude.ai/code/session_01Cbdek8SKSHxddGqTPZXdqX Co-authored-by: Claude <noreply@anthropic.com>
…e new zh step names in the 7254 pin; changeset (objectui#12724) Claude-Session: https://claude.ai/code/session_01Cbdek8SKSHxddGqTPZXdqX Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cbdek8SKSHxddGqTPZXdqX Co-authored-by: Claude <noreply@anthropic.com>
…planCard and checklist (objectui#12724) Claude-Session: https://claude.ai/code/session_01Cbdek8SKSHxddGqTPZXdqX Co-authored-by: Claude <noreply@anthropic.com>
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contract reviewServed-tier: Face (reviewed 2026-10-18T08:06Z): the Inputs read:
Nothing was built or run locally. ① Derived judgments
② Semver levelThe changeset bumps ③ Boundary flags
Implemented-by: VERDICT: PASS |
席位核对 · ACCEPT ·
|
Part of #12724
Clause-②: yes
Phase 2 of objectui#12724: the AI build cards draw the v2 rows whose keys objectstack-ai/cloud now declares (cloud PR #2979, merged as
69632617; its schemapackages/service-ai-studio/schema/build-cards.schema.jsonis vendored here as a test fixture). Every row reads one declared key and degrades to phase 1's shape when that key is absent, because a tenant on an older cloud build sends none of them. The card stays open for the rows no key declares yet (listed below).What changed
Plan card, from
propose_blueprint'splanCard(lifted bydetectProposedPlaninmapMessages.ts, drawn byPlanCardObjectRowsinChatbotEnhanced.tsx):planCard.objects[].fields[];format.labelis drawn in mono type on the chip;suggested: truedraws the dashed chip marked 「补充」 / "suggested";nameField;planCard.views[].line; with noplanCard, the envelope'sviewIntentslines (a producer between cloud#2922 and cloud#2979 sends only those), else phase 1's view names;planCard.assumptions(elseblueprint.assumptions, as before);planCard.sampleData.line(「示例数据 12 条/对象」) takes the place of the bare "sample data" bit in the count line.Result card, from the turn's LAST
checklist(apply_blueprint, then a laterverify_buildthat re-measured it), read by the newdetectBuildChecklistfrom each tool's result at render time, so the live and the hydrated paths both reach it without a mapper change:passed/totalchip (green whenstatusispassed, amber whenfailed), and the checklist'slines, object lines in one column and view and sample-data lines in the other (a container query stacks them in a narrow pane); they replace the staged-artifact list;checklist.app.nameand 在 Studio 中查看 openschecklist.packageId; the header nameschecklist.app.label. Without those keys the doors read the stagedappartifact and the draft envelope's package, as in phase 1.「接下来可以说」 is phase 1's line, fed by
nextSteps. Per pointer 3 of the card's thread, no cloud producer answersapply_blueprintwithstatus: 'published'; a build published in the turn isdraftedwithmaterialized: true. No reader is built for an envelope nobody sends: the new tests shownextStepsreach the line on both real envelopes (drafted, and drafted withmaterialized: true).Step names as sentences (cloud#2927 Target 3, ruled 「同意」, which lands in this repo): every pack's 35
chatbot.tool.*values are rewritten as short sentences in that language, zh first (todo_writereads 「记下后续检查项」,list_objects「列出已有对象」,en"List the existing objects"). The ruling coversen, so the pack comment that pinnedento the title-caser's output is rewritten in all ten packs, and thetoolLabels-locale-parity-7481case that asserted it retires. The newtoolLabels-sentences-12724.test.tsbeside it asserts that no value in any pack equals its tool id orhumanizeToolName's English title-case of it. Cross-check against cloud'stool-manifest.tsat69632617: its 29 tool ids are all keys of every pack (the packs' other six keys are the data tools other packages register); no id is missing.New pack keys in all ten packs:
chatbot.plan.suggestedField,chatbot.plan.nameField,chatbot.build.checksPassed.Not drawn
No key declares these, so none is derived from other keys:
69632617);typeis declared, but the schema gives no display words for it, and a renderer-side dictionary of field types would be a second dialect.Tests
At
3b053f3c(after mergingmainat32b492b6;9a4b279badds only the docs paragraph), every run through the shared verify lock:pnpm exec vitest run --maxWorkers=2 packages/plugin-chatbot/: 66 files passed (66), 679 tests passed (679);git ls-filescounts 66 tracked test files in the package.pnpm exec vitest run --maxWorkers=2 packages/i18n/: 83 files passed (83), 1325 passed and 13 skipped (1338); 83 tracked test files.buildCards.contract-12724.test.ts(every fixture envelope checked against the vendored schema, with a control that a key the schema does not declare, a missing required key and twonextStepsare refused),mapMessages.buildCards-12724.test.ts(the lifts keep only the drawn keys; a value without its required lists lifts nothing),ChatbotEnhanced.buildCardsV2-12724.test.tsx(each row drawn through the real mapper from a raw tool part, each row's absent case,verify_buildsupersedingapply_blueprint, the two doors fed by the checklist,nextStepson both envelopes),toolLabels-sentences-12724.test.ts.ChatbotEnhanced.buildChat-12724, the zh step names intoolCardI18n-7254andtoolLabels-locale-parity-7481.Ablation (one, on a lift): through objectstack's
scripts/ablation-replace.mjs, theplanCardmember was dropped fromdetectProposedPlan's return (anchor 1 to 0, blob086c6309to4b92e3f6). The two card suites went red: 5 failed and 17 passed of 22 (the lift's own test and the four plan-card render tests). Restore: blob back to086c6309, equal toHEAD, andgit diff HEADempty, read by the tool and again by hand. No dist was involved: the suites importmapMessagesandChatbotEnhancedrelatively.Gates (local)
type-check(hyphenated) for@object-ui/plugin-chatbotand@object-ui/i18n: exit 0 each, after rebuilding the dependency closure and the merged@object-ui/react.tsc -p tsconfig.test.json --listFileslists all four new test files and both fixtures.lintfor both packages: exit 0, 0 errors; no warning falls on an added line.check:i18n-keys,check:i18n-drift("35 en value(s) changed … 315 pack value(s) followed"),check:i18n-dead-keys,check:i18n-designer-parity,check:new-line-citations(0 new),check:control-bytes,check:test-path-roots,check:unreferenced-sources,check:phantom-deps,check:unused-deps,check:self-import,check:published-tsconfig-exclude,check:changeset-claims,check:pending-changeset-literals, the threecheck:vi-mock-*,check:shell-escape-residue,check:comment-mask-corpus,check:lint-rule-coverage,check:spec-symbols,check:esm-specifiers,check:handler-key-reads,check:registry-bare-names,check:doc-fences,check:doc-json,check:doc-types,scripts/check-changeset-presence.mjsandscripts/check-changeset-no-major.mjs: exit 0 each. NOT MEASURED here, prerequisite builds this container did not run, so CI's runs are the evidence:check:eager-locale-catalogues(needs the built console),check:readme-exports(needs every package's dist; this diff touches no README),check:doc-examplesandcheck:doc-snippets(need 34 packages built; the docs edit adds prose, no code fence).@object-ui/app-shellis not touched, so its suite runs in CI.Screenshots
On the evidence branch
claude/issue-12724e-evidence(08f510ff, never merged; no image is in this diff), rendered at 1280 px, light, from the fixture envelopes through the real mapper andChatbotEnhanced:The branch's
docs/design/findings/12724/phase2/README.mdsays how they were rendered and what is faked (the envelopes, and a publish-count probe answering 0).Acceptance notes
useChatConversation(proposedPlanToCachedResult,draftReviewToCachedResult) keep neitherplanCard,viewIntentsnorchecklist. That is the degrade the card asks for; widening the cache is a hooks change outside this claim. Carrier: none; noted, not filed.checklistfrom anapply_blueprintenvelope that otherwise carriesnextSteps(it measures nothing when no artifact was drafted, and swallows a failed measurement), althoughBuildResultCardPayloadmarks both required. The card then degrades as above. Observation on the cloud side, not filed.planCard.viewslists only the views the producer could write an intent for, so a view row count can be below the count line'scounts.views. Observation, not filed.Published faces
@object-ui/plugin-chatbot's exportedProposedPlangains two optional members (planCard,viewIntents);@object-ui/i18ngains three keys and rewords the 35chatbot.tool.*values in every pack. The seat's amended claim declaresClause-②: yesfor that, and the seat'sTIER_DEFAULTcontract review is on this PR.Session:
https://claude.ai/code/session_01Cbdek8SKSHxddGqTPZXdqX