Repository navigation
Let people dismiss the update banner - #696
Merged
Merged
Conversation
The "Cyd update available" box sat in the corner with no way to close it. On Linux it isn't even actionable — it just says to use your package manager — so it was permanent furniture until you upgraded. Dismissing hides it for the rest of the session, whatever it's showing; update information stays reachable from the hamburger menu's "check for updates". App unmounts the bar when updates stop being available, so a genuinely new update still shows even if an earlier one was dismissed. The banner moves to its own component to make that testable without mounting App.vue, which has no test scaffolding of its own. UpdateStatus moves to types.ts now that two files need it. TabsView's updatesAvailable prop, which it never read, is gone. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
micahflee
force-pushed
the
updates-bar-dismissable
branch
from
September 10, 2026 18:11
cd7542e to
0bbb59e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
The "Cyd update available" box in the bottom-right corner had no close button. On Linux it isn't even actionable — the text just says to use your package manager — so it was permanent furniture until you upgraded.
It now has a
×. Dismissing hides it for the rest of the session, whatever it's showing, including the actionable Restart to Update state on macOS/Windows: a box the user closed stays closed. Update information is still reachable any time from the hamburger menu's Check for updates, which reports current vs latest version.Appunmounts the bar whenupdatesAvailablegoes false, so the dismissal resets and a genuinely new update is still shown even if an earlier one was dismissed. That's intentional and commented; the hourly re-check doesn't resurrect a dismissed bar, because it leavesupdatesAvailabletrue.Why it moved to a component
The banner lived inline in
App.vue, which has no test file — 391 lines with anonMounteddoing device info, API client, sign-in state, emitter wiring and five IPC listeners. Testing one boolean there would have meant building that entire mock scaffold first.UpdatesBar.vueis purely presentational —updateStatusandplatformin,restartToUpdateClickedout — so it tests with props and no IPC. The auto-updater listeners stay inApp.vue; moving those too would be a good follow-up but isn't this PR's job.Two small things came along because the move forced them:
UpdateStatusmoves from a local enum inApp.vuetotypes.ts, now that two files need it.TabsView'supdatesAvailableprop is removed. It was declared and never read, so the banner was already the only update indicator in the UI — leaving a dead prop next to new dismissal logic invites someone to wire the two together by mistake.Testing
UpdatesBar.test.ts: dismissal hides the bar and survives a status change; the dismiss button is present in all six update statuses across all three platforms, pinning the "always dismissable" rule; Linux shows package-manager text and never a restart button; the checking/downloading/downloaded/error states render and emit correctly.npm test src/renderer— 1055 pass, no type errors.npm run lint— clean.🤖 Generated with Claude Code