Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix: preserve app navigation during deep-link startup
Josué372efd533457
diff --git a/desktop-app/package-lock.json b/desktop-app/package-lock.jsonindex bf7593734..a86de9fcb 100644--- a/desktop-app/package-lock.json+++ b/desktop-app/package-lock.json@@ -1,12 +1,12 @@{"name": "evenfire",- "version": "0.1.320",+ "version": "0.1.321","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "evenfire",- "version": "0.1.320",+ "version": "0.1.321","license": "MPL-2.0","dependencies": {"@tanstack/react-query": "5.100.10",diff --git a/desktop-app/package.json b/desktop-app/package.jsonindex 424fb5ca2..ce2450ae7 100644--- a/desktop-app/package.json+++ b/desktop-app/package.json@@ -1,7 +1,7 @@{"name": "evenfire","productName": "Evenfire",- "version": "0.1.320",+ "version": "0.1.321","private": true,"license": "MPL-2.0","description": "Evenfire desktop client for secure agent and workflow access",diff --git a/desktop-app/ui/src/App.tsx b/desktop-app/ui/src/App.tsxindex 58c8f46ab..08bd650ae 100644--- a/desktop-app/ui/src/App.tsx+++ b/desktop-app/ui/src/App.tsx@@ -18,7 +18,11 @@ import { DESKTOP_ROUTES, SIDEBAR_COLLAPSED_KEY } from '@constants/navigation'import { THEME_STORAGE_KEY } from '@constants/theme'import { useAgentChatActionsValue } from '@hooks/useAgentChatActionsValue'import { useAppController } from '@hooks/useAppController'-import { resolveSandboxUiDeepLinkApp, toActiveSandboxUiApps } from '@lib/sandboxUiAppSelection'+import {+ canProcessSandboxUiDeepLinks,+ resolveSandboxUiDeepLinkApp,+ toActiveSandboxUiApps,+} from '@lib/sandboxUiAppSelection'import {getConversationOriginForAppLaunch,getConversationOriginForNavigation,@@ -336,7 +340,15 @@ export function App() {}, [])React.useEffect(() => {- if (!vm.isAuthenticated || pendingSandboxUiDeepLinks.length === 0) return+ if (+ !canProcessSandboxUiDeepLinks(+ vm.booting,+ vm.isAuthenticated,+ pendingSandboxUiDeepLinks.length+ )+ ) {+ return+ }const pending = pendingSandboxUiDeepLinks[0]if (!pending || processingSandboxUiDeepLinkIdRef.current !== null) returnprocessingSandboxUiDeepLinkIdRef.current = pending.link.id@@ -379,6 +391,7 @@ export function App() {}, [launchSandboxUiApp,pendingSandboxUiDeepLinks,+ vm.booting,vm.currentTeamId,vm.handleEnsureTeamContext,vm.isAuthenticated,diff --git a/desktop-app/ui/src/lib/__tests__/sandboxUiAppSelection.test.ts b/desktop-app/ui/src/lib/__tests__/sandboxUiAppSelection.test.tsindex f6b5382f6..b84ff903c 100644--- a/desktop-app/ui/src/lib/__tests__/sandboxUiAppSelection.test.ts+++ b/desktop-app/ui/src/lib/__tests__/sandboxUiAppSelection.test.ts@@ -1,5 +1,9 @@import { describe, expect, it } from 'vitest'-import { resolveSandboxUiDeepLinkApp, toActiveSandboxUiApps } from '@lib/sandboxUiAppSelection'+import {+ canProcessSandboxUiDeepLinks,+ resolveSandboxUiDeepLinkApp,+ toActiveSandboxUiApps,+} from '@lib/sandboxUiAppSelection'const apps = [{@@ -19,6 +23,11 @@ const apps = []describe('sandbox UI app selection', () => {+ it('waits for startup hydration before processing a queued deep link', () => {+ expect(canProcessSandboxUiDeepLinks(true, true, 1)).toBe(false)+ expect(canProcessSandboxUiDeepLinks(false, true, 1)).toBe(true)+ })+it('keeps provisioning apps out of the app picker', () => {expect(toActiveSandboxUiApps(apps)).toEqual([{diff --git a/desktop-app/ui/src/lib/sandboxUiAppSelection.ts b/desktop-app/ui/src/lib/sandboxUiAppSelection.tsindex b500dd442..178fe0725 100644--- a/desktop-app/ui/src/lib/sandboxUiAppSelection.ts+++ b/desktop-app/ui/src/lib/sandboxUiAppSelection.ts@@ -17,6 +17,14 @@ export function toActiveSandboxUiApps(apps: SandboxUiAppListing[]): ActiveSandboreturn apps.filter(app => app.ready).map(toActiveSandboxUiApp)}+export function canProcessSandboxUiDeepLinks(+ booting: boolean,+ isAuthenticated: boolean,+ pendingLinkCount: number+): boolean {+ return !booting && isAuthenticated && pendingLinkCount > 0+}+export function resolveSandboxUiDeepLinkApp(apps: SandboxUiAppListing[],appRef: string