Skip to content

History: Updates Icons on macOS - #2886

Merged
jleandroperez merged 2 commits into
mainfrom
lantean/updates-history-icons
Jul 21, 2026
Merged

History: Updates Icons on macOS#2886
jleandroperez merged 2 commits into
mainfrom
lantean/updates-history-icons

Conversation

@jleandroperez

@jleandroperez jleandroperez commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Asana Task/Github Issue:

Description

This PR updates the History Special Page's sidebar icons on macOS, so that we display the (new + rebranded) assets.

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
Platform-gated visual asset swap in the History sidebar with no logic or data-handling changes.

Overview
On macOS, the History special page sidebar now uses new rebranded SVG assets for each date/range filter instead of the legacy icons.

Sidebar.js adds a rebrandingIconMap parallel to the existing iconMap and selects it when usePlatformName() returns macos; other platforms are unchanged. Six new files under public/icons/ (*-rebranding.svg) supply the updated artwork.

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

@jleandroperez jleandroperez self-assigned this Jul 21, 2026
daxtheduck
daxtheduck previously approved these changes Jul 21, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Injected PR Evaluation: Web Compatibility & Security

PR: History: Updates Icons on macOS (#2886)
Scope: special-pages/pages/history/ only — Sidebar.js + 6 static SVG assets. No injected/, messaging/, or runtime API override changes.


Web Compatibility Assessment

File Lines Severity Finding
(all) info Changes are confined to the first-party History special page embedded in DDG browsers. This code is not injected into third-party web pages, so API surface fidelity, prototype chain integrity, third-party script detection, and stack-trace exemption concerns do not apply.
Sidebar.js 122–123, 144 info Icon selection uses static module-scope path literals (icons/*-rebranding.svg). No page-derived or user-controlled data flows into src, so there is no URL-construction or DOM-injection risk from this change.
Sidebar.js 122–123 info Platform gating via usePlatformName() === 'macos' matches existing History page patterns (App.jsx, SearchForm.js, selection/link handlers). Non-macOS platforms continue using the original iconMap unchanged.
Sidebar.js 144 info <img> elements lack alt text. This is pre-existing for legacy icons; decorative sidebar icons could use alt="" for a11y, but this is not introduced by this PR.
Sidebar.js 122–123 warning Rebrand icons are gated by platform name only, not a remote-config/feature flag (contrast NTP's newTabPageRebranding). Icons cannot be remotely disabled without a deploy. Acceptable for first-party UI, but limits rollout control if visual regressions appear.
public/icons/*.svg all info Static bundled assets with hardcoded fills/paths. No external references, scripts, or event handlers.

No web compatibility errors identified.


Security Assessment

File Lines Severity Finding
(all) info No changes to captured-globals.js, message bridge, messaging transports, postMessage, or content-scope initialization. Hostile-page threat models (global capture bypass, nativeData leakage, origin validation, iframe sandboxing) are not in scope.
Sidebar.js 35–47, 123, 144 info Icon paths are compile-time constants. SVG assets are first-party static files — no eval, dynamic code execution, CSS injection from user input, or network fetches to third parties.
Sidebar.js 122–123 info usePlatformName() reads from SettingsContext (native-provided platform name), not page-controlled globals. No new messaging schemas or outbound notify/request calls.

No security findings.


Risk Level

Low Risk — Special-pages-only visual asset swap with a macOS platform gate; no injected runtime, API overrides, or messaging changes.


Recommendations

  1. (info) Consider adding a macOS integration test (or screenshot test) asserting rebranding icon src values render for sidebar items — similar to NTP rebrand icon coverage in #2877.
  2. (info) If History rebrand should follow the same rollout model as NTP, consider a historyPageRebranding settings flag instead of hardcoded platformName === 'macos'.
  3. (info) Optional a11y: add alt="" to decorative sidebar <img> icons (pre-existing gap, not blocking).
Open in Web View Automation 

Sent by Cursor Automation: Web compat and sec

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

[Beta] Generated file diff

Time updated: Tue, 21 Jul 2026 20:52:57 GMT

Apple
    - apple/pages/history/dist/index.js

File has changed

Integration
    - integration/pages/history/dist/index.js

File has changed

Windows
    - windows/pages/history/dist/index.js

File has changed

New Files
    - apple/pages/history/icons/all-rebranding.svg
  • apple/pages/history/icons/day-rebranding.svg
  • apple/pages/history/icons/older-rebranding.svg
  • apple/pages/history/icons/sites-rebranding.svg
  • apple/pages/history/icons/today-rebranding.svg
  • apple/pages/history/icons/yesterday-rebranding.svg
  • integration/pages/history/icons/all-rebranding.svg
  • integration/pages/history/icons/day-rebranding.svg
  • integration/pages/history/icons/older-rebranding.svg
  • integration/pages/history/icons/sites-rebranding.svg
  • integration/pages/history/icons/today-rebranding.svg
  • integration/pages/history/icons/yesterday-rebranding.svg
  • windows/pages/history/icons/all-rebranding.svg
  • windows/pages/history/icons/day-rebranding.svg
  • windows/pages/history/icons/older-rebranding.svg
  • windows/pages/history/icons/sites-rebranding.svg
  • windows/pages/history/icons/today-rebranding.svg
  • windows/pages/history/icons/yesterday-rebranding.svg

❌ File only exists in new changeset

@jleandroperez
jleandroperez requested a review from moon0326 July 21, 2026 20:39

@moon0326 moon0326 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! 🚀

@jleandroperez jleandroperez added the semver-minor New feature — triggers minor version bump label Jul 21, 2026
@daxtheduck
daxtheduck dismissed their stale review July 21, 2026 20:51

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

@github-actions github-actions Bot added semver-patch Bug fix / internal — no release needed and removed semver-minor New feature — triggers minor version bump labels Jul 21, 2026
@jleandroperez
jleandroperez enabled auto-merge July 21, 2026 20:56
@jleandroperez
jleandroperez added this pull request to the merge queue Jul 21, 2026
Merged via the queue into main with commit f814660 Jul 21, 2026
38 checks passed
@jleandroperez
jleandroperez deleted the lantean/updates-history-icons branch July 21, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-patch Bug fix / internal — no release needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants