Skip to content

Setup → Users on a managed environment: an admin can remove a pending person from the list, and the removal cancels their invitation #35220

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

Filing gate: ③ a task the maintainer asked for. Split out of #33187 on his word in seat repo:objectstack#5's project session, 2026-11-18T16:40Z, verbatim: 「同意」. That answered the seat's proposal to close #33187, whose add, import and per-row result have shipped, and to file the remaining "remove a pending person" button as a small card of its own.

Why

On a managed environment, an admin adds people by email before they first sign in (pending rows, #33181 / PR #33227). When an admin mistypes an address or adds the wrong person, they need to take that pending row back out, and the invitation must die with it. Otherwise a stranger keeps a live invitation to the organization. The server door exists: remove-sso-user (packages/plugins/plugin-auth/src/pending-sso-users.ts, about line 779, PR #34162), and the host is told through userDeleted (#34183). The seat's premise read at origin/main ec227fc found no Setup → Users action that reaches it: packages/platform-objects/src/identity/sys-user.object.ts carries add_sso_user and import_sso_users, and nothing calls remove-sso-user.

First step: measure reach

On a managed environment, as a platform admin, open Setup → Users and look at a pending row. Does any control (a row action or the standard delete) remove it so that the invitation is cancelled? If one already does, close this card with that reading.

Scope, if the gap holds

  • A row action on sys_user, visible only on a pending row on a managed environment to the same admins who see Add/Import, calling /api/v1/auth/admin/remove-sso-user, with a confirm dialog.
  • Its labels through the regenerated translation packs. A test beside the existing managed-visibility test. A changeset.
  • Generic blocks only: the existing action/confirm-dialog machinery, no new named widget.

Done when

  • Removing a pending person from Setup → Users deletes the row and cancels the invitation. A test pins the visibility: pending + managed + admin only.

Relations

Activity

  1. added
    enhancement
    priority:p2
    pm:queue
    domain:server
    on Nov 18, 2026
  2. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb

    Claim: PM loop round 12 · area data-1 (the maintainer, verbatim, 2026-11-19T04:35Z project chat: 「再开 area:data」; standing 「暂时都只派 p1 p2 的卡」) · 2026-11-19T10:43Z
    Area: data-1
    Session: session_01Utp6Ca1jJvsA1dHsPwMiQb
    Account: os-bill
    Branch: claude/issue-35220-remove-pending-sso-user-action
    Worktree: objectstack-issue-35220 (os-dev worktree in the data-1 container)
    Domain: domain:server
    Seat: repo:objectstack#5
    File surface: packages/platform-objects/src/identity/sys-user.object.ts (a new row action beside add_sso_user / import_sso_users and its header note), a test in packages/platform-objects/src/identity/ beside cloud-managed-visibility.test.ts (named for this card), the regenerated translation packs the label check names, root .changeset/. If the action needs a route-forward entry or the platform-admin affordance census to change, the dev reports it before widening. ⛔ No change to the server door remove-sso-user itself (#34404 just landed on it). Stop on breach and report.
    Container & model: S, mode:subagent, model: default — no path-derived mandate, effort: medium
    Clause-②: no (a new row action on a platform object; no package-entry export; measure on the diff)
    Metadata-protocol: none (measure on the diff)
    Responsibility: platform — on a managed environment an admin who adds the wrong pending person has no Setup → Users control to take the row back out, so the invitation stays live.
    Thread-read: none
    Premise: the card's read at ec227fc found no Setup → Users control reaching remove-sso-user. The dev measures reach first (row action or standard delete on a pending row); if a control already removes it and cancels the invitation, the card closes with that reading.
    Serial constraints cleared: #34404 (same door, audit row) merged via PR #35422; no open PR holds sys-user.object.ts.
    Pre-claim lane: domain:server (packages/platform-objects/src/identity/**)
    Pre-claim deps: server door PR #34162, host seam #34183 (closed), #34404 merged.
    Prior rulings read: maintainer 「同意」 2026-11-18T16:40Z (split from #33187); check-prior-rulings 204 term hits, no ADR decision answers the control's shape; thread: none

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb
    os-dev-report

    {
      "issue": 35220,
      "status": "done",
      "branch": "claude/issue-35220-remove-pending-sso-user-action",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/35487",
      "head": "e6380b4f1c",
      "session": "session_01Utp6Ca1jJvsA1dHsPwMiQb",
      "premise_still_valid": true,
      "summary": "Added sys_user row action remove_sso_user (Remove Pending User; list_item + record_header). It posts recordIdParam userId to /api/v1/auth/admin/remove-sso-user behind a confirmText. It is visible only to a platform admin, on a cloud-managed environment, on a row with source == 'idp_pending' (MANAGED_ADD_PERSON_VISIBLE plus a has()-guarded pending term). Labels regenerated into all 10 locale bundles, hand-translated for zh-CN, ja-JP and es-ES. Server door unchanged.",
      "readings": {
        "A1": "Holds. At origin/main 20badaea24 no sys_user action targets remove-sso-user (only plugin-auth tests and dogfood route rosters name it), and userActions opens edit only, so the standard delete is off. No control reached the door.",
        "A2": "Holds. add_sso_user and import_sso_users use MANAGED_ADD_PERSON_VISIBLE = isPlatformAdmin && has(features.cloudManaged) && features.cloudManaged == true. A row is pending when sys_user.source == 'idp_pending', the value the door checks (isPendingSsoSource(target.source)). The new predicate adds has(record.source) && record.source == 'idp_pending'.",
        "A3": "No forward or allow entry is needed: buildApiActionRequest is generic and stamps organizationId, which the door's unknownBodyKeys admits. platform-admin-affordance-standing.test.ts is a floor (arrayContaining) that picks the action up by its target; it passes unchanged. platform-objects.test.ts rows are not exhaustive for SysUser; unchanged. feature-gate-guard.test.ts DID need one SHOWN_WHEN_ON row, reported before widening and approved by the coordinator.",
        "A4": "Body {userId}, a closed key set plus the stamped organizationId. Refusals: 409 RESOURCE_CONFLICT (not managed, not pending, or signed in meanwhile); 503 (host unreachable, or no engine); 404; 400; a typed host refusal; an engine restrict. confirmText says: 'Remove this person, who has not signed in yet, and cancel their invitation? If they have signed in meanwhile, or the hosting organization cannot be reached, no one is removed.' successMessage: 'Pending user removed'. Neither promises a cancellation when no host is wired."
      },
      "files_changed": ["packages/platform-objects/src/identity/sys-user.object.ts", "packages/platform-objects/src/identity/remove-pending-sso-user-visibility.test.ts (new)", "packages/platform-objects/src/feature-gate-guard.test.ts (+1 row, approved widening)", "packages/platform-objects/src/apps/translations/*.objects.generated.ts (10 locales) + 7 *.source-hashes.generated.ts", ".changeset/35220-remove-pending-sso-user-action.md"],
      "line_budget": "22 files, +210/-0: sys-user.object.ts +34, new test 89, guard +1, changeset 10, generated bundles +76. No line ratchet governs these files.",
      "tests": "Ran at e6380b4f1c with OS_VERIFY_LOCK_SLOT=dev-35220. pnpm --filter @objectstack/platform-objects exec vitest run --maxWorkers=2: VERDICT command-exit 0, Test Files 124 passed (124), Tests 2061 passed (2061). typecheck: VERDICT command-exit 0, check:test-typecheck OK. Ablation, one-shot via scripts/ablation-replace.mjs (the test imports source, so no dist leg). (1) Dropped the pending term: anchor 1 to 0; 3 failed | 5 passed, the idp_provisioned, env_native and no-source CONTROLs red; restored, blob == HEAD f058d18c77a8, git diff HEAD empty. (2) Replaced the standing and managed terms with true: flag off, no flag and org owner CONTROLs red; restored the same way. The first pending attempt was a refused no-op (the replacement already occurred 684 times) and was redone with a distinct marker.",
      "gates": "dispatch-gates --commands (no paths): 66 families. 65 ran with exit 0, each recorded as 'cmd :: exit N', including check:i18n (platform-objects in sync, 32 bundles), check:i18n-stale-fill, check:nul-bytes, check:cross-package-test-inputs, check:type-check-coverage/debt and the changeset families. --ran reconciliation: 1 of 66 UNRUN, which is check:dual-build-cjs-loads. NOT MEASURED: check:dual-build-cjs-loads, reason: exit 3 PREREQUISITE NOT MET, it needs a whole-workspace pnpm build. Declared narrowing; CI runs it. overlap-check --branch=HEAD: VERDICT clean exit 0. check:i18n-coverage was exit 3 on the same prerequisite (it is not a derived family). test:repo not run locally because no file of that project changed. PR check-runs: in_progress at report time.",
      "dogfood_battery": "n/a: no ! in the PR title and Clause-②: no",
      "deviations": ["feature-gate-guard.test.ts: +1 SHOWN_WHEN_ON row, outside the claim surface. Reported to the coordinator before widening and approved.", "Card's live drive (remove the row and cancel the invitation through the dialog) is not pinned for the action: the plugin-auth pending-sso-users.test.ts declared-action block is outside the surface. The door's own suites pin removal and cancellation. Noted in the PR Acceptance notes.", "PR body footer uses the os-dev session-URL form, not the harness robot line (os-dev.md precedence)."],
      "mcp_calls": "0",
      "api_writes": "2: fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls + assignee leg, via the relay) and the os-dev-report comment (POST /repos/objectstack-ai/objectstack/issues/35220/comments via post-stamped). git push is not counted.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": ["carrier: none · noted, not filed: a declared-action live-drive pin for remove_sso_user beside the [#33186] block in plugin-auth pending-sso-users.test.ts would close the loop from dialog to door"]
    }

    Generated by Claude Code

  5. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6Ca1jJvsA1dHsPwMiQb

    Close-out 2026-11-19T12:32Z: PR #35487 merged, and Fixes closed this card.

    Setup → Users now has a Remove Pending User action, on the list row and on the record header. It calls the existing remove-sso-user door behind a confirm dialog. It shows only to a platform admin, on a managed environment, on a row whose source is idp_pending, which is the value the door itself checks. A visibility test pins this, with ablation. The door's own suites already pin the outcome, "deletes the row and cancels the invitation" (#34162, #34404, and #34183 for the host).

    L1-a ACCEPT 7008624913. It judged that a live drive from the button to the door is a dogfood item for the next managed-environment pass, not a landing condition. pm:dispatched off.

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

Metadata

Metadata

Assignees

Labels

area:datadomain:serverenhancementpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions