~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

A group is switched off, back on, and deleted from the console and the command

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:host/group-lifecycle-everywhere

What changes

Console. The profile page of a group's settings ends with "Switch off or delete". Switching off asks to be sure, then goes to the group's page. That page then shows an empty state, "This group is switched off". Its stewards (whoever held group.configure when it went off) get "Switch back on" and "Delete the group" there; anyone else gets a way back to their groups. Deleting asks to be sure, in danger, and goes home. ConfirmDialog takes danger={false} for an act that can be undone, which then is the dialog's one primary button.

Host. getGroup on a switched-off group gives one signed in a viewer with steward: whether they may switch it back on or delete it. Nothing else of their standing is read (member false, roles and actions empty). Before, a switched-off group's page could not tell a steward from anyone else. steward is a new optional field on fyi.opensocial.defs#viewerState.

Command and MCP. opensocial group deactivate <group> [--undo] is the tool group_deactivate (with undo, activateGroup). opensocial group delete <group> has no tool: an MCP client acts in the one group it was connected to and should never end it. AGENTS.md and the CLI and MCP reference pages list it beside group create, seed and move.

Why

The host had deactivateGroup, activateGroup and deleteGroup, but nothing called them: no page, no command, no tool.

How it was checked

  • lifecycle.rs: a steward of a switched-off group is told so by getGroup, and a plain member is not.
  • mcp.rs: a plain member's client is refused group_deactivate; an admin's switches the group off and, with undo, back on.
  • protocol.rs: the tool is listed and plans the method and its opposite.
  • commands.rs: group deactivate, its --undo, and group delete, refused to a non-admin, then deleting the group by its handle.
  • e2e: switching a group off from its settings, bob seeing no switch, switching it back on from its page, deleting it, and its page then 404.
  • Looked at with just look: the settings section, both dialogs, and the switched-off page as a steward and as not, on desktop light and phone dark. Critiqued by a fresh agent: the switched-off page became an empty state, and the dialogs' words plainer.

Shortcomings

  • A switched-off group's profile can't be read, so its page names it by its handle. The dialogs ask of "this group", so neither a long name nor that handle runs over their titles.

  • Switching off asks to be sure although it can be undone, because it hides the group from every member at once. Its act is primary, not danger.

  • group delete asks nothing before deleting, as role delete does not.

🤖 Generated with Claude Code

settings-section-alice-desktop-light.png

switch-off-alice-desktop-light.png

delete-group-alice-desktop-light.png

off-steward-alice-desktop-light.png

off-bob-bob-phone-dark.png

off-delete-alice-phone-dark.png

Approved

This adds switching a group off, back on, and deleting it. The console gets a settings section and a switched-off page. getGroup gets viewer.steward for a switched-off group. The CLI gets group deactivate [--undo] and group delete, and MCP gets group_deactivate. I found nothing that must change.

  • Convention and design: The command and tool come from one TOOLS entry, as AGENTS.md asks, with delete left toolless for the stated reason. steward is optional, so it only grows the lexicon. The switching-off-on-and-deleting anchor the CLI doc links to exists in groups.md.
  • Docs and tests: AGENTS.md, the design pages and both reference pages are updated. The host, MCP, command and e2e tests cover the new paths.
  • Gating: Both new actions run through the host, which already limits deleteGroup and activateGroup to the right callers, so hiding the buttons from non-stewards is not the only guard.
  • Skipped: I did not read the check results, and I did not open the screenshots.
Approved

This round only changes the switch-off and delete dialogs to ask about "this group" instead of naming it. I found nothing that must change. My earlier review had no requests, so there was nothing to follow up on.

  • Title change: SwitchOff, DeleteGroup and SwitchedOff lose their name prop. The settings page and the group page stop passing it, so nothing still passes a prop that no longer exists.
  • e2e: The dialog names in flows.spec.mjs ("Switch this group off?", "Delete this group?") match the new titles.
  • Not read: I did not read the check results or open the screenshots.
Approved

This round adds one test to commands.rs. It covers group delete on a group whose steward added a recovery key, and expects the output "its DID is left to the holders of its recovery keys". I found nothing that must change.

  • Earlier reviews: They asked for nothing, so there is nothing to follow up on.
  • Test: It sits beside the existing delete case and checks the exact output for the recovery-key path. I did not trace the source that prints that line. The diff for this commit touches only the test, so that output was presumably already in the earlier head.
  • Not read: I did not read the check results or open the screenshots.
Approved

This round only merges main into the pull. It brings in the in-place acts and the fixed dialog titles. I found nothing that must change.

  • Earlier reviews: They asked for nothing, so there is nothing to follow up on.
  • Merge: The "Switch back on" form in SwitchedOff.svelte now uses use:enhance={inPlace}. That is what the in-place pull said whichever landed second should do. DeleteGroup takes no props, so it fits the fixed-title change.
  • Not read: I did not read the check results or open the screenshots.
Approved

Carried forward: the change this pull makes at 1a7ac13a5ffa21766f1b5296d8211f936e66964b is the one reviewed at 3fa00898cec279c143e6b3759956069776368452, so that review stands. What is new comes from its base.

Merged as 5701b06