Skip to content

Team mode M9: Password lifecycle, disabling Team mode, offboarding #4147

Closed

Description

@DoodleBears

Parent: hub #4138 (spec #4137, ADR-0336). Blocked by: #4142.

Behavior

  • Admin reset issues a temporary password and revokes all of that member's grants.
  • A member changing their own password gets "sign out other devices", checked by default.
  • Disabling Team mode suspends non-Owner members: grants revoked, data kept, private Bots not woken. Re-enabling restores accounts with a fresh sign-in.
  • Offboarding:
    1. Deactivate the member.
    2. Transfer their shared Bots, Channel ownership and shared-root grants.
    3. Permanently delete them through Content Purge after separate confirmation, with authorship kept as a deleted member.

Acceptance

  • A suspended or reset member is refused on every existing device.
  • No data is lost on disable or re-enable.
  • CLI parity passes.

Activity

  1. DoodleBears commented on Nov 14, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim

    • Agent: Claude Code (orchestrator, UI/UX) + Codex CLI (logic)
    • Task: claude/local/74a5ee4a-f6fe-4aab-870f-5e465b0b8474 (not a DSH Session); Codex thread added once started
    • Issue scope: M9 per the contract below
    • Branch: claude/4147-offboarding (from main after Team mode M3: Host roles, permission catalog, member and device management #4164; Codex sub-branch codex/4147-logic)
    • Started: 2026-11-14 01:59 UTC
    • State: active

    M9 wire contract (agreed before parallel work; Claude = UI, Codex = logic)

    Based on main after M1 (#4163) and M3 (#4164). M2 (private Bots) may land in parallel; Bot-related offboarding steps apply to whatever Bot ownership exists on main when this merges (rebase reconciles).

    Password lifecycle

    • memberPasswordReset { humanId } (exists, Owner-only today) → also allowed to members.manage holders whose own permissions cover every permission of the target's roles; never the Owner (owner-protected), never self. Returns { initialPassword }; sets mustChangePassword; revokes every grant and disposes every Peer of that member (browser and paired devices). Refusals: permission-required, permission-not-grantable, owner-protected, member-not-found.
    • memberPasswordChange { current, next, signOutOthers? } → signOutOthers defaults to true and revokes the caller's other grants (keeps the current one).

    Team mode off / on

    • teamModeSet { enabled: false } suspends every non-Owner member: grants revoked, Peers disposed, data kept, their private Bots not woken by schedules, IM or mentions while suspended. teamMode gains activeMembers: number for the confirmation copy. Re-enabling restores each previously active member to active with a fresh sign-in (no grant survives). Owner unaffected.

    Offboarding (separate steps)

    • memberDeactivate { humanId } → status deactivated; grants revoked; their Bots paused and not woken; refused for the Owner and self. memberReactivate { humanId } → active, fresh sign-in.
    • memberTransferPreview { humanId } → { channels: [{ channelId, name }], bots: [{ slug, displayName }] }: group Channels they own and (once those slices exist) shared Bots/roots.
    • memberTransfer { humanId, toHumanId } → moves those ownerships to an active member or the Owner; refusals member-not-found, transfer-target-invalid.
    • memberPurgePreview { humanId } → { token, counts: { channels, bots, messages, files } }; needs the member deactivated (member-active) and nothing left to transfer (transfer-required).
    • memberPurgeConfirm { humanId, token, username } → permanent deletion through Content Purge; typed username must match; single-use short-lived token (purge-token-invalid). Their messages in shared Channels stay, authored by a deleted member (author.humanId kept, author.deleted: true, no display name).
    • Offboarding needs members.manage with the same coverage rule as reset; Admin targets are Owner-only.

    CLI: members reset-password (exists), members deactivate|reactivate <u>, members transfer <u> --to <u2> [--preview], members purge <u> --preview / --token-stdin --confirm, --as <u> members change-password --sign-out-others=<bool>; team-mode off reports how many members were suspended.

    Client (Claude): member sheet actions (Reset password with one-time reveal, Deactivate/Reactivate, Transfer, Delete permanently with preview + typed username), own password dialog "Sign out other devices" (checked), Team mode off confirmation (members suspended, data kept), Deactivated/Suspended labels, deleted-member author label; en + zh.

    Tests: a reset or suspended member is refused on every existing device (browser + paired device); no data lost across disable/re-enable; purge keeps shared-Channel messages with deleted authorship; every refusal.

  2. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Nov 14, 2026
  3. DoodleBears commented on Nov 14, 2026

    @DoodleBears
    ContributorAuthor

    Codex logic task for this claim: codex/local/01a1d7c8-0459-73c0-b787-cc858b0de1b1 on codex/4147-logic (gpt-6.1-sol, high).

  4. DoodleBears commented on Nov 14, 2026

    @DoodleBears
    ContributorAuthor

    Outcome

    Merged in #4167. Password reset (signs the member out everywhere), sign-out of other devices on password change, Team mode off/on without data loss, and offboarding by deactivate → transfer (Channels and private Bots) → permanent delete (Tob, private Bots and Memory through Content Purge; shared messages kept with deleted authorship). Migration 145. Verified on a real isolated Host with the Owner UI and the member's browser; CI green; all review findings fixed with regressions.

    Follow-up noted: the legacy EventSource fallback does not reload cached messages after a stream ends (typed carrier path verified).

    State: done. Claim released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDsfeature:teamready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions