fix(adminui): _canRebirth is captured at browse-open, so a reaped session still draws Request-rebirth #510

Closed
opened 2026-07-27 13:50:30 -04:00 by dohertj2 · 1 comment
Owner

RawBrowseModal.razor:377 sets _canRebirth = BrowserService.CanRequestRebirth(_token) once, when the
browse session is established. Browse sessions are reaped for idleness after ~2 minutes. A modal left open past
the reap therefore still renders the Request rebirth… button (RawBrowseModal.razor:102), and clicking it
fails against a token that no longer resolves.

Not silent — the error is surfaced to the operator, not swallowed, and reopening the browser fixes it. So
this is a stale-affordance defect: the UI offers an action it can no longer perform.

Fix options, in increasing order of effort:

  1. Re-evaluate CanRequestRebirth(_token) at click time and, on a dead token, re-establish the session (or
    tell the operator to reopen) instead of erroring.
  2. Have the session-reap path notify open modals so the button disappears when the capability does.

Option 1 alone closes the operator-visible symptom.

Acceptance. With a browse modal open and idle past the reap window, the rebirth affordance either works
(session re-established) or is no longer offered — it never presents and then errors.

`RawBrowseModal.razor:377` sets `_canRebirth = BrowserService.CanRequestRebirth(_token)` **once**, when the browse session is established. Browse sessions are reaped for idleness after ~2 minutes. A modal left open past the reap therefore still renders the *Request rebirth…* button (`RawBrowseModal.razor:102`), and clicking it fails against a token that no longer resolves. **Not silent** — the error is surfaced to the operator, not swallowed, and reopening the browser fixes it. So this is a stale-affordance defect: the UI offers an action it can no longer perform. **Fix options,** in increasing order of effort: 1. Re-evaluate `CanRequestRebirth(_token)` at click time and, on a dead token, re-establish the session (or tell the operator to reopen) instead of erroring. 2. Have the session-reap path notify open modals so the button disappears when the capability does. Option 1 alone closes the operator-visible symptom. **Acceptance.** With a browse modal open and idle past the reap window, the rebirth affordance either works (session re-established) or is no longer offered — it never presents and then errors.
dohertj2 added the driver/mqtt label 2026-07-27 13:50:30 -04:00
Author
Owner

Fixed in master 2a7d1167 — option 1, plus a bit more.

RawBrowseModal re-probes CanRequestRebirth on arm and on confirm. The second one is not
belt-and-braces: the reap can land between arming the two-click confirm and clicking it, and confirm is
the one path that publishes to a live broker.

When the capability has gone the affordance is retired with an explanation rather than vanishing
silently or erroring — the panel is replaced by "this browse session expired while idle… close and
re-open the browser". CanRequestRebirth is a cheap, non-throwing, no-I/O probe that is false for a
reaped token, so re-running it per click costs nothing.

Note this stays a capability probe. The DriverOperator authorization gate is untouched and still
fails closed server-side in BrowserSessionService.RequestRebirthAsync.

Fixed in master `2a7d1167` — option 1, plus a bit more. `RawBrowseModal` re-probes `CanRequestRebirth` on **arm and on confirm**. The second one is not belt-and-braces: the reap can land between arming the two-click confirm and clicking it, and confirm is the one path that publishes to a live broker. When the capability has gone the affordance is **retired with an explanation** rather than vanishing silently or erroring — the panel is replaced by "this browse session expired while idle… close and re-open the browser". `CanRequestRebirth` is a cheap, non-throwing, no-I/O probe that is false for a reaped token, so re-running it per click costs nothing. Note this stays a **capability** probe. The `DriverOperator` authorization gate is untouched and still fails closed server-side in `BrowserSessionService.RequestRebirthAsync`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#510