Skip to content

The agent that grows with you

fix(desktop): keep pending-restart card hooks unconditional

Yuan Li85e87a3813c2
diff --git a/apps/desktop/src/app/settings/about-settings.tsx b/apps/desktop/src/app/settings/about-settings.tsx
index b7312c78abd..35a23affafe 100644
--- a/apps/desktop/src/app/settings/about-settings.tsx
+++ b/apps/desktop/src/app/settings/about-settings.tsx
@@ -60,7 +60,7 @@ function AppUpdatesSettings({ includeUninstall }: AppUpdatesSettingsProps): Reac
<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" />}
+ {remote && <UpdateStatusCard showReleaseNotes={false} target="backend" version={version} />}
</div>
{version && <VersionDetails version={version} />}
{includeUninstall && <UninstallSection />}
diff --git a/apps/desktop/src/components/update-status.tsx b/apps/desktop/src/components/update-status.tsx
index 4fa94b60ae4..ffa968ef22f 100644
--- a/apps/desktop/src/components/update-status.tsx
+++ b/apps/desktop/src/components/update-status.tsx
@@ -332,12 +332,8 @@ export function UpdateStatusCard({
}: {
showReleaseNotes?: boolean
target: UpdateTarget
- version?: DesktopVersionInfo | null
+ version: DesktopVersionInfo | null
}): ReactElement {
- if (target === 'client' && version?.bundleSwapPending) {
- return <></>
- }
-
const { t } = useI18n()
const u = t.updates
const isBackend = target === 'backend'
@@ -357,6 +353,10 @@ export function UpdateStatusCard({
u
})
+ if (target === 'client' && version?.bundleSwapPending) {
+ return <></>
+ }
+
const handleCheck = async (): Promise<void> => {
setJustChecked(false)
const next = await (isBackend ? checkBackendUpdates({ force: true }) : checkUpdates({ force: true }))