Skip to content

Ask before every destructive action in the dashboard - #429

Merged
artyomsv merged 4 commits into
masterfrom
fix/confirm-deletes
Nov 16, 2026
Merged

artyomsv merged 4 commits into
masterfrom
fix/confirm-deletes

Conversation

@artyomsv

Copy link
Copy Markdown
Owner

Part of #391.

The operator found that two trash icons deleted at once, with no confirmation: the sign-in application and the operator link. An audit of all 16 destructive actions in the dashboard found 5 that did not ask first:

  • the sign-in application trash;
  • the operator link trash;
  • ActorPicker Remove;
  • Factory PeopleStep Remove;
  • Prompt "Reset to default".

All 5 now use the existing ConfirmDialog, which names what will go and what that means. Tests check three things for each: the button alone deletes nothing, Confirm deletes, Cancel does not.

Left as one click on purpose, because both can be undone:

  • "Stop hiding" in learned memory;
  • the harness "Switch off".

Docs: docs/TLS.md lists the nginx proxy manager Advanced settings that the first production install needed. Without the buffer lines, the sign-in callback gives a 502, "upstream sent too big header". The other lines set the WebSocket timeouts and the body size. HISTORY has an entry.

CI only; nothing ran locally.

The first production install found that the People tab's trash icons
removed a sign-in application or unlinked an operator at once. An audit
of every destructive action found five that did not ask:

- Settings > People: remove a sign-in application, unlink an operator
- Account allowed people and repository /fix overrides: Remove
- Factory tab, allowed people on a work source: Remove
- Prompts: Reset to default (deletes the saved custom text)

Each now opens ConfirmDialog, which names what goes and what that
means. A refused request stays in the dialog, so it can be retried or
cancelled. The drift banner's "Take the new default" stays one click:
it already shows both texts side by side.

The OAuth application form and the operator links table move to their
own files so the screens stay small. Tests cover, for each action, that
the first click does not call the API, Confirm does and Cancel does not.

Part of #391
nginx proxy manager is a second nginx in front of the dashboard's own,
so it needs the same limits. Without the header buffers the sign-in
callback, which sets the session as several large cookies, answered 502
"upstream sent too big header" on the first production install
(2026-11-15). The timeouts keep the idle WebSockets open and the body
size lets a large webhook through. Adds the symptom to the
troubleshooting table and a HISTORY entry for the confirmations.

Part of #391
@artyomsv artyomsv added the review: requested the code waits for a reviewer label Nov 16, 2026
The sign-in application form moved out of ScmConnections.tsx unchanged,
taking its settings-convention debt with it. The contract test's legacy
list now names the file that holds the form, so it neither flags the
moved form as new debt nor keeps a screen that no longer owes anything.

Part of #391

@artyomsv artyomsv left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First review at 757d8a1. All five unconfirmed deletes now go through the existing ConfirmDialog, and the behaviour is right in each: the dialog names what goes and what it means, a failed action stays inside the dialog (ConfirmDialog keeps itself open and shows the error) so it can be retried or cancelled, and the moved code is a pure move (ScmOAuthAppForm and OperatorLinksTable carry the old bodies, ScmConnections 304 -> 224 and SettingsOperators 249 -> 177 lines, PromptDetail 304 -> 303). The two undoable actions left as one click are named with the reason. CI is green. I found no defect in behaviour. One MEDIUM about the 250-line rule in tests and one LOW in the TLS doc.

Findings: 1 MEDIUM, 1 LOW. Reviewed head 757d8a1cb9 as @artyomsv.

Comment thread docs/TLS.md Resolved

@artyomsv artyomsv left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ CHANGES REQUESTED

Posted as a comment: GitHub does not let an account approve or request changes on its own pull request. The label carries the verdict.

Agent findings: 0 resolved, 2 open. CI: 11/14 checks passing. Head 757d8a1cb9, reviewed by @artyomsv.

Open findings:

@artyomsv artyomsv added review: changes-requested Agent review verdict: changes requested and removed review: requested the code waits for a reviewer labels Nov 16, 2026
Review of #429 found the unlink and remove-person cases pushed
SettingsOperators.test.tsx and RepositoryFactory.test.tsx past the
file-size limit. They now live in OperatorLinksTable.test.tsx, next to
the component that owns the dialog, and PeopleStepConfirm.test.tsx,
which reuses the factory test setup. Both older files are back below
their previous length.

TLS.md no longer says proxy manager needs no custom configuration at
all: only requirements 1 and 2 need none; the Advanced lines cover the
buffers, timeouts and body size.

Part of #391
@artyomsv artyomsv added review: requested the code waits for a reviewer and removed review: changes-requested Agent review verdict: changes requested labels Nov 16, 2026

@artyomsv artyomsv left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ APPROVED

Posted as a comment: GitHub does not let an account approve or request changes on its own pull request. The label carries the verdict.

Agent findings: 2 resolved, 0 open. CI: 11/14 checks passing. Head b9b92f5d3c, reviewed by @artyomsv.

@artyomsv artyomsv added review: approved Agent review verdict: approved and removed review: requested the code waits for a reviewer labels Nov 16, 2026
@artyomsv
artyomsv merged commit 75377f1 into master Nov 16, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review: approved Agent review verdict: approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant