Skip to content

Hand the presentation terminal Omarchy's BROWSER default - #9040

Open
PyRo1121 wants to merge 2 commits into
omacom:quattrofrom
PyRo1121:fix/issue-8961
Open

PyRo1121 wants to merge 2 commits into
omacom:quattrofrom
PyRo1121:fix/issue-8961

Conversation

@PyRo1121

Copy link
Copy Markdown
Contributor

Fixes #8961

The presentation script runs as bash -c, which is non-interactive and never sources default/bash/envs. The shell-scoped BROWSER default was therefore missing inside the floating terminal, so tools that open a URL from that process tree (an agent's OAuth flow) aborted instead of opening a browser.

The launcher now exports the same ${BROWSER:-omarchy-launch-browser} default interactive shells get; any BROWSER the caller exported still wins.

Tests:

  • bash test/shell.d/floating-terminal-test.sh
  • bash test/shell.d/browser-env-test.sh
  • bash -n bin/omarchy-launch-floating-terminal-with-presentation test/shell.d/floating-terminal-test.sh
  • git diff --check

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Oct 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed and verified by reproduction. Nothing found that needs changing.

Reproduced on an Omarchy ISO worker, in a real foot terminal. I launched omarchy-launch-floating-terminal-with-presentation with BROWSER unset and had the presented command print $BROWSER. On current quattro (c05d901) it printed UNSET. At this head, and with this head merged into current quattro, it printed omarchy-launch-browser. With only the launcher reverted on that merge it printed UNSET again. So the variable does make it through setsid uwsm-app -- xdg-terminal-exec into the terminal's shell, and #8961's missing BROWSER is fixed.

Tests on the worker:

  • test/shell.d/floating-terminal-test.sh and browser-env-test.sh pass at this head and on the merge.
  • The new floating-terminal assertion fails with the launcher reverted, so it pins the fix.
  • ./test/cli is green at this head (116 ok).
  • On current quattro, ./test/cli stops at vscode generated theme references current theme file. quattro fails there without this PR as well, so that failure is not from this change.

Side effects checked by reading:

  • With BROWSER now set in this terminal, xdg-settings would refuse to change the default browser. Every xdg-settings call in bin/ and install/ already runs under env -u BROWSER, and that includes omarchy-default-browser, which runs in this terminal. The other xdg commands run here are xdg-mime default calls, and BROWSER does not affect those.
  • No shipped terminal config uses a single-instance or server mode, where a new window would take its environment from the server.
  • The change is one line plus its comment, which is proportionate to the problem.

Related: #10361 also comes from the first-login OAuth flow, but it is a separate fix. It raises a browser that opens behind the float, while this PR detaches the browser from the terminal's process tree. The two don't compete.

Second opinion: none. The configured reviewer (Codex Medium) is reachable, but omabot review refused because today's review budget is spent. Everything above is one model's review (Claude Opus 5.5). This is labelled verified but not ready, because a second opinion is required for ready and this PR has no CI run. It is waiting on that second opinion and then on the maintainer. Nothing is needed from the author.

quattro removed test/shell.d/floating-terminal-test.sh in omacom#16334, so the merge takes that deletion rather than reviving the file for this one-line export, and keeps the BROWSER default above quattro's new Done/Failed presentation script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Nov 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This had stopped merging into quattro, so I merged current quattro into the branch (252d50c) and verified it again. The fix itself is unchanged.

The merge. quattro deleted test/shell.d/floating-terminal-test.sh in #16334 and gave the launcher a Done/Failed state in bc0753d. The merge keeps your BROWSER export above the new presentation script, and it takes the deletion instead of reviving the file. Under the test rules in quattro's AGENTS.md, a one-line declarative default usually gets no test, and certainly not a new file. So the pull request is now the 7-line change to bin/omarchy-launch-floating-terminal-with-presentation and nothing else.

Reproduced on an Omarchy ISO worker, in a real foot terminal, with BROWSER unset and the presented command printing $BROWSER:

  • quattro (d367a56) prints UNSET.
  • The merge prints omarchy-launch-browser.
  • The merge with only the launcher reverted prints UNSET.
  • A caller's own BROWSER=custom-browser comes through unchanged.

The bug is still live on quattro. omarchy-default-agent --install (line 136) still runs the first-login agent through this terminal, and the primary sign-in in omarchy-agent-account-add sets no BROWSER of its own.

Tests on the worker: ./test/cli passes (129 ok). browser-env-test.sh, launch-browser-test.sh, default-browser-lookup-test.sh and browser-handoff-test.sh all pass.

Second opinion: Codex Medium and muse-wonder (pi, thinking high) both reviewed the merged diff and found no defect. Their agreement with my reading is not guaranteed to be independent. Both confirmed that every xdg-settings set reachable from this terminal runs under env -u BROWSER. They raised one more point, the unguarded xdg-settings get in migrations/1784510887.sh. I checked it and it is unaffected: xdg-settings skips the launcher's NoDisplay desktop entry when it resolves BROWSER, so the migration gets the same answer it gets without BROWSER set. The two reviewers split on the test. Codex would keep the default and override cases as a few lines in browser-env-test.sh, and muse-wonder agreed with dropping it. That is the maintainer's call, and the branch is left without a test.

It is labelled verified. It waits on CI and then on the maintainer. Nothing is needed from you.

@greptile-apps

greptile-apps Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge.

Summary

Gives presentation terminals the same BROWSER default as interactive shells.

  • Presentation terminal commands inherit Omarchy’s browser default.

Reviews (1) · Last reviewed commit: "Merge quattro into fix/issue-8961" · Reviewed by Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy-launch-floating-terminal-with-presentation drops BROWSER: first-agent OAuth browser runs in the terminal's process tree and aborts with SIGTRAP

2 participants