Repository navigation
Carry cookies into a cold-started Grab - #46
Merged
Merged
Conversation
When the local server refuses the handoff, navigate to a wake URL that launches Grab without a download, poll until it proves the pairing, then retry the POST so the cookies still travel. Fall back to the cookieless grab:// URL only when Grab never comes up.
Only wake when the retry can carry cookies: a paired Grab and the Cookies permission are both required, so unpaired or revoked users fall back immediately as before. Show a starting badge while waiting, and let concurrent sends await one in-flight wake instead of launching repeatedly.
Only wake when the tab is not incognito, Grab is paired, the Cookies permission is granted, and the site actually has cookies to send. A warned tab keeps its existing badge instead of having it replaced and cleared. Reads the pairing code once.
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.
When Grab is closed, the HTTP handoff fails and the previous code fell back to the
grab://URL. That channel cannot carry cookies, so Grab started with none and sites that need a logged-in browser (simpcity and similar) failed authentication.This change:
grab://https/, which launches it without opening a download card;/hellountil the listener proves the pairing (12 s cap);grab://fallback immediately in every skipped case.Tests cover wake-and-retry (cookies present, badge shown and cleared, acted-on tab), the timeout fallback, the unpaired and permission-revoked gates, incognito, cookie-less sites, warning-badge preservation, and a concurrent burst producing one wake navigation. Full suite: 183 passing.
Builds on the merged #45.