Harden browser push receiver capability detection#140
Conversation
Port the patched 1.9.3 extension changes, improve cross-context handling and diagnostics, skip unsupported legacy cloud-push tests in Edge, hide sensitive token output, and provide a local send-only device name.
|
Hi. Thanks for the PR. To clarify, are these supposed to make the extension fully work with Edge? What did you test the AI code with exactly? Thanks! |
|
Thanks for asking. I updated the titles/bodies of #139 and this PR to clarify the scope. No — these PRs are not meant to make Edge a complete Join receiver. The current Join browser receive path depends on Chrome-only extension APIs ( The intended scope is narrower:
Testing performed:
Not yet tested: full manual browser QA in a live Join account proving Chrome receive still works and Edge falls back cleanly to send-only. I added that limitation to the PR bodies so the scope is not overstated. If you prefer, I can close this stacked PR and keep only #139 open until the broader Edge compatibility changes are reviewed first. |
|
Update: I ran a validation-focused Repo AI review and also did local smoke checks. Repo AI validation result:
Additional local checks I ran outside Repo AI:
Still not tested:
So the accurate status is: static validation and local unpacked-extension load smoke passed; live account QA has not been done; this is not verified full Edge receiver support. |
Summary
Follow-up hardening for #139.
This PR does not make Edge a full Join receiver. It tightens the capability check so the extension only reports full browser receiver support when both sides of the current legacy Chrome receiver path are actually available:
chrome.instanceID.getTokenfor the registration tokenchrome.gcm.onMessage.addListenerfor incoming push deliveryThis prevents partial Chromium environments from registering as Join receivers when they can expose part of the old API surface but cannot actually receive messages.
Changes
Errorobjects before throwing them.chrome.instanceID.isAvailable()through the service worker capability check instead of relying on local/offscreen context availability.Why this matters
Join's browser receiver path requires end-to-end support. A token alone is not enough: if
chrome.gcm.onMessagecannot fire, the extension can register as a receiver and silently drop every incoming push.This keeps Chrome behavior intact while forcing unsupported/partial environments into the existing send-only fallback.
Stacking note
This PR is stacked on top of #139. GitHub may show the broader #139 changes in this diff until #139 is merged. The new commit in this branch is:
Harden Edge receiver capability detectionAfter #139 is merged, this branch can be rebased so the PR diff contains only the follow-up hardening commit.
Validation
node --check cross_context.jspasses locally.Manual validation recommended: