Skip to content

add safari redirect loop special error page#2728

Open
brindy wants to merge 11 commits into
mainfrom
brindy/special-error-page-for-x-safari-https-scheme-loop
Open

add safari redirect loop special error page#2728
brindy wants to merge 11 commits into
mainfrom
brindy/special-error-page-for-x-safari-https-scheme-loop

Conversation

@brindy
Copy link
Copy Markdown

@brindy brindy commented May 28, 2026

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

Description

New special error page for Safari redirect loop, as a generic general page problem with parameterised title, etc.

Testing Steps

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

Low Risk
User-facing special-page UX and a new native messaging hook; no auth or sensitive data handling changes.

Overview
Adds a generalPageProblem special-error variant for pages that cannot load in-app (e.g. Safari redirect loops), with optional native title, message, and button overrides and default copy via new locale keys.

For this kind, the UI hides Advanced and shows a primary Open in Browser action that sends a new openInBrowser notification (existing visitSite remains for the advanced “accept risk” flow on other errors). Tab title, headings, and styling align generalPageProblem with SSL-style shield treatment.

Schema, types, docs, sample data, and Playwright/screenshot tests cover the new flow and overrides.

Reviewed by Cursor Bugbot for commit 493338d. 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 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

[Beta] Generated file diff

Time updated: Fri, 29 May 2026 10:22:45 GMT

Apple
    - apple/pages/special-error/dist/index.css
  • apple/pages/special-error/dist/index.js
  • apple/pages/special-error/index.html
  • apple/pages/special-error/locales/bg/special-error.json
  • apple/pages/special-error/locales/cs/special-error.json
  • apple/pages/special-error/locales/da/special-error.json
  • apple/pages/special-error/locales/de/special-error.json
  • apple/pages/special-error/locales/el/special-error.json
  • apple/pages/special-error/locales/en/special-error.json
  • apple/pages/special-error/locales/es/special-error.json
  • apple/pages/special-error/locales/et/special-error.json
  • apple/pages/special-error/locales/fi/special-error.json
  • apple/pages/special-error/locales/fr/special-error.json
  • apple/pages/special-error/locales/hr/special-error.json
  • apple/pages/special-error/locales/hu/special-error.json
  • apple/pages/special-error/locales/it/special-error.json
  • apple/pages/special-error/locales/lt/special-error.json
  • apple/pages/special-error/locales/lv/special-error.json
  • apple/pages/special-error/locales/nb/special-error.json
  • apple/pages/special-error/locales/nl/special-error.json
  • apple/pages/special-error/locales/pl/special-error.json
  • apple/pages/special-error/locales/pt/special-error.json
  • apple/pages/special-error/locales/ro/special-error.json
  • apple/pages/special-error/locales/ru/special-error.json
  • apple/pages/special-error/locales/sk/special-error.json
  • apple/pages/special-error/locales/sl/special-error.json
  • apple/pages/special-error/locales/sv/special-error.json
  • apple/pages/special-error/locales/tr/special-error.json

File has changed

Integration
    - integration/pages/special-error/dist/index.css
  • integration/pages/special-error/dist/index.js
  • integration/pages/special-error/locales/bg/special-error.json
  • integration/pages/special-error/locales/cs/special-error.json
  • integration/pages/special-error/locales/da/special-error.json
  • integration/pages/special-error/locales/de/special-error.json
  • integration/pages/special-error/locales/el/special-error.json
  • integration/pages/special-error/locales/en/special-error.json
  • integration/pages/special-error/locales/es/special-error.json
  • integration/pages/special-error/locales/et/special-error.json
  • integration/pages/special-error/locales/fi/special-error.json
  • integration/pages/special-error/locales/fr/special-error.json
  • integration/pages/special-error/locales/hr/special-error.json
  • integration/pages/special-error/locales/hu/special-error.json
  • integration/pages/special-error/locales/it/special-error.json
  • integration/pages/special-error/locales/lt/special-error.json
  • integration/pages/special-error/locales/lv/special-error.json
  • integration/pages/special-error/locales/nb/special-error.json
  • integration/pages/special-error/locales/nl/special-error.json
  • integration/pages/special-error/locales/pl/special-error.json
  • integration/pages/special-error/locales/pt/special-error.json
  • integration/pages/special-error/locales/ro/special-error.json
  • integration/pages/special-error/locales/ru/special-error.json
  • integration/pages/special-error/locales/sk/special-error.json
  • integration/pages/special-error/locales/sl/special-error.json
  • integration/pages/special-error/locales/sv/special-error.json
  • integration/pages/special-error/locales/tr/special-error.json

File has changed

