fix(push): guard passive web push reconciliation#121
Conversation
Deploying with
|
| Status | Preview URL | Commit | Alias | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! | https://pr-121-charm.justin-tech.workers.dev | 69e48ab | pr-121 |
Wed, 17 Jun 2026 04:44:07 GMT |
Code Coverage OverviewLanguages: JavaScript JavaScript / code-coverage/vitestThe overall coverage in the branch remains at 22%, unchanged from the branch. Show a code coverage summary of the most impacted files.
Code Coverage is in Public Preview. Learn more and provide us with your feedback. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 69e48ab239
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| useEffect(() => { | ||
| setMatrixToBase(clientConfig.matrixToBaseUrl); | ||
| }, [clientConfig.matrixToBaseUrl]); |
There was a problem hiding this comment.
Set the matrix.to base before rendering descendants
When matrixToBaseUrl is configured, moving setMatrixToBase into a passive effect means RouterProvider and its children render once before the module global is updated. The matrix-to helper explicitly relies on this being set before any getMatrixTo* calls, and rendered hrefs such as forwarded-event links can stay on the default https://matrix.to/ until some unrelated re-render happens; previously the base was set synchronously before returning the children.
Useful? React with 👍 / 👎.
| return redirect(getLandingPath(settings.defaultLandingScreen)); | ||
| } | ||
| const afterLoginPath = getAppPathFromHref(getOriginBaseUrl(), window.location.href); | ||
| const afterLoginPath = getAppPathFromWindowHref(hashRouter); |
There was a problem hiding this comment.
Skip redirect capture when the hash is absent
With hashRouter enabled, an unauthenticated user who lands on the bare origin without a # now passes the hash-router config into getAppPathFromWindowHref. getAppPathFromHref assumes a hash exists in that mode, so it slices the full URL as if it were a hash path and stores malformed after-login redirects like /https://host/ (or /ps://host/ with a basename), causing login completion to navigate to a bogus route instead of the normal landing page.
Useful? React with 👍 / 👎.
Description
Guard passive web-push reconciliation on unsupported browsers and carry the related notification-restore fixes that were developed during the push investigation.
This branch:
PushManageris unavailable/to/...notification restore behavior across hash-router and call-join deep linksRelated context: follow-up to the recent push recovery work that landed across PRs #116 and #117, and adjacent to the earlier unsupported-browser push fix in PR SableClient#868.
Fixes #
Type of change
Checklist:
AI disclosure: