From bf10349ebd013ecf850e4da604ccc6abc256ed05 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Fri, 14 Aug 2026 11:10:11 -0700 Subject: [PATCH] chore: lint fixes (blank line, useMemo dep) --- apps/desktop/electron/main.ts | 1 + apps/desktop/electron/update-count.ts | 1 + apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts index b6e64feb1f..714643c3cc 100644 --- a/apps/desktop/electron/main.ts +++ b/apps/desktop/electron/main.ts @@ -2579,6 +2579,7 @@ async function checkUpdates() { // compare API when possible; otherwise behind stays null ("update // available, count unknown") and updateAvailable carries the signal. const upToDate = Boolean(currentSha && currentSha === targetSha) + const sshBehind = upToDate ? 0 : await fetchCompareBehindCount({ currentSha, originUrl: OFFICIAL_REPO_HTTPS_URL, targetSha }) diff --git a/apps/desktop/electron/update-count.ts b/apps/desktop/electron/update-count.ts index d1b8630a06..adf19f9d14 100644 --- a/apps/desktop/electron/update-count.ts +++ b/apps/desktop/electron/update-count.ts @@ -63,6 +63,7 @@ function compareApiUrl({ currentSha, originUrl, targetSha }) { function canonicalRemoteForCompare(originUrl) { const value = String(originUrl || '').trim() + const match = /^git@github\.com:([^/]+\/[^/]+?)(?:\.git)?\/?$/i.exec(value) || /^(?:ssh:\/\/git@|https:\/\/|http:\/\/)github\.com\/([^/]+\/[^/]+?)(?:\.git)?\/?$/i.exec(value) diff --git a/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx b/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx index 3a81097862..26c33b094f 100644 --- a/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx +++ b/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx @@ -310,7 +310,8 @@ export function useStatusbarItems({ updateApply.stage, updateStatus?.behind, updateStatus?.branch, - updateStatus?.currentSha + updateStatus?.currentSha, + updateStatus?.updateAvailable ]) const backendVersionItem = useMemo(() => {