Windows
    - windows/pages/special-error/dist/index.css
  • windows/pages/special-error/dist/index.js
  • windows/pages/special-error/index.html
  • windows/pages/special-error/locales/bg/special-error.json
  • windows/pages/special-error/locales/cs/special-error.json
  • windows/pages/special-error/locales/da/special-error.json
  • windows/pages/special-error/locales/de/special-error.json
  • windows/pages/special-error/locales/el/special-error.json
  • windows/pages/special-error/locales/en/special-error.json
  • windows/pages/special-error/locales/es/special-error.json
  • windows/pages/special-error/locales/et/special-error.json
  • windows/pages/special-error/locales/fi/special-error.json
  • windows/pages/special-error/locales/fr/special-error.json
  • windows/pages/special-error/locales/hr/special-error.json
  • windows/pages/special-error/locales/hu/special-error.json
  • windows/pages/special-error/locales/it/special-error.json
  • windows/pages/special-error/locales/lt/special-error.json
  • windows/pages/special-error/locales/lv/special-error.json
  • windows/pages/special-error/locales/nb/special-error.json
  • windows/pages/special-error/locales/nl/special-error.json
  • windows/pages/special-error/locales/pl/special-error.json
  • windows/pages/special-error/locales/pt/special-error.json
  • windows/pages/special-error/locales/ro/special-error.json
  • windows/pages/special-error/locales/ru/special-error.json
  • windows/pages/special-error/locales/sk/special-error.json
  • windows/pages/special-error/locales/sl/special-error.json
  • windows/pages/special-error/locales/sv/special-error.json
  • windows/pages/special-error/locales/tr/special-error.json

File has changed

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.

Stale comment

Web Compatibility Assessment

No findings. The changes are scoped to the special-error special page UI, schema/types, sample data, integration tests, and locale strings. They do not touch injected runtime code, browser API wrappers/shims, prototype patches, page DOM mutation observers, or platform entry points.

Security Assessment

No findings. The new Safari redirect-loop path reuses the existing paramless visitSite notification, so it does not forward page-derived objects or introduce a nativeData leakage path. The added errorData.url field is not rendered, echoed back to native, used for network requests, or passed to postMessage.

Risk Level

Low Risk: special-page presentation and schema additions only, with no changes to injected API surface, captured globals, message transports, origin validation, or bridge security checks.

Recommendations

  • Run the targeted special-error integration coverage for the new safariRedirectLoop path on the intended Apple project/build artifact before merge.
  • Optional cleanup: remove the trailing space from the new safariRedirectLoopPageHeading source string if it is not intentional.
Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

Comment thread special-pages/pages/special-error/public/locales/en/special-error.json Outdated
Comment thread special-pages/pages/special-error/src/sampleData.js
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Cursor review was not successful.

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

Build Branch

Branch pr-releases/brindy/special-error-page-for-x-safari-https-scheme-loop
Commit 688fbae6af
Updated May 29, 2026 at 10:22:06 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/brindy/special-error-page-for-x-safari-https-scheme-loop

Swift Package Manager (Apple):

.package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/brindy/special-error-page-for-x-safari-https-scheme-loop")

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/brindy/special-error-page-for-x-safari-https-scheme-loop
git -C submodules/content-scope-scripts checkout origin/pr-releases/brindy/special-error-page-for-x-safari-https-scheme-loop
Pin to exact commit

npm (Android / Extension):

npm i github:duckduckgo/content-scope-scripts#688fbae6afcbc7eeae15040d832746141f835cb6

Swift Package Manager (Apple):

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

git submodule (Windows):

git -C submodules/content-scope-scripts fetch origin pr-releases/brindy/special-error-page-for-x-safari-https-scheme-loop
git -C submodules/content-scope-scripts checkout 688fbae6afcbc7eeae15040d832746141f835cb6

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.

Stale comment

Web Compatibility Assessment

No findings. The latest diff remains scoped to the special-error special-page UI, schema/types, sample data, locale strings, and integration coverage. It does not touch injected runtime code, browser API wrappers/shims, prototype patches, DOM observers, or platform entry points.

Security Assessment

No findings. The new Safari redirect-loop path reuses the existing paramless visitSite notification, so it does not forward page-derived objects or introduce a nativeData leakage path. The added errorData.url field is not rendered, echoed to native, used for network requests, or sent via postMessage.

Risk Level

Low Risk: special-page presentation and message-schema additions only, with no changes to injected API surface, captured globals, message transports, origin validation, or bridge security checks.

Recommendations

No blocking recommendations. The prior trailing-space copy concern is addressed in the latest sync.

Validation: npm run build --workspace=special-pages and npm run test-int --workspace=special-pages -- pages/special-error/integration-tests/special-error.spec.js --grep "safari redirect loop|opens site in safari" --reporter list passed.

Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

daxtheduck
daxtheduck previously approved these changes May 28, 2026
@daxtheduck daxtheduck dismissed their stale review May 28, 2026 20:17

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

Comment thread special-pages/pages/special-error/app/components/App.jsx
Comment thread special-pages/pages/special-error/app/components/AdvancedInfo.jsx Outdated
@github-actions github-actions Bot added semver-major Breaking change — triggers major version bump and removed semver-minor New feature — triggers minor version bump labels May 28, 2026
Comment thread special-pages/pages/special-error/integration-tests/special-error.js Outdated
@github-actions github-actions Bot added semver-minor New feature — triggers minor version bump and removed semver-major Breaking change — triggers major version bump labels May 28, 2026
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.

