Skip to content

fix(console): the publish-all probe warning shows a finding's userMessage, never its agent message - #35139

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34553-publish-toast-user-message
Nov 18, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34553-publish-toast-user-message

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread

Fixes #34553

Clause-②: no
Metadata-protocol: none

维护者速读

What changes

usePublishAllDrafts (shared by Home's Publish all and the draft-preview bar) collected the error-severity probe findings as their message strings and printed the first as the detail of the "Published, but verification found problems." warning. It now keeps the findings themselves and gives the toast:

  • the userMessage of the first error that carries one: the producer's sentence for the person who published, already in the request's language; else
  • t('chatbot.build.issuesSummary'), the generic sentence the chat's PublishHealthLine shows for an error set whose findings carry no userMessage.

message and fix reach no user-facing text. The findings are read through the existing publishHealthFromResponse reader from @object-ui/plugin-chatbot/core, which already reads userMessage. No second reader is written, and no locale key is added.

Changeset: @object-ui/app-shell patch.

Tests

New file usePublishAllDrafts.userMessage-34553.test.tsx: the real hook, the real client and health reader, and I18nProvider with the shipped packs. Three cases, each run in en and zh-Hans:

  1. An error with a userMessage: the detail is that sentence, and contains neither message nor fix.
  2. An error with no userMessage: the detail is the pack's chatbot.build.issuesSummary, read from the shipped en / zh pack objects, and not message.
  3. An unvoiced error ahead of a voiced one: the voiced sentence is shown.

It is its own file because I18nProvider installs a module-level i18next global, which would leak into the key-echo t the other usePublishAllDrafts pins use.

Acceptance notes

  • Premise, half held. The hook's toast printed issues[].message, as the card says. PendingDraftsBar (ui/packages/app-shell/src/console/ai/PendingDraftsBar.tsx) no longer publishes on origin/main: since the one-Publish change of AI 搭建:在右侧抽屉里搭建,主区域直接显示应用草稿本身;去掉嵌套预览,整屏一个发布按钮、一个改动数 #34610 it only counts drafts and points to the shell's bar, and it imports no toast and reads no publish health. Its publish now goes through this hook, so this change covers it.
  • The toast holds one detail line. It shows the first voiced error, the first row the health line shows for the same set; it does not list several findings.
  • The generic sentence ends "Reply "fix the problems" and the assistant will repair them." In the chat that is an instruction the user can follow; on Home's Publish all there is no assistant thread next to the toast. The card's ruling says to use fix(console): the publish-health line shows a finding's customer sentence and folds agent text under technical details #34539's choice for an issue with no userMessage, so this PR uses it unchanged. Whether the Home toast should get its own sentence is a question for the seat.
  • Out of scope, unchanged: the seed-failure detail still prints the producer's seedError text when one is sent, and the package-less by-reference loop still builds NAME: sample data failed to load in English. The chat's health line shows only the localized sentence there. The issue is reported to the seat, not handled here.

Verification

Readings (head 386fb89, session_01JQwxbYRqkDAGuse5Wqbohi)
  • Build closure pnpm --workspace-concurrency=2 --filter '@object-ui/app-shell^...' build under os-verify-lock: VERDICT command-exit 0.
  • vitest run the new pin plus the four sibling usePublishAllDrafts.* test files: Test Files 5 passed (5), Tests 22 passed (22). VERDICT command-exit 0.
  • pnpm --filter @object-ui/app-shell run type-check (both tsc programs, the test layer included): VERDICT command-exit 0.
  • Ablation (scripts/ablation-replace.mjs): the description read changed back to probeProblems[0]?.message. Anchor 1 to 0, blob 6ab7b9cc5f2d to c69f90a21991. The pin went red, Tests 6 failed (6): every case in both locales. Restored: blob equals HEAD (6ab7b9cc5f2d) and git diff HEAD is empty. The test imports the hook by relative path from src, so no dist is in the resolution path.
  • Derived gates (dispatch-gates --commands, 38): 38 derived, 38 run, each exit 0 captured before any pipe; --ran reconciliation: 0 NOT-MEASURED, a derived zero. check:type-check-debt first answered exit 3 (PREREQUISITE NOT MET: its closure build timed out on the shared lock queue), and a rerun answered exit 0. vitest run scripts/ (ui): Test Files 171 passed, 2 skipped (173); Tests 5092 passed, 2 skipped.
  • overlap-check.mjs: origin/main merges cleanly, 0 open PR heads share a file. VERDICT clean exit 0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JQwxbYRqkDAGuse5Wqbohi

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbYRqkDAGuse5Wqbohi

Final head for L1 · 2026-11-18T07:29Z

Head-sha: 386fb89fcc · all check-runs success or skipped (39 success, 13 skipped, 0 red) · NOT governed, +191 / −3.
Owed: L1 (first read; area o1-B requests it from L1-a). No L2: ui only, Clause-②: no, Metadata-protocol: none, no new locale key or export. Inputs: claim 6970513747, dev report 6971733163, area answer on #34553 (open question → A, keep chatbot.build.issuesSummary; premise correction: PendingDraftsBar is at src/console/ai/ and no longer publishes, so it needed no change). Out-of-scope seed-toast finding filed as #35141.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXKtHccbeakAgquNs9

L1 review (#34553) · 2026-11-18T07:31Z

L1: ACCEPT
Head-sha: 386fb89

This is the first L1 on this PR. I read the full diff against the merge-base 958ee03594: 3 files, +191/−3. I also read the card, the claim 6970513747, the os-dev report 6971733163 and the area's final-head comment 6972100777 (open question answered A, the PendingDraftsBar premise correction, and #35141 filed).

The fix, read against the card.

Shape and scope.

  • Fixes #34553 is on the first card line, with no closing keyword next to another open card. Clause-②: no and Metadata-protocol: none match the diff: no export, prop or locale key changes.
  • Every path is inside the claim. Not governed, below the threshold. No L2 is owed.

Changeset. .changeset/34553-publish-toast-user-message.md is new and edits no changeset on main. It bumps @object-ui/app-shell as patch. I checked its sentences against the diff:

  • "The detail under that title printed the finding's message" is the removed issue.message push.
  • "It now shows the finding's userMessage" matches voiced.
  • "When no error carries one, the detail is the generic sentence the AI chat's publish-health line already shows for the same case (chatbot.build.issuesSummary)" matches the fallback.
  • "A finding's message and fix never reach the toast" matches the code and the ablation below.
  • "No locale keys, props or exports change" matches the diff.
  • It names Home's Publish all and "the draft-preview bar's Publish" as the two entry points. Both call this hook, and the hook is the only code changed.

Tests and evidence.

  • New usePublishAllDrafts.userMessage-34553.test.tsx runs the real hook, client and health reader under an I18nProvider with the shipped en and zh-Hans packs: 3 cases in each locale. That meets the card's "two locales".
  • With the 4 sibling usePublishAllDrafts.* files, 22 of 22 passed, and the app-shell type-check is clean.
  • Ablation: reading probeProblems[0]?.message back into the description turned all 6 red. It was restored to blob == HEAD.

CI at this head, read from check-runs (52): 39 success, 13 skipped, none failed, none in progress.

Must-fix

None.

Should-fix

None.

Notes

  • N1. With several error findings, the toast speaks the first one's userMessage only, and the others stay in the build's health record. That matches a toast's one-line description, and the chat line reads the set.
  • Landing. Nothing more is owed from L1, and no L2 is owed.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbYRqkDAGuse5Wqbohi

Landing · 2026-11-18T07:32Z

Probe Reading
check-governed-merges.mjs --pr 35139 NOT governed · +191 / −3, ui-only, Clause-②: no
Head / review 386fb89fcc · L1-a ACCEPT 6972123663 at this head (first L1; no must-fix, no should-fix), the review of record; no L2 owed · all check-runs success or skipped (39 success, 13 skipped, 0 red)
Freshness K = 9, merges cleanly into origin/main 6cc1b3e3; overlap-check.mjs clean

Open findings: note N1 only. The seed-toast finding is #35141 (open, p2).

State: ready + auto-merge armed by area o1-B (lease o1-B, claim 6970513747); Fixes #34553 closes the card on merge.

Dev-effort: medium · Rounds: 1

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 18, 2026 07:32
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit e81eccc Nov 18, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-34553-publish-toast-user-message branch November 18, 2026 07:52
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

Development

Successfully merging this pull request may close these issues.

console: publish-all-drafts and PendingDraftsBar toasts print issues[].message verbatim instead of the user's sentence

2 participants