Repository navigation
Viewer: Try again when the first recording fails to open - #428
Merged
Merged
Conversation
A failed first open left an error and a link, and only a reload recovered. The message now carries a Try again button that re-runs the same open through the session (same claim and supersession), on the dialog and the embed. When the viewer's code did not load, the button reads Reload and reloads the page, since Chromium and WebKit cache a failed dynamic import for the document. Tested: unit tests for the message; Playwright on Chromium and WebKit for the embed (code fails to load, mount throws once and twice) and the dialog.
Deploying nemar-website with
|
| Latest commit: |
5cddc57
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://39740bdf.nemar-website.pages.dev |
| Branch Preview URL: | https://fix-issue-416-try-again.nemar-website.pages.dev |
…view fixes Reload page now goes to the address with ?view= naming the failed recording (the failed open had already stripped it, so a bare reload opened a different recording in an embed). The viewer's own 'could not load' message, for a store that would not open, offers Try again too. A failed retry says 'Still couldn't open', the button is described by the message, focus is restored only when it was not moved, aria-busy clears before the message, and the module failure rides on the mount outcome instead of session state. Tested: unit tests for the message and reloadUrl; Playwright on Chromium and WebKit for chunk failure, mount throw twice, store outage, dialog, and dialog plus chunk failure, all with ?view=.
This was referenced Oct 6, 2026
…le rule The viewer's own Try again re-enables when its retry settles, the outage message says 'still' after a failed retry, and isRetryableUnavailable keeps the button and the message on one rule, with a test that they agree. Tested: viewer and session unit tests; Playwright on Chromium and WebKit for an outage that persists through one retry and then recovers.
This was referenced Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #416 (closing keywords do not close on
staging; I will close it by hand after merging).When the first open of a recording fails, the viewer showed an error and a link and nothing else:
liveis null, so the nav controls hide, and only a reload recovered. That matters most in the embed, where a partner's visitor has no surrounding page.openRecordingFrom), so it takes a new claim and is superseded and guarded like any other open. One change inviewer-session.ts, so the dataset page dialog and the embed both get it. A failed in-place navigation is unchanged.onRetryoption. Without it that case, the one the code comment names as Viewer: a Try again action when the first recording fails to open #416, would still have no way out. A missing store, a recorded data failure, a missing canvas and "no channel groups" do not get it: a retry cannot change them.aria-busyclears before the message is inserted.import()for the life of the document and answer the next one without asking the network (checked: one request, two failures), so a re-run would never recover from the most likely cause, a network blip on the viewer chunk. Firefox was not tested (the Playwright Firefox build hung here).?view=. Both reviewers found this: by the time the button is on screen the session has already stripped?view=(nothing is live), so a bare reload landed an embed on a different recording, or the dataset page with no dialog, without a word. Reload now goes to the address with?view=naming the failed recording (reloadUrl), so the embed reopens on the same recording and the dataset page reopens the dialog on it.MountOutcome.moduleFailed), not on session state.presentno longer callsshowModal()on a dialog that is already open, because a retry re-presents into the open dialog.eeg-viewer.css(.preview__retry, page tokens,--color-focusring, light and dark).Follow-ups, filed rather than carried: #429 (the inline viewer under a tree row has the same remembered-import dead end) and #430 (a throw after
present()leaves "Loading viewer..." with no message, which predates this PR).Verification
bun run typecheck,bun run lint,bun run test(3008 pass), including new unit tests foropenFailureHtml(Try again, Still, Reload page, the description link, escaping) andreloadUrl(adds the view, replaces a stale one, keeps the version and the hash).?view=sub-23_task-BCCWJreading:?view=at that moment, the reload restores it and the embed opens sub-23;