Skip to content

The agent that grows with you

refactor(desktop): keep UpdateStatusCard under the CC ratchet

Teknium78e20d18e513
diff --git a/apps/desktop/src/components/update-status.tsx b/apps/desktop/src/components/update-status.tsx
index ffa968ef22f..69813455d37 100644
--- a/apps/desktop/src/components/update-status.tsx
+++ b/apps/desktop/src/components/update-status.tsx
@@ -333,6 +333,22 @@ export function UpdateStatusCard({
showReleaseNotes?: boolean
target: UpdateTarget
version: DesktopVersionInfo | null
+}): ReactElement {
+ // An installed bundle waiting only for a restart owns the client status; a
+ // stale check error beside it contradicts it (#128195).
+ if (target === 'client' && version?.bundleSwapPending) {
+ return <></>
+ }
+
+ return <UpdateStatusCardBody showReleaseNotes={showReleaseNotes} target={target} />
+}
+
+function UpdateStatusCardBody({
+ showReleaseNotes,
+ target
+}: {
+ showReleaseNotes: boolean
+ target: UpdateTarget
}): ReactElement {
const { t } = useI18n()
const u = t.updates
@@ -353,10 +369,6 @@ 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 }))