A domain claim's records view shows "404 page not found" in place of itself when its refresh is refused #325

Open
opened 2026-11-06 01:47:16 +00:00 by cgalo5758 · 0 comments
Owner

What happens

While a domain claim is pending, its DNS records view (member_domains_claim.html) refreshes itself every 5 seconds: a GET of /partials/domains/claims/{claimID} that swaps the answer over the view's root element (outerHTML). The route checks that the session's workspace owns the claim (ownedClaim in internal/server/member_domains.go), and when it no longer does it answers http.NotFound, a plain-text body reading "404 page not found".

The member pages' htmx configuration declines to swap 204, 304, 403 and 5xx answers (noSwap in each page's htmx-config meta), but not a 404. The refresh therefore replaces the records table, the status and the buttons with the bare text "404 page not found", and error-handler.js also raises the error toast. Nothing stops the refresh: the replaced element carried the polling attributes, so the text simply stays.

What should happen

A refresh the console refuses leaves the member with a sentence they can act on and stops refreshing, never the server's plain-text 404. Either the route answers a refused refresh with a view that states the claim is no longer available and carries no polling attributes, or the 404 joins the statuses the member pages decline to swap, with the error toast as the only feedback. Whichever is chosen, a test drives a refresh for a claim the session no longer owns and asserts what the member sees.

Where

ownedClaim and GetClaimStatus in internal/server/member_domains.go; the htmx-config meta in the member page templates (index.html, products.html, billing.html, and any member page added later); internal/embeds/static/error-handler.js.

Steps

  1. As a member with a pending external domain claim, open the claim's DNS records.
  2. In another session, move the member to another workspace or organization, so the claim no longer belongs to the session's workspace (or delete the claim row in a test database).
  3. Within 5 seconds the records view is replaced by "404 page not found" and the error toast appears.

Why it matters

A member watching DNS verification is the one person waiting on this view. A raw server string in place of the instructions reads as the console breaking, and it gives no hint that the claim moved or how to find it again.

### What happens While a domain claim is pending, its DNS records view (`member_domains_claim.html`) refreshes itself every 5 seconds: a GET of `/partials/domains/claims/{claimID}` that swaps the answer over the view's root element (`outerHTML`). The route checks that the session's workspace owns the claim (`ownedClaim` in `internal/server/member_domains.go`), and when it no longer does it answers `http.NotFound`, a plain-text body reading "404 page not found". The member pages' htmx configuration declines to swap 204, 304, 403 and 5xx answers (`noSwap` in each page's `htmx-config` meta), but not a 404. The refresh therefore replaces the records table, the status and the buttons with the bare text "404 page not found", and `error-handler.js` also raises the error toast. Nothing stops the refresh: the replaced element carried the polling attributes, so the text simply stays. ### What should happen A refresh the console refuses leaves the member with a sentence they can act on and stops refreshing, never the server's plain-text 404. Either the route answers a refused refresh with a view that states the claim is no longer available and carries no polling attributes, or the 404 joins the statuses the member pages decline to swap, with the error toast as the only feedback. Whichever is chosen, a test drives a refresh for a claim the session no longer owns and asserts what the member sees. ### Where `ownedClaim` and `GetClaimStatus` in `internal/server/member_domains.go`; the `htmx-config` meta in the member page templates (`index.html`, `products.html`, `billing.html`, and any member page added later); `internal/embeds/static/error-handler.js`. ### Steps 1. As a member with a pending external domain claim, open the claim's DNS records. 2. In another session, move the member to another workspace or organization, so the claim no longer belongs to the session's workspace (or delete the claim row in a test database). 3. Within 5 seconds the records view is replaced by "404 page not found" and the error toast appears. ### Why it matters A member watching DNS verification is the one person waiting on this view. A raw server string in place of the instructions reads as the console breaking, and it gives no hint that the claim moved or how to find it again.
cgalo5758 added the
kind
bug
area/domainsarea/member-ui
labels 2026-11-06 01:47:16 +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#325