Skip to content

Show the Downloading update dialog from live progress events - #398

Merged
jtklein-agents merged 1 commit into
spec/393-update-download-progressfrom
395-downloading-update-dialog
Nov 27, 2026
Merged

jtklein-agents merged 1 commit into
spec/393-update-download-progressfrom
395-downloading-update-dialog

Conversation

@jtklein-agents

Copy link
Copy Markdown
Owner

Closes #395

Summary

sequenceDiagram
    participant Updater as electron-updater
    participant Main as updates.ts (main)
    participant Page as RunList store
    participant Dialog as UpdateDownloadDialog
    Updater->>Main: download-progress / update-downloaded / error
    Main->>Page: UPDATE_DOWNLOAD { id, status, percent? }
    Page->>Dialog: updateDownload
    Note over Dialog: open while status ≠ idle
Loading
 setDownload(next)
   download = next
+  window?.webContents.send(UPDATE_DOWNLOAD, { id: 'update', ...next })
   applyUpdateDownloadBar(window)
 <App>
   ...
+  <UpdateDownloadDialog download={store.updateDownload} />
   <ErrorDialog error={store.error} />
State Bar Percent text Status line
connecting indeterminate Starting… Connecting to the update server…
downloading <100 determinate 42% RAxML-GUI will quit and install when the download finishes.
restarted <100 determinate 10% Retrying with the full download…
100 or done 100 100% Download complete. Preparing to install…

The dialog has no onClose and no button, so Escape and backdrop clicks do nothing.

Evidence

  • Before: the page never heard about an Update download. Only the Dock/taskbar bar moved.
    After: yarn test: 72 files, 495 tests passed, including the preload launch with onUpdateDownload.json.
updates.test.ts  "every state change is sent to the page"
  click Yes, emit progress 42, progress 10, update-downloaded, error
  expect sends: connecting, downloading 42, restarted 10, done, idle
updates.test.ts  "an error mid-download ..."
  expect order: send idle, bar -1, error box
updateDownload.test.tsx
  push connecting / downloading 42 / restarted 10 / done
    → title "Downloading update", percent text, status line, no button
  Escape + backdrop click → still open
  push idle → dialog gone

Not met: the two onUpdateDownload sentences for docs/research/electron-vite-packaging.md. That file is not on any branch.

Merge Danger

Door: two-way

Adds a channel, a bridge method and a dialog; nothing is removed or renamed.

Blast Radius: updates

Only shows during an Update download. A stuck non-idle state would leave an undismissable dialog until the app quits; error and update-downloaded both move the state on.

🤖 Generated with Claude Code

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>
@jtklein-agents
jtklein-agents merged commit 367a782 into spec/393-update-download-progress Nov 27, 2026
8 checks passed
@jtklein-agents
jtklein-agents deleted the 395-downloading-update-dialog branch November 27, 2026 10:34
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