fix(desktop): show the Hermes icon in the update hand-off window - #103632
chelsealong wants to merge 1 commit into
Conversation
The macOS/Linux update shim (posix.sh -> serve-ui.py -> ui.html, a chromeless browser --app window) never served a favicon, so the update window showed the browser's generic default icon instead of Hermes's, making it unidentifiable at a glance in the taskbar/window switcher. serve-ui.py now takes an optional icon path and serves it at /favicon.ico; posix.sh passes the repo's existing web/public/favicon.ico when present; ui.html declares the icon link. Missing/unreadable icon degrades to no favicon, matching the shim's existing fail-soft posture.
A delayed browser could miss the 900ms terminal event and spin forever after the updater exited. Retain terminal delivery until the page acknowledges it, bound unavailable-client teardown and failed requests, and preserve a truthful final display. Fixes NousResearch#103747. Builds on OutThisLife and Teknium detached handoff work in NousResearch#83634 and the NousResearch#75895 quiet-window design. Continues Axl Ibiza Windows update investigation (NousResearch#60233, NousResearch#94107, NousResearch#100763), including source/review contributions carried by merged NousResearch#93353 and NousResearch#85170. Existing NousResearch#102373, NousResearch#103140, NousResearch#95719, NousResearch#97299 and NousResearch#103632 retain their separate scopes.
PR 103632 — fix(desktop): show the Hermes icon in the update hand-off windowSummary: Threads the app Non-blocking findings:
No security concerns ( |
|
Re non-blocking finding #2 (Windows coverage): already addressed in the PR description — |
A delayed browser could miss the 900ms terminal event and spin forever after the updater exited. Retain terminal delivery until the page acknowledges it, bound unavailable-client teardown and failed requests, and preserve a truthful final display. Fixes #103747. Builds on OutThisLife and Teknium detached handoff work in #83634 and the #75895 quiet-window design. Continues Axl Ibiza Windows update investigation (#60233, #94107, #100763), including source/review contributions carried by merged #93353 and #85170. Existing #102373, #103140, #95719, #97299 and #103632 retain their separate scopes.
What does this PR do?
Fixes #103629. The macOS/Linux desktop update hand-off shows a "chromeless
default-browser app window" (
scripts/desktop-update/posix.shspawningchrome/chromium --app=http://127.0.0.1:<port>/, servingscripts/desktop-update/ui.htmloverscripts/desktop-update/serve-ui.py)while
hermes updateruns. That window never served a favicon, so insteadof the Hermes mark, the taskbar/window switcher showed a generic default
icon — exactly what the reporter saw on Ubuntu 26.04.1. Verified via
grep -r icon scripts/desktop-update/: zero hits before this change.Chromium's
--app=mode uses the page's favicon as the window's taskbaricon (that's the whole point of "site-specific browser" app windows), so
serving one from the shim is enough to fix this — no Electron
BrowserWindowis even involved in this particular window (that's a separate, unrelated
in-app "Updating Hermes…" overlay that already looks fine).
Changes Made
scripts/desktop-update/serve-ui.py— accepts an optional 4th argv (iconfile path); if given and readable, serves it at
GET /favicon.icoasimage/x-icon. Missing/unreadable icon degrades to a plain 404, matchingevery other optional input this shim already tolerates.
scripts/desktop-update/posix.sh—start_ui()resolves the repo'sexisting
web/public/favicon.ico(already used as the web app's ownfavicon) and passes it through to
serve-ui.py; falls back to no icon ifthe file isn't there (old/partial checkouts).
scripts/desktop-update/ui.html— adds<link rel="icon" href="/favicon.ico">.tests/test_desktop_update_shim_progress.py— extends the existing real(no-mock)
serve-ui.pysubprocess fixture with an icon-path variant, andadds two new tests: the icon is served correctly when a path is given, and
the route cleanly 404s (not a crash) when it isn't.
Windows (
scripts/desktop-update/windows.ps1) has its own in-process HTTPlistener and WinForms fallback that also don't set an icon today, but I
deliberately left that out of this PR: I can't execute or verify the
Windows-only WinForms path from this environment, and this repo's own test
suite treats
windows.ps1execution aswindows_only/ CI-lane-only forthat reason (see
tests/test_desktop_update_windows_pipe_drain.py). Happyto follow up there if maintainers want it, ideally reviewed/tested by
someone on Windows.
How to Test
Output:
Proved the new test actually exercises the fix: with the three source files
reverted (
git stashofposix.sh/serve-ui.py/ui.html, keeping only thetest change) the same run gives
1 failed, 6 passed— the newtest_favicon_served_when_icon_path_givenfails withHTTPError: 404,while the new negative test (
test_favicon_missing_when_no_icon_path_given)and all pre-existing tests still pass, confirming the new test targets
exactly the added behavior. Restoring the fix returns it to
7 passed, 0 failed.Also ran, both clean:
Platforms Tested
Linux (Ubuntu, matching the report) — ran the real
serve-ui.pysubprocessend-to-end via the test suite above. Did not have access to macOS or Windows
hardware; the POSIX code path (
posix.sh) is shared between macOS and Linuxand touches nothing platform-specific.
Checklist
scripts/run_tests.sh tests/test_desktop_update_shim_progress.py— all passAI assistance disclosure
This PR was prepared with the help of an AI coding agent (investigation,
implementation, and test verification), reviewed by me before submission.