From 3c55349c4c6ec42c4f915b412a353c7cd5dce325 Mon Sep 17 00:00:00 2001 From: Lukas May Date: Fri, 6 Mar 2026 15:27:09 +0100 Subject: [PATCH] feat: Add /hq route, nav item, and update root redirect - Create apps/web/src/routes/hq.tsx with HeadquartersPage shell component - Add "HQ" as first entry in AppLayout.tsx navItems array - Change root redirect from /initiatives to /hq - Regenerate routeTree.gen.ts with the new /hq route Co-Authored-By: Claude Sonnet 4.6 --- apps/web/src/layouts/AppLayout.tsx | 1 + apps/web/src/routeTree.gen.ts | 21 +++++++++++++++++++++ apps/web/src/routes/hq.tsx | 25 +++++++++++++++++++++++++ apps/web/src/routes/index.tsx | 2 +- 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 apps/web/src/routes/hq.tsx diff --git a/apps/web/src/layouts/AppLayout.tsx b/apps/web/src/layouts/AppLayout.tsx index 6c0df56..4a2f9b3 100644 --- a/apps/web/src/layouts/AppLayout.tsx +++ b/apps/web/src/layouts/AppLayout.tsx @@ -7,6 +7,7 @@ import { trpc } from '@/lib/trpc' import type { ConnectionState } from '@/hooks/useConnectionStatus' const navItems = [ + { label: 'HQ', to: '/hq', badgeKey: null }, { label: 'Initiatives', to: '/initiatives', badgeKey: null }, { label: 'Agents', to: '/agents', badgeKey: 'running' as const }, { label: 'Inbox', to: '/inbox', badgeKey: 'questions' as const }, diff --git a/apps/web/src/routeTree.gen.ts b/apps/web/src/routeTree.gen.ts index 9d06a31..81fe6e3 100644 --- a/apps/web/src/routeTree.gen.ts +++ b/apps/web/src/routeTree.gen.ts @@ -11,6 +11,7 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as SettingsRouteImport } from './routes/settings' import { Route as InboxRouteImport } from './routes/inbox' +import { Route as HqRouteImport } from './routes/hq' import { Route as AgentsRouteImport } from './routes/agents' import { Route as IndexRouteImport } from './routes/index' import { Route as SettingsIndexRouteImport } from './routes/settings/index' @@ -29,6 +30,11 @@ const InboxRoute = InboxRouteImport.update({ path: '/inbox', getParentRoute: () => rootRouteImport, } as any) +const HqRoute = HqRouteImport.update({ + id: '/hq', + path: '/hq', + getParentRoute: () => rootRouteImport, +} as any) const AgentsRoute = AgentsRouteImport.update({ id: '/agents', path: '/agents', @@ -68,6 +74,7 @@ const InitiativesIdRoute = InitiativesIdRouteImport.update({ export interface FileRoutesByFullPath { '/': typeof IndexRoute '/agents': typeof AgentsRoute + '/hq': typeof HqRoute '/inbox': typeof InboxRoute '/settings': typeof SettingsRouteWithChildren '/initiatives/$id': typeof InitiativesIdRoute @@ -79,6 +86,7 @@ export interface FileRoutesByFullPath { export interface FileRoutesByTo { '/': typeof IndexRoute '/agents': typeof AgentsRoute + '/hq': typeof HqRoute '/inbox': typeof InboxRoute '/initiatives/$id': typeof InitiativesIdRoute '/settings/health': typeof SettingsHealthRoute @@ -90,6 +98,7 @@ export interface FileRoutesById { __root__: typeof rootRouteImport '/': typeof IndexRoute '/agents': typeof AgentsRoute + '/hq': typeof HqRoute '/inbox': typeof InboxRoute '/settings': typeof SettingsRouteWithChildren '/initiatives/$id': typeof InitiativesIdRoute @@ -103,6 +112,7 @@ export interface FileRouteTypes { fullPaths: | '/' | '/agents' + | '/hq' | '/inbox' | '/settings' | '/initiatives/$id' @@ -114,6 +124,7 @@ export interface FileRouteTypes { to: | '/' | '/agents' + | '/hq' | '/inbox' | '/initiatives/$id' | '/settings/health' @@ -124,6 +135,7 @@ export interface FileRouteTypes { | '__root__' | '/' | '/agents' + | '/hq' | '/inbox' | '/settings' | '/initiatives/$id' @@ -136,6 +148,7 @@ export interface FileRouteTypes { export interface RootRouteChildren { IndexRoute: typeof IndexRoute AgentsRoute: typeof AgentsRoute + HqRoute: typeof HqRoute InboxRoute: typeof InboxRoute SettingsRoute: typeof SettingsRouteWithChildren InitiativesIdRoute: typeof InitiativesIdRoute @@ -158,6 +171,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof InboxRouteImport parentRoute: typeof rootRouteImport } + '/hq': { + id: '/hq' + path: '/hq' + fullPath: '/hq' + preLoaderRoute: typeof HqRouteImport + parentRoute: typeof rootRouteImport + } '/agents': { id: '/agents' path: '/agents' @@ -229,6 +249,7 @@ const SettingsRouteWithChildren = SettingsRoute._addFileChildren( const rootRouteChildren: RootRouteChildren = { IndexRoute: IndexRoute, AgentsRoute: AgentsRoute, + HqRoute: HqRoute, InboxRoute: InboxRoute, SettingsRoute: SettingsRouteWithChildren, InitiativesIdRoute: InitiativesIdRoute, diff --git a/apps/web/src/routes/hq.tsx b/apps/web/src/routes/hq.tsx new file mode 100644 index 0000000..919f2dd --- /dev/null +++ b/apps/web/src/routes/hq.tsx @@ -0,0 +1,25 @@ +import { createFileRoute } from "@tanstack/react-router"; +import { motion } from "motion/react"; + +export const Route = createFileRoute("/hq")({ + component: HeadquartersPage, +}); + +function HeadquartersPage() { + return ( + +
+

Headquarters

+

+ Items waiting for your attention. +

+
+ {/* Sections implemented in next phase */} +
+ ); +} diff --git a/apps/web/src/routes/index.tsx b/apps/web/src/routes/index.tsx index bba3d5a..b7b40b2 100644 --- a/apps/web/src/routes/index.tsx +++ b/apps/web/src/routes/index.tsx @@ -2,6 +2,6 @@ import { createFileRoute, redirect } from '@tanstack/react-router' export const Route = createFileRoute('/')({ beforeLoad: () => { - throw redirect({ to: '/initiatives' }) + throw redirect({ to: '/hq' }) }, })