Repository navigation
feat: show a write answer's advisory warnings after save, on the write-warning channel - #12709
Merged
objectstack-fleet[bot] merged 3 commits intoOct 16, 2026
Merged
Conversation
…warning event The spec declares `warnings` (advisory validation-rule hits, element ValidateDataIssueSchema) on CreateDataResponseSchema / UpdateDataResponseSchema. The single-record create/update emit site now parses it through the spec schema and carries it as an optional `warnings` member on WriteWarningEvent; the event is emitted when droppedFields or warnings is non-empty. An answer without the key emits nothing new. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XVp19E1MYUTFM3dnkwz8gB
emitWriteWarning now shows the event's `warnings` messages, verbatim, in their own toast on the same sink, under one new heading key (detail.writeWarningsTitle, all ten packs). The stripped-fields toast is unchanged; an event without warnings toasts exactly as before. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XVp19E1MYUTFM3dnkwz8gB
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XVp19E1MYUTFM3dnkwz8gB
This was referenced Oct 16, 2026
Contributor
✅ 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
|
Contributor
Author
Review: ACCEPT — objectui PR #12709 ·
|
objectstack-fleet
Bot
deleted the
claude/issue-12107-write-answer-warnings
branch
October 16, 2026 14:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #12107
Clause-②: yes
What
A single-record create/update answer's
warnings(advisory validation-rule hits, declared by the installed@objectstack/speconCreateDataResponseSchema/UpdateDataResponseSchema, elementValidateDataIssueSchema) now reaches the user after save, on the existing write-warning channel thatdroppedFieldsuses. No second channel, no new provider, no form-level code.@object-ui/data-objectstack:WriteWarningEventgains an optionalwarnings?: ValidateDataIssue[](type imported from@objectstack/spec/api, no hand-written duplicate).notifyDroppedFields(the create/update emit site) parses each entry throughValidateDataIssueSchema.safeParseand emits whendroppedFieldsORwarningsis non-empty — the gate measured on main was "return unless droppedFields non-empty after the no-op filter", widened only by "or warnings non-empty".droppedFieldsstays required; it is[]on an event that exists only for warnings.@object-ui/app-shell:emitWriteWarningkeeps the stripped-fields toast byte-for-byte, then shows the warnings in their OWN toast on the same sink: each distinct message verbatim, one per line, under one new heading key. Two toasts rather than one combined: the stripped toast's title says fields did not take effect, which misdescribes an advisory hit. The field is not prefixed to the message (the ruling allows it, does not require it; the author-written message is shown as written, and a prefix would be invented formatting).@object-ui/i18n:detail.writeWarningsTitlein all ten packs (the one heading key).Clause-② (A1, measured)
WriteWarningEventisexport interfaceinpackages/data-objectstack/src/index.ts, the package's only entry (exports["."]builds from it), so the optional member is a published-type widening:Clause-②: yes. Changeset:minordata-objectstack,patchapp-shell and i18n.Pins (A2)
writeWarningToast.test.ts"shows the warning message after a create whose answer carries one" (real adapter, realonWriteWarning, realemitWriteWarning; onlyclient.datastubbed), and the adapter-level twin inonWriteWarning.test.ts.Ablation (once, after commit, via
ablation-replace.mjswith restore proven by blob hash == HEAD and emptygit diff HEAD): replacingconst warnings = readWriteWarnings(result);with an empty list turned 7 tests red (both create pins, both update pins, the both-present controls, the parse pin) while the no-key controls stayed green — the expected direction. Restored blobc113f4ec3cb5== HEAD.Acceptance notes
batchTransaction(notifyBatchDroppedFields) is not touched: the file surface and the card name the single-record create/update sites only. Whether the cross-object batch answer carries per-opwarningswas not read here. Carrier: none named.severitya later runtime adds) is not shown: parse, never assert, asdroppedFieldsdoes for its own entries; the skew arm it would need is not this card's.Verification (head
849e0cfa4)Every gate below ran on
849e0cfa4(git rev-parse --short HEADafter the last commit); exit codes recorded to a file.pnpm --filter '@object-ui/app-shell^...' build(covers data-objectstack's closure too): exit 0.type-checkfor@object-ui/data-objectstack,@object-ui/app-shell,@object-ui/i18n: exit 0;--listFilesconfirms both new test files are in the checked programs.--maxWorkers=1:onWriteWarning.test.ts18 passed;writeWarningToast.test.ts19 passed.packages/data-objectstack/94 files / 1164 tests passed;packages/i18n/83 files / 1321 passed, 13 skipped.packages/app-shell/: NOT MEASURED as a whole package — the serial (--maxWorkers=1) run printed no file result after 22 minutes and was stopped by PID. Declared narrowing:packages/app-shell/src/providers/(every sibling of the changed module, incl.AdapterProvider.*and the other toast modules) plusproduct-neutral-renderer.ratchet.test.ts(locale keys): 26 files / 274 tests passed. The rest of app-shell is left to CI'spnpm test..tsfiles (eslint, inline config on as the packagelintscripts run it): 0 errors, 0 warnings on added lines. Population: the 14 files of the diff, count read from--format json. Invariance: the eslint config declares no type-aware parser options, so this diff cannot move a verdict on an untouched file.pnpm check:phantom-deps, self-import, unreferenced-sources, doc-example-readers, handler-key-reads, side-effects-array, element-data-source-declaration, spec-symbols, action-forward-parity, designer-field-key-parity, icon-record-names, i18n-keys, i18n-drift, i18n-designer-parity, control-bytes: all exit 0.node scripts/check-hand-rolled-comment-mask.mjs: 0.node scripts/check-changeset-fixed.mjs: 0.node scripts/check-changeset-presence.mjs: 0.pnpm check:new-line-citations: 0 new.Generated by Claude Code