Skip to content

feat(cli): choose the browser with SEDUM_BROWSER, per environment, or doctor --browser - #164

Merged
devnacho merged 6 commits into
sedum-dev:mainfrom
bagrat:feat/browser-setting
Oct 23, 2026
Merged

devnacho merged 6 commits into
sedum-dev:mainfrom
bagrat:feat/browser-setting

Conversation

@bagrat

@bagrat bagrat commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What

  • The browser now resolves from, highest first:
    1. --browser;
    2. SEDUM_BROWSER (the process environment, then the project .env);
    3. the selected environment's new browser key;
    4. the top-level browser;
    5. the default, chrome.
  • sedum doctor accepts --browser. Its browser check says where the setting came from, e.g. chromium is available (from SEDUM_BROWSER).
  • When the configuration doesn't load, doctor shows the first config diagnostic instead of a bare "could not be loaded".
  • The Chrome-to-managed-Chromium fallback now recognises Playwright 1.63's Chromium distribution 'chrome' is not found at … error.

Why

We run the same suite on macOS, where Chrome is installed, and in Linux containers (Claude Code cloud sessions, CI), where it isn't.

  • The browser could only be set in the shared config's top-level key or with --browser on run, so a Linux machine needed a flag on every command. doctor couldn't be told at all.
  • With browser: chrome on Linux, doctor said "chrome is available", because findBrowserExecutable falls back to managed Chromium. But launch didn't recognise Playwright 1.63's missing-distribution message, so it never fell back, and every run failed.

Verification

  • pnpm typecheck and pnpm lint are clean, and pnpm test passes 1,450 tests (new: precedence, .env vs process, an invalid value per source, doctor --browser, the doctor config message, the Linux fallback).
  • On Linux, installed into a project with browser: chrome:
    • doctor reports (from browser), (from SEDUM_BROWSER) and (from --browser) correctly;
    • SEDUM_BROWSER=firefox gives "Project configuration could not be loaded: SEDUM_BROWSER must be chrome or chromium."
  • On macOS (arm64) with Google Chrome 156, installed into the same project:
    • doctor reports (from browser), (from SEDUM_BROWSER) and (from --browser), and the firefox error;
    • a run with no --browser used real Chrome;
    • a run with SEDUM_BROWSER=chromium used managed Chromium;
  • Real isolated runs on Linux passed with no --browser flag (the fallback) and with SEDUM_BROWSER=chromium.
  • Not yet checked on macOS with Chrome.

… doctor --browser

Resolve the browser from --browser, SEDUM_BROWSER (process, then .env), the
selected environment's browser key, then the top-level key. sedum doctor
accepts --browser, names the setting's source, and shows the first config
diagnostic when the configuration does not load.

Fall back to managed Chromium when Playwright reports a missing Chrome
distribution, as it does on Linux without Google Chrome.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U7KCKub793DH4xshQbHCGd
@coldtea-pr-lens

coldtea-pr-lens Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
  • Redraw · drawn at 8df897c, the branch has moved on

Architecture

Architecture diagram for sedum-dev/sedum at 8df897c

Play the walkthrough


Data flow

Data flow diagram for sedum-dev/sedum at 8df897c

Follow each request


Tip

Set github.draw: on-demand in .github/pr-lens.yml and PR Lens stops drawing pull requests on its own. Comment @pr-lens draw on a pull request when you want that one drawn

🪧 More tips
  • Run npx skills add coldteadotai/pr-lens, then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Run npx @coldtea/pr-lens-cli analyze --base origin/main on a branch, then npx @coldtea/pr-lens-cli render .pr-lens/graph.json. Same lenses, your own model key, before the pull request exists
  • Click the link under each diagram to open it on a canvas you can zoom, pan and step through
  • The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change
  • Open a diagram on the canvas, then press W or click play to walk through the change one step at a time
  • The CLI's render reads .github/pr-lens.yml and applies your renames, exclusions and lane pins at draw time
  • Set github.comment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture and data flow row. Drawing still runs as before
  • Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and your model provider's key as its api-key to run PR Lens from your own CI. Any /chat/completions endpoint works
  • After a push, tick Redraw to draw the latest commit
  • Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion

Thanks for using PR Lens! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out on X, Bluesky, Mastodon, Reddit or LinkedIn

@mintlify

mintlify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit b4cca2c.

Approve preview

codescene-access[bot]

This comment was marked as outdated.

Keep loadProjectConfig, executeDoctorCommand and runCli from growing more
complex: browser resolution, doctor's config overrides and its config failure
check move into small functions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U7KCKub793DH4xshQbHCGd
codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U7KCKub793DH4xshQbHCGd
codescene-access[bot]

This comment was marked as outdated.

ampagent and others added 2 commits October 23, 2026 16:04
A flag or SEDUM_BROWSER no longer hides an unsupported `browser` key at the
top level or in any environment, selected or not, the same way every
`stepTimeoutMs` is checked. An unsupported SEDUM_BROWSER from the process
environment or --browser value is reported at <process environment> or
<command line> instead of line 1 of sedum.config.yaml.

Co-authored-by: Bagrat <bagrat@timeline.co>
Amp-Thread-ID: https://ampcode.com/threads/T-8894897a-ba72-47ec-b40f-2aacd96b4545
Co-authored-by: Ignacio Gutierrez <nachojgutierrez@gmail.com>
@devnacho
devnacho merged commit 87cf92f into sedum-dev:main Oct 23, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants