fix: default viewport and engine-aligned User-Agent #73
Reference in New Issue
Block a user
Delete Branch "fix/70-default-viewport-ua-alignment"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
DefaultFirefoxUserAgent,DefaultChromiumUserAgent) withDefaultUserAgentkept as backward-compatible aliasinitBrowsernow auto-selects the matching UA based onopt.Browserwhen the caller hasn't explicitly set one — fixes Firefox UA being applied to Chromium instancesNewBrowser(previously had none — a strong headless signal)NewInteractiveBrowseralso gains engine-aware UA selection (keeps its existing 1280x720 viewport)Closes #70
Relates to #68
Test plan
go build ./...succeedsgo test ./...all pass (including 8 new tests)go vet ./...cleancmd/browser/pkg/browser/flags.gostill compiles withDefaultUserAgentalias🤖 Generated with Claude Code