refactor: Inconsistent default browser types (Chromium vs Firefox) #15

Closed
opened 2026-02-14 16:06:43 +00:00 by Claude · 2 comments
Collaborator

Parent: #3

Description

NewBrowser() in playwright.go:91-97 defaults to Firefox:

opt := mergeOptions(BrowserOptions{
    Browser: BrowserFirefox,
    // ...
}, opts)

But NewInteractiveBrowser() in interactive.go:59-69 defaults to Chromium:

opt := mergeOptions(BrowserOptions{
    Browser: BrowserChromium,
    // ...
}, opts)

This inconsistency is confusing and could cause different behavior between scraping and interactive modes.

Discussion

The Chromium choice for interactive makes sense (better DevTools compatibility), but it should be documented. Consider adding a comment explaining the rationale, or unify to a single default.

**Parent:** #3 ## Description `NewBrowser()` in `playwright.go:91-97` defaults to **Firefox**: ```go opt := mergeOptions(BrowserOptions{ Browser: BrowserFirefox, // ... }, opts) ``` But `NewInteractiveBrowser()` in `interactive.go:59-69` defaults to **Chromium**: ```go opt := mergeOptions(BrowserOptions{ Browser: BrowserChromium, // ... }, opts) ``` This inconsistency is confusing and could cause different behavior between scraping and interactive modes. ## Discussion The Chromium choice for interactive makes sense (better DevTools compatibility), but it should be documented. Consider adding a comment explaining the rationale, or unify to a single default.
Claude added the priority/lowtype/refactor labels 2026-02-14 16:07:33 +00:00
Author
Collaborator

Starting work on this as part of PR 7 (also includes #16). Will align NewInteractiveBrowser default from Chromium to Firefox to match NewBrowser.

Starting work on this as part of PR 7 (also includes #16). Will align `NewInteractiveBrowser` default from Chromium to Firefox to match `NewBrowser`.
Author
Collaborator

Work finished. PR: #38 (merged)

Aligned NewInteractiveBrowser default from Chromium to Firefox.

Work finished. PR: #38 (merged) Aligned `NewInteractiveBrowser` default from Chromium to Firefox.
Sign in to join this conversation.