Skip to content

Restore Microsoft weather icons for Google Search SVGs - #5260

Open
Entrpi wants to merge 4 commits into
valinet:masterfrom
Entrpi:draft/weather-microsoft-svg-runtime
Open

Entrpi wants to merge 4 commits into
valinet:masterfrom
Entrpi:draft/weather-microsoft-svg-runtime

Conversation

@Entrpi

@Entrpi Entrpi commented Nov 18, 2026

Copy link
Copy Markdown

Problem

Google Search now supplies SVGs for conditions such as cloudy, partly sunny, and light rain. The Microsoft pack's existing PNG matcher leaves these SVGs displaying Google artwork.

Change

  • Recognize 33 Google SVG asset names and 183 inline SVG fingerprints, including light and dark variants. Retain the legacy PNG matches.
  • Fetch the same 21 Microsoft PNGs already referenced upstream. The weather host downloads them over HTTPS on a background thread, caches each successful image in memory, and supplies image data to WebView2.
  • Use the available cache entries when the initial wait reaches five seconds. A later refresh retries missing PNGs. Unmatched or unavailable artwork falls back to the original Google icon.
  • Wait up to one second for the current Microsoft PNG to decode before extracting the taskbar icon. On timeout, keep the Google artwork in the taskbar and flyout for that refresh.
  • Restore the provider's original forecast tile dimensions when Google changes the image or when switching packs. Ignore replacement decodes that finish after a pack switch.
  • Map legacy PNGs that use the same artwork day and night even when the weather card omits coordinates.

Review order

The first commit is the shared icon lookup fix from #5258. A local merge preview with #5259 found one conflict in ep_weather_host.c, where both changes select and load icon packs. The local resolution built successfully and passed live switching tests across Google, Microsoft, and ExplorerPatcher, plus a browser test that switched packs during a pending Microsoft image decode.

Verification

  • Built the x64 Release weather host and tested it in isolated WebView2 sessions on Windows 11 25H2.
  • With the Microsoft pack selected, the current icon and all eight daily icons rendered as replacement PNGs, and the weather host returned the Microsoft raster to the taskbar client. Live tests switched from Microsoft to Google and from Google to Microsoft after the forecast loaded.
  • A browser fixture checked direct and inline SVGs, legacy PNG matching, and Google artwork fallback for an empty cache or corrupt replacement. It also verified that switching packs restores the original images on the same page.
  • A separate browser fixture delayed the current icon decode and checked the taskbar handoff, fallback at the deadline, and restoration of tile dimensions after repeated provider image changes.
  • A native fixture simulated a slow final download and one unavailable PNG. The cache returned the available PNGs at the deadline, and the retry requested only the missing PNG.
  • Compared all 21 replacement URLs with upstream and confirmed they returned PNGs.
  • One fresh WebView2 profile received a Google Search response without a weather card. A rerun of the final DLL with a normal forecast response rendered the Microsoft icons and switched back to Google successfully.

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