Skip to content

feat(presets): enable/disable switch for presets - #447

Merged
theogravity merged 19 commits into
mainfrom
feat/preset-enable-disable
Oct 26, 2026
Merged

theogravity merged 19 commits into
mainfrom
feat/preset-enable-disable

Conversation

@theogravity

@theogravity theogravity commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Adds the ability to park a preset without deleting it. A toggle in the presets table flips an enabled flag; a switched-off preset disappears from every launch picker (web and mobile), from the MCP list_presets answer, and starting or restarting a subshell with one is refused until it's switched back on. Panes already running from it are untouched.

Spec: docs/superpowers/specs/2026-10-24-preset-enable-disable-design.md. Plan: docs/superpowers/plans/2026-10-24-preset-enable-disable.md.

  • Migration 0068 (renumbered from 0062, which main took while this branch was open) adds enabled (integer 0/1, NOT NULL DEFAULT 1) to presets and ssh_presets; registered in the migrator map, the backup level (LATEST_BACKUP_MIGRATION), the backup era lists, and the curated in-memory test migration lists.
  • PATCH /api/presets/:id is the only write path for the flag (cookie-only, owner or edit grantee; PUT stays unable to speak about it, so a settings save can never resurrect a parked preset).
  • Launch and restart refusals are 409s (wire code EXISTS_ERROR, as with the other preset refusals), answered before any pane work; the manager keeps a backstop for direct calls.
  • MCP list_presets withholds disabled rows and its description says so; create_subshell refuses one. The docs MCP tools page carries the same line.
  • Web: a shared Enabled cell in both preset tables (a switch on editable rows, plain Yes/No text otherwise), filtered pickers, and a toast when a toggle fails; mobile: chip filter via isPresetOffered (lenient: an older server's field-less rows stay offered).

Verification: full suites green (server/api 4537 pass with one env-only failure proven to be this harness's bash SHELLOPTS poison via a standalone probe, web 2984, mcp-core 118, mobile 143), root verify-types, lint:check, lint:prose, lint:design, lint:licenses, and turbo build all clean. Review loop closed: whole-branch code review, two fix waves, and a scoped re-review with zero open MAJOR/MINOR findings.

Changesets included (@internal/server + @internal/node minor, @internal/docs patch for the docs deploy).

Known follow-up (parked, not a blocker): the clone dialog surfaces a server 409 rather than pre-filtering the source preset.

theogravity and others added 19 commits October 24, 2026 20:44
Co-Authored-By: Claude <noreply@anthropic.com>
…evel

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>" <<'X'
@theogravity
theogravity merged commit f72a30b into main Oct 26, 2026
21 of 22 checks passed
@theogravity
theogravity deleted the feat/preset-enable-disable branch October 26, 2026 01:25
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant