Skip to content

Add "Set as Default" page for Windows integration#2701

Open
thisisrajat wants to merge 2 commits into
mainfrom
rjain/windows-sad-settings-page
Open

Add "Set as Default" page for Windows integration#2701
thisisrajat wants to merge 2 commits into
mainfrom
rjain/windows-sad-settings-page

Conversation

@thisisrajat
Copy link
Copy Markdown
Contributor

@thisisrajat thisisrajat commented May 18, 2026

Asana Task/Github Issue: https://app.asana.com/1/137249556945/task/1213000200043647?focus=true

Description

Windows "Set as Default" special page. The page shows a dimmed overlay with an instruction bar and a hand-drawn arrow, displayed behind the native Windows Settings app when prompting users to set DDG as their default browser.

Testing Steps

  • cd special-pages && npm run watch -- --page=set-as-default
  • Open http://localhost:8001 — verify gray overlay, white instruction bar with bold "Set default button" text, and arrow to the right of the bar

Checklist

Please tick all that apply:

  • I have tested this change locally
  • I have tested this change locally in all supported browsers
  • This change will be visible to users
  • I have added automated tests that cover this change
  • I have ensured the change is gated by config
  • This change was covered by a ship review
  • This change was covered by a tech design
  • Any dependent config has been merged

Note

Medium Risk
Adds a new Windows-facing special page plus new messaging schemas/types; risk is mainly around integration/build wiring and correct runtime messaging/locale loading, with no sensitive data or auth changes.

Overview
Adds a new set-as-default special page (wired into pages.mjs for windows and integration) that renders a dimmed overlay with an instruction bar and an SVG arrow, intended to sit behind the native Windows Settings window.

Introduces the page’s Preact entrypoints (src/index.js, app/index.js), locale loading and typed translations, plus query-param overrides (arrow_x, arrow_y) for arrow positioning.

Defines new messaging schemas (initialSetup, reportInitException, reportPageException) and generated TS types, along with the page’s static assets (public/index.html, landscape.svg, and en strings).

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

@github-actions github-actions Bot added the semver-minor New feature — triggers minor version bump label May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 18, 2026

[Beta] Generated file diff

Time updated: Mon, 18 May 2026 11:05:41 GMT

Integration
    - integration/pages/index.html

File has changed

New Files
    - integration/pages/set-as-default/dist/index.css
  • integration/pages/set-as-default/dist/index.js
  • integration/pages/set-as-default/dist/inline.js
  • integration/pages/set-as-default/dist/landscape-ZAI73JVK.svg
  • integration/pages/set-as-default/index.html
  • integration/pages/set-as-default/landscape.svg
  • integration/pages/set-as-default/locales/en/set-as-default.json
  • windows/pages/set-as-default/dist/index.css
  • windows/pages/set-as-default/dist/index.js
  • windows/pages/set-as-default/dist/inline.js
  • windows/pages/set-as-default/dist/landscape-ZAI73JVK.svg
  • windows/pages/set-as-default/index.html
  • windows/pages/set-as-default/landscape.svg
  • windows/pages/set-as-default/locales/en/set-as-default.json

❌ File only exists in new changeset

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Web Compatibility Assessment

No findings. The diff is confined to a new Windows special-pages page and special-pages/pages.mjs; it does not touch injected/src, wrapper utilities, API overrides/shims, DDGProxy, message bridge, remote config, or platform feature inclusion for injected scripts.

Security Assessment

No findings. The new native messaging calls use the existing createSpecialPageMessaging transport, send literal payloads only ({ message }) for exception reports, and do not introduce direct postMessage, origin-validation changes, dynamic code execution, iframe access, or network requests outside bundled locale JSON.

Risk Level

Medium Risk because this adds a new privileged Windows special page and native-message contract, but injected-page runtime risk is low: no hostile-page API surface, prototype, captured-global, or message-bridge behavior changes.

Recommendations

No blocking recommendations. A targeted integration smoke test for set-as-default initial setup, arrow query overrides, and locale fallback would reduce regression risk for the new page.

Validation run: git diff --check, npm run build -w special-pages, and npx eslint special-pages/pages/set-as-default special-pages/pages.mjs passed.

Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

daxtheduck
daxtheduck previously approved these changes May 18, 2026
@daxtheduck daxtheduck dismissed their stale review May 18, 2026 11:04

Dismissing stale approval — new commits pushed, awaiting Cursor re-review.

@github-actions
Copy link
Copy Markdown
Contributor

Build Branch

Branch pr-releases/rjain/windows-sad-settings-page
Commit 3ba7d8ba4b
Updated May 18, 2026 at 11:05:15 AM UTC

Static preview entry points

QR codes (mobile preview)
Entry point QR code
Docs QR for docs preview
Static pages QR for static pages preview
Integration pages QR for integration pages preview

Integration commands

npm (Android / Extension):

npm i github:duckduckgo/content-scope-scripts#pr-releases/rjain/windows-sad-settings-page

Swift Package Manager (Apple):

.package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/rjain/windows-sad-settings-page")

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/rjain/windows-sad-settings-page
git -C submodules/content-scope-scripts checkout origin/pr-releases/rjain/windows-sad-settings-page
Pin to exact commit

npm (Android / Extension):

npm i github:duckduckgo/content-scope-scripts#3ba7d8ba4b7eaadf2c9d24c905045b0c00a7ebb4

Swift Package Manager (Apple):

.package(url: "https://github.com/duckduckgo/content-scope-scripts.git", revision: "3ba7d8ba4b7eaadf2c9d24c905045b0c00a7ebb4")

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/rjain/windows-sad-settings-page
git -C submodules/content-scope-scripts checkout 3ba7d8ba4b7eaadf2c9d24c905045b0c00a7ebb4

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Cursor assessed this PR as Medium Risk (only Low Risk is auto-approved).

This PR requires a manual review and approval from a member of one of the following teams:

  • @duckduckgo/content-scope-scripts-owners
  • @duckduckgo/apple-devs
  • @duckduckgo/android-devs
  • @duckduckgo/team-windows-development
  • @duckduckgo/extension-owners
  • @duckduckgo/config-aor
  • @duckduckgo/breakage-aor
  • @duckduckgo/breakage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-minor New feature — triggers minor version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants