Repository navigation
fix(app-shell,cli,plugin-designer): one authority for Diagnostic, DiagnosticLevel and ConfirmDialogState (objectui#6349, batch 6) - #12057
Conversation
…gnosticLevel and ConfirmDialogState (objectui#6349, batch 6) Three ledger rows, each two or three meanings behind one name, converge by renaming the sites that no package entry publishes: - Diagnostic: @object-ui/sdui-parser keeps the name (published at its root and read through it). The flow designer's structural-check finding becomes FlowSimDiagnostic; the doctor command's check result becomes DoctorDiagnostic. - DiagnosticLevel: the flow designer's 'error' | 'warning' keeps the name (its structural, server and expression problems all carry it); the doctor's 'ok' | 'warn' | 'error' becomes DoctorDiagnosticLevel. - ConfirmDialogState: app-shell's dialog data keeps the name; the designer's hook result becomes DesignerConfirmDialogState. The three rows leave KNOWN_COLLISIONS. Comment riders: the chat page's import comment and two plugin-chatbot comments name ChatbotEnhancedMessage as batch 5 left it, and the ledger's note above the Filter rows records ruling 5857342228 as landed in objectui#10823. Types and comments only. Claude-Session: https://claude.ai/code/session_01CGZy1BGCjdN5cXqL9cnvB8 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: Inputs: card objectui#6349 (body and all 24 comments, through the batch 6 claim ① Derived judgmentsEach batch row converged by the card's rename branch ("where the two shapes really are different things, rename one"), and every public-surface change the diff implies was checked against the head's export maps and entries.
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
Refs #6349 (batch 6)
Clause-②: yes
Batch 6 of the one-authority burn-down, on claim
6080168957(seatdomain:ui#3, sessionhttps://claude.ai/code/session_01CGZy1BGCjdN5cXqL9cnvB8). Three rows ofKNOWN_COLLISIONSconverge. Each row was two or three meanings behind one name, and each converges by renaming the sites that no package entry publishes. Types and comments only: no runtime behaviour changes, and no emitted JavaScript changes.This PR has no closing keyword. The card stays open for later batches.
What each row was (measured on base
3fd86251)Diagnostic: three meanings.packages/sdui-parser/src/types.tsseverity,code,message,start?,tag?@object-ui/components'page.tsxand 17 test files (single-line import clauses; controlSchemaElement: 20)packages/app-shell/.../simulator/flow-sim-types.tslevel,nodeId?,edge?,message,cycle?packages/cli/src/commands/doctor.tslevel,message,idobjectui doctorcheck resultserveandinitonly)The three share only
message. sdui-parser keeps the name. The flow site becomesFlowSimDiagnostic; the doctor site becomesDoctorDiagnostic.DiagnosticLevel: two meanings. The flow site is'error' | 'warning', a severity. The doctor site is'ok' | 'warn' | 'error', a check verdict with anokarm. They share only'error'. Neither is exported. The flow designer's keeps the name:flow-problems.tsputs it on structural, server and expression problems alike, so it is the designer's general level, not the simulator's. The doctor's becomesDoctorDiagnosticLevel.ConfirmDialogState: two meanings. app-shell's (ActionConfirmDialog.tsx) hasopen,message,options?andresolve?. It is the data the action-confirm dialog renders, with the promise's resolver. The designer's (useConfirmDialog.ts) hasisOpen,title,message,confirm,onConfirmandonCancel. It is a hook result. They share onlymessage. Neither built entry exports the name. The designer's becomesDesignerConfirmDialogState, followingDesignerHistoryState. That rename touches 2 files (the declaration and thehooks/index.tsre-export), where the app-shell side would touch 4.Why renames and not a re-point. By batch 3's rule, only a dependency-legal direction may re-point. Neither app-shell nor cli depends on
@object-ui/sdui-parser. app-shell does reach plugin-designer as a peer, but the designer's shape means something else. So the remedy is the card's rename branch, under the batch 5 amendment6078948754: two meanings, so rename the narrower side; and a site no built entry reaches publishes nothing.Published surface, base vs head
One TypeScript program per tree over each package's built root entry (
exports["."].types), with dist rebuilt for each tree:Exported name sets. app-shell 258 = 258, cli 2 = 2, sdui-parser 41 = 41, plugin-designer 38 = 38. That is 0 diff lines for every package. plugin-chatbot has 93 names at head.
Structural reach. A walker follows every root export through members, signatures, type arguments and unions. It reaches the designer interface only as the return type of
useConfirmDialog, which cannot be named from the entry. It reaches no flow-sim site and no doctor site. The walker is lit: it reaches 152 app-shell types that are not exported,ObjectActionConfig(throughuseObjectActions) among them.Emitted output. Base and head dist differ only in declaration files and maps:
hooks/useConfirmDialog.d.ts,hooks/index.d.ts;flow-sim-types.d.ts,flow-sim-validate.d.ts;chatMessageAdapter.d.ts, a JSDoc change;cli.js.map, whosesourcesContentchanged.No
.jsfile differs in any of the five packages. So no first-load bytes move.Riders (comment-only)
AiChatPage.tsx: the import comment no longer callsChatbotEnhancedMessage"a deprecated alias" and no longer tells new code to spellChatMessage. It now says what batch 5 made true:ChatbotEnhancedMessageis the runtime contract's one name, and the plugin root publishes noChatMessage.useObjectChat.tsandchatMessageAdapter.ts:ChatbotEnhanced.ChatMessageis nowChatbotEnhancedMessage.5857342228(objectui#9306, letter A) landed as objectui#10823, so components derives both types from@object-ui/types, keepingoperatorandvalueas named extensions. The rows stay until a batch measures a rename against that ruling. The rows themselves are untouched.Changesets
6349-batch6-plugin-designer.mdminoruseConfirmDialognow returnsDesignerConfirmDialogState). Breaking-change note: nothing breaks, because the old name was never importable from the entry.6349-batch6-app-shell.mdpatch6349-batch6-cli.mdpatchserveandinitonly.6349-batch6-plugin-chatbot.mdpatchThe grades follow the claim's criterion:
minorwhere a published shape widens or a name moves. ⛔ Nomajor.Gates
All gates were read at head
078743319. Heavy runs went throughos-verify-lock.pnpm exec vitest run scripts/__tests__/one-authority-per-exported-name-6273.test.ts: exit 0,Tests 11 passed (11).pnpm exec vitest run --maxWorkers=2over the gate,packages/cli/,packages/plugin-designer/,packages/plugin-chatbot/and the 44 app-shell test files that import a changed module (the flow previews and simulator, andconsole/ai): exit 0,Test Files 176 passed (176),Tests 1956 passed (1956).Test Files 9 passed (9),Tests 134 passed (134).pnpm --filter @object-ui/PKG type-checkfor cli, sdui-parser, plugin-designer, plugin-chatbot and app-shell, with dist rebuilt and the script name echoed: each exit 0, 0error TSlines. cli'stsc --noEmitlistsdoctor.test.ts(checked with--listFiles).pnpm type-check:scripts: exit 0.check:control-bytes,check:test-path-roots,check:changeset-claimsandcheck:pending-changeset-literals;check:new-line-citations, which reports 0 new;check-changeset-no-major;check-changeset-presence, which reads 10 source files of 4 released packages and 4 changesets.pnpm exec eslinton the 11 touched TS files: 0 errors, and none of its warnings falls on a changed line.git merge-treeagainstmain55e90fd3is clean.Not run locally:
Diagnosticonly through@object-ui/sdui-parser, whose source this PR does not touch and whose dist is byte-identical.check:readme-exports. No export changed.Reverse verification
Every leg went through
ablation-replacein wrap mode. Predictions were written before any leg ran. Each leg was restored with blob equal to HEAD and an emptygit diff HEAD.ConfirmDialogStaterow put backTests 1 failed / 10 passed,no longer collides at:lists both filesDiagnosticrow put backDiagnosticLevelrow put backhooks/index.tsaliasesDesignerConfirmDialogState as ConfirmDialogStateConfirmDialogState — a NEW colliding name:ActionConfirmDialog.tsx(interface declaration) andhooks/index.ts(aliasing re-export)DiagnosticagainDiagnostic — a NEW colliding name:flow-sim-types.tsandsdui-parser/src/types.tsDiagnosticLevelagainDiagnosticLevel — a NEW colliding name:doctor.tsandflow-sim-types.tsTests 11 passed (11)The first S1 to S3 run was a no-op, and
ablation-replacerefused it. That run's replacements re-inserted the anchor line, so the anchor count did not drop. The tool restored each file and exited non-zero before running the gate. The legs were re-run with anchors that the mutation replaces, and the readings above are from that re-run.Acceptance notes
DiagnosticLevelis not renamed. Only the doctor's is. The reason is above: the flow level types server and expression problems too.FlowSimDiagnostic,DoctorDiagnosticandDesignerConfirmDialogStateeach gain a short doc comment. It says why the type is not spelled with the general name, so the next author does not restore it.chatMessageAdapter.ts's lead-in now reads "Two chat-message types meet", where it said "TwoChatMessagetypes meet". The first line ofuseObjectChat.ts's comment now says "the runtimeChatbotEnhancedMessage".AiChatPage.tsxsentence ships in app-shell's built JS. The base dist does not show that:AiChatPage.jsholds 0 hits of "deprecated alias" or "should spell". The comment sits on a type-only import specifier, whichtscelides, so this rider is source-only.hooks/index.tsis still unreachable.packages/plugin-designer/src/hooks/index.tshas 0 importers, as batch 5 noted. This PR only renames its re-export.DiagnosticLeveland sdui-parser'sSeverityare both'error' | 'warning'under different names. That is not a collision under the gate. It is noted here and not filed.Generated by Claude Code