A confirmed action the server refuses leaves the confirm dialog open over the re-rendered page, beside a generic "Request failed" toast #326

Open
opened 2026-11-06 19:39:24 +00:00 by cgalo5758 · 0 comments
Owner

What happens

When the server refuses an action confirmed in the shared confirm dialog with a status the page swaps (409, 404), its answer swaps into the target behind the dialog: the page re-rendered with its refusal notice. The dialog stays open with its backdrop. A red toast, "Request failed. Check your input and try again.", also appears beside the notice that already says what went wrong. The operator has to close the dialog by hand to read the page.

What should happen

When the answer swaps into a target outside the dialog, the dialog closes whatever the status, and the refusal is said once, by the notice in the swapped page. The generic toast stays for answers that swap nothing (403, 5xx).

Where

internal/embeds/static/confirm-action-modal.js: the htmx:after:request handler closes the dialog only on 2xx and 3xx. The htmx:after:swap handler that closes the dialog when a swap lands outside it returns early for the confirm form, because it only looks at the dialog's loaded region. internal/embeds/static/error-handler.js toasts every status of 400 and above except 422.

Every confirm action whose data-action-target is outside the dialog can show this:

  • Force-release on Domains;
  • the plan ladder, tier, price and integration removals that swap #operator-body;
  • the member's plan actions that swap #member-plans.

Steps

  1. As an operator, open Domains with a pending external claim listed.
  2. In the database or another session, move that claim to a terminal state.
  3. Back on Domains, choose Force-release on the claim and confirm.
  4. The page behind the dialog shows "That claim reached a terminal state while the page was open; the list below is current.", the dialog stays open, and the red "Request failed" toast appears.

Why it matters

A refused moderation or catalog write is exactly when the operator needs to read the page, and the dialog covers it. Two messages for one refusal, one of them generic and wrong ("Check your input"), teach the operator to ignore both.

## What happens When the server refuses an action confirmed in the shared confirm dialog with a status the page swaps (409, 404), its answer swaps into the target behind the dialog: the page re-rendered with its refusal notice. The dialog stays open with its backdrop. A red toast, "Request failed. Check your input and try again.", also appears beside the notice that already says what went wrong. The operator has to close the dialog by hand to read the page. ## What should happen When the answer swaps into a target outside the dialog, the dialog closes whatever the status, and the refusal is said once, by the notice in the swapped page. The generic toast stays for answers that swap nothing (403, 5xx). ## Where `internal/embeds/static/confirm-action-modal.js`: the `htmx:after:request` handler closes the dialog only on 2xx and 3xx. The `htmx:after:swap` handler that closes the dialog when a swap lands outside it returns early for the confirm form, because it only looks at the dialog's loaded region. `internal/embeds/static/error-handler.js` toasts every status of 400 and above except 422. Every confirm action whose `data-action-target` is outside the dialog can show this: - Force-release on Domains; - the plan ladder, tier, price and integration removals that swap `#operator-body`; - the member's plan actions that swap `#member-plans`. ## Steps 1. As an operator, open Domains with a pending external claim listed. 2. In the database or another session, move that claim to a terminal state. 3. Back on Domains, choose Force-release on the claim and confirm. 4. The page behind the dialog shows "That claim reached a terminal state while the page was open; the list below is current.", the dialog stays open, and the red "Request failed" toast appears. ## Why it matters A refused moderation or catalog write is exactly when the operator needs to read the page, and the dialog covers it. Two messages for one refusal, one of them generic and wrong ("Check your input"), teach the operator to ignore both.
cgalo5758 added the
kind
bug
area/operator-uiarea/member-ui
labels 2026-11-06 19:39:24 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#326