Skip to content

fix(plugin-chatbot): the build result card draws the checklist verification line and states a failed build once - #34858

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34627-checklist-verification-line
Nov 17, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34627-checklist-verification-line

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

Fixes #34627

repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:AI 搭建结果卡的核对清单现在会显示云端新增的 verification 行(红色,显示云端给的标签和问题数);清单失败时,搭建的草稿卡不再显示「N 处待修复」标签和红色的「fix the problems」提示,失败只在清单里说一次。清单里其它新种类的行(如之后的 publish)按其 status 和 line 原样显示,不必再改控制台。
  • 为什么改:console AI build card: render the result checklist's new verification line, and drop the 「Completed · N to fix」 card beside a failed checklist (consumer half of objectstack-ai/cloud#4799) #34627(cloud#4799 的控制台一半)。以前控制台丢掉这一行,失败的搭建显示「核对通过 4/5」却只列 4 行,同一屏还重复说了两次失败。
  • 风险与回滚:只改 @object-ui/plugin-chatbot 的映射和结果卡渲染,没有新的语言键,不动契约和服务端;已有三种行的显示与原来一致。回滚即 revert。
  • 先看:ui/packages/plugin-chatbot/src/mapMessages.ts 的 checklistLineOf(哪些行保留、哪些丢弃);ChatbotEnhanced.tsx 的 BuildChecklistRows(红色行)和 renderToolDetail 的 failureOnChecklist(什么时候不画标签和红字)。
  • 两分钟验证:pnpm --dir ui exec vitest run packages/plugin-chatbot/src/__tests__/ChatbotEnhanced.checklistVerification-34627.test.tsx,预期 9 个测试全部通过。
  • 需要你做的:无,席位落地。

What changes

  • Mapper (mapMessages.ts). BuildResultChecklist.lines is now a union, BuildResultChecklistLine. detectBuildChecklist reads each line through checklistLineOf:
    • object / view / sampleData: read as before (status + line).
    • verification (cloud ChecklistVerificationLine, { kind: 'verification', status: 'failed', label, count }): kept only when status is failed, label is a non-empty string and count is a non-negative integer. Anything else under this kind is dropped; it is not read as a generic line.
    • Any other kind with a valid status and a non-empty string line is kept as { kind: 'other', servedKind, status, line } (the claim's last paragraph, from cloud note 6941198748: cloud#4809's publish line is the next such kind).
  • Result card (ChatbotEnhanced.tsx, BuildChecklistRows). A verification row is drawn in red (XCircle, text-red-600 dark:text-red-400, data-kind="verification"). It shows the producer's label, then the count through the existing chatbot.build.issuesCount key (zh 3 处待修复, en 3 to fix). No new locale key, and no copy of the producer's wording. An other row is drawn like the existing rows, by status and line. Rows of the existing kinds keep their markup unchanged. The chip still reads the served passed/total.
  • One statement of failure. When the turn's result card shows a checklist whose status is failed, renderToolDetail gets failureOnChecklist. The build's draft card then draws neither its error-count chip (draft-verification-chip, "N to fix") nor the red draft-issues-summary ("fix the problems"). The findings stay behind its closed Technical details disclosure. A clean "Verified" chip and the amber warnings-only summary are not failure statements, so they draw as before.
  • Patch changeset for @object-ui/plugin-chatbot. detectBuildChecklist and its types are not exported from the package index, so no public type changes.

Tests

New ui/packages/plugin-chatbot/src/__tests__/ChatbotEnhanced.checklistVerification-34627.test.tsx (9 tests). Every message goes through the real uiMessageToChatMessage:

  • Mapper: a verification line is kept with label and count; malformed verification lines are dropped (empty label, count: -1, count: '3', status: 'passed', a line instead of label/count); a publish line is kept by status + line, and malformed ones are dropped. CONTROL: a checklist without the new line maps exactly as before.
  • Card: a failed build reads 核对通过 4/5 over 5 rows. Exactly one row is failed, and it reads 校验未通过 · 3 处待修复 in red. The draft card has no draft-verification-chip and no draft-issues-summary, and Technical details is still there. A new kind renders by its line. CONTROL: a passed checklist without the new line draws 7/7 over 7 rows with no data-kind, and the draft card keeps its chip and summary. CONTROL: no checklist (an older producer) keeps the chip and summary.
