Skip to content

fix: remove Firefox from the supported browser types - #59

Merged
giordano-lucas merged 2 commits into
mainfrom
fix/remove-firefox
Aug 5, 2026
Merged

fix: remove Firefox from the supported browser types#59
giordano-lucas merged 2 commits into
mainfrom
fix/remove-firefox

Conversation

@giordano-lucas

Copy link
Copy Markdown
Member

Notte runs Chromium-family browsers only. Starting a session with --browser-type firefox is rejected by the API:

Value error, Firefox sessions are not supported.
Please use 'chromium' or 'chrome' as `browser_type`.

The CLI still advertised it in several places.

Changes

Where Was Now
README.md feature list "headless or headed Chrome/Firefox" "headless or headed Chromium/Chrome"
README.md flag line --browser-type chromium|chrome|firefox --browser-type chromium|chrome
scripts/gen-flags/types.go "Can be chromium, chrome or firefox." "Supported values are chromium and chrome."
internal/validate/validate.go accepts chromium|firefox|webkit accepts chromium|chrome + legacy aliases

The gen-flags override had drifted: the generated flag help already reads "Supported values are chromium and chrome. chrome-nightly and chrome-turbo are legacy aliases for chrome", but the override source it is generated from still mentioned Firefox, so it would come back the next time that override applies.

validate.Browser was wrong in both directions

valid := map[string]bool{
    "chromium": true,
    "firefox":  true,   // rejected by the API
    "webkit":   true,   // never supported
}
// ...and "chrome", which IS valid, was rejected

That's Playwright's browser set, not Notte's. It now accepts chromium and chrome plus the chrome-nightly / chrome-turbo legacy aliases, and the error message names the real options.

Two things deliberately left alone

validate.Browser is dead code. ValidateBrowser is referenced only by its own unit test — never wired to --browser-type, which is why an invalid value reaches the API today rather than failing locally. Wiring it up would give a cleaner client-side error and save a round trip, but it changes behaviour and would stop TestErrorParsing_InvalidBrowserType / TestErrorParsing_ValidationErrorContainsDetails exercising the API error path, since they use an invalid browser type as their trigger. Happy to do it in a follow-up if you want it — it needs those tests re-pointed at a different invalid input.

internal/api/client.gen.go still has SessionResponseBrowserTypeFirefox. It is generated from the OpenAPI spec and untouched here. Removing it means dropping firefox from the spec's browser_type Literal — worth doing, since the API currently accepts it through the Literal only to reject it in a second validator, which is what produces the slightly confusing two-layer error above.

Testing

  • go build ./..., go vet ./..., gofmt -l clean
  • go test ./internal/... — all 10 packages pass
  • Unit tests updated to assert Firefox and WebKit are now rejected and that chrome and its aliases are accepted
  • tests/integration/errors_test.go no longer lists firefox among the browser names it expects to see in a validation error

Verified against prod that --browser-type firefox is rejected end to end.

🤖 Generated with Claude Code

Notte runs Chromium-family browsers only. Starting a session with
--browser-type firefox is rejected by the API:

  Value error, Firefox sessions are not supported.
  Please use 'chromium' or 'chrome' as `browser_type`.

The CLI still advertised it in several places. Removed from the README (both
the feature list and the --browser-type line) and from the gen-flags field
description override, which still read "Can be chromium, chrome or firefox"
even though the generated flag help has since been corrected to
"Supported values are chromium and chrome".

validate.Browser was wrong in both directions: it accepted firefox and webkit,
which the API rejects, and rejected chrome, which is valid. That list looks
like Playwright's browser set rather than Notte's. It now accepts chromium and
chrome plus the chrome-nightly / chrome-turbo legacy aliases, and its error
message names the real options.

Note validate.Browser is currently dead code - ValidateBrowser is referenced
only by its own unit test, never wired to --browser-type, which is why an
invalid value reaches the API today. Wiring it up would give a cleaner
client-side error but changes behaviour and would stop the integration
error-parsing tests exercising the API path, so it is left for a separate
decision.

internal/api/client.gen.go still carries SessionResponseBrowserTypeFirefox. It
is generated from the OpenAPI spec and deliberately untouched; removing it
means dropping firefox from the spec's browser_type Literal, which is an
API-side change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown

Greptile Summary

This PR aligns browser-type validation and documentation with the Chromium-only backend while retaining two legacy Chrome aliases.

  • Rejects Firefox and WebKit while accepting Chromium, Chrome, and legacy Chrome aliases.
  • Updates README and generator override text to remove Firefox.
  • Updates unit and integration coverage for the corrected browser set.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The validation, generated-help source, documentation, and tests consistently remove Firefox while preserving API-defined legacy Chrome aliases.

Important Files Changed

Filename Overview
internal/validate/validate.go Corrects the accepted browser set and validation error to match the backend contract.
scripts/gen-flags/types.go Removes Firefox from the fallback browser-type help text used by flag generation.
internal/validate/validate_test.go Covers supported Chromium-family values and rejection of Firefox and WebKit.
tests/integration/errors_test.go Updates integration expectations so Firefox is no longer treated as a valid browser suggestion.
README.md Updates feature and flag documentation to advertise Chromium and Chrome rather than Firefox.

Reviews (1): Last reviewed commit: "fix: remove Firefox from the supported b..." | Re-trigger Greptile

@giordano-lucas
giordano-lucas merged commit 2537ec6 into main Aug 5, 2026
3 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.

1 participant