From 8f3c8e97ee393f6e2536764866c9bea732f9c7d6 Mon Sep 17 00:00:00 2001 From: Surajsm60720 <1ds22is166@dsce.edu.in> Date: Wed, 18 Nov 2026 17:51:58 +0530 Subject: [PATCH 1/2] fix(web): bump TanStack Router past the _nonReactive preload crash Move @tanstack/react-router to 1.170.46 and @tanstack/router-plugin to 1.169.0, which bring @tanstack/router-core 1.171.39. Core 1.171.16 (TanStack/router#7805) rewrote match loading and removed the _nonReactive/loadRouteMatch path that crashed when an in-flight preload's match was evicted (TanStack/router#7759). The rewrite makes navigate a no-op when the router thinks it is on the server, so Node unit tests that drive a memory router now pass isServer: false with an explicit origin. Redirects are followed inside navigate and router.state.redirect is gone, so the settings tests no longer follow it by hand. routeTree.gen.ts is the new generator's import order. Deny the agent skills react-router now ships, as we already do for router-plugin. Fixes #483 Co-Authored-By: Claude Opus 5.5 --- apps/web/package.json | 4 +- .../settings/settingsScopeNavigation.test.ts | 8 +- .../lib/assistantCitationNavigation.test.ts | 3 + apps/web/src/routeTree.gen.ts | 1110 ++++++++--------- apps/web/src/threadRoutes.test.ts | 3 + pnpm-lock.yaml | 206 ++- pnpm-workspace.yaml | 2 + 7 files changed, 712 insertions(+), 624 deletions(-) diff --git a/apps/web/package.json b/apps/web/package.json index 1e630227b9236..09521d1fe7b9a 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -42,7 +42,7 @@ "@t3tools/secret-provider-onepassword": "workspace:*", "@t3tools/shared": "workspace:*", "@tanstack/react-pacer": "^0.19.4", - "@tanstack/react-router": "^1.160.2", + "@tanstack/react-router": "^1.170.46", "@tiptap/core": "^3.31.3", "@tiptap/extension-blockquote": "^3.31.3", "@tiptap/extension-bold": "^3.31.3", @@ -99,7 +99,7 @@ "@effect/platform-node": "catalog:", "@effect/vitest": "catalog:", "@tailwindcss/vite": "^4.0.0", - "@tanstack/router-plugin": "^1.161.0", + "@tanstack/router-plugin": "^1.169.0", "@types/canvas-confetti": "1.9.0", "@types/compression": "^1.8.1", "@types/culori": "^4.0.1", diff --git a/apps/web/src/components/settings/settingsScopeNavigation.test.ts b/apps/web/src/components/settings/settingsScopeNavigation.test.ts index a749bd45422b8..3ab405ab5fc3b 100644 --- a/apps/web/src/components/settings/settingsScopeNavigation.test.ts +++ b/apps/web/src/components/settings/settingsScopeNavigation.test.ts @@ -77,6 +77,9 @@ function createSettingsRouter(initialEntry = "/settings/general") { legacyProject, ]), history: createMemoryHistory({ initialEntries: [initialEntry] }), + // Without a document the router runs as SSR, where navigate is a no-op. + isServer: false, + origin: "http://localhost", }); } @@ -122,7 +125,6 @@ describe("settings scope navigation", () => { }); expect(router.state.location.pathname).toBe(to); expect(router.state.location.search).toEqual(regroupedCheckout); - expect(router.state.redirect).toBeUndefined(); await router.navigate({ from: "/settings", @@ -220,8 +222,6 @@ describe("settings scope navigation", () => { to: "/projects/$projectKey", params: { projectKey: "legacy-project" }, }); - expect(router.state.redirect).not.toBeUndefined(); - await router.navigate(router.state.redirect!.options); expect(router.state.location.pathname).toBe("/settings/projects"); expect(router.state.location.search).toEqual({ project: "legacy-project" }); }); @@ -229,8 +229,6 @@ describe("settings scope navigation", () => { it("keeps scope through the settings index redirect", async () => { const router = createSettingsRouter(); await router.navigate({ to: "/settings", search: { machine: "remote-server" } }); - expect(router.state.redirect).not.toBeUndefined(); - await router.navigate(router.state.redirect!.options); expect(router.state.location.pathname).toBe("/settings/general"); expect(router.state.location.search).toEqual({ machine: "remote-server" }); }); diff --git a/apps/web/src/lib/assistantCitationNavigation.test.ts b/apps/web/src/lib/assistantCitationNavigation.test.ts index 0f1816c2db85a..9c5027991dcd8 100644 --- a/apps/web/src/lib/assistantCitationNavigation.test.ts +++ b/apps/web/src/lib/assistantCitationNavigation.test.ts @@ -33,6 +33,9 @@ function createCitationRouter(initialEntry = "/environment-one/thread-one") { return createRouter({ routeTree: root.addChildren([thread]), history: createMemoryHistory({ initialEntries: [initialEntry] }), + // Without a document the router runs as SSR, where navigate is a no-op. + isServer: false, + origin: "http://localhost", }); } diff --git a/apps/web/src/routeTree.gen.ts b/apps/web/src/routeTree.gen.ts index 568195430cfee..7a6c20da6f10b 100644 --- a/apps/web/src/routeTree.gen.ts +++ b/apps/web/src/routeTree.gen.ts @@ -9,83 +9,82 @@ // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. import { Route as rootRouteImport } from './routes/__root' -import { Route as WelcomeRouteImport } from './routes/welcome' -import { Route as PairRouteImport } from './routes/pair' -import { Route as GuestRouteImport } from './routes/guest' -import { Route as ConnectAgentRouteImport } from './routes/connect-agent' -import { Route as ConnectRouteImport } from './routes/connect' -import { Route as ApproveAgentRouteImport } from './routes/approve-agent' import { Route as ChatRouteImport } from './routes/_chat' +import { Route as ApproveAgentRouteImport } from './routes/approve-agent' +import { Route as ConnectRouteImport } from './routes/connect' +import { Route as ConnectAgentRouteImport } from './routes/connect-agent' +import { Route as GuestRouteImport } from './routes/guest' +import { Route as PairRouteImport } from './routes/pair' +import { Route as WelcomeRouteImport } from './routes/welcome' import { Route as ChatIndexRouteImport } from './routes/_chat.index' -import { Route as ProjectsProjectKeyRouteImport } from './routes/projects.$projectKey' -import { Route as KinInviteRouteImport } from './routes/kin.invite' -import { Route as ChatUsageRouteImport } from './routes/_chat.usage' -import { Route as ChatSettingsRouteImport } from './routes/_chat.settings' -import { Route as ChatPullRequestsRouteImport } from './routes/_chat.pull-requests' -import { Route as ChatNewRouteImport } from './routes/_chat.new' -import { Route as ChatKinRouteImport } from './routes/_chat.kin' import { Route as ChatIssuesRouteImport } from './routes/_chat.issues' +import { Route as ChatKinRouteImport } from './routes/_chat.kin' +import { Route as ChatNewRouteImport } from './routes/_chat.new' +import { Route as ChatPullRequestsRouteImport } from './routes/_chat.pull-requests' +import { Route as ChatSettingsRouteImport } from './routes/_chat.settings' +import { Route as ChatUsageRouteImport } from './routes/_chat.usage' +import { Route as KinInviteRouteImport } from './routes/kin.invite' +import { Route as ProjectsProjectKeyRouteImport } from './routes/projects.$projectKey' +import { Route as ChatEnvironmentIdThreadIdRouteImport } from './routes/_chat.$environmentId.$threadId' +import { Route as ChatDraftDraftIdRouteImport } from './routes/_chat.draft.$draftId' import { Route as ChatKinIndexRouteImport } from './routes/_chat.kin.index' -import { Route as ThreadsEnvironmentIdThreadIdRouteImport } from './routes/threads.$environmentId.$threadId' -import { Route as ChatSettingsWorktreesRouteImport } from './routes/_chat.settings.worktrees' -import { Route as ChatSettingsVoiceRouteImport } from './routes/_chat.settings.voice' -import { Route as ChatSettingsThreadsRouteImport } from './routes/_chat.settings.threads' -import { Route as ChatSettingsStorageRouteImport } from './routes/_chat.settings.storage' -import { Route as ChatSettingsSourceControlRouteImport } from './routes/_chat.settings.source-control' -import { Route as ChatSettingsSnapShotRouteImport } from './routes/_chat.settings.snap-shot' -import { Route as ChatSettingsSecretsRouteImport } from './routes/_chat.settings.secrets' -import { Route as ChatSettingsScheduledTasksRouteImport } from './routes/_chat.settings.scheduled-tasks' -import { Route as ChatSettingsProvidersRouteImport } from './routes/_chat.settings.providers' -import { Route as ChatSettingsProjectsRouteImport } from './routes/_chat.settings.projects' -import { Route as ChatSettingsOpenSourceLicensesRouteImport } from './routes/_chat.settings.open-source-licenses' -import { Route as ChatSettingsMaintenanceRouteImport } from './routes/_chat.settings.maintenance' -import { Route as ChatSettingsLabsRouteImport } from './routes/_chat.settings.labs' -import { Route as ChatSettingsKinConnectionsRouteImport } from './routes/_chat.settings.kin-connections' -import { Route as ChatSettingsKeybindingsRouteImport } from './routes/_chat.settings.keybindings' -import { Route as ChatSettingsIntegrationsRouteImport } from './routes/_chat.settings.integrations' -import { Route as ChatSettingsGeneralRouteImport } from './routes/_chat.settings.general' -import { Route as ChatSettingsDiffsRouteImport } from './routes/_chat.settings.diffs' -import { Route as ChatSettingsDiagnosticsRouteImport } from './routes/_chat.settings.diagnostics' -import { Route as ChatSettingsDevicesRouteImport } from './routes/_chat.settings.devices' -import { Route as ChatSettingsConnectionsRouteImport } from './routes/_chat.settings.connections' -import { Route as ChatSettingsCompanyRouteImport } from './routes/_chat.settings.company' -import { Route as ChatSettingsCheckInsRouteImport } from './routes/_chat.settings.check-ins' -import { Route as ChatSettingsChatRouteImport } from './routes/_chat.settings.chat' -import { Route as ChatSettingsBrowserRouteImport } from './routes/_chat.settings.browser' -import { Route as ChatSettingsBetaRouteImport } from './routes/_chat.settings.beta' -import { Route as ChatSettingsArchivedRouteImport } from './routes/_chat.settings.archived' -import { Route as ChatSettingsApprovalsRouteImport } from './routes/_chat.settings.approvals' -import { Route as ChatSettingsAppearanceRouteImport } from './routes/_chat.settings.appearance' -import { Route as ChatSettingsAccessRouteImport } from './routes/_chat.settings.access' import { Route as ChatSettingsAboutRouteImport } from './routes/_chat.settings.about' -import { Route as ChatDraftDraftIdRouteImport } from './routes/_chat.draft.$draftId' -import { Route as ChatEnvironmentIdThreadIdRouteImport } from './routes/_chat.$environmentId.$threadId' -import { Route as ChatKinEnvironmentIdOrgIdWorkRouteImport } from './routes/_chat.kin.$environmentId.$orgId.work' -import { Route as ChatKinEnvironmentIdOrgIdTeamRouteImport } from './routes/_chat.kin.$environmentId.$orgId.team' -import { Route as ChatKinEnvironmentIdOrgIdSettingsRouteImport } from './routes/_chat.kin.$environmentId.$orgId.settings' -import { Route as ChatKinEnvironmentIdOrgIdMemoryRouteImport } from './routes/_chat.kin.$environmentId.$orgId.memory' -import { Route as ChatKinEnvironmentIdOrgIdPlacesRouteImport } from './routes/_chat.kin.$environmentId.$orgId._places' +import { Route as ChatSettingsAccessRouteImport } from './routes/_chat.settings.access' +import { Route as ChatSettingsAppearanceRouteImport } from './routes/_chat.settings.appearance' +import { Route as ChatSettingsApprovalsRouteImport } from './routes/_chat.settings.approvals' +import { Route as ChatSettingsArchivedRouteImport } from './routes/_chat.settings.archived' +import { Route as ChatSettingsBetaRouteImport } from './routes/_chat.settings.beta' +import { Route as ChatSettingsBrowserRouteImport } from './routes/_chat.settings.browser' +import { Route as ChatSettingsChatRouteImport } from './routes/_chat.settings.chat' +import { Route as ChatSettingsCheckInsRouteImport } from './routes/_chat.settings.check-ins' +import { Route as ChatSettingsCompanyRouteImport } from './routes/_chat.settings.company' +import { Route as ChatSettingsConnectionsRouteImport } from './routes/_chat.settings.connections' +import { Route as ChatSettingsDevicesRouteImport } from './routes/_chat.settings.devices' +import { Route as ChatSettingsDiagnosticsRouteImport } from './routes/_chat.settings.diagnostics' +import { Route as ChatSettingsDiffsRouteImport } from './routes/_chat.settings.diffs' +import { Route as ChatSettingsGeneralRouteImport } from './routes/_chat.settings.general' +import { Route as ChatSettingsIntegrationsRouteImport } from './routes/_chat.settings.integrations' +import { Route as ChatSettingsKeybindingsRouteImport } from './routes/_chat.settings.keybindings' +import { Route as ChatSettingsKinConnectionsRouteImport } from './routes/_chat.settings.kin-connections' +import { Route as ChatSettingsLabsRouteImport } from './routes/_chat.settings.labs' +import { Route as ChatSettingsMaintenanceRouteImport } from './routes/_chat.settings.maintenance' +import { Route as ChatSettingsOpenSourceLicensesRouteImport } from './routes/_chat.settings.open-source-licenses' +import { Route as ChatSettingsProjectsRouteImport } from './routes/_chat.settings.projects' +import { Route as ChatSettingsProvidersRouteImport } from './routes/_chat.settings.providers' +import { Route as ChatSettingsScheduledTasksRouteImport } from './routes/_chat.settings.scheduled-tasks' +import { Route as ChatSettingsSecretsRouteImport } from './routes/_chat.settings.secrets' +import { Route as ChatSettingsSnapShotRouteImport } from './routes/_chat.settings.snap-shot' +import { Route as ChatSettingsSourceControlRouteImport } from './routes/_chat.settings.source-control' +import { Route as ChatSettingsStorageRouteImport } from './routes/_chat.settings.storage' +import { Route as ChatSettingsThreadsRouteImport } from './routes/_chat.settings.threads' +import { Route as ChatSettingsVoiceRouteImport } from './routes/_chat.settings.voice' +import { Route as ChatSettingsWorktreesRouteImport } from './routes/_chat.settings.worktrees' +import { Route as ThreadsEnvironmentIdThreadIdRouteImport } from './routes/threads.$environmentId.$threadId' import { Route as ChatKinEnvironmentIdOrgIdChatIdRouteImport } from './routes/_chat.kin.$environmentId.$orgId.$chatId' +import { Route as ChatKinEnvironmentIdOrgIdPlacesRouteImport } from './routes/_chat.kin.$environmentId.$orgId._places' +import { Route as ChatKinEnvironmentIdOrgIdMemoryRouteImport } from './routes/_chat.kin.$environmentId.$orgId.memory' +import { Route as ChatKinEnvironmentIdOrgIdSettingsRouteImport } from './routes/_chat.kin.$environmentId.$orgId.settings' +import { Route as ChatKinEnvironmentIdOrgIdTeamRouteImport } from './routes/_chat.kin.$environmentId.$orgId.team' +import { Route as ChatKinEnvironmentIdOrgIdWorkRouteImport } from './routes/_chat.kin.$environmentId.$orgId.work' +import { Route as ChatKinEnvironmentIdOrgIdPlacesClientsRouteImport } from './routes/_chat.kin.$environmentId.$orgId._places.clients' +import { Route as ChatKinEnvironmentIdOrgIdPlacesDocsRouteImport } from './routes/_chat.kin.$environmentId.$orgId._places.docs' +import { Route as ChatKinEnvironmentIdOrgIdPlacesMoneyRouteImport } from './routes/_chat.kin.$environmentId.$orgId._places.money' +import { Route as ChatKinEnvironmentIdOrgIdPlacesTasksRouteImport } from './routes/_chat.kin.$environmentId.$orgId._places.tasks' import { Route as ChatKinEnvironmentIdOrgIdSettingsIndexRouteImport } from './routes/_chat.kin.$environmentId.$orgId.settings.index' import { Route as ChatKinEnvironmentIdOrgIdSettingsPageRouteImport } from './routes/_chat.kin.$environmentId.$orgId.settings.$page' -import { Route as ChatKinEnvironmentIdOrgIdPlacesTasksRouteImport } from './routes/_chat.kin.$environmentId.$orgId._places.tasks' -import { Route as ChatKinEnvironmentIdOrgIdPlacesMoneyRouteImport } from './routes/_chat.kin.$environmentId.$orgId._places.money' -import { Route as ChatKinEnvironmentIdOrgIdPlacesDocsRouteImport } from './routes/_chat.kin.$environmentId.$orgId._places.docs' -import { Route as ChatKinEnvironmentIdOrgIdPlacesClientsRouteImport } from './routes/_chat.kin.$environmentId.$orgId._places.clients' -const WelcomeRoute = WelcomeRouteImport.update({ - id: '/welcome', - path: '/welcome', +const ChatRoute = ChatRouteImport.update({ + id: '/_chat', getParentRoute: () => rootRouteImport, } as any) -const PairRoute = PairRouteImport.update({ - id: '/pair', - path: '/pair', +const ApproveAgentRoute = ApproveAgentRouteImport.update({ + id: '/approve-agent', + path: '/approve-agent', getParentRoute: () => rootRouteImport, } as any) -const GuestRoute = GuestRouteImport.update({ - id: '/guest', - path: '/guest', +const ConnectRoute = ConnectRouteImport.update({ + id: '/connect', + path: '/connect', getParentRoute: () => rootRouteImport, } as any) const ConnectAgentRoute = ConnectAgentRouteImport.update({ @@ -93,18 +92,19 @@ const ConnectAgentRoute = ConnectAgentRouteImport.update({ path: '/connect-agent', getParentRoute: () => rootRouteImport, } as any) -const ConnectRoute = ConnectRouteImport.update({ - id: '/connect', - path: '/connect', +const GuestRoute = GuestRouteImport.update({ + id: '/guest', + path: '/guest', getParentRoute: () => rootRouteImport, } as any) -const ApproveAgentRoute = ApproveAgentRouteImport.update({ - id: '/approve-agent', - path: '/approve-agent', +const PairRoute = PairRouteImport.update({ + id: '/pair', + path: '/pair', getParentRoute: () => rootRouteImport, } as any) -const ChatRoute = ChatRouteImport.update({ - id: '/_chat', +const WelcomeRoute = WelcomeRouteImport.update({ + id: '/welcome', + path: '/welcome', getParentRoute: () => rootRouteImport, } as any) const ChatIndexRoute = ChatIndexRouteImport.update({ @@ -112,24 +112,19 @@ const ChatIndexRoute = ChatIndexRouteImport.update({ path: '/', getParentRoute: () => ChatRoute, } as any) -const ProjectsProjectKeyRoute = ProjectsProjectKeyRouteImport.update({ - id: '/projects/$projectKey', - path: '/projects/$projectKey', - getParentRoute: () => rootRouteImport, -} as any) -const KinInviteRoute = KinInviteRouteImport.update({ - id: '/kin/invite', - path: '/kin/invite', - getParentRoute: () => rootRouteImport, +const ChatIssuesRoute = ChatIssuesRouteImport.update({ + id: '/issues', + path: '/issues', + getParentRoute: () => ChatRoute, } as any) -const ChatUsageRoute = ChatUsageRouteImport.update({ - id: '/usage', - path: '/usage', +const ChatKinRoute = ChatKinRouteImport.update({ + id: '/kin', + path: '/kin', getParentRoute: () => ChatRoute, } as any) -const ChatSettingsRoute = ChatSettingsRouteImport.update({ - id: '/settings', - path: '/settings', +const ChatNewRoute = ChatNewRouteImport.update({ + id: '/new', + path: '/new', getParentRoute: () => ChatRoute, } as any) const ChatPullRequestsRoute = ChatPullRequestsRouteImport.update({ @@ -137,19 +132,35 @@ const ChatPullRequestsRoute = ChatPullRequestsRouteImport.update({ path: '/pull-requests', getParentRoute: () => ChatRoute, } as any) -const ChatNewRoute = ChatNewRouteImport.update({ - id: '/new', - path: '/new', +const ChatSettingsRoute = ChatSettingsRouteImport.update({ + id: '/settings', + path: '/settings', getParentRoute: () => ChatRoute, } as any) -const ChatKinRoute = ChatKinRouteImport.update({ - id: '/kin', - path: '/kin', +const ChatUsageRoute = ChatUsageRouteImport.update({ + id: '/usage', + path: '/usage', getParentRoute: () => ChatRoute, } as any) -const ChatIssuesRoute = ChatIssuesRouteImport.update({ - id: '/issues', - path: '/issues', +const KinInviteRoute = KinInviteRouteImport.update({ + id: '/kin/invite', + path: '/kin/invite', + getParentRoute: () => rootRouteImport, +} as any) +const ProjectsProjectKeyRoute = ProjectsProjectKeyRouteImport.update({ + id: '/projects/$projectKey', + path: '/projects/$projectKey', + getParentRoute: () => rootRouteImport, +} as any) +const ChatEnvironmentIdThreadIdRoute = + ChatEnvironmentIdThreadIdRouteImport.update({ + id: '/$environmentId/$threadId', + path: '/$environmentId/$threadId', + getParentRoute: () => ChatRoute, + } as any) +const ChatDraftDraftIdRoute = ChatDraftDraftIdRouteImport.update({ + id: '/draft/$draftId', + path: '/draft/$draftId', getParentRoute: () => ChatRoute, } as any) const ChatKinIndexRoute = ChatKinIndexRouteImport.update({ @@ -157,105 +168,64 @@ const ChatKinIndexRoute = ChatKinIndexRouteImport.update({ path: '/', getParentRoute: () => ChatKinRoute, } as any) -const ThreadsEnvironmentIdThreadIdRoute = - ThreadsEnvironmentIdThreadIdRouteImport.update({ - id: '/threads/$environmentId/$threadId', - path: '/threads/$environmentId/$threadId', - getParentRoute: () => rootRouteImport, - } as any) -const ChatSettingsWorktreesRoute = ChatSettingsWorktreesRouteImport.update({ - id: '/worktrees', - path: '/worktrees', +const ChatSettingsAboutRoute = ChatSettingsAboutRouteImport.update({ + id: '/about', + path: '/about', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsVoiceRoute = ChatSettingsVoiceRouteImport.update({ - id: '/voice', - path: '/voice', +const ChatSettingsAccessRoute = ChatSettingsAccessRouteImport.update({ + id: '/access', + path: '/access', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsThreadsRoute = ChatSettingsThreadsRouteImport.update({ - id: '/threads', - path: '/threads', +const ChatSettingsAppearanceRoute = ChatSettingsAppearanceRouteImport.update({ + id: '/appearance', + path: '/appearance', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsStorageRoute = ChatSettingsStorageRouteImport.update({ - id: '/storage', - path: '/storage', +const ChatSettingsApprovalsRoute = ChatSettingsApprovalsRouteImport.update({ + id: '/approvals', + path: '/approvals', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsSourceControlRoute = - ChatSettingsSourceControlRouteImport.update({ - id: '/source-control', - path: '/source-control', - getParentRoute: () => ChatSettingsRoute, - } as any) -const ChatSettingsSnapShotRoute = ChatSettingsSnapShotRouteImport.update({ - id: '/snap-shot', - path: '/snap-shot', +const ChatSettingsArchivedRoute = ChatSettingsArchivedRouteImport.update({ + id: '/archived', + path: '/archived', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsSecretsRoute = ChatSettingsSecretsRouteImport.update({ - id: '/secrets', - path: '/secrets', +const ChatSettingsBetaRoute = ChatSettingsBetaRouteImport.update({ + id: '/beta', + path: '/beta', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsScheduledTasksRoute = - ChatSettingsScheduledTasksRouteImport.update({ - id: '/scheduled-tasks', - path: '/scheduled-tasks', - getParentRoute: () => ChatSettingsRoute, - } as any) -const ChatSettingsProvidersRoute = ChatSettingsProvidersRouteImport.update({ - id: '/providers', - path: '/providers', - getParentRoute: () => ChatSettingsRoute, -} as any) -const ChatSettingsProjectsRoute = ChatSettingsProjectsRouteImport.update({ - id: '/projects', - path: '/projects', +const ChatSettingsBrowserRoute = ChatSettingsBrowserRouteImport.update({ + id: '/browser', + path: '/browser', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsOpenSourceLicensesRoute = - ChatSettingsOpenSourceLicensesRouteImport.update({ - id: '/open-source-licenses', - path: '/open-source-licenses', - getParentRoute: () => ChatSettingsRoute, - } as any) -const ChatSettingsMaintenanceRoute = ChatSettingsMaintenanceRouteImport.update({ - id: '/maintenance', - path: '/maintenance', +const ChatSettingsChatRoute = ChatSettingsChatRouteImport.update({ + id: '/chat', + path: '/chat', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsLabsRoute = ChatSettingsLabsRouteImport.update({ - id: '/labs', - path: '/labs', +const ChatSettingsCheckInsRoute = ChatSettingsCheckInsRouteImport.update({ + id: '/check-ins', + path: '/check-ins', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsKinConnectionsRoute = - ChatSettingsKinConnectionsRouteImport.update({ - id: '/kin-connections', - path: '/kin-connections', - getParentRoute: () => ChatSettingsRoute, - } as any) -const ChatSettingsKeybindingsRoute = ChatSettingsKeybindingsRouteImport.update({ - id: '/keybindings', - path: '/keybindings', +const ChatSettingsCompanyRoute = ChatSettingsCompanyRouteImport.update({ + id: '/company', + path: '/company', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsIntegrationsRoute = - ChatSettingsIntegrationsRouteImport.update({ - id: '/integrations', - path: '/integrations', - getParentRoute: () => ChatSettingsRoute, - } as any) -const ChatSettingsGeneralRoute = ChatSettingsGeneralRouteImport.update({ - id: '/general', - path: '/general', +const ChatSettingsConnectionsRoute = ChatSettingsConnectionsRouteImport.update({ + id: '/connections', + path: '/connections', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsDiffsRoute = ChatSettingsDiffsRouteImport.update({ - id: '/diffs', - path: '/diffs', +const ChatSettingsDevicesRoute = ChatSettingsDevicesRouteImport.update({ + id: '/devices', + path: '/devices', getParentRoute: () => ChatSettingsRoute, } as any) const ChatSettingsDiagnosticsRoute = ChatSettingsDiagnosticsRouteImport.update({ @@ -263,87 +233,123 @@ const ChatSettingsDiagnosticsRoute = ChatSettingsDiagnosticsRouteImport.update({ path: '/diagnostics', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsDevicesRoute = ChatSettingsDevicesRouteImport.update({ - id: '/devices', - path: '/devices', +const ChatSettingsDiffsRoute = ChatSettingsDiffsRouteImport.update({ + id: '/diffs', + path: '/diffs', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsConnectionsRoute = ChatSettingsConnectionsRouteImport.update({ - id: '/connections', - path: '/connections', +const ChatSettingsGeneralRoute = ChatSettingsGeneralRouteImport.update({ + id: '/general', + path: '/general', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsCompanyRoute = ChatSettingsCompanyRouteImport.update({ - id: '/company', - path: '/company', +const ChatSettingsIntegrationsRoute = + ChatSettingsIntegrationsRouteImport.update({ + id: '/integrations', + path: '/integrations', + getParentRoute: () => ChatSettingsRoute, + } as any) +const ChatSettingsKeybindingsRoute = ChatSettingsKeybindingsRouteImport.update({ + id: '/keybindings', + path: '/keybindings', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsCheckInsRoute = ChatSettingsCheckInsRouteImport.update({ - id: '/check-ins', - path: '/check-ins', +const ChatSettingsKinConnectionsRoute = + ChatSettingsKinConnectionsRouteImport.update({ + id: '/kin-connections', + path: '/kin-connections', + getParentRoute: () => ChatSettingsRoute, + } as any) +const ChatSettingsLabsRoute = ChatSettingsLabsRouteImport.update({ + id: '/labs', + path: '/labs', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsChatRoute = ChatSettingsChatRouteImport.update({ - id: '/chat', - path: '/chat', +const ChatSettingsMaintenanceRoute = ChatSettingsMaintenanceRouteImport.update({ + id: '/maintenance', + path: '/maintenance', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsBrowserRoute = ChatSettingsBrowserRouteImport.update({ - id: '/browser', - path: '/browser', +const ChatSettingsOpenSourceLicensesRoute = + ChatSettingsOpenSourceLicensesRouteImport.update({ + id: '/open-source-licenses', + path: '/open-source-licenses', + getParentRoute: () => ChatSettingsRoute, + } as any) +const ChatSettingsProjectsRoute = ChatSettingsProjectsRouteImport.update({ + id: '/projects', + path: '/projects', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsBetaRoute = ChatSettingsBetaRouteImport.update({ - id: '/beta', - path: '/beta', +const ChatSettingsProvidersRoute = ChatSettingsProvidersRouteImport.update({ + id: '/providers', + path: '/providers', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsArchivedRoute = ChatSettingsArchivedRouteImport.update({ - id: '/archived', - path: '/archived', +const ChatSettingsScheduledTasksRoute = + ChatSettingsScheduledTasksRouteImport.update({ + id: '/scheduled-tasks', + path: '/scheduled-tasks', + getParentRoute: () => ChatSettingsRoute, + } as any) +const ChatSettingsSecretsRoute = ChatSettingsSecretsRouteImport.update({ + id: '/secrets', + path: '/secrets', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsApprovalsRoute = ChatSettingsApprovalsRouteImport.update({ - id: '/approvals', - path: '/approvals', +const ChatSettingsSnapShotRoute = ChatSettingsSnapShotRouteImport.update({ + id: '/snap-shot', + path: '/snap-shot', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsAppearanceRoute = ChatSettingsAppearanceRouteImport.update({ - id: '/appearance', - path: '/appearance', +const ChatSettingsSourceControlRoute = + ChatSettingsSourceControlRouteImport.update({ + id: '/source-control', + path: '/source-control', + getParentRoute: () => ChatSettingsRoute, + } as any) +const ChatSettingsStorageRoute = ChatSettingsStorageRouteImport.update({ + id: '/storage', + path: '/storage', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsAccessRoute = ChatSettingsAccessRouteImport.update({ - id: '/access', - path: '/access', +const ChatSettingsThreadsRoute = ChatSettingsThreadsRouteImport.update({ + id: '/threads', + path: '/threads', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatSettingsAboutRoute = ChatSettingsAboutRouteImport.update({ - id: '/about', - path: '/about', +const ChatSettingsVoiceRoute = ChatSettingsVoiceRouteImport.update({ + id: '/voice', + path: '/voice', getParentRoute: () => ChatSettingsRoute, } as any) -const ChatDraftDraftIdRoute = ChatDraftDraftIdRouteImport.update({ - id: '/draft/$draftId', - path: '/draft/$draftId', - getParentRoute: () => ChatRoute, +const ChatSettingsWorktreesRoute = ChatSettingsWorktreesRouteImport.update({ + id: '/worktrees', + path: '/worktrees', + getParentRoute: () => ChatSettingsRoute, } as any) -const ChatEnvironmentIdThreadIdRoute = - ChatEnvironmentIdThreadIdRouteImport.update({ - id: '/$environmentId/$threadId', - path: '/$environmentId/$threadId', - getParentRoute: () => ChatRoute, +const ThreadsEnvironmentIdThreadIdRoute = + ThreadsEnvironmentIdThreadIdRouteImport.update({ + id: '/threads/$environmentId/$threadId', + path: '/threads/$environmentId/$threadId', + getParentRoute: () => rootRouteImport, } as any) -const ChatKinEnvironmentIdOrgIdWorkRoute = - ChatKinEnvironmentIdOrgIdWorkRouteImport.update({ - id: '/$environmentId/$orgId/work', - path: '/$environmentId/$orgId/work', +const ChatKinEnvironmentIdOrgIdChatIdRoute = + ChatKinEnvironmentIdOrgIdChatIdRouteImport.update({ + id: '/$environmentId/$orgId/$chatId', + path: '/$environmentId/$orgId/$chatId', getParentRoute: () => ChatKinRoute, } as any) -const ChatKinEnvironmentIdOrgIdTeamRoute = - ChatKinEnvironmentIdOrgIdTeamRouteImport.update({ - id: '/$environmentId/$orgId/team', - path: '/$environmentId/$orgId/team', +const ChatKinEnvironmentIdOrgIdPlacesRoute = + ChatKinEnvironmentIdOrgIdPlacesRouteImport.update({ + id: '/$environmentId/$orgId/_places', + path: '/$environmentId/$orgId', + getParentRoute: () => ChatKinRoute, + } as any) +const ChatKinEnvironmentIdOrgIdMemoryRoute = + ChatKinEnvironmentIdOrgIdMemoryRouteImport.update({ + id: '/$environmentId/$orgId/memory', + path: '/$environmentId/$orgId/memory', getParentRoute: () => ChatKinRoute, } as any) const ChatKinEnvironmentIdOrgIdSettingsRoute = @@ -352,23 +358,41 @@ const ChatKinEnvironmentIdOrgIdSettingsRoute = path: '/$environmentId/$orgId/settings', getParentRoute: () => ChatKinRoute, } as any) -const ChatKinEnvironmentIdOrgIdMemoryRoute = - ChatKinEnvironmentIdOrgIdMemoryRouteImport.update({ - id: '/$environmentId/$orgId/memory', - path: '/$environmentId/$orgId/memory', +const ChatKinEnvironmentIdOrgIdTeamRoute = + ChatKinEnvironmentIdOrgIdTeamRouteImport.update({ + id: '/$environmentId/$orgId/team', + path: '/$environmentId/$orgId/team', getParentRoute: () => ChatKinRoute, } as any) -const ChatKinEnvironmentIdOrgIdPlacesRoute = - ChatKinEnvironmentIdOrgIdPlacesRouteImport.update({ - id: '/$environmentId/$orgId/_places', - path: '/$environmentId/$orgId', +const ChatKinEnvironmentIdOrgIdWorkRoute = + ChatKinEnvironmentIdOrgIdWorkRouteImport.update({ + id: '/$environmentId/$orgId/work', + path: '/$environmentId/$orgId/work', getParentRoute: () => ChatKinRoute, } as any) -const ChatKinEnvironmentIdOrgIdChatIdRoute = - ChatKinEnvironmentIdOrgIdChatIdRouteImport.update({ - id: '/$environmentId/$orgId/$chatId', - path: '/$environmentId/$orgId/$chatId', - getParentRoute: () => ChatKinRoute, +const ChatKinEnvironmentIdOrgIdPlacesClientsRoute = + ChatKinEnvironmentIdOrgIdPlacesClientsRouteImport.update({ + id: '/clients', + path: '/clients', + getParentRoute: () => ChatKinEnvironmentIdOrgIdPlacesRoute, + } as any) +const ChatKinEnvironmentIdOrgIdPlacesDocsRoute = + ChatKinEnvironmentIdOrgIdPlacesDocsRouteImport.update({ + id: '/docs', + path: '/docs', + getParentRoute: () => ChatKinEnvironmentIdOrgIdPlacesRoute, + } as any) +const ChatKinEnvironmentIdOrgIdPlacesMoneyRoute = + ChatKinEnvironmentIdOrgIdPlacesMoneyRouteImport.update({ + id: '/money', + path: '/money', + getParentRoute: () => ChatKinEnvironmentIdOrgIdPlacesRoute, + } as any) +const ChatKinEnvironmentIdOrgIdPlacesTasksRoute = + ChatKinEnvironmentIdOrgIdPlacesTasksRouteImport.update({ + id: '/tasks', + path: '/tasks', + getParentRoute: () => ChatKinEnvironmentIdOrgIdPlacesRoute, } as any) const ChatKinEnvironmentIdOrgIdSettingsIndexRoute = ChatKinEnvironmentIdOrgIdSettingsIndexRouteImport.update({ @@ -382,30 +406,6 @@ const ChatKinEnvironmentIdOrgIdSettingsPageRoute = path: '/$page', getParentRoute: () => ChatKinEnvironmentIdOrgIdSettingsRoute, } as any) -const ChatKinEnvironmentIdOrgIdPlacesTasksRoute = - ChatKinEnvironmentIdOrgIdPlacesTasksRouteImport.update({ - id: '/tasks', - path: '/tasks', - getParentRoute: () => ChatKinEnvironmentIdOrgIdPlacesRoute, - } as any) -const ChatKinEnvironmentIdOrgIdPlacesMoneyRoute = - ChatKinEnvironmentIdOrgIdPlacesMoneyRouteImport.update({ - id: '/money', - path: '/money', - getParentRoute: () => ChatKinEnvironmentIdOrgIdPlacesRoute, - } as any) -const ChatKinEnvironmentIdOrgIdPlacesDocsRoute = - ChatKinEnvironmentIdOrgIdPlacesDocsRouteImport.update({ - id: '/docs', - path: '/docs', - getParentRoute: () => ChatKinEnvironmentIdOrgIdPlacesRoute, - } as any) -const ChatKinEnvironmentIdOrgIdPlacesClientsRoute = - ChatKinEnvironmentIdOrgIdPlacesClientsRouteImport.update({ - id: '/clients', - path: '/clients', - getParentRoute: () => ChatKinEnvironmentIdOrgIdPlacesRoute, - } as any) export interface FileRoutesByFullPath { '/': typeof ChatIndexRoute @@ -808,25 +808,25 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/welcome': { - id: '/welcome' - path: '/welcome' - fullPath: '/welcome' - preLoaderRoute: typeof WelcomeRouteImport + '/_chat': { + id: '/_chat' + path: '' + fullPath: '/' + preLoaderRoute: typeof ChatRouteImport parentRoute: typeof rootRouteImport } - '/pair': { - id: '/pair' - path: '/pair' - fullPath: '/pair' - preLoaderRoute: typeof PairRouteImport + '/approve-agent': { + id: '/approve-agent' + path: '/approve-agent' + fullPath: '/approve-agent' + preLoaderRoute: typeof ApproveAgentRouteImport parentRoute: typeof rootRouteImport } - '/guest': { - id: '/guest' - path: '/guest' - fullPath: '/guest' - preLoaderRoute: typeof GuestRouteImport + '/connect': { + id: '/connect' + path: '/connect' + fullPath: '/connect' + preLoaderRoute: typeof ConnectRouteImport parentRoute: typeof rootRouteImport } '/connect-agent': { @@ -836,25 +836,25 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ConnectAgentRouteImport parentRoute: typeof rootRouteImport } - '/connect': { - id: '/connect' - path: '/connect' - fullPath: '/connect' - preLoaderRoute: typeof ConnectRouteImport + '/guest': { + id: '/guest' + path: '/guest' + fullPath: '/guest' + preLoaderRoute: typeof GuestRouteImport parentRoute: typeof rootRouteImport } - '/approve-agent': { - id: '/approve-agent' - path: '/approve-agent' - fullPath: '/approve-agent' - preLoaderRoute: typeof ApproveAgentRouteImport + '/pair': { + id: '/pair' + path: '/pair' + fullPath: '/pair' + preLoaderRoute: typeof PairRouteImport parentRoute: typeof rootRouteImport } - '/_chat': { - id: '/_chat' - path: '' - fullPath: '/' - preLoaderRoute: typeof ChatRouteImport + '/welcome': { + id: '/welcome' + path: '/welcome' + fullPath: '/welcome' + preLoaderRoute: typeof WelcomeRouteImport parentRoute: typeof rootRouteImport } '/_chat/': { @@ -864,32 +864,25 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ChatIndexRouteImport parentRoute: typeof ChatRoute } - '/projects/$projectKey': { - id: '/projects/$projectKey' - path: '/projects/$projectKey' - fullPath: '/projects/$projectKey' - preLoaderRoute: typeof ProjectsProjectKeyRouteImport - parentRoute: typeof rootRouteImport - } - '/kin/invite': { - id: '/kin/invite' - path: '/kin/invite' - fullPath: '/kin/invite' - preLoaderRoute: typeof KinInviteRouteImport - parentRoute: typeof rootRouteImport + '/_chat/issues': { + id: '/_chat/issues' + path: '/issues' + fullPath: '/issues' + preLoaderRoute: typeof ChatIssuesRouteImport + parentRoute: typeof ChatRoute } - '/_chat/usage': { - id: '/_chat/usage' - path: '/usage' - fullPath: '/usage' - preLoaderRoute: typeof ChatUsageRouteImport + '/_chat/kin': { + id: '/_chat/kin' + path: '/kin' + fullPath: '/kin' + preLoaderRoute: typeof ChatKinRouteImport parentRoute: typeof ChatRoute } - '/_chat/settings': { - id: '/_chat/settings' - path: '/settings' - fullPath: '/settings' - preLoaderRoute: typeof ChatSettingsRouteImport + '/_chat/new': { + id: '/_chat/new' + path: '/new' + fullPath: '/new' + preLoaderRoute: typeof ChatNewRouteImport parentRoute: typeof ChatRoute } '/_chat/pull-requests': { @@ -899,25 +892,46 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ChatPullRequestsRouteImport parentRoute: typeof ChatRoute } - '/_chat/new': { - id: '/_chat/new' - path: '/new' - fullPath: '/new' - preLoaderRoute: typeof ChatNewRouteImport + '/_chat/settings': { + id: '/_chat/settings' + path: '/settings' + fullPath: '/settings' + preLoaderRoute: typeof ChatSettingsRouteImport parentRoute: typeof ChatRoute } - '/_chat/kin': { - id: '/_chat/kin' - path: '/kin' - fullPath: '/kin' - preLoaderRoute: typeof ChatKinRouteImport + '/_chat/usage': { + id: '/_chat/usage' + path: '/usage' + fullPath: '/usage' + preLoaderRoute: typeof ChatUsageRouteImport parentRoute: typeof ChatRoute } - '/_chat/issues': { - id: '/_chat/issues' - path: '/issues' - fullPath: '/issues' - preLoaderRoute: typeof ChatIssuesRouteImport + '/kin/invite': { + id: '/kin/invite' + path: '/kin/invite' + fullPath: '/kin/invite' + preLoaderRoute: typeof KinInviteRouteImport + parentRoute: typeof rootRouteImport + } + '/projects/$projectKey': { + id: '/projects/$projectKey' + path: '/projects/$projectKey' + fullPath: '/projects/$projectKey' + preLoaderRoute: typeof ProjectsProjectKeyRouteImport + parentRoute: typeof rootRouteImport + } + '/_chat/$environmentId/$threadId': { + id: '/_chat/$environmentId/$threadId' + path: '/$environmentId/$threadId' + fullPath: '/$environmentId/$threadId' + preLoaderRoute: typeof ChatEnvironmentIdThreadIdRouteImport + parentRoute: typeof ChatRoute + } + '/_chat/draft/$draftId': { + id: '/_chat/draft/$draftId' + path: '/draft/$draftId' + fullPath: '/draft/$draftId' + preLoaderRoute: typeof ChatDraftDraftIdRouteImport parentRoute: typeof ChatRoute } '/_chat/kin/': { @@ -927,116 +941,109 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ChatKinIndexRouteImport parentRoute: typeof ChatKinRoute } - '/threads/$environmentId/$threadId': { - id: '/threads/$environmentId/$threadId' - path: '/threads/$environmentId/$threadId' - fullPath: '/threads/$environmentId/$threadId' - preLoaderRoute: typeof ThreadsEnvironmentIdThreadIdRouteImport - parentRoute: typeof rootRouteImport + '/_chat/settings/about': { + id: '/_chat/settings/about' + path: '/about' + fullPath: '/settings/about' + preLoaderRoute: typeof ChatSettingsAboutRouteImport + parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/worktrees': { - id: '/_chat/settings/worktrees' - path: '/worktrees' - fullPath: '/settings/worktrees' - preLoaderRoute: typeof ChatSettingsWorktreesRouteImport + '/_chat/settings/access': { + id: '/_chat/settings/access' + path: '/access' + fullPath: '/settings/access' + preLoaderRoute: typeof ChatSettingsAccessRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/voice': { - id: '/_chat/settings/voice' - path: '/voice' - fullPath: '/settings/voice' - preLoaderRoute: typeof ChatSettingsVoiceRouteImport + '/_chat/settings/appearance': { + id: '/_chat/settings/appearance' + path: '/appearance' + fullPath: '/settings/appearance' + preLoaderRoute: typeof ChatSettingsAppearanceRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/threads': { - id: '/_chat/settings/threads' - path: '/threads' - fullPath: '/settings/threads' - preLoaderRoute: typeof ChatSettingsThreadsRouteImport + '/_chat/settings/approvals': { + id: '/_chat/settings/approvals' + path: '/approvals' + fullPath: '/settings/approvals' + preLoaderRoute: typeof ChatSettingsApprovalsRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/storage': { - id: '/_chat/settings/storage' - path: '/storage' - fullPath: '/settings/storage' - preLoaderRoute: typeof ChatSettingsStorageRouteImport + '/_chat/settings/archived': { + id: '/_chat/settings/archived' + path: '/archived' + fullPath: '/settings/archived' + preLoaderRoute: typeof ChatSettingsArchivedRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/source-control': { - id: '/_chat/settings/source-control' - path: '/source-control' - fullPath: '/settings/source-control' - preLoaderRoute: typeof ChatSettingsSourceControlRouteImport + '/_chat/settings/beta': { + id: '/_chat/settings/beta' + path: '/beta' + fullPath: '/settings/beta' + preLoaderRoute: typeof ChatSettingsBetaRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/snap-shot': { - id: '/_chat/settings/snap-shot' - path: '/snap-shot' - fullPath: '/settings/snap-shot' - preLoaderRoute: typeof ChatSettingsSnapShotRouteImport + '/_chat/settings/browser': { + id: '/_chat/settings/browser' + path: '/browser' + fullPath: '/settings/browser' + preLoaderRoute: typeof ChatSettingsBrowserRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/secrets': { - id: '/_chat/settings/secrets' - path: '/secrets' - fullPath: '/settings/secrets' - preLoaderRoute: typeof ChatSettingsSecretsRouteImport + '/_chat/settings/chat': { + id: '/_chat/settings/chat' + path: '/chat' + fullPath: '/settings/chat' + preLoaderRoute: typeof ChatSettingsChatRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/scheduled-tasks': { - id: '/_chat/settings/scheduled-tasks' - path: '/scheduled-tasks' - fullPath: '/settings/scheduled-tasks' - preLoaderRoute: typeof ChatSettingsScheduledTasksRouteImport + '/_chat/settings/check-ins': { + id: '/_chat/settings/check-ins' + path: '/check-ins' + fullPath: '/settings/check-ins' + preLoaderRoute: typeof ChatSettingsCheckInsRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/providers': { - id: '/_chat/settings/providers' - path: '/providers' - fullPath: '/settings/providers' - preLoaderRoute: typeof ChatSettingsProvidersRouteImport - parentRoute: typeof ChatSettingsRoute - } - '/_chat/settings/projects': { - id: '/_chat/settings/projects' - path: '/projects' - fullPath: '/settings/projects' - preLoaderRoute: typeof ChatSettingsProjectsRouteImport + '/_chat/settings/company': { + id: '/_chat/settings/company' + path: '/company' + fullPath: '/settings/company' + preLoaderRoute: typeof ChatSettingsCompanyRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/open-source-licenses': { - id: '/_chat/settings/open-source-licenses' - path: '/open-source-licenses' - fullPath: '/settings/open-source-licenses' - preLoaderRoute: typeof ChatSettingsOpenSourceLicensesRouteImport + '/_chat/settings/connections': { + id: '/_chat/settings/connections' + path: '/connections' + fullPath: '/settings/connections' + preLoaderRoute: typeof ChatSettingsConnectionsRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/maintenance': { - id: '/_chat/settings/maintenance' - path: '/maintenance' - fullPath: '/settings/maintenance' - preLoaderRoute: typeof ChatSettingsMaintenanceRouteImport + '/_chat/settings/devices': { + id: '/_chat/settings/devices' + path: '/devices' + fullPath: '/settings/devices' + preLoaderRoute: typeof ChatSettingsDevicesRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/labs': { - id: '/_chat/settings/labs' - path: '/labs' - fullPath: '/settings/labs' - preLoaderRoute: typeof ChatSettingsLabsRouteImport + '/_chat/settings/diagnostics': { + id: '/_chat/settings/diagnostics' + path: '/diagnostics' + fullPath: '/settings/diagnostics' + preLoaderRoute: typeof ChatSettingsDiagnosticsRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/kin-connections': { - id: '/_chat/settings/kin-connections' - path: '/kin-connections' - fullPath: '/settings/kin-connections' - preLoaderRoute: typeof ChatSettingsKinConnectionsRouteImport + '/_chat/settings/diffs': { + id: '/_chat/settings/diffs' + path: '/diffs' + fullPath: '/settings/diffs' + preLoaderRoute: typeof ChatSettingsDiffsRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/keybindings': { - id: '/_chat/settings/keybindings' - path: '/keybindings' - fullPath: '/settings/keybindings' - preLoaderRoute: typeof ChatSettingsKeybindingsRouteImport + '/_chat/settings/general': { + id: '/_chat/settings/general' + path: '/general' + fullPath: '/settings/general' + preLoaderRoute: typeof ChatSettingsGeneralRouteImport parentRoute: typeof ChatSettingsRoute } '/_chat/settings/integrations': { @@ -1046,137 +1053,137 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ChatSettingsIntegrationsRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/general': { - id: '/_chat/settings/general' - path: '/general' - fullPath: '/settings/general' - preLoaderRoute: typeof ChatSettingsGeneralRouteImport + '/_chat/settings/keybindings': { + id: '/_chat/settings/keybindings' + path: '/keybindings' + fullPath: '/settings/keybindings' + preLoaderRoute: typeof ChatSettingsKeybindingsRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/diffs': { - id: '/_chat/settings/diffs' - path: '/diffs' - fullPath: '/settings/diffs' - preLoaderRoute: typeof ChatSettingsDiffsRouteImport + '/_chat/settings/kin-connections': { + id: '/_chat/settings/kin-connections' + path: '/kin-connections' + fullPath: '/settings/kin-connections' + preLoaderRoute: typeof ChatSettingsKinConnectionsRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/diagnostics': { - id: '/_chat/settings/diagnostics' - path: '/diagnostics' - fullPath: '/settings/diagnostics' - preLoaderRoute: typeof ChatSettingsDiagnosticsRouteImport + '/_chat/settings/labs': { + id: '/_chat/settings/labs' + path: '/labs' + fullPath: '/settings/labs' + preLoaderRoute: typeof ChatSettingsLabsRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/devices': { - id: '/_chat/settings/devices' - path: '/devices' - fullPath: '/settings/devices' - preLoaderRoute: typeof ChatSettingsDevicesRouteImport + '/_chat/settings/maintenance': { + id: '/_chat/settings/maintenance' + path: '/maintenance' + fullPath: '/settings/maintenance' + preLoaderRoute: typeof ChatSettingsMaintenanceRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/connections': { - id: '/_chat/settings/connections' - path: '/connections' - fullPath: '/settings/connections' - preLoaderRoute: typeof ChatSettingsConnectionsRouteImport + '/_chat/settings/open-source-licenses': { + id: '/_chat/settings/open-source-licenses' + path: '/open-source-licenses' + fullPath: '/settings/open-source-licenses' + preLoaderRoute: typeof ChatSettingsOpenSourceLicensesRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/company': { - id: '/_chat/settings/company' - path: '/company' - fullPath: '/settings/company' - preLoaderRoute: typeof ChatSettingsCompanyRouteImport + '/_chat/settings/projects': { + id: '/_chat/settings/projects' + path: '/projects' + fullPath: '/settings/projects' + preLoaderRoute: typeof ChatSettingsProjectsRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/check-ins': { - id: '/_chat/settings/check-ins' - path: '/check-ins' - fullPath: '/settings/check-ins' - preLoaderRoute: typeof ChatSettingsCheckInsRouteImport + '/_chat/settings/providers': { + id: '/_chat/settings/providers' + path: '/providers' + fullPath: '/settings/providers' + preLoaderRoute: typeof ChatSettingsProvidersRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/chat': { - id: '/_chat/settings/chat' - path: '/chat' - fullPath: '/settings/chat' - preLoaderRoute: typeof ChatSettingsChatRouteImport + '/_chat/settings/scheduled-tasks': { + id: '/_chat/settings/scheduled-tasks' + path: '/scheduled-tasks' + fullPath: '/settings/scheduled-tasks' + preLoaderRoute: typeof ChatSettingsScheduledTasksRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/browser': { - id: '/_chat/settings/browser' - path: '/browser' - fullPath: '/settings/browser' - preLoaderRoute: typeof ChatSettingsBrowserRouteImport + '/_chat/settings/secrets': { + id: '/_chat/settings/secrets' + path: '/secrets' + fullPath: '/settings/secrets' + preLoaderRoute: typeof ChatSettingsSecretsRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/beta': { - id: '/_chat/settings/beta' - path: '/beta' - fullPath: '/settings/beta' - preLoaderRoute: typeof ChatSettingsBetaRouteImport + '/_chat/settings/snap-shot': { + id: '/_chat/settings/snap-shot' + path: '/snap-shot' + fullPath: '/settings/snap-shot' + preLoaderRoute: typeof ChatSettingsSnapShotRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/archived': { - id: '/_chat/settings/archived' - path: '/archived' - fullPath: '/settings/archived' - preLoaderRoute: typeof ChatSettingsArchivedRouteImport + '/_chat/settings/source-control': { + id: '/_chat/settings/source-control' + path: '/source-control' + fullPath: '/settings/source-control' + preLoaderRoute: typeof ChatSettingsSourceControlRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/approvals': { - id: '/_chat/settings/approvals' - path: '/approvals' - fullPath: '/settings/approvals' - preLoaderRoute: typeof ChatSettingsApprovalsRouteImport + '/_chat/settings/storage': { + id: '/_chat/settings/storage' + path: '/storage' + fullPath: '/settings/storage' + preLoaderRoute: typeof ChatSettingsStorageRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/appearance': { - id: '/_chat/settings/appearance' - path: '/appearance' - fullPath: '/settings/appearance' - preLoaderRoute: typeof ChatSettingsAppearanceRouteImport + '/_chat/settings/threads': { + id: '/_chat/settings/threads' + path: '/threads' + fullPath: '/settings/threads' + preLoaderRoute: typeof ChatSettingsThreadsRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/access': { - id: '/_chat/settings/access' - path: '/access' - fullPath: '/settings/access' - preLoaderRoute: typeof ChatSettingsAccessRouteImport + '/_chat/settings/voice': { + id: '/_chat/settings/voice' + path: '/voice' + fullPath: '/settings/voice' + preLoaderRoute: typeof ChatSettingsVoiceRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/settings/about': { - id: '/_chat/settings/about' - path: '/about' - fullPath: '/settings/about' - preLoaderRoute: typeof ChatSettingsAboutRouteImport + '/_chat/settings/worktrees': { + id: '/_chat/settings/worktrees' + path: '/worktrees' + fullPath: '/settings/worktrees' + preLoaderRoute: typeof ChatSettingsWorktreesRouteImport parentRoute: typeof ChatSettingsRoute } - '/_chat/draft/$draftId': { - id: '/_chat/draft/$draftId' - path: '/draft/$draftId' - fullPath: '/draft/$draftId' - preLoaderRoute: typeof ChatDraftDraftIdRouteImport - parentRoute: typeof ChatRoute + '/threads/$environmentId/$threadId': { + id: '/threads/$environmentId/$threadId' + path: '/threads/$environmentId/$threadId' + fullPath: '/threads/$environmentId/$threadId' + preLoaderRoute: typeof ThreadsEnvironmentIdThreadIdRouteImport + parentRoute: typeof rootRouteImport } - '/_chat/$environmentId/$threadId': { - id: '/_chat/$environmentId/$threadId' - path: '/$environmentId/$threadId' - fullPath: '/$environmentId/$threadId' - preLoaderRoute: typeof ChatEnvironmentIdThreadIdRouteImport - parentRoute: typeof ChatRoute + '/_chat/kin/$environmentId/$orgId/$chatId': { + id: '/_chat/kin/$environmentId/$orgId/$chatId' + path: '/$environmentId/$orgId/$chatId' + fullPath: '/kin/$environmentId/$orgId/$chatId' + preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdChatIdRouteImport + parentRoute: typeof ChatKinRoute } - '/_chat/kin/$environmentId/$orgId/work': { - id: '/_chat/kin/$environmentId/$orgId/work' - path: '/$environmentId/$orgId/work' - fullPath: '/kin/$environmentId/$orgId/work' - preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdWorkRouteImport + '/_chat/kin/$environmentId/$orgId/_places': { + id: '/_chat/kin/$environmentId/$orgId/_places' + path: '/$environmentId/$orgId' + fullPath: '/kin/$environmentId/$orgId' + preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdPlacesRouteImport parentRoute: typeof ChatKinRoute } - '/_chat/kin/$environmentId/$orgId/team': { - id: '/_chat/kin/$environmentId/$orgId/team' - path: '/$environmentId/$orgId/team' - fullPath: '/kin/$environmentId/$orgId/team' - preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdTeamRouteImport + '/_chat/kin/$environmentId/$orgId/memory': { + id: '/_chat/kin/$environmentId/$orgId/memory' + path: '/$environmentId/$orgId/memory' + fullPath: '/kin/$environmentId/$orgId/memory' + preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdMemoryRouteImport parentRoute: typeof ChatKinRoute } '/_chat/kin/$environmentId/$orgId/settings': { @@ -1186,26 +1193,47 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdSettingsRouteImport parentRoute: typeof ChatKinRoute } - '/_chat/kin/$environmentId/$orgId/memory': { - id: '/_chat/kin/$environmentId/$orgId/memory' - path: '/$environmentId/$orgId/memory' - fullPath: '/kin/$environmentId/$orgId/memory' - preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdMemoryRouteImport + '/_chat/kin/$environmentId/$orgId/team': { + id: '/_chat/kin/$environmentId/$orgId/team' + path: '/$environmentId/$orgId/team' + fullPath: '/kin/$environmentId/$orgId/team' + preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdTeamRouteImport parentRoute: typeof ChatKinRoute } - '/_chat/kin/$environmentId/$orgId/_places': { - id: '/_chat/kin/$environmentId/$orgId/_places' - path: '/$environmentId/$orgId' - fullPath: '/kin/$environmentId/$orgId' - preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdPlacesRouteImport + '/_chat/kin/$environmentId/$orgId/work': { + id: '/_chat/kin/$environmentId/$orgId/work' + path: '/$environmentId/$orgId/work' + fullPath: '/kin/$environmentId/$orgId/work' + preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdWorkRouteImport parentRoute: typeof ChatKinRoute } - '/_chat/kin/$environmentId/$orgId/$chatId': { - id: '/_chat/kin/$environmentId/$orgId/$chatId' - path: '/$environmentId/$orgId/$chatId' - fullPath: '/kin/$environmentId/$orgId/$chatId' - preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdChatIdRouteImport - parentRoute: typeof ChatKinRoute + '/_chat/kin/$environmentId/$orgId/_places/clients': { + id: '/_chat/kin/$environmentId/$orgId/_places/clients' + path: '/clients' + fullPath: '/kin/$environmentId/$orgId/clients' + preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdPlacesClientsRouteImport + parentRoute: typeof ChatKinEnvironmentIdOrgIdPlacesRoute + } + '/_chat/kin/$environmentId/$orgId/_places/docs': { + id: '/_chat/kin/$environmentId/$orgId/_places/docs' + path: '/docs' + fullPath: '/kin/$environmentId/$orgId/docs' + preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdPlacesDocsRouteImport + parentRoute: typeof ChatKinEnvironmentIdOrgIdPlacesRoute + } + '/_chat/kin/$environmentId/$orgId/_places/money': { + id: '/_chat/kin/$environmentId/$orgId/_places/money' + path: '/money' + fullPath: '/kin/$environmentId/$orgId/money' + preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdPlacesMoneyRouteImport + parentRoute: typeof ChatKinEnvironmentIdOrgIdPlacesRoute + } + '/_chat/kin/$environmentId/$orgId/_places/tasks': { + id: '/_chat/kin/$environmentId/$orgId/_places/tasks' + path: '/tasks' + fullPath: '/kin/$environmentId/$orgId/tasks' + preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdPlacesTasksRouteImport + parentRoute: typeof ChatKinEnvironmentIdOrgIdPlacesRoute } '/_chat/kin/$environmentId/$orgId/settings/': { id: '/_chat/kin/$environmentId/$orgId/settings/' @@ -1221,34 +1249,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdSettingsPageRouteImport parentRoute: typeof ChatKinEnvironmentIdOrgIdSettingsRoute } - '/_chat/kin/$environmentId/$orgId/_places/tasks': { - id: '/_chat/kin/$environmentId/$orgId/_places/tasks' - path: '/tasks' - fullPath: '/kin/$environmentId/$orgId/tasks' - preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdPlacesTasksRouteImport - parentRoute: typeof ChatKinEnvironmentIdOrgIdPlacesRoute - } - '/_chat/kin/$environmentId/$orgId/_places/money': { - id: '/_chat/kin/$environmentId/$orgId/_places/money' - path: '/money' - fullPath: '/kin/$environmentId/$orgId/money' - preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdPlacesMoneyRouteImport - parentRoute: typeof ChatKinEnvironmentIdOrgIdPlacesRoute - } - '/_chat/kin/$environmentId/$orgId/_places/docs': { - id: '/_chat/kin/$environmentId/$orgId/_places/docs' - path: '/docs' - fullPath: '/kin/$environmentId/$orgId/docs' - preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdPlacesDocsRouteImport - parentRoute: typeof ChatKinEnvironmentIdOrgIdPlacesRoute - } - '/_chat/kin/$environmentId/$orgId/_places/clients': { - id: '/_chat/kin/$environmentId/$orgId/_places/clients' - path: '/clients' - fullPath: '/kin/$environmentId/$orgId/clients' - preLoaderRoute: typeof ChatKinEnvironmentIdOrgIdPlacesClientsRouteImport - parentRoute: typeof ChatKinEnvironmentIdOrgIdPlacesRoute - } } } diff --git a/apps/web/src/threadRoutes.test.ts b/apps/web/src/threadRoutes.test.ts index 9b321b5d43cbc..7ccb1480d7fe6 100644 --- a/apps/web/src/threadRoutes.test.ts +++ b/apps/web/src/threadRoutes.test.ts @@ -56,6 +56,9 @@ describe("threadRoutes", () => { const router = createRouter({ routeTree: root.addChildren([thread, newThread]), history: createMemoryHistory({ initialEntries: ["/new"] }), + // Without a document the router runs as SSR, where navigate is a no-op. + isServer: false, + origin: "http://localhost", }); await router.load(); const ref = scopeThreadRef("local" as never, ThreadId.make("mcp:example")); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 43feab321c952..66377ea47abe8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1171,8 +1171,8 @@ importers: specifier: ^0.19.4 version: 0.19.4(react-dom@19.3.0(react@19.3.0))(react@19.3.0) '@tanstack/react-router': - specifier: ^1.160.2 - version: 1.170.10(react-dom@19.3.0(react@19.3.0))(react@19.3.0) + specifier: ^1.170.46 + version: 1.170.46(react-dom@19.3.0(react@19.3.0))(react@19.3.0) '@tiptap/core': specifier: ^3.31.3 version: 3.31.3(@tiptap/pm@3.31.3) @@ -1337,8 +1337,8 @@ importers: specifier: 4.3.3 version: 4.3.3(@voidzero-dev/vite-plus-core@1.4.0(@types/node@24.12.4)(@volar/typescript@2.4.28(typescript@6.0.3))(esbuild@0.28.2)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0)) '@tanstack/router-plugin': - specifier: ^1.161.0 - version: 1.168.13(@tanstack/react-router@1.170.10(react-dom@19.3.0(react@19.3.0))(react@19.3.0))(@voidzero-dev/vite-plus-core@1.4.0(@types/node@24.12.4)(@volar/typescript@2.4.28(typescript@6.0.3))(esbuild@0.28.2)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(supports-color@8.1.1) + specifier: ^1.169.0 + version: 1.169.0(@tanstack/react-router@1.170.46(react-dom@19.3.0(react@19.3.0))(react@19.3.0))(@voidzero-dev/vite-plus-core@1.4.0(@types/node@24.12.4)(@volar/typescript@2.4.28(typescript@6.0.3))(esbuild@0.28.2)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.2.13)(supports-color@8.1.1) '@types/canvas-confetti': specifier: 1.9.0 version: 1.9.0 @@ -3075,6 +3075,10 @@ packages: resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==} engines: {node: '>=6.9.0'} + '@babel/generator@7.29.14': + resolution: {integrity: sha512-qSY56jgW5JnSXzuekLVil6zaOQxOCtOHidr65KkaMBw772IuAY28Qx4ZykAcDn8+FRF15qk80XzKwgSc/RYW6g==} + engines: {node: '>=6.9.0'} + '@babel/generator@7.29.7': resolution: {integrity: sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==} engines: {node: '>=6.9.0'} @@ -3146,6 +3150,10 @@ packages: resolution: {integrity: sha512-brcMGQaVzIeUb+6/bs1Av0f8YuNNjKY2JyvfRCsFuFsdKccEQ5Ges2y74D74NZ1Rz8lKJ9ksJkfqwQFJ/iNEyQ==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.29.14': + resolution: {integrity: sha512-CXvKMFvM80ihI7Vox9jb+kQjnyjESQNPM+vB7U0Zz6TWuZA+Z/FL0QPMH300h33qJtIx+REeBhXqWOPW48TcAQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.29.7': resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} engines: {node: '>=6.9.0'} @@ -3166,6 +3174,11 @@ packages: resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==} engines: {node: '>=6.9.0'} + '@babel/parser@7.29.14': + resolution: {integrity: sha512-VL220vXuyO2z3rNIQwY7ftj9UwpqOt+33sH+sBWkOekbsSR2g7EEMnOx24ZlCH0xOA3DM/33SifVFGbnJD8r/w==} + engines: {node: '>=6.0.0'} + hasBin: true + '@babel/parser@7.29.8': resolution: {integrity: sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==} engines: {node: '>=6.0.0'} @@ -3444,6 +3457,10 @@ packages: resolution: {integrity: sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==} engines: {node: '>=6.9.0'} + '@babel/types@7.29.14': + resolution: {integrity: sha512-UjI/dKmwJwT9pOszJitq2G6EObZPnsZUfdCr92z2TlF3EZK9J3EdfOKUrCzHl6wFthbzwhzl1Soc/UIwxRiq6w==} + engines: {node: '>=6.9.0'} + '@babel/types@7.29.8': resolution: {integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==} engines: {node: '>=6.9.0'} @@ -7195,8 +7212,8 @@ packages: engines: {node: '>=18'} hasBin: true - '@tanstack/history@1.162.0': - resolution: {integrity: sha512-79pf/RkhteYZTRgcR4F9kbk84P2N8rugQJswxfIqovlbRiT3yI7eBE+5QorIrZaOKktsgzRlXh1l/du/xpl4iA==} + '@tanstack/history@1.162.5': + resolution: {integrity: sha512-w1+YvwmTkwt5n8yUqEH3IWZ9DsmorCZW/EQ3KYHnqEgIkOZpH54NvW6/Epq3Dzb8H0ifIeYX8PExvrNLIH5FIA==} engines: {node: '>=20.19'} '@tanstack/pacer@0.18.0': @@ -7213,40 +7230,40 @@ packages: react: '>=16.8' react-dom: '>=16.8' - '@tanstack/react-router@1.170.10': - resolution: {integrity: sha512-gVmWYq0ucWr+OB97Nud0YhKa9NOipB7/QrWI7wRZJJWEL0qUS8WPqAs0vA1f3IBXZpXmf8xxzf/tl5cmo4tlmA==} + '@tanstack/react-router@1.170.46': + resolution: {integrity: sha512-ez1iNIhsPjGlaDHg3BXWs67EWVIYzB2tbopEHYDESdkO7owgkGb5de52+5Kv2v1fxdkggcNzo35bdk4arTVGQw==} engines: {node: '>=20.19'} peerDependencies: react: '>=18.0.0 || >=19.0.0' react-dom: '>=18.0.0 || >=19.0.0' - '@tanstack/react-store@0.8.1': - resolution: {integrity: sha512-XItJt+rG8c5Wn/2L/bnxys85rBpm0BfMbhb4zmPVLXAKY9POrp1xd6IbU4PKoOI+jSEGc3vntPRfLGSgXfE2Ig==} + '@tanstack/react-store@0.11.2': + resolution: {integrity: sha512-oj5O5DmiMWE+ih+SioX2ayC1kbK7d3fpLx0B75fPJr9nY3zU+hoW010yr64qXsY/9fyiLVE2bn5mGNV3owm8RQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - '@tanstack/react-store@0.9.3': - resolution: {integrity: sha512-y2iHd/N9OkoQbFJLUX1T9vbc2O9tjH0pQRgTcx1/Nz4IlwLvkgpuglXUx+mXt0g5ZDFrEeDnONPqkbfxXJKwRg==} + '@tanstack/react-store@0.8.1': + resolution: {integrity: sha512-XItJt+rG8c5Wn/2L/bnxys85rBpm0BfMbhb4zmPVLXAKY9POrp1xd6IbU4PKoOI+jSEGc3vntPRfLGSgXfE2Ig==} peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - '@tanstack/router-core@1.171.8': - resolution: {integrity: sha512-PbrTBbofFcacrH3RLgHYILRqTFnAGq+gXrXoA/vo7qUSkJpSO4GWfLtrtCahD4VayzRm19IPwcjPPLEugag6pw==} + '@tanstack/router-core@1.171.39': + resolution: {integrity: sha512-qUhoJ0meuSUqGYQbHbcJYdASr06YtK+bulbj6vtrhKYFkLgkSsZ6tXmMyym7sFxiSJSPYgasgozrL01LyyR/6A==} engines: {node: '>=20.19'} - '@tanstack/router-generator@1.167.12': - resolution: {integrity: sha512-FGr7nn6VhjL53TUCTyDgApSkAYRxhId+v0HVQdSu0ADkNuHY+sUnYEMqiF6aN82jYWuXzrSL1xazg6/rfEP82g==} - engines: {node: '>=20.19'} + '@tanstack/router-generator@1.168.0': + resolution: {integrity: sha512-Ty3y1g96Nq4yMojTH+OTgRFp0oa14LBKhiDW8+SrsdgW2mCpPRzZ8Ix7jjztxmkS8O+AKc2WaLkSskGUe3oEDQ==} + engines: {node: ^20.19.0 || >=22.12.0} - '@tanstack/router-plugin@1.168.13': - resolution: {integrity: sha512-LnepwDai+TaC4K3aZeXrrKpnGoP8xGGilVGFfa5flGgC3+jCSBysb8SktidRE8eF2/iOzCQC0LIGirtMyZepSA==} - engines: {node: '>=20.19'} + '@tanstack/router-plugin@1.169.0': + resolution: {integrity: sha512-aulFJmvW/rN5zQg/IM1Z5iUueX9dnYjBKxNpFWstpHxbatdlRlEwtSrc57VlBmfzRuckVxpZLi6wH3O40DMLgw==} + engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: '@rsbuild/core': '>=1.0.2 || ^2.0.0' - '@tanstack/react-router': ^1.170.10 - vite: '>=5.0.0 || >=6.0.0 || >=7.0.0 || >=8.0.0' + '@tanstack/react-router': ^1.170.46 + vite: '>=6.0.0' vite-plugin-solid: ^2.11.10 || ^3.0.0-0 webpack: '>=5.92.0' peerDependenciesMeta: @@ -7261,16 +7278,16 @@ packages: webpack: optional: true - '@tanstack/router-utils@1.162.1': - resolution: {integrity: sha512-62layyTGmclHDQS/eidwKRfN1hhCKwViG7iEBcVmL0MXgcAB3OOucWCEcDDGd9Cu11H6b4QQ5oOo47MWIqwz0A==} - engines: {node: '>=20.19'} + '@tanstack/router-utils@1.163.0': + resolution: {integrity: sha512-OMeFv8aRwk9Xtf3JhRmQrjtMxCj7qqfnsueASuL8xUgItoblIL9eCIyt4Zv0hk3LBp/s7NqviZgQhiAfDhJb/A==} + engines: {node: ^20.19.0 || >=22.12.0} + + '@tanstack/store@0.11.2': + resolution: {integrity: sha512-sJ4mjol8uQsHV0gOJzzjwXfh2Fwm+Sz0+8deqiTm4jGbMdjzNSW+xZCFm0kUa870uhd8yi+DpKnZb5Kc4apa0Q==} '@tanstack/store@0.8.1': resolution: {integrity: sha512-PtOisLjUZPz5VyPRSCGjNOlwTvabdTBQ2K80DpVL1chGVr35WRxfeavAPdNq6pm/t7F8GhoR2qtmkkqtCEtHYw==} - '@tanstack/store@0.9.3': - resolution: {integrity: sha512-8reSzl/qGWGGVKhBoxXPMWzATSbZLZFWhwBAFO9NAyp0TxzfBP0mIrGb8CP8KrQTmvzXlR/vFPPUrHTLBGyFyw==} - '@tanstack/virtual-file-routes@1.162.0': resolution: {integrity: sha512-uhOeFyxLcU41HzvrxsGpiWdcMbScY1EDgbZ5K7DVRMYInbLYWAC0EA/kx9wXAoSM8q82bUG2hRl8+EAjE6XAbA==} engines: {node: '>=20.19'} @@ -11903,6 +11920,11 @@ packages: preact@11.0.0-beta.0: resolution: {integrity: sha512-IcODoASASYwJ9kxz7+MJeiJhvLriwSb4y4mHIyxdgaRZp6kPUud7xytrk/6GZw8U3y6EFJaRb5wi9SrEK+8+lg==} + prettier@3.10.1: + resolution: {integrity: sha512-70vp3ZUYoPlFbF9uiTdXHUUCGEIp7d4+6p+8DYbkm2jP7x/3i/paXVF6dopSI3zd/CEitrZN1rc4i85xWmmXlg==} + engines: {node: '>=14'} + hasBin: true + prettier@3.8.3: resolution: {integrity: sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw==} engines: {node: '>=14'} @@ -13093,9 +13115,41 @@ packages: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} - unplugin@3.0.0: - resolution: {integrity: sha512-0Mqk3AT2TZCXWKdcoaufeXNukv2mTrEZExeXlHIOZXdqYoHHr4n51pymnwV8x2BOVxwXbK2HLlI7usrqMpycdg==} + unplugin@3.7.0: + resolution: {integrity: sha512-GrM2uq3DQo3hvLU2FjeYhooJ8BY9N6j1Fbzgx7Pta3VVJevsD3VP4dPjZkZOS0mLvN8w9zzr9OlP+31bSMyuLw==} engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@farmfe/core': '*' + '@rsbuild/core': '*' + '@rspack/core': '*' + bun-types-no-globals: '*' + esbuild: '*' + rolldown: '*' + rollup: '*' + unloader: '*' + vite: '*' + webpack: '*' + peerDependenciesMeta: + '@farmfe/core': + optional: true + '@rsbuild/core': + optional: true + '@rspack/core': + optional: true + bun-types-no-globals: + optional: true + esbuild: + optional: true + rolldown: + optional: true + rollup: + optional: true + unloader: + optional: true + vite: + optional: true + webpack: + optional: true unrun@0.2.39: resolution: {integrity: sha512-h9FxYVpztY/wwq+bauLOh6Y3CWu2IVeRLq5lxzneBiIU9Tn86OGp9xiQrGhnYspAmg5dzdY0Cc8+Y70kuTARCg==} @@ -14038,6 +14092,14 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/generator@7.29.14': + dependencies: + '@babel/parser': 7.29.14 + '@babel/types': 7.29.14 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + jsesc: 3.1.0 + '@babel/generator@7.29.7': dependencies: '@babel/parser': 7.29.8 @@ -14145,6 +14207,8 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-string-parser@7.29.14': {} + '@babel/helper-string-parser@7.29.7': {} '@babel/helper-validator-identifier@7.29.7': {} @@ -14164,6 +14228,10 @@ snapshots: '@babel/template': 7.29.7 '@babel/types': 7.29.8 + '@babel/parser@7.29.14': + dependencies: + '@babel/types': 7.29.14 + '@babel/parser@7.29.8': dependencies: '@babel/types': 7.29.8 @@ -14489,6 +14557,11 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/types@7.29.14': + dependencies: + '@babel/helper-string-parser': 7.29.14 + '@babel/helper-validator-identifier': 7.29.7 + '@babel/types@7.29.8': dependencies: '@babel/helper-string-parser': 7.29.7 @@ -17654,7 +17727,7 @@ snapshots: '@tanstack/devtools-event-client@0.4.3': {} - '@tanstack/history@1.162.0': {} + '@tanstack/history@1.162.5': {} '@tanstack/pacer@0.18.0': dependencies: @@ -17670,87 +17743,89 @@ snapshots: react: 19.3.0 react-dom: 19.3.0(react@19.3.0) - '@tanstack/react-router@1.170.10(react-dom@19.3.0(react@19.3.0))(react@19.3.0)': + '@tanstack/react-router@1.170.46(react-dom@19.3.0(react@19.3.0))(react@19.3.0)': dependencies: - '@tanstack/history': 1.162.0 - '@tanstack/react-store': 0.9.3(react-dom@19.3.0(react@19.3.0))(react@19.3.0) - '@tanstack/router-core': 1.171.8 + '@tanstack/history': 1.162.5 + '@tanstack/react-store': 0.11.2(react-dom@19.3.0(react@19.3.0))(react@19.3.0) + '@tanstack/router-core': 1.171.39 isbot: 5.1.40 react: 19.3.0 react-dom: 19.3.0(react@19.3.0) - '@tanstack/react-store@0.8.1(react-dom@19.3.0(react@19.3.0))(react@19.3.0)': + '@tanstack/react-store@0.11.2(react-dom@19.3.0(react@19.3.0))(react@19.3.0)': dependencies: - '@tanstack/store': 0.8.1 + '@tanstack/store': 0.11.2 react: 19.3.0 react-dom: 19.3.0(react@19.3.0) use-sync-external-store: 1.6.0(react@19.3.0) - '@tanstack/react-store@0.9.3(react-dom@19.3.0(react@19.3.0))(react@19.3.0)': + '@tanstack/react-store@0.8.1(react-dom@19.3.0(react@19.3.0))(react@19.3.0)': dependencies: - '@tanstack/store': 0.9.3 + '@tanstack/store': 0.8.1 react: 19.3.0 react-dom: 19.3.0(react@19.3.0) use-sync-external-store: 1.6.0(react@19.3.0) - '@tanstack/router-core@1.171.8': + '@tanstack/router-core@1.171.39': dependencies: - '@tanstack/history': 1.162.0 + '@tanstack/history': 1.162.5 cookie-es: 3.1.1 seroval: 1.7.10 seroval-plugins: 1.7.8(seroval@1.7.10) - '@tanstack/router-generator@1.167.12(supports-color@8.1.1)': + '@tanstack/router-generator@1.168.0(supports-color@8.1.1)': dependencies: '@babel/types': 7.29.8 - '@tanstack/router-core': 1.171.8 - '@tanstack/router-utils': 1.162.1(supports-color@8.1.1) + '@tanstack/router-core': 1.171.39 + '@tanstack/router-utils': 1.163.0(supports-color@8.1.1) '@tanstack/virtual-file-routes': 1.162.0 jiti: 2.7.0 magic-string: 0.30.21 - prettier: 3.8.3 + prettier: 3.10.1 zod: 4.6.7 transitivePeerDependencies: - supports-color - '@tanstack/router-plugin@1.168.13(@tanstack/react-router@1.170.10(react-dom@19.3.0(react@19.3.0))(react@19.3.0))(@voidzero-dev/vite-plus-core@1.4.0(@types/node@24.12.4)(@volar/typescript@2.4.28(typescript@6.0.3))(esbuild@0.28.2)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(supports-color@8.1.1)': + '@tanstack/router-plugin@1.169.0(@tanstack/react-router@1.170.46(react-dom@19.3.0(react@19.3.0))(react@19.3.0))(@voidzero-dev/vite-plus-core@1.4.0(@types/node@24.12.4)(@volar/typescript@2.4.28(typescript@6.0.3))(esbuild@0.28.2)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.2.13)(supports-color@8.1.1)': dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) - '@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) '@babel/template': 7.29.7 - '@babel/traverse': 7.29.7(supports-color@8.1.1) '@babel/types': 7.29.8 - '@tanstack/router-core': 1.171.8 - '@tanstack/router-generator': 1.167.12(supports-color@8.1.1) - '@tanstack/router-utils': 1.162.1(supports-color@8.1.1) - '@tanstack/virtual-file-routes': 1.162.0 + '@tanstack/router-core': 1.171.39 + '@tanstack/router-generator': 1.168.0(supports-color@8.1.1) + '@tanstack/router-utils': 1.163.0(supports-color@8.1.1) chokidar: 5.0.0 - unplugin: 3.0.0 + unplugin: 3.7.0(@voidzero-dev/vite-plus-core@1.4.0(@types/node@24.12.4)(@volar/typescript@2.4.28(typescript@6.0.3))(esbuild@0.28.2)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.2.13) zod: 4.6.7 optionalDependencies: - '@tanstack/react-router': 1.170.10(react-dom@19.3.0(react@19.3.0))(react@19.3.0) + '@tanstack/react-router': 1.170.46(react-dom@19.3.0(react@19.3.0))(react@19.3.0) vite: '@voidzero-dev/vite-plus-core@1.4.0(@types/node@24.12.4)(@volar/typescript@2.4.28(typescript@6.0.3))(esbuild@0.28.2)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0)' transitivePeerDependencies: + - '@farmfe/core' + - '@rspack/core' + - bun-types-no-globals + - esbuild + - rolldown + - rollup - supports-color + - unloader - '@tanstack/router-utils@1.162.1(supports-color@8.1.1)': + '@tanstack/router-utils@1.163.0(supports-color@8.1.1)': dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/generator': 7.29.7 + '@babel/generator': 7.29.14 '@babel/parser': 7.29.8 '@babel/types': 7.29.8 ansis: 4.3.1 babel-dead-code-elimination: 1.0.12(supports-color@8.1.1) - diff: 8.0.3 + diff: 9.0.0 pathe: 2.0.3 tinyglobby: 0.2.17 transitivePeerDependencies: - supports-color - '@tanstack/store@0.8.1': {} + '@tanstack/store@0.11.2': {} - '@tanstack/store@0.9.3': {} + '@tanstack/store@0.8.1': {} '@tanstack/virtual-file-routes@1.162.0': {} @@ -23318,6 +23393,8 @@ snapshots: preact@11.0.0-beta.0: {} + prettier@3.10.1: {} + prettier@3.8.3: {} pretty-cache-header@1.0.0: @@ -24720,11 +24797,16 @@ snapshots: unpipe@1.0.0: {} - unplugin@3.0.0: + unplugin@3.7.0(@voidzero-dev/vite-plus-core@1.4.0(@types/node@24.12.4)(@volar/typescript@2.4.28(typescript@6.0.3))(esbuild@0.28.2)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0))(esbuild@0.28.2)(rolldown@1.2.13): dependencies: '@jridgewell/remapping': 2.3.5 + '@rolldown/pluginutils': 1.0.1 picomatch: 4.0.7 webpack-virtual-modules: 0.6.2 + optionalDependencies: + esbuild: 0.28.2 + rolldown: 1.2.13 + vite: '@voidzero-dev/vite-plus-core@1.4.0(@types/node@24.12.4)(@volar/typescript@2.4.28(typescript@6.0.3))(esbuild@0.28.2)(jiti@2.7.0)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(yaml@2.9.0)' unrun@0.2.39: dependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 858962e1159fc..2ca85f0ca574e 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -308,6 +308,8 @@ peerDependencyRules: # pnpm 12 links agent skills that dependencies ship into .claude/skills once # approved. We curate our own skills, so deny these to keep installs quiet. permissions: + "@tanstack/react-router": + skills: false "@tanstack/router-plugin": skills: false drizzle-kit: From 586994f3c9130198222a7ac112083833f1f072f9 Mon Sep 17 00:00:00 2001 From: Surajsm60720 <1ds22is166@dsce.edu.in> Date: Wed, 25 Nov 2026 18:05:54 +0530 Subject: [PATCH 2/2] test(web): share the Node memory router setup The three Node tests that navigate a memory router now build it through one createTestMemoryRouter helper, so the isServer/origin workaround for the new router core lives in one place. People-change: none Co-Authored-By: Claude Opus 5.5 --- .../settings/settingsScopeNavigation.test.ts | 14 +++----------- .../src/lib/assistantCitationNavigation.test.ts | 13 +++---------- apps/web/src/threadRoutes.test.ts | 13 +++---------- apps/web/test/memoryRouter.ts | 11 +++++++++++ 4 files changed, 20 insertions(+), 31 deletions(-) create mode 100644 apps/web/test/memoryRouter.ts diff --git a/apps/web/src/components/settings/settingsScopeNavigation.test.ts b/apps/web/src/components/settings/settingsScopeNavigation.test.ts index 3ab405ab5fc3b..3f35736a0a108 100644 --- a/apps/web/src/components/settings/settingsScopeNavigation.test.ts +++ b/apps/web/src/components/settings/settingsScopeNavigation.test.ts @@ -1,12 +1,7 @@ import { EnvironmentId, ProviderInstanceId, ScheduledTaskId } from "@t3tools/contracts"; -import { - createMemoryHistory, - createRootRoute, - createRoute, - createRouter, - redirect, -} from "@tanstack/react-router"; +import { createRootRoute, createRoute, createRouter, redirect } from "@tanstack/react-router"; import { describe, expect, it } from "vite-plus/test"; +import { testMemoryRouterOptions } from "../../../test/memoryRouter"; import { resolveSettingsScope } from "./settingsScope"; import { retainSettingsScope, validateSettingsRouteSearch } from "./settingsScopeNavigation"; @@ -76,10 +71,7 @@ function createSettingsRouter(initialEntry = "/settings/general") { ]), legacyProject, ]), - history: createMemoryHistory({ initialEntries: [initialEntry] }), - // Without a document the router runs as SSR, where navigate is a no-op. - isServer: false, - origin: "http://localhost", + ...testMemoryRouterOptions(initialEntry), }); } diff --git a/apps/web/src/lib/assistantCitationNavigation.test.ts b/apps/web/src/lib/assistantCitationNavigation.test.ts index 5c4c1ad1995ec..8a5892c2fae44 100644 --- a/apps/web/src/lib/assistantCitationNavigation.test.ts +++ b/apps/web/src/lib/assistantCitationNavigation.test.ts @@ -1,12 +1,8 @@ import { EnvironmentId, MessageId, ThreadId, type AssistantCitation } from "@t3tools/contracts"; -import { - createMemoryHistory, - createRootRoute, - createRoute, - createRouter, -} from "@tanstack/react-router"; +import { createRootRoute, createRoute, createRouter } from "@tanstack/react-router"; import { scopeThreadRef } from "@t3tools/client-runtime/environment"; import { describe, expect, it } from "vite-plus/test"; +import { testMemoryRouterOptions } from "../../test/memoryRouter"; import { selectActiveRightPanelSurface, useRightPanelStore } from "../rightPanelStore"; import { @@ -32,10 +28,7 @@ function createCitationRouter(initialEntry = "/environment-one/thread-one") { const thread = createRoute({ getParentRoute: () => root, path: "/$environmentId/$threadId" }); return createRouter({ routeTree: root.addChildren([thread]), - history: createMemoryHistory({ initialEntries: [initialEntry] }), - // Without a document the router runs as SSR, where navigate is a no-op. - isServer: false, - origin: "http://localhost", + ...testMemoryRouterOptions(initialEntry), }); } diff --git a/apps/web/src/threadRoutes.test.ts b/apps/web/src/threadRoutes.test.ts index e47e109e2f8fa..9830266c068ef 100644 --- a/apps/web/src/threadRoutes.test.ts +++ b/apps/web/src/threadRoutes.test.ts @@ -1,9 +1,4 @@ -import { - createMemoryHistory, - createRootRoute, - createRoute, - createRouter, -} from "@tanstack/react-router"; +import { createRootRoute, createRoute, createRouter } from "@tanstack/react-router"; import { describe, expect, it } from "vite-plus/test"; import { scopeThreadRef } from "@t3tools/client-runtime/environment"; import { EMPTY_ENVIRONMENT_THREAD_STATE } from "@t3tools/client-runtime/state/threads"; @@ -12,6 +7,7 @@ import * as DateTime from "effect/DateTime"; import * as Option from "effect/Option"; import { linkedThreadRouteParams } from "./linkedThreadSurface"; import { makeThreadProjectionFixture } from "./test-fixtures"; +import { testMemoryRouterOptions } from "../test/memoryRouter"; import { isThreadRoutePathname, @@ -56,10 +52,7 @@ describe("threadRoutes", () => { const newThread = createRoute({ getParentRoute: () => root, path: "new" }); const router = createRouter({ routeTree: root.addChildren([thread, newThread]), - history: createMemoryHistory({ initialEntries: ["/new"] }), - // Without a document the router runs as SSR, where navigate is a no-op. - isServer: false, - origin: "http://localhost", + ...testMemoryRouterOptions("/new"), }); await router.load(); const ref = scopeThreadRef("local" as never, ThreadId.make("mcp:example")); diff --git a/apps/web/test/memoryRouter.ts b/apps/web/test/memoryRouter.ts new file mode 100644 index 0000000000000..fd52fbe80dff6 --- /dev/null +++ b/apps/web/test/memoryRouter.ts @@ -0,0 +1,11 @@ +import { createMemoryHistory } from "@tanstack/react-router"; + +/** Spread into `createRouter` for a memory router in Node tests that navigate. */ +export function testMemoryRouterOptions(initialEntry: string) { + return { + history: createMemoryHistory({ initialEntries: [initialEntry] }), + // Without a document the router runs as SSR, where navigate is a no-op. + isServer: false, + origin: "http://localhost", + } as const; +}