Repository navigation
feat(console): action dialogs draw declared notices; the invite dialogs warn when this server delivers no mail - #39248
objectstack-fleet[bot] wants to merge 6 commits into
Conversation
…ialogs (#39045) Claude-Session: https://claude.ai/code/session_01Utp6Cb9JFbMTwmocV9qxio Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6Cb9JFbMTwmocV9qxio Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6Cb9JFbMTwmocV9qxio Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6Cb9JFbMTwmocV9qxio Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6Cb9JFbMTwmocV9qxio Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 21 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 11 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 183 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin e520f7af8b811e7dbc8d832a13cf25d066e2d11a && git checkout e520f7af8b811e7dbc8d832a13cf25d066e2d11a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1fe9c6287f2f058c7d1f1972cdfa4ebcd58803b6 015998c057c6ea5fa29afaed961f52c419a44150 && git checkout -B drift-repro 1fe9c6287f2f058c7d1f1972cdfa4ebcd58803b6 && git merge --no-ff 015998c057c6ea5fa29afaed961f52c419a44150
node scripts/docs-audit/affected-docs.mjs --json 1fe9c6287f2f058c7d1f1972cdfa4ebcd58803b6
|
… pin the mail notice's condition Claude-Session: https://claude.ai/code/session_01Utp6Cb9JFbMTwmocV9qxio Co-authored-by: Claude <noreply@anthropic.com>
Requested by Bill · project thread
repo:objectstack@os-bill · os-bill · session_01Utp6Cb9JFbMTwmocV9qxio
Fixes #39045
Clause-②: yes (widening)
Metadata-protocol: none
维护者速读
notices由控制台在确认框和参数框里画出来,邀请动作采用它,并同步更新 emailDelivery 的功能登记。What changes
Ruling A on #39045 (comment 7359751238) gave actions a general dialog notice key,
ActionSchema.notices, which landed spec-side in #39201. This PR is the consumer half: the console draws the key, the invite actions adopt it, and theemailDeliveryregistry entry books the reads (ruling term 6).The console draws
notices(ui/packages/**):ActionRunner(core) hands an action's notices, in declared order and named, to the dialog the action opens before it runs, beside the record the dispatch runs against (the row for a row dispatch, else the page record). A param-less action withconfirmTextgets them in the confirm handler's options (notices). An action withparamsgets them in the param-collection handler's new 6th argument, and then never in the confirm too. The runner judges no condition.ActionDialogNoticeList(app-shell, newviews/ActionDialogNotices.tsx) draws each notice between the dialog's title and its description, in bothActionConfirmDialogandActionParamDialog.severitypicks the tone and icon from the notification surfaces' one severity table (notificationSeverityStyle, now exported from@object-ui/components);infowhen omitted.visibledraws the notice, a boolean is its own verdict, anything else is evaluated byevalRowPredicateagainst the dispatch's record plus the host predicate scope (features, the signed-in user). Fail-closed and loud: a condition that cannot be evaluated draws nothing and warns once, naming the notice and the action (approved by the seat on the claim).objects.<object>._actions.<action>.notices.<notice>.title|body(useObjectLabel().actionNoticeText), then the authored text. The confirm path resolves it inuseActionTextLocalizer(localizeActionNotices); the console's two param-collection handlers (useConsoleActionRuntime,RecordDetailView) sharelocalizeDialogNotices, so they cannot drift.action-button,action-icon,action-group,action-menu) forward the key;@object-ui/typesActionSchemacarries it; the forward-order pins list it.Invite User and Resend Invitation warn first (
packages/platform-objects):MAIL_NOT_DELIVERED_NOTICES(beside the invite outcome messages) declaresmail_not_delivered,severity: 'warning',visible: has(features.emailDelivery) && features.emailDelivery != true. Thehas()conjunct keeps it off a host that has not received the flag, rather than leaning on fail-closed for the common case.invite_useractions (sys_user,sys_member,sys_invitation,sys_organization) andsys_invitation.resend_invitation. The invitation is still created, and the post-submit toast still reports thelink_onlyoutcome.The feature registry books notice reads (
packages/spec/src/kernel/public-auth-features.ts):PublicAuthFeatureEntrygains optionalnoticePaths(<object>.actions.<action>.notices.<name>). A notice gates nothing, so it is booked apart fromgatedInputs;emailDeliverystays an exempt, opt-in,login-surface flag, with its exempt reason rewritten to say it now also draws the invite notices (display only).feature-gate-guard.test.tschecks both directions: every booked path is a declared notice whose condition reads the flag, and everyfeatures.*read in any notice condition is booked; a walker floor keeps both loops non-vacuous.Liveness and docs: the
noticesrow inpackages/spec/liveness/action.json(and its children) moves fromplannedtolive, with the console read points as evidence;gen:liveness-countsregenerated.content/docs/protocol/objectui/actions.mdx: only its notices section (Planned callout removed, the both-dialogs and fail-closed rules, the platform adoption).Changeset: patch for
@objectstack/spec,@objectstack/platform-objectsand six@object-ui/*packages.Clause-②: yes (widening): new exported names and members, none removed (PublicAuthFeatureEntry.noticePaths;notificationSeverityStylefrom@object-ui/components;ActionNoticeDef,ActionDialogNotice,ActionDialogNoticesand the param handler'snoticesargument in@object-ui/core;localizeActionNoticesin@object-ui/react;useObjectLabel().actionNoticeText;noticeson@object-ui/typesActionSchema). No metadata author can write anything new, soMetadata-protocol: noneandpatch.Tests
ui/packages/core/src/actions/__tests__/ActionRunner.dialogNotices-39045.test.ts(6): confirm options shape and order, row record over page record, no record, no-notices control, param action gets them in argument 6 and not the confirm, param control.ui/packages/app-shell/src/views/ActionDialogNotices.notices-39045.test.tsx: drawn while mail is off; not while on; not while the flag is absent (has()); boolean and absent conditions; the record read; fail-closed warning naming notice and action; declared order; bundle-first localisation and inline locale maps; both dialogs render the notice above the description, with controls.packages/platform-objects/src/feature-gate-guard.test.ts: the new two-waynoticePathsdescribe.packages/spec/src/kernel/public-auth-features.test.ts:noticePathsgrammar.useObjectLabelmember count 33 → 34; renderer forward-order pins.Acceptance notes
AppContentreadsfeaturesonce per mount (getAuthConfigeffect). An admin who configures mail and returns to the invite dialog in the same session still sees the notice until a reload. The notice errs toward the old state for one session; no wrong action follows because it gates nothing.724b3695;mainwas merged afterwards (no overlapping files) and the generated-artefact gates re-ran on the merged tree.Verification
scripts/pm/dispatch-gates.mjs), 122 commands, base724b3695: 118 passed first time. List:/mnt/project-files/card-39045/gates-ran-015998c0.txt(card-thread file).pnpm --dir ui exec vitest run scripts/was OOM-killed in this container at the default worker count; re-run with--maxWorkers=2: 172 files, 5159 tests passed.check:skill-examplesrefused (exit 3,client-reactunbuilt); after building it: 344 prose examples type-check.check:dual-build-cjs-loadsrefused (exit 3, unbuilt packages outside this diff) andcheck-plugin-teardown-shape --self-testrefused (exit 3, fixture commit unreachable from a shallow clone). Nothing was measured by either; CI answers both.main(5a0bb8dd, no file overlap):check:liveness,check:generatedandcheck-i18n-bundlesre-ran green.platform-objects132 files / 2352 tests; spec registry tests; typechecks of core, types, i18n, react, components, app-shell;check:action-forward-parity,check:handler-key-reads, eslint.Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6Cb9JFbMTwmocV9qxio