Stale comment

Web Compatibility Assessment

No findings. The current diff is isolated to the special-error special page UI, schema/types, locale copy, and integration tests. It does not touch injected runtime code, browser API wrappers/shims, prototype patches, page-world DOM observers, or platform entry points.

Security Assessment

No findings. The new generalPageProblem path sends a paramless openInBrowser notification, so it does not forward page-derived objects or introduce a nativeData leakage path. Native-provided title / message / button copy is rendered as text through Preact, and the required url field is not rendered, fetched, posted, or echoed back to native.

Risk Level

Medium Risk: this adds a user-facing special-error path and a new native notification contract, but the scope is limited to the special page and does not alter injected API surface, captured globals, message transports, origin validation, or bridge security checks.

Recommendations

No blocking recommendations. Keep the existing visitSite notification for Advanced/accept-risk flows and the new openInBrowser notification only on the generalPageProblem primary action, as the latest head does.

Validation: git diff --check, npm run build --workspace=special-pages, and npm run test-int --workspace=special-pages -- pages/special-error/integration-tests/special-error.spec.js --reporter list passed.

Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7830c71. Configure here.

Comment thread special-pages/pages/special-error/app/components/Warning.jsx Outdated
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.

Stale comment

Web Compatibility Assessment

No findings. The current diff is isolated to the special-error special page UI, schema/types, locale copy, and integration tests. It does not touch injected runtime code, browser API wrappers/shims, prototype patches, page-world DOM observers, or platform entry points. The latest sync only extracts duplicated primary-button variant mapping into getPrimaryActionButtonVariant().

Security Assessment

No findings. The new generalPageProblem path sends a paramless openInBrowser notification, so it does not forward page-derived objects or introduce a nativeData leakage path. Native-provided title / message / button copy is rendered as text through Preact, and the required url field is not rendered, fetched, posted, or echoed back to native.

Risk Level

Medium Risk: this adds a user-facing special-error path and a new native notification contract, but the scope is limited to the special page and does not alter injected API surface, captured globals, message transports, origin validation, or bridge security checks.

Recommendations

No blocking recommendations. Keep the existing visitSite notification for Advanced/accept-risk flows and the new openInBrowser notification only on the generalPageProblem primary action.

Validation: git diff --check and npm run build --workspace=special-pages passed.

Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

daxtheduck
daxtheduck previously approved these changes May 28, 2026
@brindy brindy requested a review from mgurgel May 28, 2026 22:04
@@ -69,16 +69,55 @@ test.describe('special-error', () => {
await special.showsScamPage();
});

Copy link
Copy Markdown
Contributor

@mgurgel mgurgel May 29, 2026

Choose a reason for hiding this comment

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

Let's try something out...

@cursoragent Add two screenshot test cases in special-pages/pages/special-error/integration-tests/special-error-screenshots.spec.js :

  1. For GeneralErrorPage without overrides
  2. For GeneralErrorPage with title, message and button overrides

edit: @ddg-cursor maybe? Bugbot, who do I tag for this?

Copy link
Copy Markdown
Contributor

@mgurgel mgurgel left a comment

Choose a reason for hiding this comment

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

LGTM and preview looks good too https://rawcdn.githack.com/duckduckgo/content-scope-scripts/a3f7c08ee414db36e6b623c2e42cb7e91e6413ac/build/integration/pages/special-error/index.html?errorId=generalPageProblem

Left a request for Cursor to generate screenshot cases as they are great for spotting regressions on copy and styling. First time trying it, not sure it's gonna work.

@daxtheduck daxtheduck dismissed their stale review May 29, 2026 10:21

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

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 current diff is scoped to the special-error special page UI, message schema/types, locale copy, docs, and integration/screenshot coverage. It does not touch injected runtime code, browser API wrappers/shims, prototype patches, page-world DOM observers, platform entry points, or cross-frame behavior.

Latest sync note: the only runtime change since the previous automation review is a JSDoc type relaxation in Warning.jsx; the rest adds generalPageProblem screenshot tests and snapshots.

Security Assessment

No findings. The generalPageProblem path sends a paramless openInBrowser notification, so it does not forward page-derived objects or introduce a nativeData leakage path. Native-provided title / message / button values are rendered as text through Preact, and the required url field is not rendered, fetched, posted, or echoed back to native.

Risk Level

Medium Risk: this adds a user-facing special-error path and a new native notification contract, but it remains limited to the special page and does not alter injected API surface, captured globals, message transports, origin validation, or bridge security checks.

Recommendations

No blocking recommendations. Keep visitSite reserved for the existing Advanced/accept-risk flow and openInBrowser only for the generalPageProblem primary action.

Validation: I reviewed the full PR diff plus the incremental diff since the prior automation review. GitHub checks showed build/unit/injected jobs passing; special-pages integration and snapshot jobs were still pending at review time.

Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

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.

3 participants