The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): prioritize pending bundle restart status
Yuan Lib8e50ad0f118
diff --git a/apps/desktop/src/app/settings/about-settings.tsx b/apps/desktop/src/app/settings/about-settings.tsxindex 8e2fd7809d2..b7312c78abd 100644--- a/apps/desktop/src/app/settings/about-settings.tsx+++ b/apps/desktop/src/app/settings/about-settings.tsx@@ -57,7 +57,7 @@ function AppUpdatesSettings({ includeUninstall }: AppUpdatesSettingsProps): Reac<div className="mx-auto mt-4 w-full max-w-2xl"><SectionHeading icon={RefreshCw} title={t.settings.about.updates} /><div className="grid gap-3" id={settingElementId(SETTING_IDS.about.updates)}>- <UpdateStatusCard target="client" />+ <UpdateStatusCard target="client" version={version} /><UpdateChannelRow />{/* Client and remote backend updates are independent. Only the client has release notes. */}{remote && <UpdateStatusCard showReleaseNotes={false} target="backend" />}diff --git a/apps/desktop/src/app/updates-overlay.tsx b/apps/desktop/src/app/updates-overlay.tsxindex 65501aa4a8b..f86bfc2aed0 100644--- a/apps/desktop/src/app/updates-overlay.tsx+++ b/apps/desktop/src/app/updates-overlay.tsx@@ -390,7 +390,7 @@ function IdleView({)}version={version}/>- <UpdateStatusCard target={target} />+ <UpdateStatusCard target={target} version={version} /><SyncStatusCard />{details}</div>diff --git a/apps/desktop/src/components/update-status.test.tsx b/apps/desktop/src/components/update-status.test.tsxindex 014b41d0860..1be0d8b25de 100644--- a/apps/desktop/src/components/update-status.test.tsx+++ b/apps/desktop/src/components/update-status.test.tsx@@ -6,7 +6,7 @@ import { I18nProvider, type Locale, TRANSLATIONS, type Translations } from '@/i1import { en } from '@/i18n/en'import type { UpdateApplyState } from '@/store/updates'-import { deriveUpdateStatus, VersionHero } from './update-status'+import { deriveUpdateStatus, UpdateStatusCard, VersionHero } from './update-status'// VersionHero is the shared About/overlay hero. Its module imports the real// updates store graph; mock it shallowly — these tests exercise the hero's@@ -207,6 +207,12 @@ describe('deriveUpdateStatus', () => {expect(view.line).toBe(en.updates.latestBody)})+ it('hides the client status card while a bundle restart is pending', () => {+ render(<UpdateStatusCard target="client" version={{ appVersion: '0.19.0', bundleSwapPending: true } as DesktopVersionInfo} />)++ expect(screen.queryByRole('button')).toBeNull()+ })+it('backend target says the backend is current, not "you"', () => {const view = deriveUpdateStatus({apply: IDLE_APPLY,diff --git a/apps/desktop/src/components/update-status.tsx b/apps/desktop/src/components/update-status.tsxindex 51abbdfe3ff..4fa94b60ae4 100644--- a/apps/desktop/src/components/update-status.tsx+++ b/apps/desktop/src/components/update-status.tsx@@ -327,11 +327,17 @@ function UpdateActions({ target, u, view }: UpdateActionsProps): ReactElement |*/export function UpdateStatusCard({showReleaseNotes = true,- target+ target,+ version}: {showReleaseNotes?: booleantarget: UpdateTarget+ version?: DesktopVersionInfo | null}): ReactElement {+ if (target === 'client' && version?.bundleSwapPending) {+ return <></>+ }+const { t } = useI18n()const u = t.updatesconst isBackend = target === 'backend'