Repository navigation
Description
epic:#5027#1 · hotlong · session_01Q4EjjMUfmNYTem26rXLFUf
Filing gate: ④ topic child (cross-repo half of a cloud card). Source: epic objectstack-ai/cloud#5027 M2 row 3 = cloud#5085 (plan v2 approved by the maintainer 2026-11-27 01:02Z 「同意,开工」): "a build turn that saved N drafts ends with a card listing N rows; publish from the card goes through the existing human publish path". cloud#5085's premise check (2026-11-27 20:54Z) found the chat renders no drafts; cloud's half is PR cloud#5172 (sends the data part). Business reason: an admin who builds in chat sees what was saved and where to review it, instead of hunting in Studio.
Owner: repo:objectstack#3 (maintainer 2026-11-27 07:51Z: non-cloud tasks go to the objectstack seat). Filed by seat epic:#5027#1, which keeps cloud#5085 and the pin round.
Grading: area:ai · Task · p1 · size M · reach: admins with the cloud admin skill switched on (default off) · evidence: read (objectstack origin/main 8d34c44; cloud PR #5172).
Dedupe: searched data-draft-review, DraftReviewCard, pending drafts chat; no open card. Precedent: the question card (objectstack#37872 spec envelope, #37874 QuestionCard).
维护者速读
- 是什么:管理员在 ask 对话里搭建时,回合结束后在回答下面出一张卡,列出这一轮存的草稿和每个的判定(能发布 / 有几个问题),每行和每个包都带去工作室审阅的链接。
- 卡片上不发布、不丢弃,都去工作室现有的人工流程(席位裁定 Q1=A)。第一版只在实时对话里显示,刷新后不重建(Q2=A,之后另开 cloud 卡把部件存进消息)。
- 要你做什么:无。
Where it renders (objectstack origin/main 8d34c44)
- The ask chat is
ui/packages/app-shell/src/console/ai/ChatPane.tsxoverui/packages/plugin-chatbot(ChatbotEnhanced,mapMessages.ts,toolResultParsers.ts). - Only
data-chartanddata-record-citationsare read today (STORED_ANSWER_DATA_PARTS,toolResultParsers.ts:325). Nothing renders asave_metadata_draft/list_draftsresult.
What cloud sends (PR cloud#5172)
At the end of a streamed ask turn whose admin skill saved drafts, before finish, one UI-message-stream part:
{ type: 'data-draft-review', id: 'draft-review', data: {
drafts: [{ type, name, package, label?, verdict: { publishable, refusals, advisories } | null,
verdictWithheld?, verdictError?, verdictRead: 'turn-end' | 'save',
review: { changes, item } }], // save order, at most 50
omitted?: number } }
verdict is the light door's own list_drafts verdict read at the turn's end as the person; review is the door's own review routes (studioChangesReviewLink, studioItemReviewLink).
What to do
- Spec:
packages/spec/src/ai/draft-review.zod.tswithDRAFT_REVIEW_PART_TYPE = 'data-draft-review'andDraftReviewListSchema(closed objects, as above; field names may be refined, say so on this card before merge so cloud follows). Follow the spec change rules (changeset, generated baselines, api-surface, docs). - plugin-chatbot: a
DraftReviewCardunder the assistant message that carries the part. One row per draft: label or name, type, a verdict badge (will publish / N problems / verdict withheld), a "Review" link toreview.item; per package a "Review and publish" link toreview.changes;omittedshown as "+N more". No publish and no discard button (seat ruling Q1 = A). Strings in every ui locale pack. - Live only in v1 (seat ruling Q2 = A): do not rebuild the card from stored
save_metadata_draftresults (save-time verdicts can be wrong). Do not add the part toSTORED_ANSWER_DATA_PARTSuntil a cloud card stores it on the assistant message.
Acceptance
- A stream fixture with the part renders N rows with the right badges and links; a malformed part renders nothing (no crash); a turn without the part is unchanged.
- Accessible names on the links; no overflow in the eleven locales.
- Hand-off: when merged, Notify seat epic:fix(lint): regex/JSON Schema 编译不过的校验规则改在发布期拒绝 —— 声明了却什么都不拦的两个静态产物 (#4762) #5027#1 (mailbox objectstack#37634) with the sha; cloud then switches to the spec constant (closes cloud#5085) after a pin round.
Clause-②: yes
Suggested-grade: p1
Activity
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim: PM loop round 1
Session:
session_01L9qibyUSf2nKJWW6qBemSUThread session:
session_01L9qibw1AHBDKuYXJdbT1PNAccount:
os-teslaBranch:
claude/project-thread-qdbmceWorktree:
objectstack-issue-38048Domain:
aiArea:
o3-askai(问AI zone, a seat card thread; maintainer accepted the card 2026-11-28 00:46Z)Seat:
repo:objectstack#3File surface:
packages/spec/src/ai/draft-review.zod.ts+draft-review.test.ts;packages/spec/src/ai/index.ts; the generated set the ask-question part (feat(spec): ask-question envelope for the question card, with legacy ask_which reading #37930) touched:api-surface/ai.json,authorable-surface/ai.json,declaration-map/ai.json,export-origins/ai.json,json-schema.manifest/ai.json,llms.txt,content/docs/references/ai/{draft-review.mdx,index.mdx,meta.json},content/docs/references/index.mdx,docs/audits/2026-07-unknown-key-strictness-ledger.counts/ai.md;.changeset/38048-draft-review-part.md(minor@objectstack/spec).ui/packages/plugin-chatbot/src/chat/DraftReviewCard.tsx;mapMessages.ts(extractDraftReview, safeParse through the spec schema, malformed → undefined);chat/types.ts;ChatbotEnhanced.tsx(beside RecordCitations);index.tsx/core.tsexports;ui/packages/app-shell/src/console/ai/ChatPane.tsx(wires an optionalonOpenReviewLinkto in-app navigate so a live-only card survives the click; href fallback when unwired); the elevenui/packages/i18n/src/locales/*packs (chatbot.draftReview.*);ui/packages/plugin-chatbot/src/__tests__/DraftReviewCard-38048.test.tsx;content/docs/frontend/plugins/plugin-chatbot.mdx,ui/packages/plugin-chatbot/README.md;.changeset/38048-draft-review-card.md.NOT
STORED_ANSWER_DATA_PARTS, history hydration or any stored-part path (seat ruling Q2 = A, live only), and nothing underskills/**,docs/adr/**or.claude/**. Stop on breach and explain in the report.Container & model:
M,mode:thread,model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate",effort: highClause-②: yes (widening)
Metadata-protocol: none
Responsibility: an ask turn that carries one
data-draft-reviewpart renders one card under that assistant message, with one row per draft (label or name, type, a verdict badge: will publish / N problems / verdict withheld) and a Review link toreview.item, one "Review and publish" link per package toreview.changes, and "+N more" foromitted. The card has no publish and no discard control. A malformed part renders nothing and does not crash; a turn without the part renders exactly as today. Strings are in every locale pack, links carry accessible names, and no locale overflows. Seat ruling on the shape:verdict.refusals/advisoriesreuseRuntimeAuthoringIssueSchemaarrays from@objectstack/spec/api, since that is what the door'slist_draftsverdict returns (runtime mcp-authoring.ts:405-414). The thread posts the final part shape on this card before merge, so cloud#5172 follows it, as the card asks.Thread-read: none
Premise: holds, measured on origin/main 0e90d2f. The chat reads only
data-chart(toolResultParsers.ts:172, allow-list :324-332) anddata-record-citations(mapMessages.ts:267). Nothing underui/renders asave_metadata_draft/list_draftsresult outside tests. The build chat front end retired by feat(chatbot): retire the build chat frontend #37720 (with itsDraftReviewtype) is not revived or reused. Full report:/mnt/project-files/card-38048/pre-claim-report-0e90d2f9.md.Serial constraints cleared:
none — no open PR touches ChatbotEnhanced, toolResultParsers or mapMessages; C5 #37861 (branch qgv6xl, no PR yet) shares ChatPane.tsx and the locale packs with different keys and props, so whichever lands later merges mainobjectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibw1AHBDKuYXJdbT1PN
os-dev-report
{ "issue": 38048, "status": "done", "branch": "claude/project-thread-qdbmce", "pr": "https://github.com/objectstack-ai/objectstack/pull/38102", "session": "session_01L9qibw1AHBDKuYXJdbT1PN", "premise_still_valid": true, "summary": "New spec part in @objectstack/spec/ai: DRAFT_REVIEW_PART_TYPE 'data-draft-review', DRAFT_REVIEW_MAX 50, DraftReviewListSchema and its row / verdict / verdict-refusal / links schemas, all closed; verdict.refusals and advisories reuse RuntimeAuthoringIssueSchema per the seat ruling; review links must be Console paths. plugin-chatbot reads the part through the schema (extractDraftReview, live only, not in STORED_ANSWER_DATA_PARTS) and ChatbotEnhanced draws DraftReviewCard under the answer: rows grouped by package, verdict badge, Review link per draft, Review and publish link per package, +N more, no button. ChatPane opens the links in-app (onOpenReviewLink -> navigate) and gives them a basename href (reviewLinkHref -> documentHref(useHref('/'))). Strings chatbot.draftReview.* in all eleven packs (zh-Hant generated), problems and more as plural families.", "tests": "At fb2070cda: pnpm --filter @objectstack/spec test -> Test Files 910 passed (910), Tests 28809 passed | 1 todo; spec typecheck exit 0. At e1c09b0a7: pnpm --dir ui exec vitest run packages/i18n/ packages/plugin-chatbot/ -> Test Files 187 passed (187), Tests 2615 passed | 13 skipped; the two new card files re-run after the grouping move: 2 files, 13 tests passed. app-shell console/ai + useChatConversation + product-neutral ratchet + clickable census: Test Files 39 passed (39), Tests 330 passed. type-check exit 0 for @object-ui/plugin-chatbot, @object-ui/i18n, @object-ui/app-shell. eslint on changed files: 0 errors. No ablation: new behaviour only, the refusal and control legs are in the same files.", "gates": "dispatch-gates --ran: 110 derived, 109 run exit 0, 1 NOT MEASURED (check:dual-build-cjs-loads exit 3, needs a full repository build; CI Lint & Repo Gates runs it), 0 unrun. First sweep on 61fee1dad found check:llms-txt exit 1 (ai count) and check:spec-parsed-alias exit 1 (three missing Parsed twins); both fixed, then the 42 spec/declaration/entry/docs families re-ran on fb2070cda: 42/42 exit 0. check:generated: all 14 artifacts up to date. PR CI: in_progress at report time.", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "5 — GitHub MCP reads only: issue_read x4 (#38048, its comments twice, #37682), list_pull_requests x1", "api_writes": "2 — fleet-write relay pr_create (POST pulls + assignees leg; read-back 9278 bytes identical); this os-dev-report comment via post-stamped", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [], "deviations": [ "Surface beyond the claim, all small: ui/packages/plugin-chatbot/src/chatMessageAdapter.ts (draftReview in RuntimeOnlyMessageKeys, so the seam types carry it), chat/draftReviewGroups.ts (grouping helper kept out of the component file for react-refresh), a second test file DraftReviewCard.i18n-38048.test.tsx (an I18nProvider mount sets a module-level global, so pack strings need their own file), the extra optional prop reviewLinkHref, and packages/spec/llms.txt (its hand-kept count, red without it). core.ts not touched: mapMessages is not in the light core entry.", "Overflow in the eleven locales is not measured in a browser (jsdom has no layout); rows wrap by construction.", "Branch name is the thread's assigned claude/project-thread-qdbmce, as the claim records, not claude/issue-38048-*.", "Merged origin/main once before the sweep (4 unrelated commits, no conflict)." ] }Final part shape, for cloud#5172 to follow (also in the PR body):
Changes from the card's sketch:
verdictmust be present (null, not left out);reviewis closed atchangesanditem(do not forward the door'snote);draftsholds at least one row;omittedis never 0.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim amendment (file surface), for PR #38102 at fb2070c:
ui/packages/plugin-chatbot/src/**/chatMessageAdapter.ts(one runtime-only key);chat/draftReviewGroups.ts(the grouping split out of the card); a second test file,DraftReviewCard.i18n-38048.test.tsx; an optionalreviewLinkHrefprop (new tab, with basename); and theaicount inpackages/spec/llms.txt.core.tsis not touched.verdictmust be present (it may benull);reviewtakes onlychangesanditem;draftsholds at least 1 row;omittedis never 0;Clause-② yes (widening), Metadata-protocol none.
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Claim amendment:
Metadata-protocol: added(wasnone). The new schemas add rows topackages/spec/authorable-surface/ai.json, which the ratchet counts as a metadata-protocol change, as with #37930.@objectstack/specis minor. Clause-② stays yes (widening).objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
os-dev-report delta —
3a44ab65ad421afb684e06cf8fc4faf3253e76c8Answers L1 REVISE 7232462684 (R1–R3) and contract review 7232434714 (S1, S2, N1). Commits since
fb2070cda:98b52b0a6(M1,Metadata-protocol: added) and3a44ab65a(below).consolePathis/^\/(?!\/)[^\\\s\u0000-\u001F\u007F]*$/: one leading/, never//, and no backslash, whitespace or C0/DEL control character anywhere. Refusal rows indraft-review.test.ts(bothitemandchanges):/\evil.example/x,/<TAB>/evil.example/x(a real tab),/<LF>/evil.example/x, a space, a NUL, plus the earlierhttps:,//,javascript:, relative and empty. Accept row: a link spelled asstudioItemReviewLink/studioChangesReviewLinkbuild it, segments throughencodeURIComponent(a package with a space, a name with a backslash, a tab and a slash).draftsdescription and the module text: one row per draft, unique bypackage,typeandname; a draft saved more than once in the turn is one row, placed at its first save, carrying the verdict read last;omittedcounts drafts, not saves. Reference page regenerated;llms.txtcarries no description text.RuntimeAuthoringIssueSchema's shape (an unknown key there is dropped). A new test pins the drop./mnt/project-files/card-38048/overflow/.Readings at
3a44ab65a:pnpm --filter @objectstack/spec test→ 910 files, 28811 passed, 1 todo (draft-review.test.ts12).pnpm --dir ui exec vitest run packages/i18n/ packages/plugin-chatbot/→ 187 files, 2615 passed, 13 skipped.pnpm --filter @objectstack/spec typecheck→ exit 0; eslint on the two changed spec files → 0.dispatch-gates --commands110 families, all run after apackages/**build: 110 exit 0;--ran→ "110 run, 0 NOT-MEASURED".check:dual-build-cjs-loads→ exit 0 (126 require entries across 74 packages load).check-changeset-no-major --event <replacement body>→ exit 0.Not changed: N2–N5 (nits), the optional
ChatbotEnhanced.tsxwording (depends on #38106 landing first). No UI file changed sincefb2070cda.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU
Closed-card tidy · 2026-11-28T04:54Z: the card closed when its PR merged;
pm:dispatchedcomes off.