Repository navigation
feat(sidebar): show the Desktop update in blue at the bottom of the sidebar - #2164
PabloWiedemann wants to merge 2 commits into
Conversation
…idebar Move the Desktop app update indicator out of the title bar and into the bottom of the left sidebar, above Desktop Settings. It keeps the same three states (available, downloading, ready) and the same actions: download, then restart to update. While the update downloads, a click opens the Updates tab of Desktop Settings. When the sidebar is collapsed it shows only the icon, with the label as its tooltip and accessible name. The panel already receives the app update state through window.api (getAppUpdateState and onAppUpdateStateChanged), and the download and restart prompts come from the existing useAppUpdatePrompts, so no preload or main process change is needed. The title bar no longer renders the pill, so its icons-only collapse step, which only hid the pill label, is removed too. Build windows have no sidebar, so they no longer show the Desktop update.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
…nfirm Point the update-pills spec at the sidebar indicator in the panel and at the panel's own confirm modal, in place of the removed title bar pill and the system modal. The install-update reset in beforeEach stays as it was.
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @PabloWiedemann.
Found 7 finding(s).
| Severity | Count |
|---|---|
| 🟡 Medium | 3 |
| 🟢 Low | 4 |
Panel: 8/8 reviewers contributed findings.
| function onClick(): void { | ||
| const { kind, version } = state.value | ||
| if (kind === 'available') void showAppUpdateDownloadPrompt(version) | ||
| else if (kind === 'ready') void showAppUpdateRestartPrompt(version) |
There was a problem hiding this comment.
🟡 Medium — onClick acts on the renderer's cached state.value and then awaits an unbounded user confirmation before invoking installUpdate(), which restarts the app without re-verifying that an update is still staged. The title-bar path this replaces re-read the authoritative update state in main at click time and bailed out when it was no longer actionable, so a stale ready here can quit and restart the app — killing running ComfyUI sessions — with nothing to install. Re-check the state in main before restarting. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).
|
|
||
| function onClick(): void { | ||
| const { kind, version } = state.value | ||
| if (kind === 'available') void showAppUpdateDownloadPrompt(version) |
There was a problem hiding this comment.
🟡 Medium — Both prompt calls are fired with void and no .catch(), yet they await window.api.downloadUpdate() / window.api.installUpdate(). If the IPC invoke rejects (handler unregistered, main throws before its internal try block) the result is an unhandled rejection and the click silently does nothing with no user feedback. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max edge-case, kimi-k2.7-code edge-case).
| } | ||
| </script> | ||
|
|
||
| <template> |
There was a problem hiding this comment.
🟡 Medium — The old title-bar pill passed isInstallLess into useUpdatePills and suppressed the affordance in portable/install-less mode; this sidebar indicator has no equivalent gate. In an install-less environment the user can now be prompted to download and restart for an update that cannot be installed. Raised by 1 of 8 reviewers (gemini-3.1-pro edge-case).
| .then((current) => { | ||
| if (!heardChange) state.value = current | ||
| }) | ||
| .catch(() => {}) |
There was a problem hiding this comment.
🟢 Low — .catch(() => {}) silently swallows a failed initial getAppUpdateState() read, and the resolved value is assigned to state with no shape check so a null/malformed payload makes later state.kind reads throw during render and take down the sidebar. Consider validating the resolved shape and retrying or logging on failure rather than leaving the indicator permanently idle. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial/edge-case, kimi-k2.7-code edge-case).
|
|
||
| function onClick(): void { | ||
| const { kind, version } = state.value | ||
| if (kind === 'available') void showAppUpdateDownloadPrompt(version) |
There was a problem hiding this comment.
🟢 Low — This routes the prompt through the panel's singleton useModal, whose confirm() resets state and drops any previously pending resolver without settling it. If main broadcasts app-update:prompt-restart while this Download dialog is open, the Restart confirm swaps in at the same screen position, so a click aimed at "Download" can land on "Restart now" and quit the app. The old title-bar pill opened a separate system-modal window and could not be clobbered this way. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).
| if (!Number.isFinite(gap)) return | ||
| const mode = collapseMode.value | ||
| if (mode === 'full') { | ||
| if (collapseMode.value === 'full') { |
There was a problem hiding this comment.
🟢 Low — With the pill's [.title-bar.is-collapsed-update_&] rules deleted, nothing styles is-collapsed-feedback or reads data-collapse-mode, so transitionTo('no-feedback') no longer changes layout: delta is always 0, feedbackRestoreCostPx stays 0, and the ResizeObserver plus rAF fit loop runs on every resize with no observable effect. Either drop the collapse machinery or restore the styling it depends on. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
| @@ -557,29 +531,6 @@ onUnmounted(() => { | |||
| <div class="title-center"></div> | |||
|
|
|||
| <div ref="titleTrailing" class="title-trailing flex items-center gap-2 [justify-self:end]"> | |||
There was a problem hiding this comment.
🟢 Low — The title bar is the only chrome visible while a build is in the foreground, but the replacement indicator lives in the dashboard sidebar behind showSidebar. Since app-update:prompt-restart is broadcast only for user-initiated downloads, an auto-downloaded ready update now has no passive affordance for a user who stays inside a build. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max edge-case).
TL;DR The Desktop app update moves from the yellow pill on the right of the title bar to a blue row at the bottom of the left sidebar, above Desktop Settings.
Why Pablo asked for the Desktop update indicator to be blue and at the bottom of the left side panel.
Can affect The left sidebar footer (dashboard window), the title bar's right side and its narrow-width collapse, and how a user starts a Desktop update. Build windows have no sidebar, so they no longer show the Desktop update.
Stacked on #2159.
Changes
SidebarDesktopUpdate.vue, placed above Desktop Settings inAppSidebar.vue. Same states as the old pill: available, downloading, ready. Hidden when there is no update.useAppUpdatePrompts(the same confirm the main process already opens in the panel).azure-600, the value@comfyorg/design-systemgives--primary. Desktop's theme maps--primaryto the foreground, so the palette token is used directly. Text and icon only, no tinted background.window.api.getAppUpdateStateandonAppUpdateStateChanged, which the panel preload already exposes. No preload or main process change.TitleBarApp.vue: the app-update pill and itsuseUpdatePillscall are removed. Theicons-onlycollapse step only hid the pill label, so it is removed too.installUpdate*code anduseUpdatePills.tsare not changed. After this PR the title bar no longer callsuseUpdatePills.SidebarDesktopUpdate.test.ts(states, first read and pushed state, clicks, collapsed, unsubscribe). The five title bar pill tests become one test that checks the title bar shows no pill. Panel test mocks get the two update methods.Checks
pnpm run typecheck,pnpm run lint,pnpm run format:check,pnpm exec vitest run(394 files passed, 1 skipped, no errors).e2e/update-pills.test.tswas rewritten to check[data-testid="app-sidebar-desktop-update"]in the panel and the panel's own confirm modal; it was not run.