Skip to content

Actions can declare a notice their dialog shows before submit when a condition holds (record:alert vocabulary) #39182

Done
0 of 1 issue completed

Description

@objectstack-fleet

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

Part of #39045 · the spec half of ruling A. Source: #39045.
Ruling-ref: 7359751238 (option A, answered by the maintainer on the decision card at 2026-12-02T21:44Z, verbatim 「A 通用提醒写法」). Analysis of record: 7351744236.
Governing text: ruling E on #27797 (unchanged); amendment 6733780864 on #31808 (host chrome only for what a declaration cannot carry); RecordAlertProps in packages/spec/src/ui/component.zod.ts; AGENTS.md Prime Directive 12.
Filing gate: ③ a ruled spec key, filed by the seat as the ruling's state line orders. Grading: area:ux · domain:spec · Feature · p2 (inherits #39045).

维护者速读

What to add

One authorable key on ActionSchema (packages/spec/src/ui/action.zod.ts) for a notice the action's dialog shows before submit, under the ruled terms of 7359751238:

  1. Vocabulary. Reuse record:alert's field names and its closed severity set (RecordAlertProps, packages/spec/src/ui/component.zod.ts). One notice or several named ones is this card's call under contract-tier review, on the rule that each notice has a stable translation key.
  2. Condition. The condition reads the scope action predicates read today (the same scope as the action's existing visible / disabled predicates); no new scope root.
  3. Text. A translatable plain label: no markup, no link, no button in v1.
  4. Display only. No door reads it; the action endpoint, the outcome answer and the outcome copy are unchanged.
  5. Docs and liveness. The key gets its JSDoc, its liveness ledger row and its docs entry as any new authorable key; the ledger row stays planned until Invite user: the dialog does not warn that mail is not configured; the invite is created and only then reported as undeliverable #39045's console reader lands.

Clause-②: yes (widening: a new optional key on a published schema). Metadata-protocol: added.

Acceptance

  • ActionSchema accepts the key in the ruled shape and refuses an unknown severity or a non-string label at parse.
  • A spec test pins the shape and the reuse of record:alert's severity set (one source, not a copy).
  • Contract-tier L2 PASS before landing.

Not in this card

Ban (from the ruling): if the key cannot reuse record:alert's vocabulary or needs a new scope root, the dev reports a fork; no fallback to a console panel keyed by action name and no twin actions.

Dedupe: ActionSchema notice, action dialog notice, record:alert action (open issues) → only #39045.

Sub-issues

Sub-issues

0 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    priority:p2
    pm:queue
    domain:spec
    on Dec 2, 2026
  2. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6Cb58xg59SdrVcwv1bK

    Claim: PM loop round 1 · 2026-12-02T22:22Z
    Session: session_01Utp6CaQsbKBMQtm6Tpsamd
    Thread session: session_01Utp6Cb58xg59SdrVcwv1bK
    Account: os-bill
    Branch: claude/project-thread-cgszok
    Worktree: objectstack-issue-39182
    Domain: domain:spec
    Seat: repo:objectstack@os-bill
    File surface: packages/spec/src/ui/action.zod.ts (the notices key and its dialog-host refinement only), packages/spec/src/ui/action-notices.zod.ts (new: the notice schema), packages/spec/src/ui/alert-severity.zod.ts (new: the one severity set), packages/spec/src/ui/component.zod.ts (one line: RecordAlertProps.severity mounts the shared set), packages/spec/src/system/translation.zod.ts (the action translation slot only), packages/spec/src/system/i18n-resolver.ts (translateAction overlay), packages/lint/src/i18n-walk.ts (extract), packages/lint/src/validate-translation-references.ts, packages/lint/src/validate-expressions.ts (checkAction), packages/spec/liveness/action.json + packages/spec/liveness/state-counts/action.md, packages/spec/authorable-surface/ui.json, packages/qa/dogfood/test/expression-conformance.ledger.ts (one row), packages/spec/src/shared/evaluated-slot-population.test.ts, packages/spec/src/system/metadata-form-zod-reconciliation.test.ts, packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts (key count), ui/packages/core/src/actions/actionKeys.ts (the spec key list), content/docs/protocol/objectui/actions.mdx, content/docs/references/** (reason: regenerated reference pages only), content/docs/ui/translations.mdx (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default (dispatch-gates --tier on the surface: "no path-derived mandate"; floor sonnet · default opus · ceiling fable — the thread reports it runs claude-opus-5-5), effort: high
    Clause-②: yes (widening: a new optional key on a published schema)
    Metadata-protocol: added
    Responsibility: n/a — not a defect card
    Thread-read: none
    Premise: holds — at origin/main 9a13387: no action key draws conditional text in an action's dialog (description, visible, disabled, disabledReason, preflight read in packages/spec/src/ui/action.zod.ts); RecordAlertProps declares the closed severity set inline (component.zod.ts severity: z.enum(['info','warning','error','success'])), and component.zod.ts imports action.zod.ts, so one source means a shared module both import; actionTranslationSchema in translation.zod.ts is strict, so a notice's translation key needs a declared slot.
    Serial constraints cleared: check-handover.mjs --inflight --card=39182 reads OVERLAP on two files, both a different region: #39067 (claim 7360336398) holds component.zod.ts (stale subforms[].columns comments; this card changes the one RecordAlertProps.severity line), #39146 (claim 7360437036) holds translation.zod.ts (the app navigation node; this card adds the action translation slot). Notify: serial — written in parallel, landed behind whichever of the two opens a pull first: overlap-check.mjs before every push, merge main after each lands.

  3. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 2, 2026
  4. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6Cb58xg59SdrVcwv1bK

    os-dev-report

    {
      "issue": 39182,
      "status": "done",
      "branch": "claude/project-thread-cgszok",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39201",
      "session": "session_01Utp6Cb58xg59SdrVcwv1bK",
      "head": "18cddafdb7cf4854d267ac0c9b5bf2857098f083",
      "premise_still_valid": true,
      "summary": "ActionSchema.notices: a snake_case-named map of notices in record:alert's vocabulary (severity, title, body, visible), drawn by the confirm or param dialog while each condition holds. AlertSeveritySchema moves to ui/alert-severity.ts and is mounted by both RecordAlertProps.severity and the notice (one schema object; component.zod.ts touched on the import and that one line only). The condition is the action's own ActionConditionInputSchema passed into the factory (same scope, no new root). Refused on a host that opens no dialog; translation slot + translateAction overlay; lint extractor, dangling-notice and condition legs; liveness row planned; docs section.",
      "tests": "spec vitest src/ui src/system/translation src/system/i18n + evaluated-slot-population + metadata-form reconciliation: 226 files / 8099 passed; action-notices.test.ts 24 passed. lint validate-translation-references + i18n-walk: 304 passed; validate-expressions: 547 passed. metadata-protocol degenerate-derivation, qa dogfood expression-conformance (8), ui core actionKeys.pin (19): passed. spec typecheck (incl. check:test-typecheck) exit 0; lint typecheck exit 0.",
      "gates": "dispatch-gates --commands: 105 non-self-test commands, 101 exit 0 first pass; check:skill-examples (3), check:i18n-walk-parity (3), check:dts-closure (1) were unbuilt prerequisites and exit 0 after building their closures; check:page-declaration-shape (1) lost a temp file to a concurrent run and exit 0 alone. Not cleared locally: check:dual-build-cjs-loads (3, needs every package built) and ui vitest scripts/ (unit-registry-absence-collision cannot import 59 unbuilt ui modules); CI check-runs on the PR are the verdict for both. check-nul-bytes 0. overlap-check --base=origin/main --pr=39184: clean.",
      "mcp_calls": "0",
      "api_writes": "3 — fleet relay pr_create (POST pulls + POST issues/39201/assignees), this comment",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": ["Skills-docs follow-up owed: skills/objectstack-i18n/SKILL.md (the _actions.{action} key list) and skills/objectstack-ui/SKILL.md (action dialog keys) do not name notices; kept out of this PR to stay off the governed surface · carrier: seat · noted, not filed"]
    }
  5. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6Cb58xg59SdrVcwv1bK

    Claim amendment (claim 7360606484), PR #39201:

    • Renamed in the surface: packages/spec/src/ui/action-notices.zod.ts → packages/spec/src/ui/action-notices.ts, packages/spec/src/ui/alert-severity.zod.ts → packages/spec/src/ui/alert-severity.ts (a *.zod.ts name moves the skill reference index under skills/**, a governed surface).
    • Added: packages/spec/src/system/i18n-action-notices.ts (the overlay, a sibling of i18n-resolver.ts) and packages/lint/src/i18n-walk-action-notices.ts (the extractor slots, a sibling of i18n-walk.ts); both files are over 1,000 lines.
    • Not touched: content/docs/ui/translations.mdx, which lists no action keys.
    • check-handover.mjs --inflight on the added paths: no overlap read.
  6. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

    Claim amendment: 2026-12-02T23:33Z · the seat widens this card's surface to close should-fix S1 of contract review 7362137624 on PR #39201: the served-schema field mask reads a notice's body as an expression and drops the whole action for a field-masked caller.
    File surface (added): packages/metadata-core/src/object-schema-fls-references.ts (classify notices in the action entry: only each notice's visible is a reference; title / body are prose; the global PROSE_KEYS stays as it is) and its test.
    Clause-②: yes (widening; unchanged by this amendment)
    Serial constraints cleared: no in-flight claim names the added path (the seat's last check-handover --inflight read).

  7. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

    Close-out · 2026-12-03T01:31Z · PR #39201 merged as 724b3695e9208d0430075a82b195c49e6f6f0b7b: ActionSchema.notices is on main. Seat ACCEPT 7362935205, contract review PASS 7362924195. Follow-ups: #39203 (skills docs) and #39045 (the consumer half), both unblocked by this merge.

  8. removed
    pm:dispatched
    on Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxdomain:specpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions