refactor(desktop): move App Update controller below AppShell - #4498
refactor(desktop): move App Update controller below AppShell#4498chihumyum wants to merge 1 commit into
Conversation
628a5ec to
d5cd6e9
Compare
|
@Astro-Han could you please review exact head I rebased it onto Exact-head local verification passes: rebuild; renderer architecture 71/71 plus the base ratchet; App Update 22/22; Desktop 1,982/1,982; UI 313/313; typecheck, lint, format, Desktop/UI Knip, ASF headers, AppShell hook scope, Astryx inventory; and the real Electron window smoke. The new hosted CI and Windows package checks are currently queued. |
d5cd6e9 to
076fb61
Compare
|
Rebased onto current How the two real conflicts were resolved:
Local verification on this head with Node 24: desktop Automated update from Claude Code on behalf of the PR author. |
Generated-by: OpenAI Codex
076fb61 to
750ee05
Compare
|
Rebased again onto current Same local verification on this head with Node 24: desktop Automated update from Claude Code on behalf of the PR author. |
Summary
Move the renderer-owned App Update lifecycle out of AppShell into a feature slice, with
AppUpdateProvideras the sole production owner ofuseAppUpdateController.No user-visible copy, update protocol, or install behavior is intended to change.
Refs #4582 (supersedes #3439)
Performance evidence
Measured in Electron 43.4.1 with a production React bundle, the same renderer PID, and alternating legacy/scoped runs:
The structural run used 8 rounds x 40 pushes, the pure renderer run 9 alternating rounds x 1,000 pushes, and the full propagation run 7 alternating rounds x 200 pushes. The full path used a real
BrowserWindow, Electron IPC, the production preload bundle, Desktop adapter, and App Update Provider; only the main status producer was a fixture.These measurements cover controlled renderer update propagation. They do not claim faster updater downloads or installs, lower main-process/network/disk cost, total wall/FPS improvement, or an exact production AppShell fiber count.
Verification
npm run rebuild,npm run typecheck,npm run lint, andnpm run format:checkapps/desktopandpackages/ui, ASF headers, stale-dist, andgit diff --checkNODE_NO_WARNINGS=1, Storage passed 1,077 tests with 8 skippednode scripts/desktop-real-window-smoke.mjs --programmatic-only --diagnostic-wait-ms 20000passed against the built renderer: visible 1280x840 movable/resizable window, renderer ready,appFramemounted, Search focused, dock visible, and no ErrorBoundaryThe real-window smoke used a source-built Electron app, not a packaged or signed installer; packaged updater download/install remains outside this PR's evidence.
Review focus
Please review the ownership guard and the two independent projections together: the feature should retain the only update subscription and bridge capability, while About and Sidebar Footer receive only the state needed at their render boundaries.
AI use
Select exactly one:
Tool(s) and scope: OpenAI Codex contributed substantive architecture design, implementation, tests, performance measurement, and verification. The human contributor reviewed the work and chose to submit it.
Checklist
Does this PR entail a change in behavior?