Skip to content

Preserve new tab semantics for snapshot preload - #328

Open
sjmiller609 wants to merge 1 commit into
mainfrom
hypeship/fix-snapshot-ntp-omnibox
Open

Preserve new tab semantics for snapshot preload#328
sjmiller609 wants to merge 1 commit into
mainfrom
hypeship/fix-snapshot-ntp-omnibox

Conversation

@sjmiller609

@sjmiller609 sjmiller609 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • initiate the snapshot preload through chrome://newtab/ so Chromium applies the managed external new-tab policy
  • continue waiting for DuckDuckGo to finish loading, including navigation retries
  • preserve the empty new-tab omnibox instead of showing the destination URL as a normal navigation

Testing

  • cd server && go vet ./...
  • cd server && go test -race $(go list ./... | grep -v /e2e$)
  • cd server && make build
  • manually verified Chromium loads an external managed new-tab page when launched through chrome://newtab/

Note

Low Risk
Scoped to snapshot preload CDP navigation and its helper; no auth or data-path changes, with behavior covered by updated unit tests.

Overview
Snapshot preload no longer CDP-navigates straight to the DuckDuckGo start URL. DispatchStartURLAndWait now takes a separate navigationURL and destination: CDP issues Page.navigate to the navigation URL, while readiness still waits for the destination host to reach complete.

prepareSnapshotStartPage uses chrome://newtab/ as the navigation URL and the existing start page as the destination so Chromium applies the managed external new-tab flow instead of treating the load as a normal navigation (preserving an empty omnibox). Chrome error-page retries re-issue navigation to navigationURL, not the destination.

Tests assert the initial and retry navigations target chrome://newtab/.

Reviewed by Cursor Bugbot for commit 4be9d2e. Bugbot is set up for automated code reviews on this repo. Configure here.

@sjmiller609
sjmiller609 marked this pull request as ready for review August 7, 2026 20:36
@sjmiller609
sjmiller609 requested a review from hiroTamada August 7, 2026 20:37
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