Skip to content

Bring the Downloading update dialog back after a page reload or reopened window (#396) - #399

Merged
jtklein-agents merged 1 commit into
spec/393-update-download-progressfrom
396-update-download-reload
Nov 27, 2026
Merged

jtklein-agents merged 1 commit into
spec/393-update-download-progressfrom
396-update-download-reload

Conversation

@jtklein-agents

Copy link
Copy Markdown
Owner

Closes #396

Summary

A page that starts mid-Update download (reload, or a macOS window reopened from the Dock) now shows the Downloading update dialog without waiting for the next progress event.

 RunList.listen
   subscribe(onUpdateDownload)
+  rendererBridge.getUpdateDownload()        # invoke GET_UPDATE_DOWNLOAD
+    main: ipcMain.handle → getUpdateDownload()  # held UpdateDownload state
+    .then(onUpdateDownload)                  # seed store.updateDownload

New one-shot method typed on RendererBridge (and so Window), channel in src/constants/ipc.ts, proof in src/preload-proofs/getUpdateDownload.json. src/test/setup.ts stubs it to idle by default.

Evidence

  • Before: (store without the seed)
    × a page that starts mid-download shows the dialog with no event pushed
    AssertionError: expected undefined to be 'Downloading update'
    
    After:
    stub getUpdateDownload → { status: 'downloading', percent: 37 }
    render page, push no event
    expect dialog title 'Downloading update', text contains '37%'   ✓
    
    Full suite: 72 files, 496 tests pass, including the Electron preload launch (src/preload.test.ts).

Not done: the ticket's two sentences in docs/research/electron-vite-packaging.md — that note is not on this branch (only on origin/research/electron-vite-packaging).

Merge Danger

Door: two-way

Blast Radius: small

Adds one IPC handler and one startup call. If main failed to answer, the page would get an unhandled rejection (same as the existing getVersion seed).

🤖 Generated with Claude Code

A reloaded page or a window reopened from the Dock mid-download now
shows the dialog at once. rendererBridge.getUpdateDownload() invokes
GET_UPDATE_DOWNLOAD, which main answers from the held UpdateDownload
state; the run list seeds updateDownload from it next to the
onUpdateDownload subscription.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jtklein-agents
jtklein-agents merged commit dbe4bc4 into spec/393-update-download-progress Nov 27, 2026
8 checks passed
@jtklein-agents
jtklein-agents deleted the 396-update-download-reload branch November 27, 2026 10:54
jtklein-agents added a commit that referenced this pull request Nov 27, 2026
AntonelliLab#528)

* Track the Update download in main and show it on the Dock/taskbar icon (#394) (#397)

Main holds an UpdateDownload state (idle, connecting, downloading,
restarted, done) and mirrors it on the window's progress bar. A reopened
main window gets the held bar back. downloadUpdate's rejection is
swallowed; the error listener reports it.

Replaces the tests "Yes downloads the update with no window, bar, or
percent" and "a finished download quits to install"; the source scan
drops its download-progress ban.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* Show the Downloading update dialog from live progress events (#395) (#398)

Main sends each Update download state to the window's page on
UPDATE_DOWNLOAD. The page subscribes through rendererBridge.onUpdateDownload,
the store keeps the latest state, and UpdateDownloadDialog follows it
until the state returns to idle.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* Bring the Downloading update dialog back after a page reload or reopened window (#396) (#399)

A reloaded page or a window reopened from the Dock mid-download now
shows the dialog at once. rendererBridge.getUpdateDownload() invokes
GET_UPDATE_DOWNLOAD, which main answers from the held UpdateDownload
state; the run list seeds updateDownload from it next to the
onUpdateDownload subscription.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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