Repository navigation
feat(console): the chat's draft review card publishes a draft, pinned to the version the turn saved - #39014
Conversation
…he card's Publish pins Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziUBsnPje7KHsByhN5
…o the version the turn saved Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziUBsnPje7KHsByhN5
…locale Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziUBsnPje7KHsByhN5
…results and the host's pinned publish Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziUBsnPje7KHsByhN5
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziUBsnPje7KHsByhN5
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziUBsnPje7KHsByhN5
… row type Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziUBsnPje7KHsByhN5
📓 Docs Drift CheckThis PR changes 1 package(s): 6 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 183 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 036876a3cf93cd6f360e10f81a996126e02542e8 && git checkout 036876a3cf93cd6f360e10f81a996126e02542e8
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 4203db7e4aeb52b1f1660f558430440a70d1e462 2bef835b10b9ca84706ed7b798a8a0418b366800 && git checkout -B drift-repro 4203db7e4aeb52b1f1660f558430440a70d1e462 && git merge --no-ff 2bef835b10b9ca84706ed7b798a8a0418b366800
node scripts/docs-audit/affected-docs.mjs --json 4203db7e4aeb52b1f1660f558430440a70d1e462
|
…under a bound Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziUBsnPje7KHsByhN5
…held wording Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziUBsnPje7KHsByhN5
… the added key Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziUBsnPje7KHsByhN5
…geset notes the verdictWithheld wording Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziUBsnPje7KHsByhN5
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm Contract-review-claim: session_01WGufzhGA3zoCFquQgku4pm · head ef3e99d · 2026-12-02T01:44Z |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm Contract reviewServed-tier: PR #39014 for card #38983, with #39015 folded in. Reviewed 2026-12-02T01:50Z on the net diff against ① Derived judgments
② Semver levelClause-②: yes (widening) The PR body and the changeset both read ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
Accepted deviations and follow-ups, none of which changes correctness or the contract:
Observation, not a finding: the chat's publish pins the draft and not the live row (no Implemented-by: VERDICT: PASS |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 review · PR #39014 (#38983, #39015) · head ef3e99d5 · 2026-12-02T01:52ZVERDICT: ACCEPT. No must-fix and no should-fix. The contract-tier record 7332178109 is PASS on this head, with four accepted nits.
Next: zone landing, after the seat names the follow-up. The merge closes #38983 and #39015. |
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufziUBsnPje7KHsByhN5
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 delta · PR #39014 (#38983, #39015) · head 2bef835 · 2026-12-02T02:30ZACCEPT, on the landing head
Next: zone landing. |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS 席位核对ACCEPT — PR #39014 @
落地
State change: ready for review + auto-merge, by the owning seat; on merge it closes #38983 and #39015. |
Requested by Yibo Wang · project thread
Fixes #38983
Fixes #39015
Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: none — the row is a stream part a host writes for the chat, which no skill teaches; the docs page
content/docs/frontend/plugins/plugin-chatbot.mdxis updated here维护者速读
What changes
packages/spec/src/ai/draft-review.zod.ts):DraftReviewItemSchemagains the optionalversion(non-empty string), the draft's version token as the turn's last save of it wrote it. The docblock's "What the card does not do / Nothing is published or discarded from the chat" flips to "What the card publishes": one draft per click, as the person, pinned throughdraftVersion; nothing discarded. Reference page regenerated.ui/packages/plugin-chatbot/src/chat/DraftReviewCard.tsx): with a hostonPublishDraft, each row carries a Publish button. Enabled only on a row with aversionand apublishableverdict; otherwise disabled with the reason in its title and accessible name (noVersion,withheld,refusals). The row keeps the click's result:published(button gone),conflict(draft changed since the turn, button gone),refusedwith the platform's code and sentence (button stays for another try). A host that throws is shown as a refusal. With no host prop the card is unchanged (no buttons).ChatbotEnhancedpasses the prop through; its comment line saying nothing is published here flips.ui/packages/app-shell/src/console/ai/draftReviewPublish.ts, new):publishReviewedDraftreusespublishDetailSave(the item page's pinned item publish) withpackageId= the row's package,draftVersion= the row's version andhadDraft= true, so a refusal never takes the assistant's draft back. 409METADATA_CONFLICTmaps toconflict; anything else torefusedwith the error's code and message. A row with no version is never sent.ChatPanewires it in (one import, one hook call, one prop; the file stays at 1,000 lines).chatbot.draftReview.*keys in all 11 locale packs (zh-Hant regenerated).verdictWithheld's.describe()and the docblock line now also cover a draft the door left unjudged under a bound such asMAX_RECORDS_EXCEEDED; shape unchanged.content/docs/frontend/plugins/plugin-chatbot.mdx§ Draft review card teachesonPublishDraftand drops "no publish control".minoron spec (theCheck Changesetgate readspackages/spec/authorable-surface/ai.jsongainingai/DraftReviewItem:version, an authorable key added), patch on plugin-chatbot, app-shell, i18n; says the "nothing is published from the chat" contract changes.Seat rulings carried (card thread order): optional version key, Clause-② yes (widening); the protocol line moved from the agreed
nonetoaddedbecause the authorable-surface ratchet recordsDraftReviewItem, and the gate refusesnoneon a moved shard; the docblock and the ChatbotEnhanced line flip, the changeset says so; no producer of the part lives in this repo (the cloud host fills it), so this ships the key plus the button and Publish is disabled on a row with no version. The cloud producer follow-up is the seat's to file. Discard (optional on the card) is not built.Risk-ranked first reads:
DraftReviewCard.tsxpublishBlockandpublishControl(what is clickable, what each result shows);draftReviewPublish.ts(pin and conflict mapping); the spec docblock flip.Tests
Run on 86fbd98 (objectstack-ai/objectstack, main 571b494 base); the head now adds docs, the changeset and the #39015 wording only:
pnpm --dir ui exec vitest run packages/plugin-chatbot/src/__tests__/DraftReviewCard-38048.test.tsx packages/plugin-chatbot/src/__tests__/DraftReviewCard.i18n-38048.test.tsx packages/app-shell/src/console/ai/draftReviewPublish-38983.test.ts: 3 files, 22 tests passed.onPublishDraftand shows it published; refused, withheld and unversioned rows are disabled with the reason and never call the host; conflict shown, no second Publish;PERMISSION_DENIEDshown with code and sentence, Publish kept; a throwing host shown as a refusal.draftPublishDoorfake that enforces the draft pin): the turn's draft goes live with{ packageId, draftVersion }; a draft another writer changed isconflict, not live, kept, no reset; a 403 refusal carries code and message, no reset; no version, no publish call.draftVersionfrom the host's publish turns 2 of 4 host tests red (the pin assertion and the conflict PIN); restored from HEAD, tree clean.pnpm --filter @objectstack/spec exec vitest run src/ai/draft-review.test.ts: 13 passed (new: version kept, optional, empty and non-string refused with path).pnpm --filter @object-ui/plugin-chatbot type-checkexit 0;pnpm --filter @object-ui/app-shell type-checkexit 0 (both incl. tsconfig.test.json).pnpm --filter @objectstack/spec check:generated:content/docs/references/**was stale, regenerated with--fix, re-check green.Acceptance notes
versionin thedata-draft-reviewpart. Until then every row's Publish is disabled ("Publish this draft in App Studio.").versionfrom the save receipt, plus the staging browser check) is asked of triage for a cloud card: pm:mailbox — triage#1 · os-warren #36743 comment 7330317456. This PR completes the framework side.check-eager-locale-catalogues/check-eager-closure-budget) needs a console build: NOT MEASURED locally, read from CI.Verification
Two minutes: run the vitest line under Tests; the five
objectstack#38983cases in the card harness and four indraftReviewPublish-38983.test.tspass.Derived gate families (local subset)
node scripts/pm/dispatch-gates.mjs --commandsderived 112 commands on 86fbd98; run one by one, exit code captured before any pipe. Later heads add only docs, the changeset and one.describe()wording (spec rebuilt andcheck:generatedre-run green on them).check-plugin-teardown-shape.mjs --self-test(its fixture is pinned to a commit this shallow clone cannot reach),check:skill-examples(needs a@objectstack/client-reactdist),check:dual-build-cjs-loads(needs every package's dist).check:type-check-debt(its re-measure passed the 300 s local cap).🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufziUBsnPje7KHsByhN5
Generated by Claude Code