Repository navigation
feat(desktop): name the versions in the update dialogs - #323
Merged
Merged
Conversation
"Check for Updates..." is asked precisely to answer "what am I on, and
what would I move to", and every dialog left the first half out: "You're
up to date." with nothing to check it against, and a restart prompt that
named the downloaded version but not the one it replaced.
Every branch now carries a detail line with app.getVersion(); the ready
dialog names both versions. The available state — where a check stops
once automatic downloading is off — gains a dialog of its own, having
previously fallen through the status !== "ready" guard so the menu item
closed showing nothing at all.
All the strings move into the app dictionaries and resolve through
main/i18n.ts, which the macOS menu bar already used: menu-i18n.ts and
menu-locale.ts are renamed i18n.ts and locale.ts now that they serve
more than the menu, and the translator gained placeholder interpolation
(@solid-primitives/i18n's resolveTemplate, already a desktop dep).
A new placeholders test asserts es and vi interpolate the same values as
en, since a dropped {{version}} renders as silence rather than an error.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Issue for this PR
Closes #
Type of change
What does this PR do?
Check for Updates... now names the versions. The menu item is asked precisely to answer "what am I on, and what would I move to", and every dialog left the first half out —
You're up to date.with nothing to check it against, and a restart prompt naming the downloaded version but not the one it was replacing.Every branch now carries a
detailline withapp.getVersion():Two things beyond the literal ask, both flagged for your call:
availablestate gained a dialog. That is where a check stops once automatic downloading is off, and it fell through thestatus !== "ready"guard — so the menu item closed showing nothing at all. Leaving it silent would have contradicted the point of the change, since it is exactly the case where a new version exists to name. Its Download button callscontroller.download()fire-and-forget; the renderer already surfaces the progress and the restart prompt.Localization. These dialogs are built in the main process, so they were the last strings in the app no locale could reach. They now come from the app dictionaries via
main/i18n.ts— the module the macOS menu bar already used, somenu-i18n.ts/menu-locale.tsare renamedi18n.ts/locale.tsnow that they serve more than the menu. The translator gained placeholder interpolation through@solid-primitives/i18n'sresolveTemplate(already a desktop dependency, and the same resolver the renderer uses). 15updater.dialog.*keys in en/es/vi.DIVERGENCES.mdgets a row for the dialogs and the localized-menu row is updated for the renames;CHANGELOG.mdgets an entry under Updates.How did you verify your code works?
packages/app/src/i18n/placeholders.test.tsasserts es and vi interpolate the same{{values}}as en — a dropped{{version}}renders as silence, not an error. Confirmed it fails by removing one; the repo has zero pre-existing drift.updater.dialog.ready.messagewith{version: "1.2.3"}rendersĐã tải xuống CoDev 1.2.3. Khởi động lại ngay?, and a missing key returnsundefined, which is what the?? keyfallback is for.updater.tspasses ({{version}}vs{{current}}).bun typecheckclean in both packages;bun testgreen (708 app, 159 desktop).electron-vite buildclean, dictionaries still code-split out of the main entry.Not verified by driving the real dialogs: they need a live update feed with a newer release than the running build, which I cannot manufacture here. The dialog wiring itself is unchanged — same
showMessageBoxcalls, same button indices, sameinstall()/download()calls — only the strings and the addedavailablebranch are new.Screenshots / recordings
None — see the note above.
Checklist
🤖 Generated with Claude Code