(feat)rebrand: NTP - Remote Messaging Framework styles and icons - #2882
(feat)rebrand: NTP - Remote Messaging Framework styles and icons#2882borgateo wants to merge 5 commits into
Conversation
[Beta] Generated file diffTime updated: Mon, 27 Jul 2026 21:29:56 GMT Apple
File has changed Integration
File has changed Windows
File has changed New Files
❌ File only exists in new changeset |
Build Branch
Static preview entry points
QR codes (mobile preview)
Integration commandsnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/matteo/rebrand/ntp-rmf")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/matteo/rebrand/ntp-rmf
git -C submodules/content-scope-scripts checkout origin/pr-releases/matteo/rebrand/ntp-rmfPin to exact commitnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", revision: "7441f5e2bf63f67afbb45523b145a78d5ef596cf")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/matteo/rebrand/ntp-rmf
git -C submodules/content-scope-scripts checkout 7441f5e2bf63f67afbb45523b145a78d5ef596cf |
| const platform = usePlatformName(); | ||
| const isRebrandEnabled = useNewTabPageRebranding(); | ||
| const showIcon = messageType !== 'small' && Boolean(message.icon); | ||
| const iconSrc = showIcon ? (isRebrandEnabled ? `./icons/rebrand/${message.icon}-96.svg` : `./icons/${message.icon}-96.svg`) : undefined; |
There was a problem hiding this comment.
info — message.icon is schema-validated (enum in rmf-message.json), so path interpolation here is safe. 79c321c6f correctly preserves the legacy ./icons/ path when rebrand is off.
|
This PR requires a manual review and approval from a member of one of the following teams:
|
Co-authored-by: Cursor <cursoragent@cursor.com>
…ag is on. Co-authored-by: Cursor <cursoragent@cursor.com>
…ry critical update
0a24b8c to
9d486e1
Compare
There was a problem hiding this comment.
Stale comment
Web Compatibility Assessment
File Lines Severity Finding (scope) — info No injected/changes. All 15 changed files are inspecial-pages/pages/new-tab/— first-party embedded NTP UI, not injected into third-party pages. Injected web-compat categories (API shimming, prototype integrity, cross-frame leakage) do not apply.special-pages/.../RemoteMessagingFramework.js22–30 info RMF icon path correctly switches between ./icons/${icon}-96.svg(legacy) and./icons/rebrand/${icon}-96.svgbased onuseNewTabPageRebranding().showIconlogic unchanged (messageType !== 'small' && message.icon).special-pages/.../RemoteMessagingFramework.module.css77–122 info Rebrand visual refresh (padding, box-shadow, typography, dismiss button) scoped under :global(body[data-rebrand="true"]). Legacy styles preserved when rebrand is off.special-pages/.../rebrand/*.svg— info 11 static SVG assets added; all RMFIconenum values covered. Latest commit (9d486e1b) corrects CriticalUpdate/VeryCriticalUpdate artwork only.Scope note: PR now contains only RMF changes vs
main(15 files). Prior warnings about ungated Privacy Stats / Protections / ActivityItem changes are out of scope for this PR (likely split to other rebrand PRs).Security Assessment
File Lines Severity Finding (scope) — info No changes to injected/,messaging/,captured-globals.js, message-bridge, or API overrides. No new security surface for hostile third-party pages.special-pages/.../RemoteMessagingFramework.js24 info Icon srcbuilt from native-suppliedmessage.iconinto static relative paths.RMFIconis enum-constrained inrmf-message.json; no page-controlled input, nopostMessage/nativeDataleakage.special-pages/.../settings.provider.js42–44 info Rebrand flag read from native settings ( newTabPageRebranding.state === 'enabled'). Remote-disable path exists; no new messaging schemas introduced.Risk Level
Low Risk — special-pages NTP RMF visual rebrand only (gated CSS + icon asset swap). No injected runtime, browser API overrides, or messaging security-boundary changes.
Recommendations
- (info) Ensure native clients ship the
newTabPageRebrandingsetting before enabling rebrand assets in production.- (info) 4/4 RMF integration tests pass locally; consider adding rebrand-on coverage to assert
./icons/rebrand/paths render whendata-rebrand="true".
Re-assessed at
9d486e1b(synchronize). PR scope vsmainis now RMF-only (15 files); RMF file content unchanged from prior0a24b8c01assessment (rebase). Prior cross-component warnings removed as those files are no longer in this PR.Sent by Cursor Automation: Web compat and sec
Replace DuckAi, PIR, and Subscription rebrand SVGs with the final vector assets, and add PrivacyPro-96 so Windows PrivacyShield messages resolve under the shared -96 path. Co-authored-by: Cursor <cursoragent@cursor.com>
…tokens Restore the pre-regression Privacy Pro shield (plus) for FF-off paths, bump design-tokens to v0.33.0 with ntp.css, and replace NTP/local aliases in RMF rebrand styles with DS font and dismiss-border tokens. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Stale comment
Injected PR Evaluation: Web Compatibility & Security
Re-assessed at
a51c7eb36(synchronize). Scope: 23 files, special-pages NTP RMF rebrand only — noinjected/changes.Web Compatibility Assessment
File Lines Severity Finding (scope) — info No injected/changes. This PR does not touch browser API overrides, wrapper utilities, captured globals, or message-bridge code — zero third-party web page compatibility surface.RemoteMessagingFramework.js22–24 info Rebrand icon switching is correctly gated via useNewTabPageRebranding(); legacy./icons/${message.icon}-96.svgpath preserved when rebrand is off. Refactor toshowIcon/iconSrcis behavior-neutral.RemoteMessagingFramework.module.css77–118 info Rebrand styles scoped under :global(body[data-rebrand="true"])— remotely rollback-able via nativenewTabPageRebrandingsetting. Uses DS NTP tokens (--ds-ntp-dismiss-btn-*).App.module.css3 info New @importofntp.cssfrom design-tokens v0.33.0 loads NTP token definitions page-wide. Non-rebrand users inherit any token value shifts from the 0.30→0.33 bump; monitor for collateral layout changes outside RMF.public/icons/— info All 14 RMFIconenum values have matching assets in both./icons/and./icons/rebrand/.PrivacyPro-96.svgis now distinct fromSubscription-96.svg(fixed ina51c7eb36).integration-tests/— warning RMF screenshot tests (8 variants: 4 message types × light/dark) fail locally — visual diffs from rebrand CSS + design-tokens bump, but no snapshot rebaselines included in this PR. CI screenshot job will fail until baselines are updated. integration-tests/— info Existing RMF screenshot tests run with default data-rebrand="false"; no coverage for rebrand-on icon path (./icons/rebrand/) or rebrand CSS block.Security Assessment
File Lines Severity Finding (scope) — info No changes to messaging transports, message-bridge trust boundary, captured-globals.js, ornativeDatahandling.RemoteMessagingFramework.js24 info message.iconinterpolated into<img src>— safe because value is schema-validated enum (rmf-message.json/RMFIcontype), not page-controlled input. Paths are static relative URLs within the NTP origin.settings.provider.js42–44 info Rebrand feature gated via native-injected settings.newTabPageRebranding.state— supports remote kill-switch without code deploy.rmf-message.json145 info PrivacyProadded to icon enum — expands native-allowed icon set; no security regression (still closed enum).Risk Level
Low Risk — Special-pages UI-only changes (CSS, SVG assets, icon path toggle) with no injected runtime, API shimming, or messaging security surface.
Recommendations
- Rebaseline RMF screenshot snapshots before merge (8 failing tests:
rmf-small,rmf-medium,rmf-big-single-action,rmf-big-two-action× light/dark).- ✅ PrivacyPro legacy icon — resolved in
a51c7eb36; distinct artwork now served for non-rebrand builds.- (Optional) Add rebrand-on RMF screenshot coverage (
data-rebrand="true") to validate./icons/rebrand/path and rebrand CSS block.- (Optional) Smoke-test non-RMF NTP widgets after the design-tokens 0.33.0 bump +
ntp.cssimport for collateral token shifts.Sent by Cursor Automation: Web compat and sec
There was a problem hiding this comment.
Injected PR Evaluation: Web Compatibility & Security
PR: #2882 — NTP RMF rebrand styles and icons (a51c7eb)
Scope: 23 files, all under special-pages/ — zero injected/ changes
Web Compatibility Assessment
| File | Lines | Severity | Finding |
|---|---|---|---|
| (entire PR) | — | info | No injected/ changes. This PR does not touch browser API overrides, wrapper-utils, DDGProxy, captured-globals, or content-script injection. Injected-specific compatibility criteria (toString masking, prototype chain integrity, stack-trace exemptions, etc.) do not apply. |
special-pages/pages/new-tab/app/components/App.module.css |
3 | info | Adds @import of @duckduckgo/design-tokens ntp.css (tokens bumped v0.30.0 → v0.33.0). Collateral styling changes to other NTP surfaces are possible via shared design-token variables — not third-party site breakage, but worth visual QA beyond RMF. |
RemoteMessagingFramework.js |
22–24 | info | Rebrand icon path (./icons/rebrand/${message.icon}-96.svg) is selected via useNewTabPageRebranding(), gated by native newTabPageRebranding settings. When rebrand is off, legacy paths are unchanged. All 14 RMFIcon enum values have matching assets in both icons/ and icons/rebrand/ (verified locally). |
RemoteMessagingFramework.js |
24 | info | message.icon is interpolated into a relative asset path. The JSON schema enum constrains values to known icon names (no / or ..), so path-traversal into arbitrary files is not a realistic vector. A native-side schema violation would produce a 404 image — UX degradation only within the privileged NTP page. |
RemoteMessagingFramework.module.css |
77–119 | info | Rebrand styles scoped under body[data-rebrand="true"], consistent with existing NTP rebrand pattern (App.module.css, settings.provider.js). No viewport/meta manipulation or global prototype changes. |
rmf-message.json / new-tab.ts |
145 / 192 | info | PrivacyPro added to RMFIcon enum with dedicated legacy + rebrand SVG assets. Latest commit (a51c7eb) restores a distinct legacy PrivacyPro-96.svg (no longer duplicates Subscription-96.svg). |
integration-tests/rmf.spec.js |
— | info | 4/4 RMF integration tests pass. No test covers rebrand-on icon path switching (?rebrand=enabled); optional coverage gap, not a compatibility regression. |
No warnings or errors for web compatibility.
Security Assessment
| File | Lines | Severity | Finding |
|---|---|---|---|
| (entire PR) | — | info | No changes to messaging transports, message bridge, captured-globals, origin validation, postMessage, or shouldExemptMethod(). |
RemoteMessagingFramework.js |
34–35, 70–71 | info | titleText and descriptionText rendered as Preact text children — auto-escaped, no dangerouslySetInnerHTML. Pre-existing pattern, unchanged. |
RemoteMessagingFramework.js |
24, 30 | info | Icon src built from schema-enumerated message.icon into a relative path under ./icons/. No user-controlled URL construction or external fetches. |
rmf.service.js |
— | info | Unchanged. Outbound notify() calls pass only { id } — no nativeData leakage risk introduced. |
RemoteMessagingFramework.js |
27 | info | id from native used as DOM id attribute — pre-existing; not introduced by this PR. |
No warnings, errors, or critical findings for security.
Risk Level
Low Risk — Special-pages-only NTP RMF visual rebrand (CSS, SVG assets, design-token bump). No injected runtime, API shims, messaging security, or captured-globals changes.
Recommendations
- (info) Visual QA with
?rebrand=enabledacross RMF message variants (medium, big_single_action, big_two_action) to confirm rebrand icons and dismiss-button styling. - (info) Spot-check collateral NTP styling from design-tokens v0.33.0 import in
App.module.css(Favorites, omnibar, etc.). - (info, optional) Add a rebrand-on RMF integration or screenshot test (
openPage({ rmf: 'medium', additional: { rebrand: 'enabled' } })) to lock in icon path switching.
Assessed at a51c7eb. 4/4 RMF integration tests pass locally.
Sent by Cursor Automation: Web compat and sec
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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 a51c7eb. Configure here.
| .title { | ||
| font-size: var(--ds-font-body-md-size); | ||
| font-weight: var(--ds-font-weight-bold); | ||
| line-height: var(--ds-font-body-md-size); |
There was a problem hiding this comment.
Title line-height mistakenly uses font-size token
Medium Severity
The rebrand .title rule sets line-height to var(--ds-font-body-md-size) — the font-size token — instead of a line-height token. The sibling .description rule correctly uses var(--ds-font-body-md-line-height) for its line-height. This looks like a copy-paste slip that results in a line-height equal to the font-size (ratio of 1), causing cramped or overlapping text if the title wraps to multiple lines.
Reviewed by Cursor Bugbot for commit a51c7eb. Configure here.




Asana Task/Github Issue: https://app.asana.com/1/137249556945/project/72649045549333/task/1216270925937867?focus=true
Description
Gates RMF rebrand styles behind
newTabPageRebrandingand shows the message icon.Testing Steps
?rebrand=enabledand an RMF message that has an icon → rebrand styles +icons/rebrand/*-96.svgicons/*-96.svgicon→ no icon blockTest all rmf.*:
small,medium,big_single_action,big_two_action,big_two_action_overflow,big_single_action_announce,big_single_action_app_update,big_single_action_critical_update,big_single_action_very_critical_update,big_single_action_pir,big_single_action_radar,big_single_action_radar_check_purple,big_single_action_subscription,big_single_action_preview,big_single_action_youtube_newScreen recording
Screen.Recording.2026-07-20.at.23.41.03.mov
Checklist
Please tick all that apply:
Note
Low Risk
UI-only NTP changes gated by existing rebrand config; no auth, messaging protocol, or data-handling changes beyond new static assets and CSS.
Overview
Adds NTP rebrand styling for Remote Messaging Framework (RMF) banners when
newTabPageRebrandingis on (body[data-rebrand="true"]): design-token spacing, shadows, typography, and a restyled dismiss control.RMF now picks icon assets from
./icons/rebrand/*-96.svgunder rebrand vs legacy./icons/*-96.svg, and only shows the icon block for non-smallmessages that include anicon.Bumps
@duckduckgo/design-tokensto v0.33.0, imports NTP token CSS inApp.module.css, adds a full rebrand icon set, registersPrivacyProin the RMF schema/types, and updates thePrivacyProSVG asset.Reviewed by Cursor Bugbot for commit a51c7eb. Bugbot is set up for automated code reviews on this repo. Configure here.