From c5497e9823b10564e89943aaeee5fea7041a6993 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Fri, 3 Apr 2026 19:55:47 +0300 Subject: [PATCH] perf: remove idle background polling hooks --- packages/ui/src/App.tsx | 47 ++++++++----------- .../ui/src/components/layout/MainLayout.tsx | 2 +- 2 files changed, 21 insertions(+), 28 deletions(-) diff --git a/packages/ui/src/App.tsx b/packages/ui/src/App.tsx index 8f52f2d5..11156d9c 100644 --- a/packages/ui/src/App.tsx +++ b/packages/ui/src/App.tsx @@ -19,8 +19,6 @@ import { usePushVisibilityBeacon } from '@/hooks/usePushVisibilityBeacon'; import { usePwaManifestSync } from '@/hooks/usePwaManifestSync'; import { usePwaInstallPrompt } from '@/hooks/usePwaInstallPrompt'; import { useWindowTitle } from '@/hooks/useWindowTitle'; -import { useGitHubPrBackgroundTracking } from '@/hooks/useGitHubPrBackgroundTracking'; -import { GitPollingProvider } from '@/hooks/useGitPolling'; import { useConfigStore } from '@/stores/useConfigStore'; import { hasModifier } from '@/lib/utils'; import { isDesktopLocalOriginActive, isDesktopShell } from '@/lib/desktop'; @@ -142,12 +140,9 @@ const SyncOptimisticBridge: React.FC = () => { return null; }; -function SyncAppEffects({ apis, embeddedBackgroundWorkEnabled }: { - apis: RuntimeAPIs; +function SyncAppEffects({ embeddedBackgroundWorkEnabled }: { embeddedBackgroundWorkEnabled: boolean; }) { - const githubApi = embeddedBackgroundWorkEnabled ? apis.github : undefined; - useGitHubPrBackgroundTracking(githubApi, apis.git); usePwaManifestSync(); useSessionAutoCleanup(embeddedBackgroundWorkEnabled); useQueuedMessageAutoSend(embeddedBackgroundWorkEnabled); @@ -532,7 +527,7 @@ function App({ apis }: AppProps) {
- +
@@ -557,7 +552,7 @@ function App({ apis }: AppProps) {
- +
@@ -575,7 +570,7 @@ function App({ apis }: AppProps) {
- +
@@ -591,24 +586,22 @@ function App({ apis }: AppProps) { - - - - -
- - - - - - {showMemoryDebug && ( - setShowMemoryDebug(false)} /> - )} -
-
-
-
-
+ + + +
+ + + + + + {showMemoryDebug && ( + setShowMemoryDebug(false)} /> + )} +
+
+
+
diff --git a/packages/ui/src/components/layout/MainLayout.tsx b/packages/ui/src/components/layout/MainLayout.tsx index b13f8bf1..637e2c7d 100644 --- a/packages/ui/src/components/layout/MainLayout.tsx +++ b/packages/ui/src/components/layout/MainLayout.tsx @@ -948,7 +948,7 @@ export const MainLayout: React.FC = () => { - + {isBottomTerminalOpen ? : null}