Skip to content

fix(interactors): keep the overlay when the reader comes back (#201) - #207

Merged
adamjohnwright merged 1 commit into
mainfrom
fix/overlay-survives-navigation
Sep 16, 2026
Merged

adamjohnwright merged 1 commit into
mainfrom
fix/overlay-survives-navigation

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Closes #201.

Going back to a pathway lost the interactor overlay — the sharp case in that
report. Forward navigation already carried ?overlay=…; returning to the
pathway where it was chosen threw it away.

The cause was not the URL

stateToDiagram replays the address through the same call a reader's click
goes through
, and currentResource() still held the resource from before the
navigation while the rebuilt diagram held no badges. So the replay was read as
the toggle-to-unselect gesture — "the reader clicked the resource that is already
active" — and put it away.

Measured on beta by logging every history write:

back x1 -> ?tab=details
    replace ?overlay=IntAct&tab=details
    push    ?tab=details

The browser restored the overlay and the app immediately pushed a URL without it,
adding a history entry on the way.

before after
overlay chosen 9 badges 9 badges
navigate away, then Back 0 badges, ?tab=details 9 badges, ?overlay=IntAct

The fix

The replay says it is a replay. A reader's gesture and the address being honoured
are different things, and this method is reached by both — the same shape of
fault as a shared confidence threshold being reset, found in the same place last
week.

Corrections to the issue

The report says the resource "is not in the URL" and that a link cannot carry it.
That is no longer true: ?overlay=IntAct opens with the overlay drawn, verified.
Only Back was broken.

Verification

Asserted on badges drawn, not on the address — a URL that keeps the parameter
while the diagram shows nothing fails the reader identically. Shown red against
the old behaviour: 9 expected, 0 drawn.

240 unit tests, lint 652 and dead code 145 unchanged from baseline.

🤖 Generated with Claude Code

Going back to a pathway lost the interactor overlay, which is the sharp
case in #201: forward navigation already carried `?overlay=…`, and
returning to the pathway where it was chosen threw it away.

The cause was not the URL. `stateToDiagram` replays the address through
the same call a reader's click goes through, and `currentResource()` still
held the resource from before the navigation while the rebuilt diagram
held no badges -- so the replay was read as the toggle-to-unselect
gesture, "the reader clicked the resource that is already active", and put
it away.

Measured on beta by logging every history write:

    back x1 -> ?tab=details
        replace ?overlay=IntAct&tab=details
        push    ?tab=details

The browser restored the overlay and the app immediately pushed a URL
without it, adding a history entry as it went.

So the replay says it is a replay. A reader's gesture and the address
being honoured are different things, and this method is reached by both --
the same shape of fault as a shared confidence threshold being reset,
found in the same place a week ago.

Asserted on badges drawn rather than on the address: a URL that keeps the
parameter while the diagram shows nothing fails the reader identically.
Shown red against the old behaviour -- 9 badges expected, 0 drawn.

Also corrected here: the issue says the resource "is not in the URL". It
is, and a link carrying it opens with the overlay drawn -- verified. Only
Back was broken.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 1e77f59 into main Sep 16, 2026
6 checks passed
@adamjohnwright
adamjohnwright deleted the fix/overlay-survives-navigation branch September 16, 2026 15:02
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.

The interactor overlay is forgotten on every navigation, including returning to the same pathway

1 participant