Repository navigation
Hand browser and web app launches to the running browser directly - #13530
Merged
Merged
Conversation
With a Chromium-based browser already running, each launch started a second browser process only to pass its command line over the profile's singleton socket and exit, ~165ms before the running browser even heard of it. omarchy-cmd-browser-handoff sends that message itself with socat and waits for the ACK, so a web app opens in ~210ms instead of ~430ms. It hands off only what it can do exactly as the browser would: the packaged browser binary rather than a wrapper, a flags file holding nothing beyond the process flags Omarchy ships, no other data directory, and a socket we own. Anything else, or no answer, launches the browser as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
/usr/bin/brave-origin is the package's own launcher, reading brave-origin-flags.conf, with the profile in BraveSoftware/Brave-Origin. A web app now opens in ~158ms instead of ~345ms. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Sep 28, 2026
This was referenced Sep 30, 2026
This was referenced Oct 1, 2026
sgruendel
pushed a commit
to sgruendel/omarchy
that referenced
this pull request
Oct 3, 2026
…acom#13530) * Hand browser and web app launches to the running browser directly With a Chromium-based browser already running, each launch started a second browser process only to pass its command line over the profile's singleton socket and exit, ~165ms before the running browser even heard of it. omarchy-cmd-browser-handoff sends that message itself with socat and waits for the ACK, so a web app opens in ~210ms instead of ~430ms. It hands off only what it can do exactly as the browser would: the packaged browser binary rather than a wrapper, a flags file holding nothing beyond the process flags Omarchy ships, no other data directory, and a socket we own. Anything else, or no answer, launches the browser as before. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Hand Brave Origin launches to the running browser too /usr/bin/brave-origin is the package's own launcher, reading brave-origin-flags.conf, with the profile in BraveSoftware/Brave-Origin. A web app now opens in ~158ms instead of ~345ms. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
1 of 2 tasks
omarchybot
added a commit
to Raj-Jagadeesh-A-P/omarchy
that referenced
this pull request
Oct 7, 2026
Resolves the conflict with omacom#13520 and omacom#13530: the default browser now comes from omarchy-cmd-default-browser, and the parsed Exec command goes to omarchy-cmd-browser-handoff before falling back to a fresh launch. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 7, 2026
ryanrhughes
pushed a commit
that referenced
this pull request
Oct 16, 2026
…3530) * Hand browser and web app launches to the running browser directly With a Chromium-based browser already running, each launch started a second browser process only to pass its command line over the profile's singleton socket and exit, ~165ms before the running browser even heard of it. omarchy-cmd-browser-handoff sends that message itself with socat and waits for the ACK, so a web app opens in ~210ms instead of ~430ms. It hands off only what it can do exactly as the browser would: the packaged browser binary rather than a wrapper, a flags file holding nothing beyond the process flags Omarchy ships, no other data directory, and a socket we own. Anything else, or no answer, launches the browser as before. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Hand Brave Origin launches to the running browser too /usr/bin/brave-origin is the package's own launcher, reading brave-origin-flags.conf, with the profile in BraveSoftware/Brave-Origin. A web app now opens in ~158ms instead of ~345ms. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> (cherry picked from commit 97a9fce)
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.
With Chromium already running, every web app and Super+Shift+B launch started a second Chromium process. It loaded the whole binary only to pass its command line to the running one over the profile's singleton socket (
~/.config/chromium/SingletonSocket) and exit. That throwaway process lived ~200ms, ~165ms of it before the running browser heard anything.omarchy-cmd-browser-handoffsends the same message itself,START\0<cwd>\0<argv…>, withsocat(already a base package) and waits for Chromium'sACK.omarchy-launch-webappandomarchy-launch-browsertry it first and launch the browser exactly as before when it declines.Measured, from dispatch through Hyprland to the window mapping. Medians over two interleaved rounds against unchanged
quattro:omarchy-launch-webapp)omarchy-launch-browser)What's left is mostly Chromium creating and drawing the window.
When it hands off. It only does so when it can reproduce exactly what the second process would have done. Otherwise it declines and the browser launches normally:
/usr/bin/chromium,google-chrome-stable,brave,brave-originormicrosoft-edge-stable. All five were checked on real installs: a cold start falls back to a normal launch, and both a web app and a plain new window open in the running browser. A wrapper in its place may pick a profile or add flags, so it gets run./etcand~/.config) hold nothing beyond the five process flags Omarchy ships. The running browser already has those. Any other flag might be meant for each launch (--new-window,--incognito,--profile-directory…), and this allow-list keeps us from having to know which.--user-data-dirorCHROME_USER_DATA_DIR/CHROME_CONFIG_HOME./tmpdir that another user could recreate after a crashed browser's dir is cleaned away, and they would then receive the URLs.ACK. A stale socket, no browser, or Firefox gets a normal launch.Tests. The new
browser-handoff-test.shruns a fake browser on a real socket. It checks the exact bytes sent, and the fallback for a stale socket, a non-Chromium browser, aPATHwrapper,--user-data-dir, the env override, and flags files with--new-windowor a quoted--profile-directory. Each fallback assertion was checked to fail without its guard. It skips where/usr/bin/chromiumisn't installed.launch-browser-test.shnow keepsXDG_CONFIG_HOMEinside the test home. Before that fix, running it on a desktop with Chromium open handed its test URLs to the real browser. It also covers a handed-off URL starting no browser. The shell suite has the same 9 failing files as unchangedquattrohere, plus the known VS Code theme failure in./test/cli.manifest-entrypoints-test.shfailed once in a full run and passed on three reruns; it loads the shell against the live compositor and doesn't touch these launchers.Review. Codex review caught several things, and the first attempts at them grew into reimplementing the launcher's flags parsing. That was replaced by the allow-list rule above. Its findings, all fixed:
--user-data-dir--inprivate/tmpsocket another user could take overExecis a wrapperIts final pass found nothing.
🤖 Generated with Claude Code