Repository navigation
Conversation
[Medium impact] The PR appears safe to merge; no actionable issue remains. SummaryAdds the two fields Edge expects before the browser token, preserving the URL and extra arguments during handoff.
Reviews (3) · Last reviewed commit: "Quote the Edge profile and clean up the ..." · Reviewed by Greptile |
f7db948 to
65d267e
Compare
|
Thanks @vitally. I reviewed this at 65d267e alongside #16079, which also says it fixes #16428. The Edge change here is the same code as the one in #16079, line for line: Your test does add something #16079 doesn't have. #16079's Edge case skips unless I found no defect in the Edge hunk itself. The offset 11644473600000000 is the 1601-to-1970 gap in microseconds, Checked by Claude Opus 5.5 and, as a second opinion, Codex Medium. Codex was given both diffs and asked which should win without being told my answer. It reached the same conclusion and also recommended folding the test in, though independence isn't guaranteed. Next step: the maintainer decides between the two. |
The packaged path is what selects Edge's profile, so the test stands in for type -P rather than skipping wherever Edge is missing, which is everywhere the suite usually runs. Taken from omacom#16433. Co-Authored-By: Vitally Tezhe <vitally@tezhe.eu> Co-Authored-By: muse-wonder High <noreply@meta.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With Microsoft Edge as the default browser and running, a handoff with two or more arguments loses the first two:
omarchy-launch-webapp URL --ignore-certificate-errorsopens a blank "New tab" in a normal window, as #16428 reports for Omarchy's own Sunshine admin web app.Edge's own second process sends two extra fields after the working directory, a time in microseconds since 1601 and one it ignores:
omarchy-cmd-browser-handoffsends Chromium's shorter message, and Edge reads a message without those fields only when it has a single argument — with more, it takes the first two arguments as the fields and drops them.Fix. For the
microsoft-edgeprofile only, the handoff now sends the two fields before the browser token, dating the message from 1601 as Edge's own client does. Chromium, Chrome, Brave, Brave Origin and the flags and socket checks are unchanged, and a single-argument handoff gets the same fields, which is the form Edge's own client sends.Test.
browser-handoff-test.shruns the real handoff against a singleton socket and asserts the exact fields:START, the working directory, a timestamp above the 1601 offset,0,browser, then both arguments. The packaged path is what selects the Edge profile, so the test stands in fortype -Pto reach it where Edge is not installed; it fails onquattrowith the messageSTART\0cwd\0browser\0--app=…\0--ignore-certificate-errorsand passes with the fix.bin-style-test.shpasses too.Not run against a real Edge, which is not installed here; the field layout and the argument-loss table are from the issue's strace capture.
Fixes #16428