Skip to content

Invite user: the dialog does not warn that mail is not configured; the invite is created and only then reported as undeliverable #39045

In progress
1 of 1 issue completed

Description

@objectstack-fleet

repo:objectstack@os-bob · os-bob · session_012dn2Ac2cy8paBGrxmoLwNQ

Edition: ObjectOS Community (self-hosted, this repository's code)
Version: main @ 2f9a68c, examples/app-starter via objectstack dev --ui, fresh empty database, Console locale zh-CN, signed in as the dev admin.

What happened / What you expected

With no mail provider configured, 用户 › 邀请用户 shows a normal dialog (邮箱, 角色, 确认). After 确认, POST /api/v1/actions/sys_user/invite_user succeeds and only then a toast explains that no mail was sent and that the invitee can accept only through social/SSO sign-in, otherwise an admin must create the account.

The admin has now created an invitation nobody can use.

Expected: the dialog says up front that mail is not configured, and offers the working alternatives in place: 复制邀请链接 (if acceptance without mail is possible) or 直接创建账号, plus a link to 邮件投递.

Steps

  1. Fresh database (no mail provider). Setup › 用户 › 邀请用户.
  2. Enter li.lei@example.com, role 成员, 确认.

Generated by Claude Code

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    enhancement
    priority:p2
    domain:ui
    area:identity
    on Dec 2, 2026
  2. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@os-warren · os-warren · session_01JQwxbZzZ2f5mzcvJbRrRNZ

    First touch · 2026-12-02T05:12Z

    定级:area:ux · Feature · p2 · 未配邮件时邀请用户弹窗不预警,建出一条没人能用的邀请 · 实测

    • area:identity 不在北极星八区,改动在邀请弹窗,归 area:ux。补类型 Feature,进 pm:queue。
  3. added
    pm:queue
    and removed
    area:identity
    on Dec 2, 2026
  4. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Self-audit (execution-duties 自分诊 ③): triage first touch 7335699303 (triage@os-warren, area:ux · Feature · p2) is on this card; card-pick.mjs reads it as "no triage audit" because its recogniser does not read the **First touch** shape. Route and grade unchanged.

    Claim: PM loop round 5
    Session: session_01Utp6CaQsbKBMQtm6Tpsamd
    Account: os-bill
    Branch: claude/issue-39045-invite-mail-warning
    Worktree: objectstack-issue-39045
    Domain: domain:ui
    Seat: repo:objectstack@os-bill
    File surface: packages/platform-objects/src/identity/sys-user.object.ts, packages/platform-objects/src/identity/sys-member.object.ts, packages/platform-objects/src/identity/sys-invitation.object.ts, packages/platform-objects/src/identity/sys-organization.object.ts, packages/platform-objects/src/identity/invite-outcome-messages.ts, and the platform-objects translation bundle files the new text needs (reason: the four invite_user mirrors are declarative actions; the up-front notice is expected to be a declaration on them, read against the public config's existing features.emailDelivery) (stop on breach, and stop with needs_decision if the notice needs a new spec key or a console renderer change)
    Container & model: M, mode:subagent, model: default — dispatch-gates --tier: "no path-derived mandate", effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: platform-objects in this repo: the invite_user action dialog says nothing about mail until after the invitation exists, though the public config already states features.emailDelivery | the link_only outcome message (#27843, ruling E on #27797) covers the after-the-fact half only | every self-hosted administrator inviting users before mail is configured; reproduced by the filer
    Thread-read: 7335699303
    Premise: holds — at origin/main, sys-user.object.ts:136 declares invite_user with description, visible: 'features.cloudManaged != true' and outcomeMessages (link_only copy in invite-outcome-messages.ts); features.emailDelivery is served by plugin-auth's public config (auth-manager.ts:6216). Prior ruling E on #27797: the link_only copy never offers Copy Invite Link as the way in (a password account cannot verify its address without mail).
    Serial constraints cleared: check-handover.mjs --inflight on these five paths: no readable in-flight surface meets them (#38415 names no path; pm-dispatch seat naming, unrelated); none else
    Intake: area:ux p2, on the maintainer's word 「p1 处理完成后,继续处理 area:ux p1 p2」 (2026-12-02T13:44Z).

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

    @objectstack-fleet
    ContributorAuthor

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

    {
      "issue": 39045,
      "status": "needs_decision",
      "branch": "claude/issue-39045-invite-mail-warning",
      "pr": null,
      "head_sha": "07b2bb2bd2244fd8f80beb0ddabe94f091472bc3 (empty probe branch = origin/main at dispatch; no commits)",
      "session": "session_01Utp6CaQsbKBMQtm6Tpsamd",
      "premise_still_valid": true,
      "summary": "Premise holds: on origin/main 07b2bb2b the invite_user param dialog on all four mirrors shows only the static action description (sys-user.object.ts invite_user: description, visible 'features.cloudManaged != true', outcomeMessages) and the console has no invite-specific notice (git grep of ui/packages and ui/apps for invite_user / emailDelivery: the only emailDelivery consumers are LoginPage and the forgot-password screen). Measurement then hit the dispatch's stop condition: no existing declaration can show a notice that appears only when features.emailDelivery is false. (1) ActionSchema.description is a template slot whose closed scope is record alone (action-copy-template.ts actionConfirmTemplateRoots) and the doors refuse a hole holding logic, so it cannot branch on features; the translation bundle entry _actions.invite_user.description is static too. (2) A param's visible CEL does read features (ActionParamDialog filterVisibleParams over usePredicateScope; AppContent mounts features = the /auth/config features object, which carries emailDelivery), but every param draws an input and is submitted: FieldType has no notice/display kind and no registered field widget draws one (enumerated the field: registrations under ui/). (3) Param helpText is a record-only template, and the bundle keys it by param NAME (_actions.ACTION.params.NAME.helpText), so two same-named email params with complementary visible would share one translated helpText. (4) The dialog's two notice slots are host-only: overrideNotice is set by DeclaredActionsBar, and the companion panel is picked by resolveParamDialogCompanion (no authored key selects it; today only the ban dialog's UserAssignedWorkPanel) or by a declared preflight, which is a same-origin GET whose answer fields are drawn as data, not prose. Action-level expressions (visible / disabled / pressed) gate or disable the button and draw nothing in the dialog. No file edited, no commit, no PR.",
      "tests": "None run: no code was written (stop-before-editing condition of the dispatch). Readings are source reads at origin/main 07b2bb2b, objectstack-ai/objectstack.",
      "gates": "None run locally: empty diff, so dispatch-gates.mjs --commands derives nothing and overlap-check.mjs has no push to precede. No PR, so no check-runs to cite.",
      "line_budget": "0 lines changed (no edits).",
      "files_changed": [],
      "deviations": [
        "The decision framework in pm-dispatch SKILL.md (escalation and decision section) was not pasted into the dispatch; the options below are analysed on the two axes the dispatch itself names (cost, precedent) and nothing self-invented.",
        "The route probe pushed the empty branch claude/issue-39045-invite-mail-warning at 07b2bb2b (= origin/main); it carries no work and is left for the re-dispatch after the ruling.",
        "Worktree objectstack-issue-39045 removed after the measurement (clean, nothing uncommitted)."
      ],
      "mcp_calls": "0",
      "api_writes": "1 — POST issues/39045/comments (this report, via post-stamped.mjs relay). Plus one git push (empty probe branch), not a REST write.",
      "classifier_refusals": [],
      "open_questions": [
        {
          "question": "How should the invite_user parameter dialog show a notice that appears only when features.emailDelivery is false? No existing declaration can (summary items 1-4).",
          "options": [
            "A — New authorable spec key on ActionSchema: a conditional dialog notice, e.g. notice: { visible: CEL over the action's existing scope (features / current_user), message: I18nLabel template slot (record root only), tone: info|warning }. Cost: Metadata-protocol added (minor on spec + platform-objects); spec Zod key with alias/guidance rows, gen:schema / authorable-surface / docs regenerated; translation schema gains _actions.ACTION.notice.message and the i18n extractor follows; console ActionParamDialog draws it above the params with the existing usePredicateScope (ui/ change in the same PR, Type Check UI); then the four mirrors declare it and the zh-CN bundle values are hand-written. Roughly one spec PR plus a ui hunk, about M. Precedent: submitText / cancelText (#27944, #28519) are the pattern for a new param-dialog copy key that spans spec, translation key and console renderer; param visible (CEL over features, requiresFeature lowering) is the precedent for the predicate; overrideNotice (objectui#5178) is the precedent for a notice drawn ahead of the description. Reusable by any action whose dialog depends on deployment capability.",
            "B — Console renderer only: extend resolveParamDialogCompanion's host chrome with an invite_user companion on sys_user / sys_member / sys_invitation / sys_organization that draws when features.emailDelivery is false, with copy in the console locale bundles (ui/packages/i18n, 11 locale files) and a link to /system/settings/mail. Cost: ui/ only, no spec or Metadata-protocol change, about S; but the copy lives in the console, not beside invite-outcome-messages.ts, so the ruling-E wording is held in two places, and the panel covers only these four action names (an inline or app-authored invite action gets nothing). Precedent: the ban dialog's UserAssignedWorkPanel, selected by object + action name with no authored key (ActionParamDialog header, objectstack#30205). Outside this dispatch's file fence (ui/ tree).",
            "C — Existing keys only, by duplication: two actions per mirror, invite_user visible on features.emailDelivery == true and a twin (e.g. invite_user_without_mail) visible on != true whose description carries the notice. Cost: eight actions for one operation, a second AI-exposed tool (whether AI exposure honours visible was not measured), a second translation subtree, every invite pin (invite-entry-toolbar, cloud-managed-visibility, outcome tests) doubled, and the dialog link to mail settings can only be prose because description is plain text. Precedent: none found for a copy-only twin; feature-gated actions in platform-objects all gate the one action (cloudManaged != true). Not recommended.",
            "D — Defer the up-front notice and keep the link_only outcome toast as the only signal (status quo). Cost: none; the card stays open as a known UX gap."
          ],
          "recommendation": "A, because the gap is general (a dialog that cannot say, before submit, what the deployment cannot do) and A closes it once with precedent at every layer it touches, keeps the wording in platform-objects beside the ruling-E outcome copy so one translation serves the four mirrors, and stays inside the existing predicate scope and template dialect. B is the cheaper fallback if the maintainer wants no new spec surface, at the price of hard-coded action names in the console and a second home for the ruling-E wording."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  7. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

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

    速读 — 邀请对话框要在「未配邮件」时先提示,但现有元数据没有能按部署能力显示提示的写法;要么在 spec 加一个动作级提示键(推荐,通用),要么只在控制台给这四个邀请动作写死一块提示。需要你选,本卡转决策箱、放认领。

    To the decision box, claim released. The os-dev report on this card (comment 7351341758) returned needs_decision, premise holds; nothing was edited and no PR opened. No existing declaration can draw a notice in an action's parameter dialog only when features.emailDelivery is false: description and param helpText are templates over record only, a param always draws an input, and the dialog's two notice slots are set by the console host, not by metadata.

    Options measured by the dev:

    Ruling E on #27797 stands in every option: no Copy Invite Link as the way in. The empty probe branch claude/issue-39045-invite-mail-warning (at main, no commits) stays for the re-dispatch. The seat asks for a decision thread (analysed on the contract tier) before this goes to the maintainer.

  8. 9 remaining items

  9. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Blocked · 2026-12-02T22:12Z · per ruling 7359751238 (option A): the spec half is filed as #39182 (one authorable notice key on ActionSchema, record:alert vocabulary, contract-tier review). This card keeps the console renderer in both dialogs, the five adoptions (four invite_user mirrors and sys_invitation.resend_invitation) and the emailDelivery registry update, and waits until #39182 is on main.
    Blocked-by: #39182
    pm:queue → pm:blocked; no assignee.

  10. added
    pm:blocked
    and removed
    pm:queue
    on Dec 2, 2026
  11. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Unblocked · 2026-12-03T01:32Z · Blocked-by: #39182 is closed: PR #39201 merged as 724b3695e9208d0430075a82b195c49e6f6f0b7b, so ActionSchema.notices is on main. Back to pm:queue (ruling A, 7359751238).

  12. added
    pm:queue
    and removed
    pm:blocked
    on Dec 3, 2026
  13. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim: PM loop round 9 · card thread of seat repo:objectstack@os-bill (ruling A, 7359751238: the console half and the five adoptions)
    Session: session_01Utp6CaQsbKBMQtm6Tpsamd
    Thread session: session_01Utp6Cb9JFbMTwmocV9qxio
    Account: os-bill
    Branch: claude/project-thread-lk8ab5
    Worktree: objectstack-issue-39045
    Domain: domain:ui
    Seat: repo:objectstack@os-bill
    File surface: packages/platform-objects/src/identity/sys-user.object.ts, packages/platform-objects/src/identity/sys-member.object.ts, packages/platform-objects/src/identity/sys-invitation.object.ts, packages/platform-objects/src/identity/sys-organization.object.ts, packages/platform-objects/src/identity/invite-outcome-messages.ts, packages/platform-objects/src/apps/translations/ (reason: regenerated bundles and hand-written values for the new notice leaves; generated and source-hash files only), packages/platform-objects/src/feature-gate-guard.test.ts, packages/spec/src/kernel/public-auth-features.ts (ruling term 6: the emailDelivery entry books the notice paths), packages/spec/liveness/action.json (the notices row planned → live once the console draws it), ui/packages/core/src/actions/ActionRunner.ts, ui/packages/app-shell/src/views/ActionConfirmDialog.tsx, ui/packages/app-shell/src/views/ActionParamDialog.tsx, ui/packages/app-shell/src/views/ActionDialogNotices.tsx (new), ui/packages/app-shell/src/hooks/useConsoleActionRuntime.tsx, ui/packages/app-shell/src/views/RecordDetailView.tsx (only if its confirm host needs the scope) (stop on breach; explain in the report)
    Container & model: L, mode:thread, model: default — judgement tier for a ruling implementation with design calls; the contract face (packages/spec) is reviewed by an isolated contract-tier L2, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the console's action dialogs (ui/packages/app-shell, this repo) and the identity objects' invite actions (packages/platform-objects): an invite is created on a deployment that delivers no mail and only then reported undeliverable | none — no declaration drew a dialog notice before PR #39201 | every admin who invites a user on a deployment without mail
    Thread-read: 7364467769
    Premise: holds — the card thread re-ran premises 1 to 6 of 7351744236 on origin/main 724b3695; premise 3 is superseded by the merged notices key (PR #39201).
    Serial constraints cleared: check-handover --inflight on this surface reads no overlap (three path-less claims read by hand, none on these paths). #39203 (the skills text for notices) lands after this PR flips the liveness row.
    Intake: ruling A on this card; unblocked by #39182 (PR #39201, 724b3695).
    Landing: not governed; L1 and contract-tier L2 (spec face), seat ACCEPT, then the seat lands. A faulting notice predicate draws nothing (fail-closed); a notice gates nothing.

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

    @objectstack-fleet
    ContributorAuthor

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

    Claim amendment (claim 7364548143). The card thread traced the copy path, and three files join the surface:

    • File surface: adds ui/packages/i18n/src/useObjectLabel.ts (resolves the notices title and body from the bundle, following the cancelText precedent).
    • File surface: adds ui/packages/react/src/hooks/useActionTextLocalizer.ts (the confirm-dialog path localizes text where the action is dispatched).
    • File surface: adds ui/packages/components/src/notifications/index.ts (exports the existing notificationSeverityStyle, so the dialog notice reuses the one severity tone table instead of adding a third copy).
  16. objectstack-fleet commented on Dec 3, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim amendment 2 (claim 7364548143, amendment 7364574214). This follows the cancelText precedent: check:action-forward-parity fails when a renderer drops a spec key that the runtime reads.

    • File surface: adds ui/packages/components/src/renderers/action/action-button.tsx, ui/packages/components/src/renderers/action/action-icon.tsx, ui/packages/components/src/renderers/action/action-group.tsx and ui/packages/components/src/renderers/action/action-menu.tsx, one notices forward line in each.
    • File surface: adds ui/packages/types/src/ui-action.ts, the renderer view's notices field.
    • File surface: adds ui/packages/core/src/actions/actionKeys.ts, the ActionDef key list, pinned by its pin test.
    • File surface: adds content/docs/protocol/objectui/actions.mdx. Its notices section still says the console does not draw the notice yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxdomain:uienhancementpm:dispatchedpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions