Skip to content

[M2.3f1b1] Web: resource settings; forms recover after a refused request - #184

Merged
samuelmbabhazi merged 2 commits into
mainfrom
feat/m2.3f1b-settings-members
Nov 7, 2026
Merged

samuelmbabhazi merged 2 commits into
mainfrom
feat/m2.3f1b-settings-members

Conversation

@samuelmbabhazi

Copy link
Copy Markdown
Collaborator

What changed

Settings forms. Organization (name, slug), project (name, slug, how shipkeep.yml is written) and environment (name, kind, failover policy, protection) pages each gain a settings section over the existing settings routes.

Bug fix, not in the plan. After a 409 (a slug already taken, for example), MutationRunner refuses further submits until reset, and the create forms never reset it. Correcting the value and submitting again silently did nothing. recoverOnEdit restarts the runner on the next edit, on every form using a runner this way. A server-requested wait still applies.

Why

PLAN M2.3f1b, which is now split into three: settings (this PR), members and bindings, then the token scope picker.

How it was tested

Web tests in resource-settings.spec.ts, through the real routes with a stubbed fetch:

  • Saving trims and sends the expected body, updates the page and disables the button until the next edit.
  • Control characters, bidi overrides, path traversal and shell metacharacters in names and slugs disable saving.
  • A corrected slug after a 409 goes through, on the settings form and on a create form.
  • A save answering after navigation to another organization is dropped.
  • Protection is sent as a boolean.
  • A refusal keeps what was typed.

Local gate only (CI off). Not exercised in a real browser or against a running API.

Security considerations

No new route. The API stays the authority for organization.update, project.update and environment.update, and audits these changes. A member without the permission still sees the form and gets the API's refusal on saving, because the API exposes no effective permissions to the UI yet. Turning protection off opens deploys, secrets and container sessions to developers, and the form says so next to the checkbox.

Checklist

  • Tests, including malicious input
  • No new shell invocation, no new secret exposure path
  • Audit events already emitted by the API routes
  • PLAN updated

review added 2 commits November 7, 2026 13:49
A 409 blocks MutationRunner until it restarts, and nothing restarted it, so a corrected value was silently never submitted.

Signed-off-by: review <[email protected]>
@samuelmbabhazi
samuelmbabhazi merged commit 5de7338 into main Nov 7, 2026
@samuelmbabhazi
samuelmbabhazi deleted the feat/m2.3f1b-settings-members branch November 7, 2026 11:50
samuelmbabhazi added a commit that referenced this pull request Nov 7, 2026
## What changed

`ConfirmByName` is a shared panel for destructive actions, extracted
from the servers page, which now uses it. It asks for the resource's
exact name with no trimming or case folding. It is announced as an
`alertdialog`, takes focus when opened, gives focus back to the opener
when closed, and Escape dismisses it. Selecting another resource starts
over.

The servers page also recovers after a refused request, using
`recoverOnEdit` from #184, which it had missed: a 409 left its forms
blocked.

## Why

PLAN M2.5b. Server removal is the only confirmable action the API has
today (`CONFIRMABLE_ACTIONS`), so it is the only user. Volume, database
and environment deletion will use it once those screens and actions
exist.

## How it was tested

`confirm-by-name.spec.ts`: wrong case, surrounding spaces, a Greek
lookalike and injection text never confirm; no double confirmation while
busy; focus moves in and back; Escape dismisses; another resource resets
the field. The existing server removal test still covers the two
requests.

Local gate only (CI off). Not exercised in a real browser.

## Security considerations

This check is a convenience. The server issues the single-use
confirmation token only for the exact name and permission, and that
remains the guarantee (rule 7). The panel is not modal: the page behind
it stays reachable.

## Checklist

- [x] Tests, including malicious input
- [x] No new shell invocation, no new secret exposure path
- [x] No new state change
- [x] PLAN updated

Signed-off-by: review <[email protected]>
Co-authored-by: review <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant