Skip to content

[M2.5b] Web: shared confirmation by typed name - #187

Merged
samuelmbabhazi merged 1 commit into
mainfrom
feat/m2.5b-confirmation-dialog
Nov 7, 2026
Merged

samuelmbabhazi merged 1 commit into
mainfrom
feat/m2.5b-confirmation-dialog

Conversation

@samuelmbabhazi

Copy link
Copy Markdown
Collaborator

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

  • Tests, including malicious input
  • No new shell invocation, no new secret exposure path
  • No new state change
  • PLAN updated

@samuelmbabhazi
samuelmbabhazi merged commit 795f250 into main Nov 7, 2026
@samuelmbabhazi
samuelmbabhazi deleted the feat/m2.5b-confirmation-dialog branch November 7, 2026 12:04
samuelmbabhazi added a commit that referenced this pull request Nov 7, 2026
## What changed

Moved two suites into their own spec files, with no change to the tests
themselves:

- `application domains over HTTP` →
`application-domains-http.integration.spec.ts`
- `rollback over HTTP` → `rollback-http.integration.spec.ts`

## Why

**These two suites never ran.** Each started a second app in a file that
had already started one. Configuration is read once per module graph, so
the second app looked for the first one's deleted KEK file and failed in
setup with `KekError`. They shipped in #176 and #178 without any
integration run, so nobody saw it.

Also updates the PLAN status with what has now run.

## How it was tested

The first integration run of this code, on `main` at #187, against a
disposable local PostgreSQL 18.4 (`DATABASE_URL`, no Docker):

- **Before the split:** 304 passed, 3 failed, 2 skipped, and these 2
suites failed in setup.
- **After the split, these 4 files:** 9 of 9 pass, including rollback
and domain uniqueness.
- **The 3 failures** expect `23503` for `ON DELETE RESTRICT`, which
PostgreSQL 18 reports as `23001`. The project pins 17, where they should
pass, but that has not been run. They are left unchanged.

Not covered: a real Docker daemon or server, and the pinned PostgreSQL
17.

## Security considerations

Test-only and documentation change.

## Checklist

- [x] Integration tests run for the changed files
- [x] No new shell invocation, no new secret exposure path
- [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