Readings at head 61db196
  • pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-chatbot/ (lock VERDICT command-exit 0): Test Files 102 passed (102), Tests 1038 passed (1038).
  • pnpm --filter @object-ui/plugin-chatbot run type-check (tsc --noEmit && tsc -p tsconfig.test.json): VERDICT command-exit 0.
  • eslint --no-inline-config on the three touched files: exit 0, 0 errors (12 warnings, all react-hooks warnings outside this diff's hunks).
  • Ablation A: checklistLineOf's if (r.kind === 'verification') { was replaced through scripts/ablation-replace.mjs (anchor 1 to 0, blob 4268370a3031 to 7f5534781a7a). The new file went red: 3 failed | 6 passed (9). The mapper keep test, the malformed-drop test and the 4/5 card test failed. Restored: blob equals HEAD, and git diff HEAD is empty.
  • Ablation B: the call site's { failureOnChecklist: buildChecklist?.status === 'failed' } was replaced with { failureOnChecklist: false } (blob af2d03d4e901 to d75c90814fb0). Result: 1 failed | 8 passed (9), and the failed test is the draft-card test. Restored: blob equals HEAD, and git diff HEAD is empty.
  • Gate families (node scripts/pm/dispatch-gates.mjs --ran): 39 derived famil(ies) accounted for — 39 run, 0 NOT-MEASURED (a DERIVED zero — all 39 recorded an exit code and none of them is 3). This includes pnpm --dir ui exec vitest run scripts/ (Tests 5077 passed | 2 skipped). pnpm --dir ui run check:new-line-citations: 0 new citation(s).
  • node scripts/pm/overlap-check.mjs --branch=claude/issue-34627-checklist-verification-line: VERDICT clean exit 0 against origin/main 7752cac.

Acceptance notes

  • The vendored producer schema (__tests__/fixtures/build-cards.schema.ts, copied at cloud f0ecef3a) predates ChecklistVerificationLine. This session cannot read the cloud repository, so the copy was not refreshed. The new fixtures follow the shape the card and the claim name, and they are not routed through buildCards.contract-12724.test.ts. Refreshing the vendored copy at a cloud sha that carries the line would let the contract test check them.
  • Branch base is origin/main 0ad377c. origin/main has since moved to 7752cac. The one incoming plugin-chatbot commit touches toolResultParsers.ts, which this diff does not touch. Overlap-check reports a clean merge, and CI runs on the merge ref.

Verification

Run the new test file (command in 维护者速读). In a running console, a failed AI build's result card should read "Checks passed 4/5" over five rows, with one red row naming the issue count. The draft card under it should show no "N to fix" chip and no red "fix the problems" sentence.

Human Minimum

  • 1. No packages/spec change.
  • 2. New names follow the casing for their kind.
  • 3. No formatter ran. eslint on the touched files is clean of errors; repo-wide pnpm lint is CI's run.
  • 4. One issue, one branch off main, one pull request.
  • 5. Patch changeset with both declaration lines, here and in the changeset.
  • 6. packages/spec not touched.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English. (The 维护者速读 block is the seat's maintainer summary.)

Generated by Claude Code

…fication line and states a failed build once

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzfrh8TiPJf1i2kMSoa
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 17, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgQsdnyS4QdR8stjDa

L1 review (L1-d) · 2026-11-17T14:27Z

L1: ACCEPT
Head-sha: 61db196c2a33b4da8f41c1aa2b690b6a5e90dfb2

Read at that head: the file list (4 paths), the full diff, the PR body, card #34627 with triage 6938627484 and cloud note 6941198748, claim 6948872692, os-dev report 6950309631, and the 52 check-runs.

Checklist

  • Shape: draft, base main, Fixes #34627. The card's three Expected items are all delivered, so a closing keyword is right. No other open card sits beside a keyword (cloud#4799/phoneOtp.cooldownSeconds 配成大于 1 小时会被静默截断 —— OtpSendGuard 的历史 TTL 硬编码 1 小时 #4808/feat(spec)!: 通知模板孤儿语汇退役 —— ./system 不再导出 EmailTemplate/SMSTemplate/PushNotification/InAppNotification (#4616) #4809 are another repository and sit in prose).
  • Scope vs claim: mapMessages.ts (BuildResultChecklist, isLineKind → isMeasuredLineKind + checklistLineOf, detectBuildChecklist), ChatbotEnhanced.tsx (BuildChecklistRows, renderToolDetail's chip and summary, and the call site), one new card-named test under __tests__/, and the root changeset. All inside the claim's file surface, including the generic-kind paragraph. No existing test is edited and no unrelated file is touched.
  • Changeset: @object-ui/plugin-chatbot is published and is the only package whose src/** moved. Sentences checked against the diff:
    • The verification shape { kind, status: 'failed', label, count } is exactly what checklistLineOf keeps.
    • "a red row: the producer's label, then the issue count" is the XCircle + text-red-600 row, with l.label and chatbot.build.issuesCount.
    • "no longer draws its 'N to fix' chip or the red 'fix the problems' sentence" is the two failureOnChecklist guards, both conditioned on errors > 0.
    • "findings stay behind its Technical details" is draft-issues-details, asserted present.
    • "any other kind that carries a valid status and a string line is drawn by those two fields" is the other arm.
    • "Lines of the existing kinds draw as before": that <li> branch is unchanged, and the CONTROL has no data-kind.
      All true.
  • Clause-② / Metadata-protocol: no / none in the claim, the body and the changeset. BuildResultChecklist and the new BuildResultChecklistLine are not exported from index.tsx or core.ts. Their only non-test reader is the module-private BuildProgressPanel, so the widened lines union is unreachable from the package's exports type graph. No contract face.
  • Governed: check-governed-merges.mjs --pr 34858 gives 0 of 4 paths and 287 lines, so not Tier H.
  • i18n: no new key. The count reuses chatbot.build.issuesCount (en {{count}} to fix, zh-Hans {{count}} 处待修复, zh-Hant present), and the label renders as served, as the card asks ("no client-side copy of the producer's wording"). The i18n-locale-en eager budget is untouched.
  • Tests: 9 tests through the real uiMessageToChatMessage and a full ChatbotEnhanced render under I18nProvider (zh).
    • The card acceptance reads literally: 核对通过 4/5 over 5 rows, exactly one failed row 校验未通过 · 3 处待修复 in red.
    • No draft-verification-chip and no draft-issues-summary.
    • Malformed verification lines are dropped, not demoted to generic.
    • Two CONTROLs (a passed checklist, and no checklist) keep the chip and summary.
    • Ablations bite on both halves: the verification arm (3 red) and failureOnChecklist (exactly the draft-card test red).
  • CI at this head: Lint & Repo Gates, TypeScript Type Check, Test UI (all 16 shards), Type Check UI, Lint UI, Build & E2E UI, Live E2E UI, Check Changeset and the Governed Surface Queue Guard all success. The rest are skipped by path filter.

Must-fix

None.

Should-fix

None.

Notes

  • N1, no live reading: the only producer of the verification line is cloud PR phoneOtp.cooldownSeconds 配成大于 1 小时会被静默截断 —— OtpSendGuard 的历史 TTL 硬编码 1 小时 #4808. Its paired publish line is cloud#4809. An open-source boot cannot serve a failed checklist, so the full-component render stands in, and the body's Verification paragraph names the live check. Triage's order note still applies: land this reader before or with the cloud pin move that carries the producer.
  • N2, contract-test gap: the new fixtures bypass buildCards.contract-12724.test.ts because the vendored build-cards.schema.ts (cloud f0ecef3a) predates ChecklistVerificationLine. The body declares this in its Acceptance notes. A refresh at a cloud sha carrying both lines would close it. It is not owed here, because the card names the shape and this session cannot read cloud.
  • N3, "Completed" left on the draft card: with the chip gone, the draft card's header keeps its tool-state word ("Completed"). It no longer states a failure, so the card's acceptance (「同一屏只有一处说失败」) holds.
  • N4, the dev's open question: the <!-- signed: … --> last line is the seat's one sanctioned dev-written HTML comment (standard order 07:41Z). The area's answer A is right.
  • N5, base: the branch base 0ad377c is behind main. The only incoming plugin-chatbot change, fix(plugin-chatbot): a reloaded answer draws a redrawn chart once, keeping the last visualize_data result per chartId #34840, touches toolResultParsers.ts alone, overlap-check is clean, and the queue runs on the merge ref.

Landing: not governed, all checks green. Area o3-H lands it. A later push owes a delta read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa

Landing (area o3-H) · 2026-11-17T14:28Z

Reading Value
L1 ACCEPT (L1-d, comment 6950913876) on head 61db196c2a33b4da8f41c1aa2b690b6a5e90dfb2, no must-fix, no should-fix, notes only
CI on that head 39 success, 13 skipped (path filter), 0 failed or pending; mergeable_state: clean
check-governed-merges.mjs --pr 34858 NOT governed, 0 of 4 paths; 287 changed lines ≤ 3000
K (0ad377c1..origin/main, first-parent) 12 (< 15); this PR touches no shared budget input (locales/en.ts)

State change: ready + auto-merge enabled; Fixes #34627 closes the card on merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 17, 2026 14:29
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit fc5913e Nov 17, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-34627-checklist-verification-line branch November 17, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants