Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(desktop): flatten routes and remember rail destinations (#87499)

Adam Leith943bd51a7fe2
diff --git a/products/desktop/apps/code/src/renderer/desktop-services.ts b/products/desktop/apps/code/src/renderer/desktop-services.ts
index 140113505ce3..30ac09dd2ae5 100644
--- a/products/desktop/apps/code/src/renderer/desktop-services.ts
+++ b/products/desktop/apps/code/src/renderer/desktop-services.ts
@@ -329,13 +329,15 @@ container.bind<IActiveView>(ACTIVE_VIEW_PROVIDER).toConstantValue({
const last = matches[matches.length - 1];
if (!last) return undefined;
const params = last.params as Record<string, string | undefined>;
- switch (last.routeId) {
- case "/code/tasks/$taskId":
- case "/website/$channelId/tasks/$taskId":
+ // `fullPath`, not `routeId`: the space routes sit under the pathless
+ // `_shell` layout, which routeId spells out and the URL pattern doesn't.
+ switch (last.fullPath) {
+ case "/tasks/$taskId":
+ case "/spaces/$channelId/tasks/$taskId":
return params.taskId
? { kind: "task", taskId: params.taskId }
: undefined;
- case "/website/$channelId/dashboards/$dashboardId":
+ case "/spaces/$channelId/dashboards/$dashboardId":
return params.channelId && params.dashboardId
? {
kind: "canvas",
diff --git a/products/desktop/apps/code/src/renderer/platform-adapters/auth-side-effects.ts b/products/desktop/apps/code/src/renderer/platform-adapters/auth-side-effects.ts
index 0e87804a2641..f206c9372a24 100644
--- a/products/desktop/apps/code/src/renderer/platform-adapters/auth-side-effects.ts
+++ b/products/desktop/apps/code/src/renderer/platform-adapters/auth-side-effects.ts
@@ -7,6 +7,7 @@ import {
import { useAuthUiStateStore } from "@posthog/ui/features/auth/authUiStateStore";
import type { IAuthSideEffects } from "@posthog/ui/features/auth/identifiers";
import { resetCurrentChannel } from "@posthog/ui/features/canvas/stores/currentChannelStore";
+import { resetRailHistory } from "@posthog/ui/features/canvas/stores/railHistoryStore";
import { useOnboardingStore } from "@posthog/ui/features/onboarding/onboardingStore";
import { resetSessionService } from "@posthog/ui/features/sessions/sessionServiceHost";
import { openTaskInput } from "@posthog/ui/router/useOpenTask";
@@ -34,6 +35,7 @@ export class RendererAuthSideEffects implements IAuthSideEffects {
// Before openTaskInput, which files a new task into the scoped channel —
// a channel id from the project we just left.
resetCurrentChannel();
+ resetRailHistory();
openTaskInput();
}
@@ -45,6 +47,7 @@ export class RendererAuthSideEffects implements IAuthSideEffects {
useAuthUiStateStore.getState().setStaleRegion(previousRegion);
}
resetCurrentChannel();
+ resetRailHistory();
openTaskInput();
useOnboardingStore.getState().resetSelections();
}
diff --git a/products/desktop/apps/web/src/web-auth-side-effects.ts b/products/desktop/apps/web/src/web-auth-side-effects.ts
index 03fed679b4af..908a3419eaf6 100644
--- a/products/desktop/apps/web/src/web-auth-side-effects.ts
+++ b/products/desktop/apps/web/src/web-auth-side-effects.ts
@@ -6,6 +6,7 @@ import {
import { useAuthUiStateStore } from "@posthog/ui/features/auth/authUiStateStore";
import type { IAuthSideEffects } from "@posthog/ui/features/auth/identifiers";
import { resetCurrentChannel } from "@posthog/ui/features/canvas/stores/currentChannelStore";
+import { resetRailHistory } from "@posthog/ui/features/canvas/stores/railHistoryStore";
import { useOnboardingStore } from "@posthog/ui/features/onboarding/onboardingStore";
import { openTaskInput } from "@posthog/ui/router/useOpenTask";
import { injectable } from "inversify";
@@ -28,6 +29,7 @@ export class WebAuthSideEffects implements IAuthSideEffects {
// Before openTaskInput, which files a new task into the scoped channel —
// a channel id from the project we just left.
resetCurrentChannel();
+ resetRailHistory();
openTaskInput();
}
@@ -37,6 +39,7 @@ export class WebAuthSideEffects implements IAuthSideEffects {
useAuthUiStateStore.getState().setStaleRegion(previousRegion);
}
resetCurrentChannel();
+ resetRailHistory();
openTaskInput();
useOnboardingStore.getState().resetSelections();
}
diff --git a/products/desktop/apps/web/src/web-notifications.ts b/products/desktop/apps/web/src/web-notifications.ts
index 0c84421c6ca8..448956a19376 100644
--- a/products/desktop/apps/web/src/web-notifications.ts
+++ b/products/desktop/apps/web/src/web-notifications.ts
@@ -86,13 +86,15 @@ export const webActiveView: IActiveView = {
const last = matches[matches.length - 1];
if (!last) return undefined;
const params = last.params as Record<string, string | undefined>;
- switch (last.routeId) {
- case "/code/tasks/$taskId":
- case "/website/$channelId/tasks/$taskId":
+ // `fullPath`, not `routeId`: the space routes sit under the pathless
+ // `_shell` layout, which routeId spells out and the URL pattern doesn't.
+ switch (last.fullPath) {
+ case "/tasks/$taskId":
+ case "/spaces/$channelId/tasks/$taskId":
return params.taskId
? { kind: "task", taskId: params.taskId }
: undefined;
- case "/website/$channelId/dashboards/$dashboardId":
+ case "/spaces/$channelId/dashboards/$dashboardId":
return params.channelId && params.dashboardId
? {
kind: "canvas",
diff --git a/products/desktop/docs/plans/browser-tabs.md b/products/desktop/docs/plans/browser-tabs.md
index a3782faa59f4..80fd2d998fab 100644
--- a/products/desktop/docs/plans/browser-tabs.md
+++ b/products/desktop/docs/plans/browser-tabs.md
@@ -1,7 +1,7 @@
# PRD: Browser Tabs for the Channels Canvas Surface
Status: ready-for-agent
-Surface: Channels space (`/website/*`) — the canvas surface with the `< >` nav and "Go back to Code" / "Leave feedback" chrome.
+Surface: Channels space (`/spaces/*`) — the canvas surface with the `< >` nav and "Go back to Code" / "Leave feedback" chrome.
## Problem Statement
diff --git a/products/desktop/packages/core/src/inbox/reportMembership.test.ts b/products/desktop/packages/core/src/inbox/reportMembership.test.ts
index 62b571515687..210153730736 100644
--- a/products/desktop/packages/core/src/inbox/reportMembership.test.ts
+++ b/products/desktop/packages/core/src/inbox/reportMembership.test.ts
@@ -60,26 +60,26 @@ describe("isDismissedReport", () => {
describe("isInboxDetailPath", () => {
it("matches detail paths for each inbox tab", () => {
- expect(isInboxDetailPath("/code/inbox/pulls/abc")).toBe(true);
- expect(isInboxDetailPath("/code/inbox/reports/abc")).toBe(true);
- expect(isInboxDetailPath("/code/inbox/runs/abc")).toBe(true);
+ expect(isInboxDetailPath("/inbox/pulls/abc")).toBe(true);
+ expect(isInboxDetailPath("/inbox/reports/abc")).toBe(true);
+ expect(isInboxDetailPath("/inbox/runs/abc")).toBe(true);
});
it("does not match tab list paths", () => {
- expect(isInboxDetailPath("/code/inbox/pulls")).toBe(false);
- expect(isInboxDetailPath("/code/inbox/reports")).toBe(false);
- expect(isInboxDetailPath("/code/inbox/runs")).toBe(false);
- expect(isInboxDetailPath("/code/inbox")).toBe(false);
+ expect(isInboxDetailPath("/inbox/pulls")).toBe(false);
+ expect(isInboxDetailPath("/inbox/reports")).toBe(false);
+ expect(isInboxDetailPath("/inbox/runs")).toBe(false);
+ expect(isInboxDetailPath("/inbox")).toBe(false);
});
it("does not match paths with extra trailing segments", () => {
- expect(isInboxDetailPath("/code/inbox/pulls/abc/edit")).toBe(false);
- expect(isInboxDetailPath("/code/inbox/runs/abc/")).toBe(false);
+ expect(isInboxDetailPath("/inbox/pulls/abc/edit")).toBe(false);
+ expect(isInboxDetailPath("/inbox/runs/abc/")).toBe(false);
});
it("does not match unrelated paths", () => {
- expect(isInboxDetailPath("/code/agents")).toBe(false);
- expect(isInboxDetailPath("/code/inbox/agents")).toBe(false);
+ expect(isInboxDetailPath("/agents")).toBe(false);
+ expect(isInboxDetailPath("/inbox/agents")).toBe(false);
expect(isInboxDetailPath("/")).toBe(false);
});
});
diff --git a/products/desktop/packages/core/src/inbox/reportMembership.ts b/products/desktop/packages/core/src/inbox/reportMembership.ts
index 5ad21889292d..3964d1acc179 100644
--- a/products/desktop/packages/core/src/inbox/reportMembership.ts
+++ b/products/desktop/packages/core/src/inbox/reportMembership.ts
@@ -117,24 +117,24 @@ export const INBOX_TAB_LABEL: Record<InboxTabKey, string> = {
/**
* Canonical inbox tab list routes. Use these constants instead of hard-coding
- * `/code/inbox/pulls` etc., so renames stay in one place.
+ * `/inbox/pulls` etc., so renames stay in one place.
*
- * Detail routes (`/code/inbox/<tab>/$reportId`) stay as TanStack Router
+ * Detail routes (`/inbox/<tab>/$reportId`) stay as TanStack Router
* literals at call sites – TanStack's typed-link API needs them as literal
* strings to infer params.
*/
export const INBOX_TAB_LIST_ROUTE: Record<
InboxTabKey,
- `/code/inbox/${InboxTabKey}`
+ `/inbox/${InboxTabKey}`
> = {
- pulls: "/code/inbox/pulls",
- reports: "/code/inbox/reports",
- runs: "/code/inbox/runs",
- dismissed: "/code/inbox/dismissed",
+ pulls: "/inbox/pulls",
+ reports: "/inbox/reports",
+ runs: "/inbox/runs",
+ dismissed: "/inbox/dismissed",
};
const INBOX_DETAIL_PATH_RE = new RegExp(
- `^/code/inbox/(${INBOX_TAB_KEYS.join("|")})/[^/]+$`,
+ `^/inbox/(${INBOX_TAB_KEYS.join("|")})/[^/]+$`,
);
export function isInboxDetailPath(pathname: string): boolean {
diff --git a/products/desktop/packages/core/src/links/loop-link.ts b/products/desktop/packages/core/src/links/loop-link.ts
index 6327778a671b..e0d95b4dee51 100644
--- a/products/desktop/packages/core/src/links/loop-link.ts
+++ b/products/desktop/packages/core/src/links/loop-link.ts
@@ -16,7 +16,7 @@ export const LoopLinkEvent = {
} as const;
export interface LoopLinkPayload {
- /** Loop id, matching the `/code/loops/$loopId` route param. */
+ /** Loop id, matching the `/loops/$loopId` route param. */
loopId: string;
}
diff --git a/products/desktop/packages/shared/src/analytics-events.ts b/products/desktop/packages/shared/src/analytics-events.ts
index 8c83f3b0dbde..2749e6e183fe 100644
--- a/products/desktop/packages/shared/src/analytics-events.ts
+++ b/products/desktop/packages/shared/src/analytics-events.ts
@@ -939,7 +939,7 @@ export interface SignalSourceConnectedProperties {
via_setup_wizard: boolean;
}
-// Agents page events (the `/code/agents` configuration surface)
+// Agents page events (the `/agents` configuration surface)
export type AgentsActionType = "run_setup_agent" | "open_mcp_servers";
export interface AgentsViewedProperties {
diff --git a/products/desktop/packages/shared/src/browser-tabs.ts b/products/desktop/packages/shared/src/browser-tabs.ts
index 4d2b0d61b957..d196a5a52d78 100644
--- a/products/desktop/packages/shared/src/browser-tabs.ts
+++ b/products/desktop/packages/shared/src/browser-tabs.ts
@@ -34,10 +34,9 @@ export function primaryWindow(snapshot: TabsSnapshot) {
/**
* True when the primary window's active tab is a blank "+" tab: no canvas,
- * task, or channel. The blank tab parks at the channels index (`/website`),
- * whose route would otherwise redirect to the first channel — callers use this
- * to suppress that redirect so the blank tab (and the in-flight navigation
- * leaving it) isn't hijacked to `channels[0]`.
+ * task, or channel. The blank tab parks at the spaces index (`/spaces`); the
+ * root layout uses this to render the new-tab placeholder there instead of the
+ * space list (`showBlankTab` in `__root`).
*/
export function activeTabIsBlank(snapshot: TabsSnapshot): boolean {
const w = primaryWindow(snapshot);
@@ -54,8 +53,6 @@ export function activeTabIsBlank(snapshot: TabsSnapshot): boolean {
/**
* True when the primary window has no tabs at all — the user closed every tab.
- * The channels index renders the new-tab screen for this state rather than
- * redirecting to the first channel, which would silently re-open a tab.
*/
export function primaryWindowHasNoTabs(snapshot: TabsSnapshot): boolean {
const w = primaryWindow(snapshot);
diff --git a/products/desktop/packages/shared/src/deep-links.ts b/products/desktop/packages/shared/src/deep-links.ts
index 5455e1b39e51..3017a28b9055 100644
--- a/products/desktop/packages/shared/src/deep-links.ts
+++ b/products/desktop/packages/shared/src/deep-links.ts
@@ -45,7 +45,7 @@ export function buildInboxDeeplink(
/**
* Build a canonical deep link to a loop's detail page
* (`<scheme>://loop/<loopId>`). The inbound side lives in the `loop` handler
- * (`LoopLinkService`), which routes to `/code/loops/<loopId>`.
+ * (`LoopLinkService`), which routes to `/loops/<loopId>`.
*/
export function buildLoopDeeplink(
loopId: string,
diff --git a/products/desktop/packages/shared/src/task-creation-domain.ts b/products/desktop/packages/shared/src/task-creation-domain.ts
index c8707ddcca90..cfecd266b44f 100644
--- a/products/desktop/packages/shared/src/task-creation-domain.ts
+++ b/products/desktop/packages/shared/src/task-creation-domain.ts
@@ -71,7 +71,7 @@ export interface TaskCreationInput {
channelId?: string;
/**
* Desktop file-system folder id that owns this channel's CONTEXT.md (the
- * `/website/$channelId` id — distinct from the backend feed `channelId`
+ * `/spaces/$channelId` id — distinct from the backend feed `channelId`
* above). When set, the injected context tells the agent to publish upkeep
* corrections to this exact id via the PostHog MCP, rather than resolving the
* channel by display name.
diff --git a/products/desktop/packages/ui/src/features/agents/hooks/useTrackAgentsViewed.ts b/products/desktop/packages/ui/src/features/agents/hooks/useTrackAgentsViewed.ts
index 141fdd7ae899..c2922a24963c 100644
--- a/products/desktop/packages/ui/src/features/agents/hooks/useTrackAgentsViewed.ts
+++ b/products/desktop/packages/ui/src/features/agents/hooks/useTrackAgentsViewed.ts
@@ -22,7 +22,7 @@ export interface TrackAgentsViewedInput {
}
/**
- * Fires `AGENTS_VIEWED` once per visit to the `/code/agents` configuration page,
+ * Fires `AGENTS_VIEWED` once per visit to the `/agents` configuration page,
* after the responder/integration/autonomy data settles, with the state the user
* sees on load. Mirrors `useTrackInboxViewed`; mounted from `ConfigureAgentsSection`
* where the data already lives, so it fires once and survives re-renders.
diff --git a/products/desktop/packages/ui/src/features/archive/useArchiveTask.ts b/products/desktop/packages/ui/src/features/archive/useArchiveTask.ts
index 4d1435ce10a5..96101acf2166 100644
--- a/products/desktop/packages/ui/src/features/archive/useArchiveTask.ts
+++ b/products/desktop/packages/ui/src/features/archive/useArchiveTask.ts
@@ -94,7 +94,7 @@ export function getCachedArchiveTask(
function makeOrchestrationDeps(
queryClient: QueryClient,
keys: ArchiveCacheKeys,
- options?: { skipNavigate?: boolean; navigateSpace?: "code" | "website" },
+ options?: { skipNavigate?: boolean; navigateUnscoped?: boolean },
): ArchiveOrchestrationDeps {
const hostClient = resolveService<HostTrpcClient>(HOST_TRPC_CLIENT);
return {
@@ -112,7 +112,7 @@ function makeOrchestrationDeps(
const view = getAppViewSnapshot();
if (view.type === "task-detail" && view.taskId === taskId) {
openTaskInput(
- options?.navigateSpace ? { space: options.navigateSpace } : undefined,
+ options?.navigateUnscoped ? { unscoped: true } : undefined,
);
}
},
@@ -190,7 +190,7 @@ export async function archiveTaskImperative(
options?: {
skipNavigate?: boolean;
optimistic?: boolean;
- navigateSpace?: "code" | "website";
+ navigateUnscoped?: boolean;
},
): Promise<void> {
await archiveTask(
@@ -218,10 +218,9 @@ export async function archiveTasksImperative(
}
export function useArchiveTask(options?: {
- // Which new-task screen to land on if the archived task is the active view.
- // Defaults to Code; the bluebird/channels nav passes "website" so archiving
- // from there returns to the website new-task screen instead.
- navigateSpace?: "code" | "website";
+ // Ignore the scoped space when the archived task is the active view, landing
+ // on the unscoped new-task screen instead of the space's own.
+ navigateUnscoped?: boolean;
}) {
const queryClient = useQueryClient();
const keys = useArchiveCacheKeys();
@@ -229,7 +228,7 @@ export function useArchiveTask(options?: {
const archiveTask = async ({ taskId }: { taskId: string }) => {
await archiveTaskImperative(taskId, queryClient, keys, {
- navigateSpace: options?.navigateSpace,
+ navigateUnscoped: options?.navigateUnscoped,
});
const toastId = `archive-undo-${taskId}`;
toast.success("Task archived", {
diff --git a/products/desktop/packages/ui/src/features/browser-tabs/AGENTS.md b/products/desktop/packages/ui/src/features/browser-tabs/AGENTS.md
index b29609bd0886..7f3df79cad37 100644
--- a/products/desktop/packages/ui/src/features/browser-tabs/AGENTS.md
+++ b/products/desktop/packages/ui/src/features/browser-tabs/AGENTS.md
@@ -1,22 +1,22 @@
# Browser tabs (Channels canvas surface)
-A browser-style tab strip in the Channels title bar (`/website/*`), each tab
+A browser-style tab strip in the Channels title bar (`/spaces/*`), each tab
fronting an open **canvas, task, or channel sub-section** (a `TabIdentity`:
`dashboardId | taskId | channel(+section) | blank`).
This file documents the UX and the model; edit it when the behaviour changes.
Canvases and tasks are equal citizens: navigating to either
-(`/website/$channelId/dashboards/$dashboardId` or
-`/website/$channelId/tasks/$taskId`) replaces the active tab's target in place,
+(`/spaces/$channelId/dashboards/$dashboardId` or
+`/spaces/$channelId/tasks/$taskId`) replaces the active tab's target in place,
the label resolves from the canvas name or the task title, and switching back
returns to whichever the tab points at. `setTabTarget` is the in-tab-nav
primitive for both.
Channel sub-sections are tabs too: the header nav (`Loops`, `Recents`,
`CONTEXT.md` — see `canvas/channelSections.ts`) routes to
-`/website/$channelId/<section>`, which is identified by `channelId` +
+`/spaces/$channelId/<section>`, which is identified by `channelId` +
`channelSection`. The tab labels by the section (`Recents`) with a `#` icon; the
-channel home (`/website/$channelId`, no section) labels by the channel name.
+channel home (`/spaces/$channelId`, no section) labels by the channel name.
Every channel tab's hover leads with `#<channel>` then the page name (the home
tab, whose label already is the channel, shows just the one line). Switching
sections is an in-tab replace — one channel tab, the section is sub-navigation
@@ -42,8 +42,8 @@ The feature is deliberately split so the rules are portable and testable:
`TabsSnapshot` / `TabTarget`), the transforms (`openOrFocusTab`, `newBlankTab`,
`setTabTarget`, `closeTab`, `closeTabs`, `setTabOrder`), `decideTabNavigation` (what a
location change means for the strip), and the snapshot predicates
- (`primaryWindow`, `activeTabIsBlank`, `primaryWindowHasNoTabs`) the `/website`
- index uses to choose the new-tab screen over a first-channel redirect. No
+ (`primaryWindow`, `activeTabIsBlank`, `primaryWindowHasNoTabs`) — `activeTabIsBlank`
+ gates the blank new-tab placeholder on the `/spaces` index. No
React, no I/O. This is where behaviour is unit-tested. Back/forward is driven by
router history + `decideTabNavigation`, not a separate action stack.
- **`@posthog/workspace-server` (`services/browser-tabs/`, `db/`)** — the
@@ -110,7 +110,7 @@ differ. Desktop ships first.
- Closing the active tab focuses its neighbour.
- Closing the last tab of a **secondary** window closes the window; closing the
last tab of the **primary** window empties the strip and lands on the
- **new-tab screen** at `/website` — it does *not* jump to the first channel
+ **new-tab screen** at `/spaces` — it does *not* jump to the first channel
(see Gotchas).
### Context menu & pinning
@@ -199,21 +199,18 @@ differ. Desktop ships first.
cannot nest inside the Button (button-in-button is invalid + fails a11y lint);
it's an absolutely-positioned sibling. The wrapper is `flex` so it hugs the
button height (a block wrapper adds an inline line-box ~2px taller).
-- **The `/website` index must not redirect to `channels[0]` while a blank tab is
- active or the strip is empty.** The blank `+` tab and the closed-all-tabs state
- both park at `/website`, whose `WebsiteChannelsIndex` otherwise `<Navigate>`s to
- the first channel. That puts a channel in the route, so `decideTabNavigation`
- opens a tab for it — hijacking the blank tab to `channels[0]`, or silently
- re-filling a strip the user just emptied. It's guarded with `activeTabIsBlank`
- (blank `+` tab) and `primaryWindowHasNoTabs` (closed-all → render
- `BlankTabView`), plus an `onIndexPath` check: TanStack renders this *stale*
- index for a couple of frames **after** the URL has already left `/website`
- (the `__root` Outlet un-suppresses on the way to `/website/$channelId` before
- the matched leaf settles), and that stale render must not redirect.
+- **`/spaces` is a page, not a redirect.** It used to bounce to `channels[0]`,
+ which put a channel in the route and made `decideTabNavigation` open a tab for
+ it — hijacking a blank `+` tab, or re-filling a strip the user had just
+ emptied. Three guards existed only to hold that bounce off
+ (`activeTabIsBlank`, `primaryWindowHasNoTabs`, and an `onIndexPath` check for
+ the frames TanStack renders the stale index after the URL has already moved).
+ The index renders the space list in place now, so none of them are needed and
+ the blank `+` tab keeps its placeholder through `showBlankTab` in `__root`.
+ Don't reintroduce a redirect here.
- **All writes are local-first (`tabsSync.ts`).** Close/open/new/reorder apply
their shared transform to the mirror and navigate in the same tick; the
- `/website` index therefore always renders against post-mutation state and
- can't redirect (re-opening a tab) mid-flight. Mutation results and
+ `/spaces` index therefore always renders against post-mutation state. Mutation results and
subscription pushes are never applied while writes are in flight — only the
last settle reconciles. Don't add a mutation `onSuccess` that calls
`setSnapshot`; route new writes through `applyLocalTransform` +
@@ -229,7 +226,7 @@ differ. Desktop ships first.
stamp / noop decision the strip makes on every navigation (including "back
returns to the previous tab" and the inherited-tag in-tab case) — plus the
snapshot predicates (`activeTabIsBlank`, `primaryWindowHasNoTabs`,
- `primaryWindow`) that gate the index's new-tab-screen-vs-redirect choice.
+ `primaryWindow`).
`BrowserTabStrip`'s effect dispatches that decision, so the tested function is
the one that runs.
- **Presentational** rendering is tested in `TabStrip.test.tsx` (active styling,
@@ -249,7 +246,7 @@ content area, splitting the scene into a resizable two-pane
1. **Router-less target pane** (what the prototype did): the secondary pane
renders the tab's target directly by id. `WebsiteDashboard` already takes
`dashboardId` as a prop and `TaskDetail` takes a `task` (replicate the
- cache-first fetch from `routes/website/$channelId/tasks/$taskId.tsx`) —
+ cache-first fetch from `routes/_shell/spaces/$channelId/tasks/$taskId.tsx`) —
both mount standalone today. **Channel views (inbox/artifacts/…) are the
blocker**: they read route params/loaders throughout, so they need a
props-parameterization pass before they can render in a pane. That
diff --git a/products/desktop/packages/ui/src/features/browser-tabs/BrowserTabStrip.tsx b/products/desktop/packages/ui/src/features/browser-tabs/BrowserTabStrip.tsx
index 09a545fda011..1842430b83ca 100644
--- a/products/desktop/packages/ui/src/features/browser-tabs/BrowserTabStrip.tsx
+++ b/products/desktop/packages/ui/src/features/browser-tabs/BrowserTabStrip.tsx
@@ -157,13 +157,13 @@ export function BrowserTabStrip() {
select: (s) => s.location.state.tabId,
});
const pathname = useRouterState({ select: (s) => s.location.pathname });
- // Tabs work in both spaces: channel-scoped tabs live under /website, while a
- // plain task tab (no channel) belongs to the Code experience. The space
- // decides where a task/blank tab navigates.
- const inChannels = pathname.startsWith("/website");
+ // Tabs work in both spaces: space-scoped tabs live under /spaces, while a
+ // plain task tab (no space) is unscoped. The space decides where a task or
+ // blank tab navigates.
+ const inChannels = pathname.startsWith("/spaces");
// Top-level app pages (Inbox, Agents, Skills, MCP servers, Command Center)
- // are tab targets too. useAppView normalizes both the /code routes and their
- // /website mirrors to the same view.type, so a tab survives either space. A
+ // are tab targets too. useAppView normalizes the scoped and unscoped routes
+ // to the same view.type, so a tab survives either space. A
// top-level route that ISN'T here falls through to `task-input`, and the
// strip then reconciles the location against the wrong tab and navigates
// straight back off the page.
@@ -559,20 +559,20 @@ export function BrowserTabStrip() {
const state = (prev: object) => ({ ...prev, tabId: tab.id });
if (tab.taskId && tab.channelId) {
navigate({
- to: "/website/$channelId/tasks/$taskId",
+ to: "/spaces/$channelId/tasks/$taskId",
params: { channelId: tab.channelId, taskId: tab.taskId },
state,
});
} else if (tab.taskId) {
// A channel-less task tab — the Code task detail route.
navigate({
- to: "/code/tasks/$taskId",
+ to: "/tasks/$taskId",
params: { taskId: tab.taskId },
state,
});
} else if (tab.dashboardId && tab.channelId) {
navigate({
- to: "/website/$channelId/dashboards/$dashboardId",
+ to: "/spaces/$channelId/dashboards/$dashboardId",
params: { channelId: tab.channelId, dashboardId: tab.dashboardId },
state,
});
@@ -583,22 +583,22 @@ export function BrowserTabStrip() {
const section = channelSectionFor(tab.channelSection);
if (section) {
navigate({
- to: `/website/$channelId/${section.key}` as const,
+ to: `/spaces/$channelId/${section.key}` as const,
params,
state,
});
} else {
- navigate({ to: "/website/$channelId", params, state });
+ navigate({ to: "/spaces/$channelId", params, state });
}
} else if (tab.appView && isAppView(tab.appView)) {
// A top-level app page — back to its canonical route (literal `to` per
// case so the router types stay checked).
switch (tab.appView) {
case "inbox":
- navigate({ to: "/code/inbox", state });
+ navigate({ to: "/inbox", state });
break;
case "agents":
- navigate({ to: "/code/agents", state });
+ navigate({ to: "/agents", state });
break;
case "skills":
navigate({ to: "/skills", state });
@@ -620,7 +620,7 @@ export function BrowserTabStrip() {
} else {
// Blank / landing tab: park on the space's home — the channels index, or
// the Code new-task screen.
- navigate({ to: inChannels ? "/website" : "/code", state });
+ navigate({ to: inChannels ? "/spaces" : "/new", state });
}
};
@@ -718,7 +718,7 @@ export function BrowserTabStrip() {
const landOnDefault = (tabId?: string) => {
const state = tabId ? (prev: object) => ({ ...prev, tabId }) : undefined;
if (!channelsEnabled) {
- navigate({ to: "/code", state });
+ navigate({ to: "/new", state });
return;
}
// #me is provisioned lazily server-side with the channel list (same source
@@ -727,12 +727,12 @@ export function BrowserTabStrip() {
const personal = channels.find((c) => c.channelType === "personal");
if (personal) {
navigate({
- to: "/website/$channelId",
+ to: "/spaces/$channelId",
params: { channelId: personal.id },
state,
});
} else {
- navigate({ to: "/code", state });
+ navigate({ to: "/new", state });
}
};
diff --git a/products/desktop/packages/ui/src/features/browser-tabs/useBrowserTabs.ts b/products/desktop/packages/ui/src/features/browser-tabs/useBrowserTabs.ts
index a361dd00aec3..003e79723133 100644
--- a/products/desktop/packages/ui/src/features/browser-tabs/useBrowserTabs.ts
+++ b/products/desktop/packages/ui/src/features/browser-tabs/useBrowserTabs.ts
@@ -11,9 +11,8 @@ export function useTabsSnapshot() {
/**
* True when the primary window's active tab is a blank "+" tab (no canvas, task,
- * or channel). The blank tab parks at `/website`, whose index would otherwise
- * redirect to the first channel — callers use this to suppress that redirect so
- * a blank tab (and the in-flight navigation leaving it) isn't hijacked.
+ * or channel). The root layout uses this to render the new-tab placeholder on
+ * the `/spaces` index instead of the space list (`showBlankTab` in `__root`).
*/
export function useActiveTabIsBlank(): boolean {
return activeTabIsBlank(useTabsSnapshot());
@@ -21,8 +20,6 @@ export function useActiveTabIsBlank(): boolean {
/**
* True when the primary window has no tabs at all — the user closed every tab.
- * The /website index renders the new-tab screen for this state rather than
- * redirecting to the first channel (which would silently re-open a tab).
*/
export function usePrimaryWindowHasNoTabs(): boolean {
return primaryWindowHasNoTabs(useTabsSnapshot());
diff --git a/products/desktop/packages/ui/src/features/canvas/AGENTS.md b/products/desktop/packages/ui/src/features/canvas/AGENTS.md
index 7c8ac057eecb..9f002fc76524 100644
--- a/products/desktop/packages/ui/src/features/canvas/AGENTS.md
+++ b/products/desktop/packages/ui/src/features/canvas/AGENTS.md
@@ -36,13 +36,39 @@ changing breadcrumbs, canvas naming, or the canvas generation harness. The root
## Spaces & chrome
-- Spaces is a **top-level space** reached through the app rail (`AppNav`),
- gated behind `project-bluebird` and wired in `routes/__root.tsx`. The rail's
- spaces are Code (`/code`), Inbox (`/inbox`), and Spaces (`/website`).
+- Spaces is a rail destination, gated behind `project-bluebird` and wired in
+ `routes/__root.tsx`.
+ The rail's destinations and the paths they claim live in one table,
+ `railPane.ts`: Home (`/`), Spaces (`/spaces`), Activity (`/activity`),
+ Inbox (`/inbox`), Command Center (`/command-center`), Loops (`/loops`).
+ Unclaimed routes belong to Spaces.
+ Only Spaces and Activity own the column beside the rail; the rest are
+ whole-screen, so no route under them may draw a second nav.
+- **A rail pick returns you to where that destination was**, not to its index.
+ `RailHistorySync` records the settled route per destination in
+ `railHistoryStore` (session-scoped; `startupLocation` already owns relaunch),
+ and `pickRailDestination` replays it. Only Spaces carries sidebar state on top
+ of its href, so `RailVisit.spaces` is the one pane-shaped field. Clicking the
+ destination you are already on never restores — it runs `onReclick`, which for
+ Spaces means the list.
+ Anything a destination does besides navigating must live in its route
+ component, not its `onPick`: the restore path navigates by href and never
+ reaches the navigation bridge.
+- **Testing flag-off locally:** dev builds default `project-bluebird` and
+ `code-spaces-layout` on, and that default beats posthog's own override. Force
+ them off with
+ `localStorage.setItem("ph-dev-flags-off", "project-bluebird,code-spaces-layout")`
+ and reload (see `devFlagOverrides.ts`). Bluebird-only paths are listed in
+ `bluebirdRoutes.ts`; a flag-off user who restores one lands on a new task.
+- Routes are flat, and the ones wearing the spaces chrome are grouped under the
+ **pathless** `_shell` layout rather than a URL prefix.
+ Match `fullPath` (the route's own pattern) rather than the resolved URL when
+ deciding what a route is: a space id could otherwise impersonate a
+ destination.
- The Spaces UI has **its own chrome**: rail + a persistent channel-list
- sidebar (`ChannelsList`, rendered in `__root`) + the `WebsiteLayout` outlet. It
+ sidebar (`ChannelsList`, rendered in `__root`) + the `ShellLayout` outlet. It
does NOT use the code `HeaderRow`/`MainSidebar`, so breadcrumbs render in
- `WebsiteLayout`'s own top bar (below).
+ `ShellLayout`'s own top bar (below).
- Under the channels layout the sidebar is a **master/detail slider**
(`ChannelPanes` in `ChannelsSidebar.tsx`): the searchable channel list, and the
channel you're in (`ChannelSidebar`, headed by `ChannelBackRow`). Both panes
@@ -204,16 +230,16 @@ changing breadcrumbs, canvas naming, or the canvas generation harness. The root
## Breadcrumbs
-- **`WebsiteLayout` renders its own top bar.** The Spaces UI has no code
+- **`ShellLayout` renders its own top bar.** The Spaces UI has no code
`HeaderRow`, so breadcrumbs (and the dashboard controls) are a local bar inside
- `WebsiteLayout`, not pushed through the header store.
+ `ShellLayout`, not pushed through the header store.
- **A page does not get its own crumb — its H1 is the title.** A view that
renders its own `<h1>` is NOT repeated as a breadcrumb segment for itself. The
dashboards grid's h1 is "Dashboards"; a single dashboard's h1 is its name.
- **A parent index IS a crumb when you're on a child, but not when you're on it.**
- - On the grid (`/website/$channelId`): trail is `#channel` only — no
+ - On the grid (`/spaces/$channelId`): trail is `#channel` only — no
"Dashboards" crumb (its own h1 covers it, and `#channel` already links here).
- - On a single dashboard (`/website/$channelId/dashboards/$id`): trail is
+ - On a single dashboard (`/spaces/$channelId/dashboards/$id`): trail is
`#channel / Dashboards`, where `Dashboards` links back to the grid. The
dashboard's name is the h1 below, not a crumb.
- Crumbs reflect navigable parents above the current page; the current page is
diff --git a/products/desktop/packages/ui/src/features/canvas/bluebirdRoutes.test.ts b/products/desktop/packages/ui/src/features/canvas/bluebirdRoutes.test.ts
new file mode 100644
index 000000000000..322d2ab3e12d
--- /dev/null
+++ b/products/desktop/packages/ui/src/features/canvas/bluebirdRoutes.test.ts
@@ -0,0 +1,23 @@
+import { describe, expect, it } from "vitest";
+import { isBluebirdOnlyPath } from "./bluebirdRoutes";
+
+describe("isBluebirdOnlyPath", () => {
+ // These paths lost the `/website` prefix that used to mark them flag-only, so
+ // nothing but this list stops a flag-off user restoring one.
+ it.each([
+ "/spaces",
+ "/spaces/chan-1",
+ "/spaces/chan-1/tasks/task-1",
+ "/activity",
+ "/feeds/feed-1",
+ ])("claims %s", (path) => {
+ expect(isBluebirdOnlyPath(path)).toBe(true);
+ });
+
+ it.each(["/", "/new", "/inbox", "/loops", "/command-center", "/spacesuit"])(
+ "leaves %s alone",
+ (path) => {
+ expect(isBluebirdOnlyPath(path)).toBe(false);
+ },
+ );
+});
diff --git a/products/desktop/packages/ui/src/features/canvas/bluebirdRoutes.ts b/products/desktop/packages/ui/src/features/canvas/bluebirdRoutes.ts
new file mode 100644
index 000000000000..9bda8fb31a57
--- /dev/null
+++ b/products/desktop/packages/ui/src/features/canvas/bluebirdRoutes.ts
@@ -0,0 +1,15 @@
+/**
+ * Paths that only exist inside project-bluebird: the spaces themselves, the
+ * activity feed and a feed page.
+ *
+ * These used to sit behind a `/website` prefix, which was the flag-off check.
+ * Flattening the routes took the prefix away, so the paths are listed here
+ * instead — a flag-off user restoring one has to be sent somewhere they can use.
+ */
+const BLUEBIRD_ONLY_ROOTS = ["/spaces", "/activity", "/feeds"] as const;
+
+export function isBluebirdOnlyPath(pathname: string): boolean {
+ return BLUEBIRD_ONLY_ROOTS.some(
+ (root) => pathname === root || pathname.startsWith(`${root}/`),
+ );
+}
diff --git a/products/desktop/packages/ui/src/features/canvas/channelSections.ts b/products/desktop/packages/ui/src/features/canvas/channelSections.ts
index a0573f6b50a7..5adc874a5810 100644
--- a/products/desktop/packages/ui/src/features/canvas/channelSections.ts
+++ b/products/desktop/packages/ui/src/features/canvas/channelSections.ts
@@ -1,7 +1,7 @@
/**
* Canonical channel sub-sections shown in the channel header nav
* ({@link ChannelTabs}) and surfaced as browser-tab names. The `key` is both the
- * route segment (`/website/$channelId/<key>`) and the value persisted on a tab's
+ * route segment (`/spaces/$channelId/<key>`) and the value persisted on a tab's
* `channelSection`; `label` is the tab + nav text.
*/
export interface ChannelSection {
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ActivityView.tsx b/products/desktop/packages/ui/src/features/canvas/components/ActivityView.tsx
index 1b23019985fe..110a7e06c3db 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ActivityView.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ActivityView.tsx
@@ -210,7 +210,7 @@ export function ActivityRow({
// what you haven't read.
//
// The spaces layout has no page: the feed is the column beside the rail
-// (ChannelsSidebar) and /website/activity's pane is whatever you picked from it.
+// (ChannelsSidebar) and /activity's pane is whatever you picked from it.
export function ActivityView() {
const client = useOptionalAuthenticatedClient();
const { data: currentUser } = useCurrentUser({ client });
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelBackRow.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelBackRow.tsx
index ea148d6ba5e9..40e4925f8812 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelBackRow.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelBackRow.tsx
@@ -1,4 +1,4 @@
-import { StarIcon, XIcon } from "@phosphor-icons/react";
+import { ArrowUUpLeftIcon, StarIcon } from "@phosphor-icons/react";
import {
Button,
cn,
@@ -100,8 +100,8 @@ export function ChannelBackRow({ channelId }: { channelId: string }) {
{/* The way out of a space, in the brand's own colour: a muted
caret read as decoration on a header rather than the control
it is, and people could not find their way back to the list. */}
- <XIcon
- size={14}
+ <ArrowUUpLeftIcon
+ size={12}
weight="bold"
className="shrink-0 text-primary"
/>
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelBreadcrumb.test.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelBreadcrumb.test.tsx
index 310b9b7a8118..07fa127c2111 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelBreadcrumb.test.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelBreadcrumb.test.tsx
@@ -5,7 +5,7 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
// Hoisted so the module factory below can read them, and each test can steer
// the current route / assert navigations.
const router = vi.hoisted(() => ({
- pathname: "/website/team/artifacts",
+ pathname: "/spaces/team/artifacts",
navigate: vi.fn(),
}));
const channels = vi.hoisted(() => ({
@@ -50,7 +50,7 @@ import { ChannelBreadcrumb } from "./ChannelBreadcrumb";
describe("ChannelBreadcrumb", () => {
beforeEach(() => {
- router.pathname = "/website/team/artifacts";
+ router.pathname = "/spaces/team/artifacts";
router.navigate.mockClear();
channels.star.mockClear();
channels.unstar.mockClear();
@@ -112,7 +112,7 @@ describe("ChannelBreadcrumb", () => {
expect(root).not.toHaveAttribute("aria-disabled", "true");
fireEvent.click(root);
expect(router.navigate).toHaveBeenCalledWith({
- to: "/website/$channelId",
+ to: "/spaces/$channelId",
params: { channelId: "team" },
});
});
@@ -141,7 +141,7 @@ describe("ChannelBreadcrumb", () => {
});
it("disables the root segment on the space's own index", () => {
- router.pathname = "/website/team";
+ router.pathname = "/spaces/team";
render(
<Theme>
<ChannelBreadcrumb
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelBreadcrumb.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelBreadcrumb.tsx
index 0411d3482f98..91c60aa03443 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelBreadcrumb.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelBreadcrumb.tsx
@@ -84,9 +84,7 @@ export function ChannelBreadcrumb({
const editing = editingScope === currentEditScope;
const navigate = useNavigate();
const pathname = useRouterState({ select: (s) => s.location.pathname });
- const atChannelHome = channelId
- ? pathname === `/website/${channelId}`
- : false;
+ const atChannelHome = channelId ? pathname === `/spaces/${channelId}` : false;
const channelSegment = (
<BreadcrumbSegment
@@ -101,7 +99,7 @@ export function ChannelBreadcrumb({
channelId && !atChannelHome
? () =>
void navigate({
- to: "/website/$channelId",
+ to: "/spaces/$channelId",
params: { channelId },
})
: undefined
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelFeedView.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelFeedView.tsx
index a0115d10879b..fb6549fbc540 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelFeedView.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelFeedView.tsx
@@ -726,7 +726,7 @@ const FeedItem = memo(function FeedItem({
const statusDisplay = useTaskStatusDisplay(task);
const taskData = useChannelTaskData(task);
const { togglePin } = usePinnedTasks();
- const { archiveTask } = useArchiveTask({ navigateSpace: "website" });
+ const { archiveTask } = useArchiveTask();
const { renameTask } = useRenameTask();
const commandCenterCells = useCommandCenterStore((state) => state.cells);
const [editingTitle, setEditingTitle] = useState(false);
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelHeader.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelHeader.tsx
index ee7386b3005c..19edb58f27a2 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelHeader.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelHeader.tsx
@@ -57,7 +57,7 @@ function LegacyChannelHeader({ channelId }: { channelId: string }) {
const { channels } = useChannels();
const channelName = channels.find((c) => c.id === channelId)?.name;
const pathname = useRouterState({ select: (s) => s.location.pathname });
- const isHome = pathname === `/website/${channelId}`;
+ const isHome = pathname === `/spaces/${channelId}`;
return (
<div className="flex min-w-0 items-center gap-2">
@@ -65,7 +65,7 @@ function LegacyChannelHeader({ channelId }: { channelId: string }) {
type="button"
data-selected={isHome || undefined}
onClick={() =>
- void navigate({ to: "/website/$channelId", params: { channelId } })
+ void navigate({ to: "/spaces/$channelId", params: { channelId } })
}
size="sm"
className={cn("min-w-0", isHome ? "bg-fill-selected" : "")}
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelPinnedMenu.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelPinnedMenu.tsx
index 82577b40799d..22e284f3a478 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelPinnedMenu.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelPinnedMenu.tsx
@@ -33,7 +33,7 @@ export function ChannelPinnedMenu({ channelId }: { channelId: string }) {
dashboard_id: dashboardId,
});
void navigate({
- to: "/website/$channelId/dashboards/$dashboardId",
+ to: "/spaces/$channelId/dashboards/$dashboardId",
params: { channelId, dashboardId },
});
};
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelSidebar.test.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelSidebar.test.tsx
index 6bb9f000cabd..8b86f20a0740 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelSidebar.test.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelSidebar.test.tsx
@@ -8,7 +8,7 @@ const mocks = vi.hoisted(() => ({
items: [] as ChannelItemModel[],
isLoading: false,
channelMissing: false,
- pathname: "/website/channel-1",
+ pathname: "/spaces/channel-1",
open: vi.fn(),
}));
@@ -39,7 +39,7 @@ vi.mock("@posthog/ui/features/canvas/components/ChannelsFab", () => ({
}));
// The row menu's spaces list reaches for a QueryClient the unit test has no
-// stack for. Stubbed at the module boundary, as WebsiteLayout.test.tsx does for
+// stack for. Stubbed at the module boundary, as ShellLayout.test.tsx does for
// the same reason.
vi.mock("@posthog/ui/features/canvas/hooks/useChannels", () => ({
useChannels: () => ({ channels: [] }),
@@ -113,7 +113,7 @@ describe("ChannelSidebar", () => {
mocks.items = [];
mocks.isLoading = false;
mocks.channelMissing = false;
- mocks.pathname = "/website/channel-1";
+ mocks.pathname = "/spaces/channel-1";
});
it.each([
@@ -377,7 +377,7 @@ describe("ChannelSidebar multi-select", () => {
beforeEach(() => {
mocks.isLoading = false;
mocks.channelMissing = false;
- mocks.pathname = "/website/channel-1";
+ mocks.pathname = "/spaces/channel-1";
mocks.open.mockClear();
useTaskSelectionStore.setState({
selectedTaskIds: [],
@@ -430,7 +430,7 @@ describe("ChannelSidebar multi-select", () => {
});
it("does not style the open session as selected when another session is selected", () => {
- mocks.pathname = "/website/channel-1/tasks/a";
+ mocks.pathname = "/spaces/channel-1/tasks/a";
useTaskSelectionStore.setState({ selectedTaskIds: ["b"] });
renderSidebar();
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelSidebar.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelSidebar.tsx
index af5d9e8005f5..d2bd95802a6e 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelSidebar.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelSidebar.tsx
@@ -417,7 +417,7 @@ export function ChannelSidebar({ channelId }: { channelId: string }) {
}, [isPersonalChannel, rawFilters, sources, tab]);
const filtersActive = hasActiveChannelItemFilters(filters);
- const base = `/website/${channelId}`;
+ const base = `/spaces/${channelId}`;
// Activeness is a key comparison rather than a flag baked into each item, so
// navigating doesn't rebuild the list.
const activeKey = useMemo(() => {
@@ -709,7 +709,7 @@ export function ChannelSidebar({ channelId }: { channelId: string }) {
isActive={pathname === `${base}/new`}
onClick={() =>
void navigate({
- to: "/website/$channelId/new",
+ to: "/spaces/$channelId/new",
params: { channelId },
})
}
@@ -721,14 +721,14 @@ export function ChannelSidebar({ channelId }: { channelId: string }) {
"home",
base,
() =>
- void navigate({ to: "/website/$channelId", params: { channelId } }),
+ void navigate({ to: "/spaces/$channelId", params: { channelId } }),
)}
{sectionRow(
"context",
`${base}/context`,
() =>
void navigate({
- to: "/website/$channelId/context",
+ to: "/spaces/$channelId/context",
params: { channelId },
}),
)}
@@ -738,7 +738,7 @@ export function ChannelSidebar({ channelId }: { channelId: string }) {
`${base}/loops`,
() =>
void navigate({
- to: "/website/$channelId/loops",
+ to: "/spaces/$channelId/loops",
params: { channelId },
}),
)}
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelTabs.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelTabs.tsx
index e8e2fff3d320..72ff3064a4ee 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelTabs.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelTabs.tsx
@@ -8,7 +8,7 @@ import { Link, useRouterState } from "@tanstack/react-router";
const TABS = CHANNEL_SECTIONS.map((s) => ({
key: s.key,
label: s.label,
- to: `/website/$channelId/${s.key}` as const,
+ to: `/spaces/$channelId/${s.key}` as const,
}));
// Channel section switcher shown in the channel header bar, with
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelsFab.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelsFab.tsx
index 2fabfbb2694b..7b811ab9ef3a 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelsFab.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelsFab.tsx
@@ -27,7 +27,6 @@ import { isContentEmpty } from "@posthog/ui/features/message-editor/content";
import { useDraftStore } from "@posthog/ui/features/message-editor/draftStore";
import { openTaskInput } from "@posthog/ui/router/useOpenTask";
import { track } from "@posthog/ui/shell/analytics";
-import { useRouterState } from "@tanstack/react-router";
import { useState } from "react";
/**
@@ -44,11 +43,6 @@ export function ChannelsFab({ channelId }: { channelId?: string }) {
const hasDraft = useDraftStore(
(s) => !isContentEmpty(s.drafts["task-input"]),
);
- // New task has no /website mirror yet, so it jumps back to Code unless we're
- // already in the Channels space — same rule as the nav's New task row.
- const inChannels = useRouterState({
- select: (s) => s.location.pathname.startsWith("/website"),
- });
const newTask = () => {
track(ANALYTICS_EVENTS.CHANNEL_ACTION, {
@@ -62,7 +56,7 @@ export function ChannelsFab({ channelId }: { channelId?: string }) {
openTaskInput({ channelId });
return;
}
- openTaskInput(inChannels ? { space: "website" } : undefined);
+ openTaskInput();
};
const newChannelItem = (
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelsList.test.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelsList.test.tsx
index 7bb323799a36..4dd055340a54 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelsList.test.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelsList.test.tsx
@@ -142,7 +142,7 @@ vi.mock("@posthog/ui/features/canvas/components/RenameChannelModal", () => ({
}));
vi.mock("@tanstack/react-router", () => ({
useNavigate: () => mocks.navigate,
- useRouterState: () => "/website",
+ useRouterState: () => "/spaces",
}));
import {
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelsList.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelsList.tsx
index 483dce23d48c..e066a80d7064 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelsList.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelsList.tsx
@@ -431,7 +431,7 @@ function useOpenSpaceTask(): (spaceId: string, taskId: string) => void {
// asks for the channel pane opens on the right one.
setCurrentChannel(spaceId);
void navigate({
- to: "/website/$channelId/tasks/$taskId",
+ to: "/spaces/$channelId/tasks/$taskId",
params: { channelId: spaceId, taskId },
});
};
@@ -769,8 +769,8 @@ function useChannelActions(channel: Channel): {
success: true,
});
// If we're inside the channel being deleted, fall back to the index.
- if (pathname.startsWith(`/website/${channel.id}`)) {
- void navigate({ to: "/website" });
+ if (pathname.startsWith(`/spaces/${channel.id}`)) {
+ void navigate({ to: "/spaces" });
}
return true;
} catch (error) {
@@ -968,7 +968,7 @@ const ChannelSection = memo(
const noun = spacesLayout ? "space" : "channel";
const pathname = useRouterState({ select: (s) => s.location.pathname });
const openChannel = useOpenChannel();
- const base = `/website/${channel.id}`;
+ const base = `/spaces/${channel.id}`;
// Highlight the row whenever any of the channel's routes is open.
const isActive = pathname === base || pathname.startsWith(`${base}/`);
// Lifted so the hover button group stays visible while the menu is open.
@@ -1321,7 +1321,7 @@ function useOpenPersonalChannel(): {
showChannelPane();
setCurrentChannel(channelId);
if (!spacesLayout) {
- void navigate({ to: "/website/$channelId", params: { channelId } });
+ void navigate({ to: "/spaces/$channelId", params: { channelId } });
}
};
@@ -1347,7 +1347,7 @@ function useOpenChannel(): (channel: Channel) => void {
setCurrentChannel(channel.id);
if (!spacesLayout) {
void navigate({
- to: "/website/$channelId",
+ to: "/spaces/$channelId",
params: { channelId: channel.id },
});
}
@@ -1379,8 +1379,8 @@ const PersonalChannelRow = memo(function PersonalChannelRow({
const blockedSessions = useBlockedSessionCount()(meChannel?.id);
const isActive =
!!meChannel &&
- (pathname === `/website/${meChannel.id}` ||
- pathname.startsWith(`/website/${meChannel.id}/`));
+ (pathname === `/spaces/${meChannel.id}` ||
+ pathname.startsWith(`/spaces/${meChannel.id}/`));
const newTask = () => {
const channelId = ensureChannelId();
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelsSidebar.test.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelsSidebar.test.tsx
index cc7783f840e2..3a2efa33d203 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelsSidebar.test.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelsSidebar.test.tsx
@@ -17,7 +17,7 @@ const mocks = vi.hoisted(() => ({
navigateToArchived: vi.fn(),
track: vi.fn(),
routeChannelId: undefined as string | undefined,
- routeId: "/website/$channelId/",
+ fullPath: "/spaces/$channelId",
markChannelSeen: vi.fn(),
}));
@@ -87,14 +87,13 @@ vi.mock("@tanstack/react-router", () => ({
useRouterState: ({
select,
}: {
- select: (s: { matches: { routeId: string }[] }) => unknown;
- }) => select({ matches: [{ routeId: mocks.routeId }] }),
+ select: (s: { matches: { fullPath: string }[] }) => unknown;
+ }) => select({ matches: [{ fullPath: mocks.fullPath }] }),
}));
import { PROJECT_BLUEBIRD_FLAG } from "@posthog/shared";
import { ANALYTICS_EVENTS } from "@posthog/shared/analytics-events";
import {
- keepListForRoute,
showChannelList,
useChannelPaneStore,
} from "@posthog/ui/features/canvas/stores/channelPaneStore";
@@ -136,7 +135,7 @@ describe("ChannelsSidebar", () => {
mocks.archivedTaskIds = new Set();
mocks.track.mockClear();
mocks.routeChannelId = undefined;
- mocks.routeId = "/website/$channelId/";
+ mocks.fullPath = "/spaces/$channelId/";
useCurrentChannelStore.setState({ currentChannelId: null });
useChannelPaneStore.setState({ pane: "channel" });
// hasUserSetOpen pins `open`, so the auto-open effect (which sees no
@@ -164,7 +163,7 @@ describe("ChannelsSidebar", () => {
// never be what a reader finds under the Activity destination.
it("hands the column to the activity feed on the Activity route", () => {
mocks.routeChannelId = undefined;
- mocks.routeId = "/website/activity";
+ mocks.fullPath = "/activity";
renderSidebar();
expect(screen.getByTestId("activity-feed")).toBeInTheDocument();
@@ -241,8 +240,7 @@ describe("ChannelsSidebar", () => {
mocks.routeChannelId = ENG.id;
const { rerender } = renderSidebar();
act(() => {
- showChannelList();
- keepListForRoute(ENG.id);
+ showChannelList(ENG.id);
});
expect(listIsInteractive()).toBe(true);
diff --git a/products/desktop/packages/ui/src/features/canvas/components/ChannelsSidebar.tsx b/products/desktop/packages/ui/src/features/canvas/components/ChannelsSidebar.tsx
index 47f2162660a0..afce19ede71d 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/ChannelsSidebar.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ChannelsSidebar.tsx
@@ -1,6 +1,5 @@
import { ArchiveIcon } from "@phosphor-icons/react";
import { cn, Separator } from "@posthog/quill";
-import { PROJECT_BLUEBIRD_FLAG } from "@posthog/shared";
import { useArchivedTaskIds } from "@posthog/ui/features/archive/useArchivedTaskIds";
import { ActivityFeedList } from "@posthog/ui/features/canvas/components/ActivityFeedList";
import { ChannelItemPreviewCardProvider } from "@posthog/ui/features/canvas/components/ChannelItemHoverCard";
@@ -11,6 +10,7 @@ import { useChannelsSidebarStore } from "@posthog/ui/features/canvas/components/
import { TaskFeedPane } from "@posthog/ui/features/canvas/components/TaskFeedPane";
import { useChannelPaneSwipe } from "@posthog/ui/features/canvas/hooks/useChannelPaneSwipe";
import { useChannelsLayout } from "@posthog/ui/features/canvas/hooks/useChannelsLayout";
+import { useChannelsWorld } from "@posthog/ui/features/canvas/hooks/useChannelsWorld";
import { useCurrentChannel } from "@posthog/ui/features/canvas/hooks/useCurrentChannel";
import { useMarkChannelSeen } from "@posthog/ui/features/canvas/hooks/useMarkChannelSeen";
import { useRailSurface } from "@posthog/ui/features/canvas/hooks/useRailSurface";
@@ -24,7 +24,6 @@ import {
showChannelPane,
useChannelPaneStore,
} from "@posthog/ui/features/canvas/stores/channelPaneStore";
-import { useFeatureFlag } from "@posthog/ui/features/feature-flags/useFeatureFlag";
import { useOnboardingStore } from "@posthog/ui/features/onboarding/onboardingStore";
import { NavResizeTooltip } from "@posthog/ui/features/sidebar/components/NavResizeTooltip";
import { ProjectSwitcher } from "@posthog/ui/features/sidebar/components/ProjectSwitcher";
@@ -160,13 +159,7 @@ export function ChannelsSidebar() {
// Channels stay behind project-bluebird: the switch only appears where the
// canvas backend is wired, and a persisted "on" is ignored when the flag is
// off so the sidebar can't strand a user on an unsupported feature.
- const bluebirdEnabled = useFeatureFlag(
- PROJECT_BLUEBIRD_FLAG,
- import.meta.env.DEV,
- );
- const channelsEnabled =
- useSidebarStore((s) => s.channelsEnabled) && bluebirdEnabled;
- const channelsWorld = channelsLayout || channelsEnabled;
+ const channelsWorld = useChannelsWorld();
const bodyChannelsWorld = useDeferredValue(channelsWorld);
// Under the layout the row moves into the account menu (ProjectSwitcher),
// beside Settings — the bottom of the sidebar belongs to the channel list.
diff --git a/products/desktop/packages/ui/src/features/canvas/components/CreateChannelModal.tsx b/products/desktop/packages/ui/src/features/canvas/components/CreateChannelModal.tsx
index d848135fb08d..12c504c2ccf4 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/CreateChannelModal.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/CreateChannelModal.tsx
@@ -246,7 +246,7 @@ export function CreateChannelModal({
onOpenChange(false);
void navigate({
- to: "/website/$channelId",
+ to: "/spaces/$channelId",
params: { channelId: contextId },
});
};
@@ -271,7 +271,7 @@ export function CreateChannelModal({
// task card show. The user clicks the card to open the session.
onOpenChange(false);
void navigate({
- to: "/website/$channelId",
+ to: "/spaces/$channelId",
params: { channelId: existingContext.channelId },
});
};
diff --git a/products/desktop/packages/ui/src/features/canvas/components/NavRail.test.tsx b/products/desktop/packages/ui/src/features/canvas/components/NavRail.test.tsx
index 2c51c4ecd036..773b784a2ee4 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/NavRail.test.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/NavRail.test.tsx
@@ -3,9 +3,10 @@ import userEvent from "@testing-library/user-event";
import { beforeEach, describe, expect, it, vi } from "vitest";
const mocks = vi.hoisted(() => ({
- routeId: "/website/home",
+ fullPath: "/",
+ navigate: vi.fn(),
navigateToActivity: vi.fn(),
- navigateToCanvas: vi.fn(),
+ navigateToSpaces: vi.fn(),
navigateToChannel: vi.fn(),
navigateToHome: vi.fn(),
navigateToInbox: vi.fn(),
@@ -15,8 +16,11 @@ vi.mock("@tanstack/react-router", () => ({
useRouterState: ({
select,
}: {
- select: (s: { matches: { routeId: string }[] }) => unknown;
- }) => select({ matches: [{ routeId: mocks.routeId }] }),
+ select: (s: { matches: { fullPath: string }[] }) => unknown;
+ }) => select({ matches: [{ fullPath: mocks.fullPath }] }),
+}));
+vi.mock("@posthog/ui/router/routerRef", () => ({
+ getRouterOrNull: () => ({ navigate: mocks.navigate }),
}));
vi.mock("@posthog/ui/features/canvas/hooks/useTaskActivity", () => ({
@@ -39,14 +43,14 @@ vi.mock("@posthog/ui/features/sidebar/components/ProjectSwitcher", () => ({
ProjectSwitcher: () => null,
}));
vi.mock("@posthog/ui/router/navigationBridge", () => ({
- getCurrentMatches: () => [{ routeId: mocks.routeId }],
- navigateToActivity: (...args: unknown[]) => mocks.navigateToActivity(...args),
- navigateToCanvas: (...args: unknown[]) => mocks.navigateToCanvas(...args),
- navigateToChannel: (...args: unknown[]) => mocks.navigateToChannel(...args),
- navigateToHome: (...args: unknown[]) => mocks.navigateToHome(...args),
- navigateToInbox: (...args: unknown[]) => mocks.navigateToInbox(...args),
+ getCurrentMatches: () => [{ fullPath: mocks.fullPath }],
+ navigateToActivity: (...a: unknown[]) => mocks.navigateToActivity(...a),
+ navigateToSpaces: (...a: unknown[]) => mocks.navigateToSpaces(...a),
+ navigateToChannel: (...a: unknown[]) => mocks.navigateToChannel(...a),
+ navigateToHome: (...a: unknown[]) => mocks.navigateToHome(...a),
+ navigateToInbox: (...a: unknown[]) => mocks.navigateToInbox(...a),
navigateToLoops: vi.fn(),
- navigateToWebsiteCommandCenter: vi.fn(),
+ navigateToCommandCenter: vi.fn(),
}));
vi.mock("@posthog/ui/shell/analytics", () => ({ track: vi.fn() }));
vi.mock("@posthog/ui/features/canvas/components/ActivityHoverCard", () => ({
@@ -59,32 +63,34 @@ import {
useChannelPaneStore,
} from "@posthog/ui/features/canvas/stores/channelPaneStore";
import { useCurrentChannelStore } from "@posthog/ui/features/canvas/stores/currentChannelStore";
+import { useRailHistoryStore } from "@posthog/ui/features/canvas/stores/railHistoryStore";
import { useSidebarStore } from "@posthog/ui/features/sidebar/sidebarStore";
import { NavRail } from "./NavRail";
describe("NavRail", () => {
beforeEach(() => {
vi.clearAllMocks();
- mocks.routeId = "/website/home";
+ mocks.fullPath = "/";
useSidebarStore.setState({ navItemOverrides: {}, navItemOrder: [] });
useCurrentChannelStore.setState({ currentChannelId: null });
useChannelPaneStore.setState({ pane: "channel" });
+ useRailHistoryStore.setState({ lastByPane: {} });
clearKeepListForRoute();
});
// The route is the whole answer, so a destination can never be lit over a
// screen that isn't it.
it.each([
- ["/website/home", "Home"],
- ["/website/activity", "Activity"],
- ["/code/inbox/pulls/$reportId", "Inbox"],
- ["/website/command-center", "Command Center"],
- ["/website/$channelId/loops", "Spaces"],
- ["/website/$channelId/context", "Spaces"],
- ["/website/$channelId/", "Spaces"],
- ["/website/$channelId/tasks/$taskId", "Spaces"],
- ])("lights %s as %s", (routeId, label) => {
- mocks.routeId = routeId;
+ ["/", "Home"],
+ ["/activity", "Activity"],
+ ["/inbox/pulls/$reportId", "Inbox"],
+ ["/command-center", "Command Center"],
+ ["/spaces", "Spaces"],
+ ["/spaces/$channelId/loops", "Spaces"],
+ ["/spaces/$channelId/context", "Spaces"],
+ ["/spaces/$channelId/tasks/$taskId", "Spaces"],
+ ])("lights %s as %s", (fullPath, label) => {
+ mocks.fullPath = fullPath;
render(<NavRail />);
expect(screen.getByLabelText(label)).toHaveAttribute(
@@ -93,51 +99,175 @@ describe("NavRail", () => {
);
});
- it("routes to Activity from a screen that has no column for it", async () => {
- const user = userEvent.setup();
- mocks.routeId = "/code/inbox";
- render(<NavRail />);
+ describe("with nothing remembered", () => {
+ it("routes to Activity from a screen that has no column for it", async () => {
+ const user = userEvent.setup();
+ mocks.fullPath = "/inbox";
+ render(<NavRail />);
- await user.click(screen.getByLabelText("Activity"));
+ await user.click(screen.getByLabelText("Activity"));
- expect(mocks.navigateToActivity).toHaveBeenCalledOnce();
- });
+ expect(mocks.navigateToActivity).toHaveBeenCalledOnce();
+ });
- it("leaves a whole-screen destination for the space it was scoped to", async () => {
- const user = userEvent.setup();
- useCurrentChannelStore.setState({ currentChannelId: "chan-1" });
- render(<NavRail />);
+ it("leaves a whole-screen destination for the space it was scoped to", async () => {
+ const user = userEvent.setup();
+ useCurrentChannelStore.setState({ currentChannelId: "chan-1" });
+ render(<NavRail />);
+
+ await user.click(screen.getByLabelText("Spaces"));
+
+ expect(mocks.navigateToChannel).toHaveBeenCalledWith("chan-1");
+ // Arriving at the space would otherwise slide straight past the list the
+ // pick asked for.
+ expect(shouldKeepListForRoute("chan-1")).toBe(true);
+ expect(useChannelPaneStore.getState().pane).toBe("list");
+ });
- await user.click(screen.getByLabelText("Spaces"));
+ it("falls back to the space index when nothing is scoped", async () => {
+ const user = userEvent.setup();
+ render(<NavRail />);
- expect(mocks.navigateToChannel).toHaveBeenCalledWith("chan-1");
- // Arriving at the space would otherwise slide straight past the list the
- // pick asked for.
- expect(shouldKeepListForRoute("chan-1")).toBe(true);
- expect(useChannelPaneStore.getState().pane).toBe("list");
+ await user.click(screen.getByLabelText("Spaces"));
+
+ expect(mocks.navigateToSpaces).toHaveBeenCalledOnce();
+ expect(mocks.navigateToChannel).not.toHaveBeenCalled();
+ });
});
- it("falls back to the space index when nothing is scoped", async () => {
- const user = userEvent.setup();
- render(<NavRail />);
+ describe("returning to where you were", () => {
+ it("reopens the page the destination was left on", async () => {
+ const user = userEvent.setup();
+ useRailHistoryStore.setState({
+ lastByPane: {
+ spaces: {
+ href: "/spaces/chan-1/loops",
+ spaces: { listOpen: false, spaceId: "chan-1" },
+ },
+ },
+ });
+ render(<NavRail />);
+
+ await user.click(screen.getByLabelText("Spaces"));
+
+ expect(mocks.navigate).toHaveBeenCalledWith({
+ href: "/spaces/chan-1/loops",
+ });
+ // Not the destination's index, which is where a pick used to land.
+ expect(mocks.navigateToChannel).not.toHaveBeenCalled();
+ expect(mocks.navigateToSpaces).not.toHaveBeenCalled();
+ });
+
+ // The sidebar pane is view state, so the href alone cannot bring it back.
+ it("puts the space list back if that is what was on screen", async () => {
+ const user = userEvent.setup();
+ useRailHistoryStore.setState({
+ lastByPane: {
+ spaces: {
+ href: "/spaces/chan-1/tasks/task-1",
+ spaces: { listOpen: true, spaceId: "chan-1" },
+ },
+ },
+ });
+ render(<NavRail />);
+
+ await user.click(screen.getByLabelText("Spaces"));
+
+ expect(useChannelPaneStore.getState().pane).toBe("list");
+ expect(shouldKeepListForRoute("chan-1")).toBe(true);
+ });
- await user.click(screen.getByLabelText("Spaces"));
+ // The space index and an unfiled task are both Spaces routes with no space
+ // in them; the list was open over one of them and stays open.
+ it("keeps the list open for a visit with no space in it", async () => {
+ const user = userEvent.setup();
+ mocks.fullPath = "/inbox";
+ useChannelPaneStore.setState({ pane: "channel" });
+ useRailHistoryStore.setState({
+ lastByPane: {
+ spaces: { href: "/spaces", spaces: { listOpen: true } },
+ },
+ });
+ render(<NavRail />);
+
+ await user.click(screen.getByLabelText("Spaces"));
+
+ expect(useChannelPaneStore.getState().pane).toBe("list");
+ });
+
+ it("returns to the space pane when the list was not open", async () => {
+ const user = userEvent.setup();
+ useChannelPaneStore.setState({ pane: "list" });
+ useRailHistoryStore.setState({
+ lastByPane: {
+ spaces: {
+ href: "/spaces/chan-1",
+ spaces: { listOpen: false, spaceId: "chan-1" },
+ },
+ },
+ });
+ render(<NavRail />);
+
+ await user.click(screen.getByLabelText("Spaces"));
+
+ expect(useChannelPaneStore.getState().pane).toBe("channel");
+ });
- expect(mocks.navigateToCanvas).toHaveBeenCalledOnce();
- expect(mocks.navigateToChannel).not.toHaveBeenCalled();
+ it("remembers each destination separately", async () => {
+ const user = userEvent.setup();
+ mocks.fullPath = "/";
+ useRailHistoryStore.setState({
+ lastByPane: {
+ inbox: { href: "/inbox/pulls/42" },
+ loops: { href: "/loops/abc" },
+ },
+ });
+ render(<NavRail />);
+
+ await user.click(screen.getByLabelText("Inbox"));
+
+ expect(mocks.navigate).toHaveBeenCalledWith({ href: "/inbox/pulls/42" });
+ expect(mocks.navigateToInbox).not.toHaveBeenCalled();
+ });
});
- it("only slides back to the list when a space is already on screen", async () => {
- const user = userEvent.setup();
- mocks.routeId = "/website/$channelId/tasks/$taskId";
- useCurrentChannelStore.setState({ currentChannelId: "chan-1" });
- render(<NavRail />);
+ describe("clicking the destination you are already on", () => {
+ it("slides Spaces back to the list without navigating", async () => {
+ const user = userEvent.setup();
+ mocks.fullPath = "/spaces/$channelId/loops";
+ useCurrentChannelStore.setState({ currentChannelId: "chan-1" });
+ useRailHistoryStore.setState({
+ lastByPane: {
+ spaces: {
+ href: "/spaces/chan-1",
+ spaces: { listOpen: false, spaceId: "chan-1" },
+ },
+ },
+ });
+ render(<NavRail />);
+
+ await user.click(screen.getByLabelText("Spaces"));
+
+ expect(useChannelPaneStore.getState().pane).toBe("list");
+ expect(mocks.navigate).not.toHaveBeenCalled();
+ expect(mocks.navigateToChannel).not.toHaveBeenCalled();
+ });
+
+ // The remembered page is where you are, so restoring it would be a no-op
+ // that also refuses to take you up to the destination's index.
+ it("goes up to the index rather than restoring", async () => {
+ const user = userEvent.setup();
+ mocks.fullPath = "/inbox/pulls/$reportId";
+ useRailHistoryStore.setState({
+ lastByPane: { inbox: { href: "/inbox/pulls/42" } },
+ });
+ render(<NavRail />);
- await user.click(screen.getByLabelText("Spaces"));
+ await user.click(screen.getByLabelText("Inbox"));
- expect(useChannelPaneStore.getState().pane).toBe("list");
- expect(mocks.navigateToChannel).not.toHaveBeenCalled();
- expect(mocks.navigateToCanvas).not.toHaveBeenCalled();
+ expect(mocks.navigateToInbox).toHaveBeenCalledOnce();
+ expect(mocks.navigate).not.toHaveBeenCalled();
+ });
});
it("peeks at the feed on hover while Activity is somewhere else", async () => {
@@ -153,7 +283,7 @@ describe("NavRail", () => {
it("drops the peek once Activity is the destination", async () => {
const user = userEvent.setup();
- mocks.routeId = "/website/activity";
+ mocks.fullPath = "/activity";
render(<NavRail />);
const bell = screen.getByLabelText("Activity");
diff --git a/products/desktop/packages/ui/src/features/canvas/components/NavRail.tsx b/products/desktop/packages/ui/src/features/canvas/components/NavRail.tsx
index dffe3ebb9565..b8b856a64377 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/NavRail.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/NavRail.tsx
@@ -14,6 +14,7 @@ import { LOOPS_FLAG } from "@posthog/shared";
import { ANALYTICS_EVENTS } from "@posthog/shared/analytics-events";
import { ActivityHoverCard } from "@posthog/ui/features/canvas/components/ActivityHoverCard";
import {
+ pickRailDestination,
type RailCounts,
type RailDestination,
visibleRailDestinations,
@@ -195,16 +196,14 @@ export function NavRail() {
});
const settingsVisible = isNavItemVisible(navItemOverrides, "configure");
- const pick =
- ({ analyticsId, onPick }: RailDestination) =>
- () => {
- track(ANALYTICS_EVENTS.SIDEBAR_NAV_ITEM_CLICKED, {
- item: analyticsId,
- in_more: false,
- layout: "channels",
- });
- onPick();
- };
+ const pick = (destination: RailDestination) => () => {
+ track(ANALYTICS_EVENTS.SIDEBAR_NAV_ITEM_CLICKED, {
+ item: destination.analyticsId,
+ in_more: false,
+ layout: "channels",
+ });
+ pickRailDestination(destination, railPane);
+ };
return (
// One provider for the whole rail: the tooltip skip window is provider
diff --git a/products/desktop/packages/ui/src/features/canvas/components/RailHistorySync.tsx b/products/desktop/packages/ui/src/features/canvas/components/RailHistorySync.tsx
new file mode 100644
index 000000000000..b2820eec1af0
--- /dev/null
+++ b/products/desktop/packages/ui/src/features/canvas/components/RailHistorySync.tsx
@@ -0,0 +1,49 @@
+import { useChannelsLayout } from "@posthog/ui/features/canvas/hooks/useChannelsLayout";
+import { railPaneForMatches } from "@posthog/ui/features/canvas/railPane";
+import { useChannelPaneStore } from "@posthog/ui/features/canvas/stores/channelPaneStore";
+import { useRailHistoryStore } from "@posthog/ui/features/canvas/stores/railHistoryStore";
+import { useRouterState } from "@tanstack/react-router";
+import { useEffect } from "react";
+
+/**
+ * Renders nothing — records where each rail destination was when you left it.
+ *
+ * One writer, on every settled navigation, rather than a note the rail takes as
+ * you click away: a destination is also left by hotkeys, deep links and links
+ * in the content, and a pick that only remembered its own departures would
+ * return you somewhere you had already moved on from.
+ */
+export function RailHistorySync() {
+ const channelsLayout = useChannelsLayout();
+ // Destination, href and space each read off the router snapshot. They settle
+ // together, so three selectors cannot disagree within a render.
+ //
+ // `resolvedLocation`, not `location`: during a pending navigation `location`
+ // is already the destination while `matches` still describes the page being
+ // left, and that pair records the old destination against the new href — so
+ // every pick sends you to the page you were walking away from.
+ const pane = useRouterState({ select: (s) => railPaneForMatches(s.matches) });
+ const href = useRouterState({
+ select: (s) => (s.resolvedLocation ?? s.location).href,
+ });
+ const spaceId = useRouterState({
+ select: (s) =>
+ (
+ s.matches[s.matches.length - 1]?.params as
+ | { channelId?: string }
+ | undefined
+ )?.channelId,
+ });
+ const listOpen = useChannelPaneStore((s) => s.pane === "list");
+ const record = useRailHistoryStore((s) => s.record);
+
+ useEffect(() => {
+ if (!channelsLayout) return;
+ record(pane, {
+ href,
+ spaces: pane === "spaces" ? { listOpen, spaceId } : undefined,
+ });
+ }, [channelsLayout, pane, href, spaceId, listOpen, record]);
+
+ return null;
+}
diff --git a/products/desktop/packages/ui/src/features/canvas/components/WebsiteLayout.test.tsx b/products/desktop/packages/ui/src/features/canvas/components/ShellLayout.test.tsx
similarity index 92%
rename from products/desktop/packages/ui/src/features/canvas/components/WebsiteLayout.test.tsx
rename to products/desktop/packages/ui/src/features/canvas/components/ShellLayout.test.tsx
index 50435b49ac93..a3b73fb0535c 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/WebsiteLayout.test.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ShellLayout.test.tsx
@@ -36,7 +36,7 @@ vi.mock("@tanstack/react-router", () => ({
}) =>
select({
location: { pathname: usePathname() },
- matches: [{ routeId: "/website/$channelId/tasks/$taskId" }],
+ matches: [{ routeId: "/spaces/$channelId/tasks/$taskId" }],
}),
}));
@@ -112,7 +112,7 @@ vi.mock("@posthog/ui/features/canvas/freeform/CanvasFrameHost", () => ({
import { useCanvasChatPanelStore } from "@posthog/ui/features/canvas/stores/canvasChatPanelStore";
import { useHeaderStore } from "@posthog/ui/shell/headerStore";
-import { WebsiteLayout } from "./WebsiteLayout";
+import { ShellLayout } from "./ShellLayout";
function renderLayout({
pathname,
@@ -143,13 +143,13 @@ function renderLayout({
render(
<QueryClientProvider client={new QueryClient()}>
<Theme>
- <WebsiteLayout />
+ <ShellLayout />
</Theme>
</QueryClientProvider>,
);
}
-describe("WebsiteLayout task header actions", () => {
+describe("ShellLayout task header actions", () => {
it.each([
["while generating", "task-1"],
["after generation", null],
@@ -157,7 +157,7 @@ describe("WebsiteLayout task header actions", () => {
"shows the comment count and opens comments %s",
(_label, generationTaskId) => {
renderLayout({
- pathname: "/website/chan-1/dashboards/canvas-1",
+ pathname: "/spaces/chan-1/dashboards/canvas-1",
params: { channelId: "chan-1", dashboardId: "canvas-1" },
dashboard: {
name: "Launch",
@@ -180,7 +180,7 @@ describe("WebsiteLayout task header actions", () => {
it("opens the chat panel when entering edit mode", () => {
renderLayout({
- pathname: "/website/chan-1/dashboards/canvas-1",
+ pathname: "/spaces/chan-1/dashboards/canvas-1",
params: { channelId: "chan-1", dashboardId: "canvas-1" },
dashboard: {
name: "Launch",
@@ -200,7 +200,7 @@ describe("WebsiteLayout task header actions", () => {
it("renders the task action row on a channel task detail", () => {
renderLayout({
- pathname: "/website/chan-1/tasks/task-1",
+ pathname: "/spaces/chan-1/tasks/task-1",
params: { channelId: "chan-1", taskId: "task-1" },
});
expect(screen.getByTestId("task-header-actions")).toHaveTextContent(
@@ -210,7 +210,7 @@ describe("WebsiteLayout task header actions", () => {
it("does not render actions for a task filed to another channel", () => {
renderLayout({
- pathname: "/website/chan-1/tasks/task-1",
+ pathname: "/spaces/chan-1/tasks/task-1",
params: { channelId: "chan-1", taskId: "task-1" },
channelTaskIds: ["other-task"],
});
@@ -218,8 +218,8 @@ describe("WebsiteLayout task header actions", () => {
});
it.each([
- ["channel home", "/website/chan-1", { channelId: "chan-1" }],
- ["new task", "/website/chan-1/new", { channelId: "chan-1" }],
+ ["channel home", "/spaces/chan-1", { channelId: "chan-1" }],
+ ["new task", "/spaces/chan-1/new", { channelId: "chan-1" }],
])("does not render the action row on %s", (_label, pathname, params) => {
renderLayout({ pathname, params });
expect(screen.queryByTestId("task-header-actions")).not.toBeInTheDocument();
diff --git a/products/desktop/packages/ui/src/features/canvas/components/WebsiteLayout.tsx b/products/desktop/packages/ui/src/features/canvas/components/ShellLayout.tsx
similarity index 99%
rename from products/desktop/packages/ui/src/features/canvas/components/WebsiteLayout.tsx
rename to products/desktop/packages/ui/src/features/canvas/components/ShellLayout.tsx
index b46a9821fe30..c7c001fbfab9 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/WebsiteLayout.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/ShellLayout.tsx
@@ -111,7 +111,7 @@ function FreeformEditControls({
invalidate: invalidateDashboards,
});
void navigate({
- to: "/website/$channelId",
+ to: "/spaces/$channelId",
params: { channelId },
});
};
@@ -347,7 +347,7 @@ function CanvasBreadcrumb({
// Canvas toolbar + content outlet for the Website space (channel-scoped). A
// single toolbar carries the channel breadcrumb (left) and data controls /
// actions (right).
-export function WebsiteLayout() {
+export function ShellLayout() {
const spacesLayout = useChannelsLayout();
const pathname = useRouterState({ select: (s) => s.location.pathname });
const params = useParams({ strict: false });
@@ -360,7 +360,7 @@ export function WebsiteLayout() {
const { taskId, channelId: taskChannelId } = useActiveSession();
const rightPanelOpen = useRightPanelOpen(taskId);
- const base = channelId ? `/website/${channelId}` : "/website";
+ const base = channelId ? `/spaces/${channelId}` : "/spaces";
const { data: tasks } = useTasks();
const { tasks: filedTasks } = useChannelTasks(taskChannelId);
diff --git a/products/desktop/packages/ui/src/features/canvas/components/SpaceHeaderRow.test.tsx b/products/desktop/packages/ui/src/features/canvas/components/SpaceHeaderRow.test.tsx
index f897b82de978..f2118eb67919 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/SpaceHeaderRow.test.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/SpaceHeaderRow.test.tsx
@@ -43,8 +43,8 @@ vi.mock("@tanstack/react-router", () => ({
}) => unknown;
}) =>
select({
- location: { pathname: "/website/chan-1/tasks/task-1" },
- matches: [{ routeId: "/website/$channelId/tasks/$taskId" }],
+ location: { pathname: "/spaces/chan-1/tasks/task-1" },
+ matches: [{ routeId: "/spaces/$channelId/tasks/$taskId" }],
}),
}));
vi.mock(
@@ -119,7 +119,7 @@ vi.mock("@posthog/ui/features/task-detail/components/TaskDetail", () => ({
import { useActivityDetailStore } from "@posthog/ui/features/canvas/stores/activityDetailStore";
import { useSetHeaderContent } from "@posthog/ui/hooks/useSetHeaderContent";
import { ActivityDetailPane } from "./ActivityDetailPane";
-import { WebsiteLayout } from "./WebsiteLayout";
+import { ShellLayout } from "./ShellLayout";
describe("SpaceHeaderRow", () => {
it("keeps the header store off the layout that renders its writer", () => {
@@ -131,7 +131,7 @@ describe("SpaceHeaderRow", () => {
});
render(
<QueryClientProvider client={client}>
- <WebsiteLayout />
+ <ShellLayout />
</QueryClientProvider>,
);
// A layout that subscribes to the header store blows the update depth here.
diff --git a/products/desktop/packages/ui/src/features/canvas/components/WebsiteNewTask.test.tsx b/products/desktop/packages/ui/src/features/canvas/components/SpaceNewTask.test.tsx
similarity index 94%
rename from products/desktop/packages/ui/src/features/canvas/components/WebsiteNewTask.test.tsx
rename to products/desktop/packages/ui/src/features/canvas/components/SpaceNewTask.test.tsx
index c85a547071c1..06b49a02136f 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/WebsiteNewTask.test.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/SpaceNewTask.test.tsx
@@ -38,7 +38,7 @@ vi.mock("@posthog/ui/features/task-detail/components/TaskInput", () => ({
},
}));
-// The raw channel rows WebsiteNewTask reads repository defaults from.
+// The raw channel rows SpaceNewTask reads repository defaults from.
vi.mock("@posthog/ui/features/canvas/hooks/useTaskChannels", () => ({
useTaskChannels: () => ({
channels: [
@@ -94,22 +94,22 @@ vi.mock("@tanstack/react-router", () => ({
}) =>
select({
matches: [
- { routeId: "/website/$channelId/new", params: { channelId: "chan-1" } },
+ { routeId: "/spaces/$channelId/new", params: { channelId: "chan-1" } },
],
}),
}));
-import { WebsiteNewTask } from "./WebsiteNewTask";
+import { SpaceNewTask } from "./SpaceNewTask";
function renderNewTask() {
render(
<Theme>
- <WebsiteNewTask channelId="chan-1" />
+ <SpaceNewTask channelId="chan-1" />
</Theme>,
);
}
-describe("WebsiteNewTask context panel", () => {
+describe("SpaceNewTask context panel", () => {
beforeEach(() => {
track.mockReset();
useFolderInstructions.mockReset();
diff --git a/products/desktop/packages/ui/src/features/canvas/components/WebsiteNewTask.tsx b/products/desktop/packages/ui/src/features/canvas/components/SpaceNewTask.tsx
similarity index 94%
rename from products/desktop/packages/ui/src/features/canvas/components/WebsiteNewTask.tsx
rename to products/desktop/packages/ui/src/features/canvas/components/SpaceNewTask.tsx
index 29e5ed2967df..a18f5b33a205 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/WebsiteNewTask.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/SpaceNewTask.tsx
@@ -20,10 +20,11 @@ import { useQueryClient } from "@tanstack/react-query";
import { useNavigate } from "@tanstack/react-router";
import { useCallback, useMemo, useState } from "react";
-// A channel's "New task" view. Reuses /code's TaskInput, but routes the created
-// task into the channel (/website/$channelId/tasks/$id) instead of /code, and
-// files the task to the channel (the task's `channel` field on the tasks API).
-export function WebsiteNewTask({ channelId }: { channelId: string }) {
+// A space's "New task" view. Reuses the shared TaskInput, but routes the
+// created task into the space (/spaces/$channelId/tasks/$id) instead of the
+// unscoped detail route, and files the task to the space (the task's `channel`
+// field on the tasks API).
+export function SpaceNewTask({ channelId }: { channelId: string }) {
const spacesLayout = useChannelsLayout();
const navigate = useNavigate();
const view = useAppView();
@@ -102,7 +103,7 @@ export function WebsiteNewTask({ channelId }: { channelId: string }) {
});
});
void navigate({
- to: "/website/$channelId/tasks/$taskId",
+ to: "/spaces/$channelId/tasks/$taskId",
params: { channelId, taskId: task.id },
});
},
@@ -120,7 +121,7 @@ export function WebsiteNewTask({ channelId }: { channelId: string }) {
channel_id: nextChannelId,
});
void navigate({
- to: "/website/$channelId/new",
+ to: "/spaces/$channelId/new",
params: { channelId: nextChannelId },
});
},
diff --git a/products/desktop/packages/ui/src/features/canvas/components/SpacesIndex.tsx b/products/desktop/packages/ui/src/features/canvas/components/SpacesIndex.tsx
new file mode 100644
index 000000000000..3a4b4ff385e0
--- /dev/null
+++ b/products/desktop/packages/ui/src/features/canvas/components/SpacesIndex.tsx
@@ -0,0 +1,112 @@
+import { PlusIcon, StarIcon } from "@phosphor-icons/react";
+import { channelDisplayLabel } from "@posthog/core/canvas/channelName";
+import {
+ Button,
+ Card,
+ CardContent,
+ Empty,
+ EmptyDescription,
+ EmptyHeader,
+ EmptyMedia,
+ EmptyTitle,
+ Skeleton,
+ Text,
+} from "@posthog/quill";
+import { CreateChannelModal } from "@posthog/ui/features/canvas/components/CreateChannelModal";
+import { channelGlyph } from "@posthog/ui/features/canvas/components/channelGlyph";
+import { SpacesIcon } from "@posthog/ui/features/canvas/components/SpacesIcon";
+import {
+ type Channel,
+ useChannels,
+} from "@posthog/ui/features/canvas/hooks/useChannels";
+import { Link } from "@tanstack/react-router";
+import { useState } from "react";
+
+function SpaceCard({ channel }: { channel: Channel }) {
+ const personal = channel.channelType === "personal";
+
+ return (
+ <Link
+ to="/spaces/$channelId"
+ params={{ channelId: channel.id }}
+ className="no-underline"
+ >
+ <Card className="h-full transition-colors hover:bg-fill-hover">
+ <CardContent className="flex flex-col gap-2 p-4">
+ <div className="flex min-w-0 items-center gap-1.5">
+ {channelGlyph(channel.name, { size: 14, personal })}
+ <Text weight="semibold" className="truncate">
+ {channelDisplayLabel(channel.name, channel.channelType)}
+ </Text>
+ {channel.starred && (
+ <StarIcon
+ size={12}
+ weight="fill"
+ className="shrink-0 text-warning"
+ />
+ )}
+ </div>
+ <Text size="sm" variant="muted" className="truncate">
+ {channel.repositories.length > 0
+ ? channel.repositories.join(", ")
+ : "No repositories wired up"}
+ </Text>
+ </CardContent>
+ </Card>
+ </Link>
+ );
+}
+
+/**
+ * The `/spaces` page: every space in the project, and a way to make one.
+ *
+ * A page rather than a redirect to the first space. The rail can put you here,
+ * and a destination you cannot rest on is one the rail cannot return you to.
+ */
+export function SpacesIndex() {
+ const { channels, isLoading } = useChannels();
+ const [createOpen, setCreateOpen] = useState(false);
+
+ return (
+ <div className="h-full overflow-auto bg-gray-1">
+ <div className="mx-auto w-full max-w-5xl px-6 py-6">
+ <div className="mb-4 flex items-center justify-between gap-3">
+ <Text size="lg" weight="semibold">
+ Spaces
+ </Text>
+ <Button variant="primary" onClick={() => setCreateOpen(true)}>
+ <PlusIcon size={14} />
+ New space…
+ </Button>
+ </div>
+
+ {isLoading ? (
+ <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3">
+ {[0, 1, 2].map((i) => (
+ <Skeleton key={i} className="h-[86px] w-full" />
+ ))}
+ </div>
+ ) : channels.length === 0 ? (
+ <Empty>
+ <EmptyHeader>
+ <EmptyMedia variant="icon">
+ <SpacesIcon size={20} />
+ </EmptyMedia>
+ <EmptyTitle>No spaces yet</EmptyTitle>
+ <EmptyDescription>
+ A space gets its own sessions, canvases, and context.
+ </EmptyDescription>
+ </EmptyHeader>
+ </Empty>
+ ) : (
+ <div className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3">
+ {channels.map((channel) => (
+ <SpaceCard key={channel.id} channel={channel} />
+ ))}
+ </div>
+ )}
+ </div>
+ <CreateChannelModal open={createOpen} onOpenChange={setCreateOpen} />
+ </div>
+ );
+}
diff --git a/products/desktop/packages/ui/src/features/canvas/components/TaskFeedHome.tsx b/products/desktop/packages/ui/src/features/canvas/components/TaskFeedHome.tsx
index c7e7ca733211..b4bc00300da1 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/TaskFeedHome.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/TaskFeedHome.tsx
@@ -90,7 +90,7 @@ export function TaskFeedHome({ feedId }: { feedId: string }) {
feed_id: feed.id,
});
toast.success("Saved search deleted");
- void navigate({ to: "/website" });
+ void navigate({ to: "/spaces" });
}, [feed, removeFeed, navigate]);
if (!feed) {
diff --git a/products/desktop/packages/ui/src/features/canvas/components/TaskFeedPane.tsx b/products/desktop/packages/ui/src/features/canvas/components/TaskFeedPane.tsx
index d9637d6ec1c9..b5e6a59b37ee 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/TaskFeedPane.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/TaskFeedPane.tsx
@@ -64,7 +64,7 @@ export function TaskFeedPane({
useTaskFeedResults(feed?.query);
const archivedTaskIds = useArchivedTaskIds();
const { pinnedTaskIds, togglePin, setPinnedMany } = usePinnedTasks();
- const { archiveTask } = useArchiveTask({ navigateSpace: "website" });
+ const { archiveTask } = useArchiveTask();
const sessionFacts = useChannelSessionFacts();
const commandCenterCells = useCommandCenterStore((state) => state.cells);
const [editOpen, setEditOpen] = useState(false);
@@ -143,7 +143,7 @@ export function TaskFeedPane({
feed_id: feed.id,
});
toast.success("Saved search deleted");
- void navigate({ to: "/website" });
+ void navigate({ to: "/spaces" });
};
return (
diff --git a/products/desktop/packages/ui/src/features/canvas/components/WebsiteChannelHistory.tsx b/products/desktop/packages/ui/src/features/canvas/components/WebsiteChannelHistory.tsx
index fc66b0f72fb4..b893014d2aa6 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/WebsiteChannelHistory.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/WebsiteChannelHistory.tsx
@@ -66,7 +66,7 @@ export function WebsiteChannelHistory({ channelId }: { channelId: string }) {
accent: "violet",
onClick: () =>
navigate({
- to: "/website/$channelId/dashboards/$dashboardId",
+ to: "/spaces/$channelId/dashboards/$dashboardId",
params: { channelId, dashboardId: d.id },
}),
}));
@@ -86,7 +86,7 @@ export function WebsiteChannelHistory({ channelId }: { channelId: string }) {
accent: "blue",
onClick: () =>
navigate({
- to: "/website/$channelId/tasks/$taskId",
+ to: "/spaces/$channelId/tasks/$taskId",
params: { channelId, taskId: f.taskId },
}),
},
diff --git a/products/desktop/packages/ui/src/features/canvas/components/WebsiteChannelHome.tsx b/products/desktop/packages/ui/src/features/canvas/components/WebsiteChannelHome.tsx
index 3796953bdc73..626c40cc0057 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/WebsiteChannelHome.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/WebsiteChannelHome.tsx
@@ -192,7 +192,7 @@ export function WebsiteChannelHome({ channelId }: { channelId: string }) {
const handleOpenFull = useCallback(
(taskId: string) => {
void navigate({
- to: "/website/$channelId/tasks/$taskId",
+ to: "/spaces/$channelId/tasks/$taskId",
params: { channelId, taskId },
});
},
diff --git a/products/desktop/packages/ui/src/features/canvas/components/WebsiteChannelsIndex.tsx b/products/desktop/packages/ui/src/features/canvas/components/WebsiteChannelsIndex.tsx
deleted file mode 100644
index 059fdf772ca3..000000000000
--- a/products/desktop/packages/ui/src/features/canvas/components/WebsiteChannelsIndex.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-import { PlusIcon } from "@phosphor-icons/react";
-import { Button } from "@posthog/quill";
-import { BlankTabView } from "@posthog/ui/features/browser-tabs/BlankTabView";
-import {
- useActiveTabIsBlank,
- usePrimaryWindowHasNoTabs,
-} from "@posthog/ui/features/browser-tabs/useBrowserTabs";
-import { CreateChannelModal } from "@posthog/ui/features/canvas/components/CreateChannelModal";
-import { useChannels } from "@posthog/ui/features/canvas/hooks/useChannels";
-import { useChannelsLayout } from "@posthog/ui/features/canvas/hooks/useChannelsLayout";
-import { Flex, Text } from "@radix-ui/themes";
-import { Navigate, useRouterState } from "@tanstack/react-router";
-import { useState } from "react";
-
-// /website index: send the user to their first channel, or prompt them to
-// create one when none exist yet.
-export function WebsiteChannelsIndex() {
- const spacesLayout = useChannelsLayout();
- const { channels, isLoading } = useChannels();
- const [modalOpen, setModalOpen] = useState(false);
- // A blank "+" tab parks at /website; RootLayout renders the placeholder for
- // it. Never redirect to the first channel while it's active.
- const activeTabIsBlank = useActiveTabIsBlank();
- // The user closed every tab — show the new-tab screen instead of redirecting
- // to the first channel, which would silently re-open a tab (the index's
- // redirect puts a channel in the route, and decideTabNavigation then opens a
- // tab for it). The empty strip should land on the new-tab screen.
- const hasNoTabs = usePrimaryWindowHasNoTabs();
- // Guard against TanStack rendering this stale index for a couple of frames
- // after a navigation has already left /website (the Outlet un-suppresses on
- // the way to /website/$channelId before the matched leaf settles). Only the
- // index path may redirect; otherwise this redirect hijacks the in-flight
- // navigation back to channels[0] (the browser-tabs blank-tab race).
- const onIndexPath = useRouterState({
- select: (s) => s.location.pathname === "/website",
- });
-
- if (isLoading) return null;
-
- if (!onIndexPath || activeTabIsBlank) return null;
-
- if (channels.length > 0) {
- // Empty tab strip → the new-tab screen, not a redirect that re-opens a tab.
- if (hasNoTabs) return <BlankTabView />;
- return (
- <Navigate
- to="/website/$channelId"
- params={{ channelId: channels[0].id }}
- replace
- />
- );
- }
-
- return (
- <Flex
- direction="column"
- align="center"
- justify="center"
- height="100%"
- gap="3"
- className="px-6 text-center"
- >
- <Flex direction="column" gap="1">
- <Text size="3" weight="bold" className="text-gray-12">
- No {spacesLayout ? "spaces" : "channels"} yet
- </Text>
- <Text size="2" className="text-gray-10">
- Create a {spacesLayout ? "space" : "channel"} to get its own canvases,
- tasks, and settings.
- </Text>
- </Flex>
- <Button variant="primary" onClick={() => setModalOpen(true)}>
- <PlusIcon size={14} />
- Create {spacesLayout ? "space" : "channel"}
- </Button>
- <CreateChannelModal open={modalOpen} onOpenChange={setModalOpen} />
- </Flex>
- );
-}
diff --git a/products/desktop/packages/ui/src/features/canvas/components/WebsiteDashboardsIndex.tsx b/products/desktop/packages/ui/src/features/canvas/components/WebsiteDashboardsIndex.tsx
index 6ffda5456d24..cf25a02cdaf3 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/WebsiteDashboardsIndex.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/components/WebsiteDashboardsIndex.tsx
@@ -101,7 +101,7 @@ const DashboardCard = memo(function DashboardCard({
)}
>
<Link
- to="/website/$channelId/dashboards/$dashboardId"
+ to="/spaces/$channelId/dashboards/$dashboardId"
params={{ channelId, dashboardId: summary.id }}
className="no-underline"
onClick={() =>
diff --git a/products/desktop/packages/ui/src/features/canvas/components/railDestinations.ts b/products/desktop/packages/ui/src/features/canvas/components/railDestinations.ts
index d8b6a00d6b17..aef9be2aa99d 100644
--- a/products/desktop/packages/ui/src/features/canvas/components/railDestinations.ts
+++ b/products/desktop/packages/ui/src/features/canvas/components/railDestinations.ts
@@ -7,15 +7,16 @@ import {
} from "@phosphor-icons/react";
import type { SidebarNavItem } from "@posthog/shared/analytics-events";
import { SpacesIcon } from "@posthog/ui/features/canvas/components/SpacesIcon";
+import type { NavRailPane } from "@posthog/ui/features/canvas/railPane";
import {
- getRailPane,
- type NavRailPane,
-} from "@posthog/ui/features/canvas/railPane";
-import {
- keepListForRoute,
showChannelList,
+ showChannelPane,
} from "@posthog/ui/features/canvas/stores/channelPaneStore";
import { useCurrentChannelStore } from "@posthog/ui/features/canvas/stores/currentChannelStore";
+import {
+ type RailVisit,
+ useRailHistoryStore,
+} from "@posthog/ui/features/canvas/stores/railHistoryStore";
import {
formatHotkey,
SHORTCUTS,
@@ -29,13 +30,14 @@ import type { CountBadgeTone } from "@posthog/ui/primitives/CountBadge";
import { LoopIcon } from "@posthog/ui/primitives/LoopIcon";
import {
navigateToActivity,
- navigateToCanvas,
navigateToChannel,
+ navigateToCommandCenter,
navigateToHome,
navigateToInbox,
navigateToLoops,
- navigateToWebsiteCommandCenter,
+ navigateToSpaces,
} from "@posthog/ui/router/navigationBridge";
+import { getRouterOrNull } from "@posthog/ui/router/routerRef";
import type { ComponentType } from "react";
export interface RailCounts {
@@ -49,9 +51,13 @@ export interface RailDestination {
label: string;
analyticsId: SidebarNavItem;
Icon: ComponentType<IconProps>;
- /** Every pick routes. The rail's selected state is read back off the route,
- * so a destination that changed nothing in the URL could never be left. */
+ /** Where the destination lands with nothing remembered. */
onPick: () => void;
+ /**
+ * What a click on the destination you are already on does, when that differs
+ * from landing on its root. Defaults to `onPick`.
+ */
+ onReclick?: () => void;
customizableId?: CustomizableNavItemId;
shortcut?: string;
count?: (counts: RailCounts) => number;
@@ -65,20 +71,46 @@ export interface RailDestination {
* to put it in, so leaving one is part of the pick.
*/
export function showSpaces(): void {
- showChannelList();
- if (getRailPane() === "spaces") return;
-
const channelId = useCurrentChannelStore.getState().currentChannelId;
if (!channelId) {
- navigateToCanvas();
+ showChannelList();
+ navigateToSpaces();
return;
}
- // Arriving at a space pulls the slider to that space. This pick asked for the
- // list, so latch it across the navigation it is about to make.
- keepListForRoute(channelId);
+ showChannelList(channelId);
navigateToChannel(channelId);
}
+/** Put a destination back the way you left it, sidebar pane included. */
+function restoreVisit(visit: RailVisit): void {
+ const spaces = visit.spaces;
+ if (spaces) {
+ if (!spaces.listOpen) showChannelPane();
+ // An unscoped space route (the index, an unfiled task) has no channel to
+ // hold the list across, but the list was open and stays open.
+ else showChannelList(spaces.spaceId);
+ }
+ void getRouterOrNull()?.navigate({ href: visit.href });
+}
+
+/**
+ * Act on a rail click: return to where the destination was, or land on its root
+ * when there is nothing to return to. Clicking the destination you are already
+ * on never restores — you are looking at it.
+ */
+export function pickRailDestination(
+ destination: RailDestination,
+ current: NavRailPane,
+): void {
+ if (destination.pane === current) {
+ (destination.onReclick ?? destination.onPick)();
+ return;
+ }
+ const visit = useRailHistoryStore.getState().lastByPane[destination.pane];
+ if (visit) restoreVisit(visit);
+ else destination.onPick();
+}
+
export const RAIL_DESTINATIONS: readonly RailDestination[] = [
{
pane: "home",
@@ -93,6 +125,9 @@ export const RAIL_DESTINATIONS: readonly RailDestination[] = [
analyticsId: "spaces",
Icon: SpacesIcon,
onPick: showSpaces,
+ // Already in Spaces, so the pick is asking for the one thing above the
+ // space you are in: the list.
+ onReclick: showChannelList,
},
{
pane: "activity",
@@ -119,7 +154,7 @@ export const RAIL_DESTINATIONS: readonly RailDestination[] = [
label: "Command Center",
analyticsId: "command_center",
Icon: Lightning,
- onPick: navigateToWebsiteCommandCenter,
+ onPick: navigateToCommandCenter,
count: (counts) => counts.commandCenter,
countTone: "neutral",
},
diff --git a/products/desktop/packages/ui/src/features/canvas/freeform/CanvasFrameHost.tsx b/products/desktop/packages/ui/src/features/canvas/freeform/CanvasFrameHost.tsx
index 677a94c61d48..81a41693d6fa 100644
--- a/products/desktop/packages/ui/src/features/canvas/freeform/CanvasFrameHost.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/freeform/CanvasFrameHost.tsx
@@ -3,7 +3,7 @@ import type { CSSProperties } from "react";
import { useCanvasFrameStore } from "./canvasFrameStore";
import { FreeformCanvas } from "./FreeformCanvas";
-// Persistent warm-iframe pool, mounted once by WebsiteLayout so it survives every
+// Persistent warm-iframe pool, mounted once by ShellLayout so it survives every
// in-space navigation. Each pool slot is a long-lived FreeformCanvas (keyed by slot
// index, never re-parented) overlaid onto the active canvas's placeholder rect. The
// active slot is visible + interactive; warm-but-hidden slots keep their iframe (and
diff --git a/products/desktop/packages/ui/src/features/canvas/freeform/FreeformCanvasView.tsx b/products/desktop/packages/ui/src/features/canvas/freeform/FreeformCanvasView.tsx
index 42e5380d2372..1fa092f78577 100644
--- a/products/desktop/packages/ui/src/features/canvas/freeform/FreeformCanvasView.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/freeform/FreeformCanvasView.tsx
@@ -941,7 +941,7 @@ export function FreeformCanvasView({
</Text>
<RadixButton size="1" variant="soft" asChild>
<Link
- to="/website/$channelId/tasks/$taskId"
+ to="/spaces/$channelId/tasks/$taskId"
params={{ channelId, taskId: effectiveTaskId }}
>
View task
@@ -1334,7 +1334,7 @@ function GeneratingState({
size="default"
render={
<Link
- to="/website/$channelId/tasks/$taskId"
+ to="/spaces/$channelId/tasks/$taskId"
params={{ channelId, taskId }}
/>
}
diff --git a/products/desktop/packages/ui/src/features/canvas/freeform/canvasFrameStore.ts b/products/desktop/packages/ui/src/features/canvas/freeform/canvasFrameStore.ts
index 00c3b9a93c54..562793c93e84 100644
--- a/products/desktop/packages/ui/src/features/canvas/freeform/canvasFrameStore.ts
+++ b/products/desktop/packages/ui/src/features/canvas/freeform/canvasFrameStore.ts
@@ -11,7 +11,7 @@ import { create } from "zustand";
// across canvases. The sandbox's `init` message swaps the rendered canvas in place
// without reloading, so a booted iframe can be re-pointed at a different canvas's
// code. We therefore keep a small pool of physical frames (indexed slots) alive in
-// the persistent WebsiteLayout and assign canvases to them: the first few distinct
+// the persistent ShellLayout and assign canvases to them: the first few distinct
// canvases each boot a frame; after the pool is full, a new canvas reuses the
// least-recently-active frame via an init code-swap — no reload.
//
diff --git a/products/desktop/packages/ui/src/features/canvas/grid/WebsiteHome.test.tsx b/products/desktop/packages/ui/src/features/canvas/grid/HomeView.test.tsx
similarity index 94%
rename from products/desktop/packages/ui/src/features/canvas/grid/WebsiteHome.test.tsx
rename to products/desktop/packages/ui/src/features/canvas/grid/HomeView.test.tsx
index 1c25ad56ba2d..bfe22a6f66dd 100644
--- a/products/desktop/packages/ui/src/features/canvas/grid/WebsiteHome.test.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/grid/HomeView.test.tsx
@@ -25,7 +25,7 @@ vi.mock("@posthog/host-router/react", () => ({
// query that resolves which canvas Home shows.
vi.mock("./GridCanvasView", () => ({ GridCanvasView: () => null }));
-import { WebsiteHome } from "./WebsiteHome";
+import { HomeView } from "./HomeView";
let queryClient: QueryClient;
@@ -35,7 +35,7 @@ function wrapper({ children }: { children: ReactNode }) {
);
}
-describe("WebsiteHome", () => {
+describe("HomeView", () => {
beforeEach(() => {
vi.clearAllMocks();
queryClient = new QueryClient({
@@ -51,7 +51,7 @@ describe("WebsiteHome", () => {
it("caches the home canvas under a query an account change evicts", async () => {
mocks.home.mockResolvedValue({ id: "canvas-1", name: "Home" });
- render(<WebsiteHome />, { wrapper });
+ render(<HomeView />, { wrapper });
await screen.findByText("Home");
expect(queryClient.getQueryData(HOME_KEY)).toMatchObject({
id: "canvas-1",
diff --git a/products/desktop/packages/ui/src/features/canvas/grid/WebsiteHome.tsx b/products/desktop/packages/ui/src/features/canvas/grid/HomeView.tsx
similarity index 99%
rename from products/desktop/packages/ui/src/features/canvas/grid/WebsiteHome.tsx
rename to products/desktop/packages/ui/src/features/canvas/grid/HomeView.tsx
index d1d9653fc9dc..9f4e18203fac 100644
--- a/products/desktop/packages/ui/src/features/canvas/grid/WebsiteHome.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/grid/HomeView.tsx
@@ -22,7 +22,7 @@ import { GridCanvasView } from "./GridCanvasView";
* (idempotent get-or-create) and composed like any other grid canvas — draw a
* box and describe it.
*/
-export function WebsiteHome() {
+export function HomeView() {
const trpc = useHostTRPC();
const [editing, setEditing] = useState(false);
// Entering edit opens the canvas chat dock, like the freeform Edit button.
diff --git a/products/desktop/packages/ui/src/features/canvas/hooks/useChannelItems.tsx b/products/desktop/packages/ui/src/features/canvas/hooks/useChannelItems.tsx
index d855ffd1c88e..93850ff45a96 100644
--- a/products/desktop/packages/ui/src/features/canvas/hooks/useChannelItems.tsx
+++ b/products/desktop/packages/ui/src/features/canvas/hooks/useChannelItems.tsx
@@ -94,7 +94,7 @@ export function useChannelItems(channelId: string): {
});
const archivedTaskIds = useArchivedTaskIds();
const { pinnedTaskIds, togglePin, setPinnedMany } = usePinnedTasks();
- const { archiveTask } = useArchiveTask({ navigateSpace: "website" });
+ const { archiveTask } = useArchiveTask();
const { setPinned: setCanvasPinned, invalidateDashboards } =
useDashboardMutations();
const client = useOptionalAuthenticatedClient();
@@ -156,12 +156,12 @@ export function useChannelItems(channelId: string): {
open: (item) => {
if (item.kind === "canvas") {
void navigate({
- to: "/website/$channelId/dashboards/$dashboardId",
+ to: "/spaces/$channelId/dashboards/$dashboardId",
params: { channelId, dashboardId: item.id },
});
} else {
void navigate({
- to: "/website/$channelId/tasks/$taskId",
+ to: "/spaces/$channelId/tasks/$taskId",
params: { channelId, taskId: item.id },
});
}
diff --git a/products/desktop/packages/ui/src/features/canvas/hooks/useChannelsWorld.ts b/products/desktop/packages/ui/src/features/canvas/hooks/useChannelsWorld.ts
new file mode 100644
index 000000000000..db20d6eb6f39
--- /dev/null
+++ b/products/desktop/packages/ui/src/features/canvas/hooks/useChannelsWorld.ts
@@ -0,0 +1,19 @@
+import { useChannelsLayout } from "@posthog/ui/features/canvas/hooks/useChannelsLayout";
+import { useBluebirdFlag } from "@posthog/ui/features/feature-flags/useBluebirdFlag";
+import { useSidebarStore } from "@posthog/ui/features/sidebar/sidebarStore";
+
+/**
+ * Whether any channels chrome is on screen: the spaces layout, or the older
+ * channels alpha behind the sidebar toggle. The shell's in-pane header, the
+ * right panel and the canvas frame host belong to both, so the routes under
+ * `_shell` ask this rather than the layout flag alone.
+ *
+ * A persisted "on" for the alpha is ignored without bluebird, so the toggle
+ * can't strand a user on a feature whose backend isn't wired.
+ */
+export function useChannelsWorld(): boolean {
+ const layout = useChannelsLayout();
+ const bluebird = useBluebirdFlag();
+ const toggledOn = useSidebarStore((s) => s.channelsEnabled);
+ return layout || (toggledOn && bluebird);
+}
diff --git a/products/desktop/packages/ui/src/features/canvas/hooks/useDashboards.ts b/products/desktop/packages/ui/src/features/canvas/hooks/useDashboards.ts
index 818e1208de72..a60ea0ab4900 100644
--- a/products/desktop/packages/ui/src/features/canvas/hooks/useDashboards.ts
+++ b/products/desktop/packages/ui/src/features/canvas/hooks/useDashboards.ts
@@ -266,7 +266,7 @@ export function useCreateAndOpenDashboard(
const record = await createDashboard(targetChannelId, name, templateId);
setEditing(record.id, true);
await navigate({
- to: "/website/$channelId/dashboards/$dashboardId",
+ to: "/spaces/$channelId/dashboards/$dashboardId",
params: { channelId: targetChannelId, dashboardId: record.id },
});
} catch (error) {
diff --git a/products/desktop/packages/ui/src/features/canvas/hooks/useShellOwnsHeader.ts b/products/desktop/packages/ui/src/features/canvas/hooks/useShellOwnsHeader.ts
new file mode 100644
index 000000000000..f0b0208bdbf4
--- /dev/null
+++ b/products/desktop/packages/ui/src/features/canvas/hooks/useShellOwnsHeader.ts
@@ -0,0 +1,19 @@
+import { useChannelsWorld } from "@posthog/ui/features/canvas/hooks/useChannelsWorld";
+import { useRouterState } from "@tanstack/react-router";
+
+/**
+ * Whether `ShellLayout` is drawing the in-pane header for the current route.
+ *
+ * The root mounts the shared `ContentHeader` everywhere this is false, so the
+ * two have to answer from the same rule or a route gets two headers or none.
+ *
+ * Read off the match chain rather than the path: `_shell` is pathless, so the
+ * URL no longer says which routes it covers.
+ */
+export function useShellOwnsHeader(): boolean {
+ const channelsWorld = useChannelsWorld();
+ const inShell = useRouterState({
+ select: (s) => s.matches.some((m) => m.routeId.startsWith("/_shell")),
+ });
+ return inShell && channelsWorld;
+}
diff --git a/products/desktop/packages/ui/src/features/canvas/hooks/useSpaceTaskActions.ts b/products/desktop/packages/ui/src/features/canvas/hooks/useSpaceTaskActions.ts
index 01525d30e467..d8bda06ffcb2 100644
--- a/products/desktop/packages/ui/src/features/canvas/hooks/useSpaceTaskActions.ts
+++ b/products/desktop/packages/ui/src/features/canvas/hooks/useSpaceTaskActions.ts
@@ -30,7 +30,7 @@ export interface SpaceTaskActions {
*/
export function useSpaceTaskActions(): SpaceTaskActions {
const { togglePin } = usePinnedTasks();
- const { archiveTask } = useArchiveTask({ navigateSpace: "website" });
+ const { archiveTask } = useArchiveTask();
const cells = useCommandCenterStore((state) => state.cells);
const assignTask = useCommandCenterStore((state) => state.assignTask);
diff --git a/products/desktop/packages/ui/src/features/canvas/railPane.test.ts b/products/desktop/packages/ui/src/features/canvas/railPane.test.ts
index 8097a12f289e..ddc5259ff86f 100644
--- a/products/desktop/packages/ui/src/features/canvas/railPane.test.ts
+++ b/products/desktop/packages/ui/src/features/canvas/railPane.test.ts
@@ -1,34 +1,47 @@
import { describe, expect, it } from "vitest";
-import { railPaneForRouteId, railPaneHasSidebar } from "./railPane";
+import {
+ RAIL_PANE_ROOT,
+ railPaneForPath,
+ railPaneHasSidebar,
+} from "./railPane";
-describe("railPaneForRouteId", () => {
+describe("railPaneForPath", () => {
it.each([
- ["/website/home", "home"],
- ["/website/activity", "activity"],
- ["/website/command-center", "command-center"],
+ ["/", "home"],
+ ["/activity", "activity"],
["/command-center", "command-center"],
- ["/code/inbox", "inbox"],
- ["/code/inbox/pulls/$reportId", "inbox"],
- ["/code/loops", "loops"],
- ["/code/loops/$loopId/edit", "loops"],
- ] as const)("puts %s on %s", (routeId, pane) => {
- expect(railPaneForRouteId(routeId)).toBe(pane);
+ ["/inbox", "inbox"],
+ ["/inbox/pulls/$reportId", "inbox"],
+ ["/loops", "loops"],
+ ["/loops/$loopId/edit", "loops"],
+ ] as const)("puts %s on %s", (path, pane) => {
+ expect(railPaneForPath(path)).toBe(pane);
});
- // A space page is a space page whatever it is called. The lookalikes are the
- // reason this matches route ids rather than path text.
+ // Home is every path's prefix, so a prefix test would hand it the whole app.
+ it.each(["/activity", "/inbox", "/spaces/$channelId", "/tasks/$taskId"])(
+ "does not let Home claim %s",
+ (path) => {
+ expect(railPaneForPath(path)).not.toBe("home");
+ },
+ );
+
+ // A space page is a space page whatever it is called. Matching the route
+ // pattern rather than the resolved URL is what keeps a space named "loops"
+ // from impersonating the Loops destination.
it.each([
- "/website/",
- "/website/$channelId/",
- "/website/$channelId/loops",
- "/website/$channelId/context",
- "/website/$channelId/history",
- "/website/$channelId/canvases",
- "/website/$channelId/tasks/$taskId",
- "/website/feeds/$feedId",
- "/code/tasks/$taskId",
- ])("leaves %s with Spaces", (routeId) => {
- expect(railPaneForRouteId(routeId)).toBe("spaces");
+ "/spaces",
+ "/spaces/$channelId",
+ "/spaces/$channelId/loops",
+ "/spaces/$channelId/context",
+ "/spaces/$channelId/history",
+ "/spaces/$channelId/canvases",
+ "/spaces/$channelId/tasks/$taskId",
+ "/feeds/$feedId",
+ "/tasks/$taskId",
+ "/new",
+ ])("leaves %s with Spaces", (path) => {
+ expect(railPaneForPath(path)).toBe("spaces");
});
});
@@ -44,3 +57,11 @@ describe("railPaneHasSidebar", () => {
expect(railPaneHasSidebar(pane)).toBe(true);
});
});
+
+describe("RAIL_PANE_ROOT", () => {
+ // Each destination's root has to belong to that destination, or a pick with
+ // nothing remembered would land somewhere the rail then lights differently.
+ it.each(Object.entries(RAIL_PANE_ROOT))("%s roots at %s", (pane, root) => {
+ expect(railPaneForPath(root)).toBe(pane);
+ });
+});
diff --git a/products/desktop/packages/ui/src/features/canvas/railPane.ts b/products/desktop/packages/ui/src/features/canvas/railPane.ts
index 16b5f3a01524..7f0524c8166a 100644
--- a/products/desktop/packages/ui/src/features/canvas/railPane.ts
+++ b/products/desktop/packages/ui/src/features/canvas/railPane.ts
@@ -17,32 +17,47 @@ export type NavRailPane =
| "loops";
/**
- * Route id prefixes each destination claims. Matched against the deepest route
- * in the match chain, so a destination claims its whole subtree (/code/inbox
- * covers /code/inbox/pulls/$reportId) without claiming a lookalike elsewhere
- * (/code/loops never covers /website/$channelId/loops).
+ * The root path of each destination.
+ *
+ * Matched against the deepest match's `fullPath` — the route's own pattern, not
+ * the resolved URL — so a destination claims its whole subtree (`/inbox` covers
+ * `/inbox/pulls/$reportId`) and no space id can ever impersonate one.
*/
-const PANE_BY_ROUTE_PREFIX: readonly (readonly [string, NavRailPane])[] = [
- ["/website/home", "home"],
- ["/website/activity", "activity"],
- ["/website/command-center", "command-center"],
- ["/command-center", "command-center"],
- ["/code/inbox", "inbox"],
- ["/code/loops", "loops"],
+export const RAIL_PANE_ROOT: Readonly<Record<NavRailPane, string>> = {
+ home: "/",
+ spaces: "/spaces",
+ activity: "/activity",
+ inbox: "/inbox",
+ "command-center": "/command-center",
+ loops: "/loops",
+};
+
+// Spaces is absent: it takes everything nothing else claims, so listing it
+// would only shadow that fallback with the same answer.
+const CLAIMED: readonly NavRailPane[] = [
+ "home",
+ "activity",
+ "inbox",
+ "command-center",
+ "loops",
];
-/** Unclaimed routes belong to Spaces — the app's resting destination. */
-export function railPaneForRouteId(routeId: string): NavRailPane {
- for (const [prefix, pane] of PANE_BY_ROUTE_PREFIX) {
- if (routeId === prefix || routeId.startsWith(`${prefix}/`)) return pane;
+export function railPaneForPath(fullPath: string): NavRailPane {
+ for (const pane of CLAIMED) {
+ const root = RAIL_PANE_ROOT[pane];
+ if (fullPath === root) return pane;
+ // Home is exact-only: every path starts with "/", so a prefix test would
+ // hand it every route in the app.
+ if (root !== "/" && fullPath.startsWith(`${root}/`)) return pane;
}
+ // Unclaimed routes belong to Spaces — the app's resting destination.
return "spaces";
}
export function railPaneForMatches(
- matches: readonly { routeId: string }[],
+ matches: readonly { fullPath: string }[],
): NavRailPane {
- return railPaneForRouteId(matches[matches.length - 1]?.routeId ?? "");
+ return railPaneForPath(matches[matches.length - 1]?.fullPath ?? "");
}
/** Read the destination outside React (event handlers, imperative picks). */
diff --git a/products/desktop/packages/ui/src/features/canvas/stores/channelPaneStore.ts b/products/desktop/packages/ui/src/features/canvas/stores/channelPaneStore.ts
index 8c4d2c68671c..3576db6c40da 100644
--- a/products/desktop/packages/ui/src/features/canvas/stores/channelPaneStore.ts
+++ b/products/desktop/packages/ui/src/features/canvas/stores/channelPaneStore.ts
@@ -43,9 +43,15 @@ export function clearKeepListForRoute(): void {
keepListForChannelId = null;
}
-/** Slide back to the channel list, keeping the scoped channel as it is. */
-export function showChannelList(): void {
- keepListForChannelId = null;
+/**
+ * Slide back to the channel list, keeping the scoped channel as it is.
+ *
+ * Pass `keepForRoute` when the caller is about to navigate into that channel:
+ * arriving at a channel pulls the slider to it, and the latch holds the list
+ * across that navigation.
+ */
+export function showChannelList(keepForRoute?: string): void {
+ keepListForChannelId = keepForRoute ?? null;
useChannelPaneStore.getState().setPane("list");
}
diff --git a/products/desktop/packages/ui/src/features/canvas/stores/railHistoryStore.test.ts b/products/desktop/packages/ui/src/features/canvas/stores/railHistoryStore.test.ts
new file mode 100644
index 000000000000..98d6601e8bc3
--- /dev/null
+++ b/products/desktop/packages/ui/src/features/canvas/stores/railHistoryStore.test.ts
@@ -0,0 +1,19 @@
+import { beforeEach, expect, it } from "vitest";
+import { resetRailHistory, useRailHistoryStore } from "./railHistoryStore";
+
+beforeEach(() => resetRailHistory());
+
+it("forgets every remembered destination on reset", () => {
+ // A project or account switch calls this; without it a later rail pick would
+ // restore a page — or re-scope the app to a space — from the old project.
+ useRailHistoryStore.getState().record("spaces", {
+ href: "/spaces/old-space",
+ spaces: { listOpen: true, spaceId: "old-space" },
+ });
+ useRailHistoryStore.getState().record("inbox", { href: "/inbox/pulls/1" });
+ expect(useRailHistoryStore.getState().lastByPane).not.toEqual({});
+
+ resetRailHistory();
+
+ expect(useRailHistoryStore.getState().lastByPane).toEqual({});
+});
diff --git a/products/desktop/packages/ui/src/features/canvas/stores/railHistoryStore.ts b/products/desktop/packages/ui/src/features/canvas/stores/railHistoryStore.ts
new file mode 100644
index 000000000000..cfc38d5219db
--- /dev/null
+++ b/products/desktop/packages/ui/src/features/canvas/stores/railHistoryStore.ts
@@ -0,0 +1,48 @@
+import type { NavRailPane } from "@posthog/ui/features/canvas/railPane";
+import { create } from "zustand";
+
+/**
+ * The sidebar state a space visit has on top of its route: whether the space
+ * list was drawn over the space pane, and the space it was drawn over. That is
+ * view state rather than a route, so the href alone cannot bring it back.
+ */
+export interface SpacesVisitView {
+ listOpen: boolean;
+ /** Absent on the space index and other unscoped routes. */
+ spaceId?: string;
+}
+
+export interface RailVisit {
+ /** The concrete href, so a pick returns to the page, not the destination. */
+ href: string;
+ /** Set only for Spaces — no other destination has a sidebar pane to restore. */
+ spaces?: SpacesVisitView;
+}
+
+interface RailHistoryState {
+ lastByPane: Partial<Record<NavRailPane, RailVisit>>;
+ record: (pane: NavRailPane, visit: RailVisit) => void;
+}
+
+/**
+ * Where each rail destination was when you last left it.
+ *
+ * Session-scoped on purpose: `startupLocation` already reopens the app on the
+ * route you quit, so persisting this would compete with it on launch and hand
+ * you a week-old inbox report behind a destination you had moved on from.
+ */
+export const useRailHistoryStore = create<RailHistoryState>()((set) => ({
+ lastByPane: {},
+ record: (pane, visit) =>
+ set((state) => ({ lastByPane: { ...state.lastByPane, [pane]: visit } })),
+}));
+
+/**
+ * Forget every remembered destination. Called on logout and project switch
+ * (beside `resetCurrentChannel`) because a visit holds hrefs and space ids from
+ * the current project; without this a rail pick after a switch would restore a
+ * page — or re-scope the app to a space — from the project the user just left.
+ */
+export function resetRailHistory(): void {
+ useRailHistoryStore.setState({ lastByPane: {} });
+}
diff --git a/products/desktop/packages/ui/src/features/canvas/taskCardNavigation.test.ts b/products/desktop/packages/ui/src/features/canvas/taskCardNavigation.test.ts
index 4fe539c10d6e..e85f2f9edc72 100644
--- a/products/desktop/packages/ui/src/features/canvas/taskCardNavigation.test.ts
+++ b/products/desktop/packages/ui/src/features/canvas/taskCardNavigation.test.ts
@@ -4,7 +4,7 @@ import { taskCardNavigation } from "./taskCardNavigation";
describe("taskCardNavigation", () => {
it("opens the channel task view", () => {
expect(taskCardNavigation("channel-1", "task-1")).toEqual({
- to: "/website/$channelId/tasks/$taskId",
+ to: "/spaces/$channelId/tasks/$taskId",
params: { channelId: "channel-1", taskId: "task-1" },
});
});
diff --git a/products/desktop/packages/ui/src/features/canvas/taskCardNavigation.ts b/products/desktop/packages/ui/src/features/canvas/taskCardNavigation.ts
index 571a6cd3a74c..cb3dec2491e6 100644
--- a/products/desktop/packages/ui/src/features/canvas/taskCardNavigation.ts
+++ b/products/desktop/packages/ui/src/features/canvas/taskCardNavigation.ts
@@ -1,6 +1,6 @@
export function taskCardNavigation(channelId: string, taskId: string) {
return {
- to: "/website/$channelId/tasks/$taskId" as const,
+ to: "/spaces/$channelId/tasks/$taskId" as const,
params: { channelId, taskId },
};
}
diff --git a/products/desktop/packages/ui/src/features/command-center/components/CommandCenterPanel.tsx b/products/desktop/packages/ui/src/features/command-center/components/CommandCenterPanel.tsx
index 6cc5a7aef597..b230cc54bb26 100644
--- a/products/desktop/packages/ui/src/features/command-center/components/CommandCenterPanel.tsx
+++ b/products/desktop/packages/ui/src/features/command-center/components/CommandCenterPanel.tsx
@@ -426,7 +426,7 @@ function CanvasCell({
const handleOpen = useCallback(() => {
if (!dashboard) return;
void navigate({
- to: "/website/$channelId/dashboards/$dashboardId",
+ to: "/spaces/$channelId/dashboards/$dashboardId",
params: { channelId: dashboard.channelId, dashboardId: canvasId },
});
}, [canvasId, dashboard, navigate]);
diff --git a/products/desktop/packages/ui/src/features/command-center/components/CommandCenterView.tsx b/products/desktop/packages/ui/src/features/command-center/components/CommandCenterView.tsx
index c8f40759c064..4bad24f2eb34 100644
--- a/products/desktop/packages/ui/src/features/command-center/components/CommandCenterView.tsx
+++ b/products/desktop/packages/ui/src/features/command-center/components/CommandCenterView.tsx
@@ -1,3 +1,5 @@
+import { ANALYTICS_EVENTS } from "@posthog/shared/analytics-events";
+import { track } from "@posthog/ui/shell/analytics";
import { Box, Flex } from "@radix-ui/themes";
import { useEffect, useMemo } from "react";
import { useSetHeaderContent } from "../../../hooks/useSetHeaderContent";
@@ -15,6 +17,13 @@ export function CommandCenterView() {
useAutofillCommandCenter();
+ // Tracked on arrival rather than in the navigation bridge: the rail returns
+ // to a remembered page by href, so a bridge-side event would miss every pick
+ // after the first, as would a deep link or the back button.
+ useEffect(() => {
+ track(ANALYTICS_EVENTS.COMMAND_CENTER_VIEWED);
+ }, []);
+
// A cell whose task has been deleted holds a dead id, so occupancy is judged
// on what actually renders — Optimize then packs the grid and drops the rest.
const occupiedCellIndices = useMemo(() => {
@@ -42,7 +51,7 @@ export function CommandCenterView() {
// Root-level page: no breadcrumb row. Its own toolbar names the view, and
// there's no parent space to walk back to, so the bar was an empty frame.
// (Pushing null also collapses the row inside the Channels space, where
- // WebsiteLayout renders whatever the active view puts in the header store.)
+ // ShellLayout renders whatever the active view puts in the header store.)
useSetHeaderContent(null);
return (
diff --git a/products/desktop/packages/ui/src/features/feature-flags/devFlagOverrides.ts b/products/desktop/packages/ui/src/features/feature-flags/devFlagOverrides.ts
new file mode 100644
index 000000000000..2dded76bc915
--- /dev/null
+++ b/products/desktop/packages/ui/src/features/feature-flags/devFlagOverrides.ts
@@ -0,0 +1,33 @@
+const STORAGE_KEY = "ph-dev-flags-off";
+
+/**
+ * Flags forced off for local development, as a comma-separated list under
+ * `ph-dev-flags-off` in localStorage:
+ *
+ * localStorage.setItem("ph-dev-flags-off", "project-bluebird,code-spaces-layout")
+ *
+ * Dev builds default several flags on (`useFeatureFlag(key, import.meta.env.DEV)`),
+ * and posthog's own override cannot undo that — the default is applied after it.
+ * Without this there is no way to see the flag-off app short of editing source.
+ *
+ * Read once at module load: which flags are off is a boot-time choice, and a
+ * flag flipping mid-session is not what a flag-off user sees.
+ */
+const forcedOff: ReadonlySet<string> = (() => {
+ if (!import.meta.env.DEV) return new Set<string>();
+ try {
+ const raw = globalThis.localStorage?.getItem(STORAGE_KEY) ?? "";
+ return new Set(
+ raw
+ .split(",")
+ .map((key) => key.trim())
+ .filter(Boolean),
+ );
+ } catch {
+ return new Set<string>();
+ }
+})();
+
+export function isFlagForcedOff(flagKey: string): boolean {
+ return forcedOff.has(flagKey);
+}
diff --git a/products/desktop/packages/ui/src/features/feature-flags/useFeatureFlag.ts b/products/desktop/packages/ui/src/features/feature-flags/useFeatureFlag.ts
index 6028ac63abfc..d458defb6649 100644
--- a/products/desktop/packages/ui/src/features/feature-flags/useFeatureFlag.ts
+++ b/products/desktop/packages/ui/src/features/feature-flags/useFeatureFlag.ts
@@ -1,18 +1,24 @@
import { useService } from "@posthog/di/react";
import { useEffect, useState } from "react";
+import { isFlagForcedOff } from "./devFlagOverrides";
import { FEATURE_FLAGS, type FeatureFlags } from "./identifiers";
export function useFeatureFlag(flagKey: string, defaultValue = false): boolean {
const flags = useService<FeatureFlags>(FEATURE_FLAGS);
+ // A dev-only kill switch, since a dev default beats both the flag's real
+ // value and posthog's override. See devFlagOverrides.
const [enabled, setEnabled] = useState(
- () => flags.isEnabled(flagKey) || defaultValue,
+ () =>
+ !isFlagForcedOff(flagKey) && (flags.isEnabled(flagKey) || defaultValue),
);
useEffect(() => {
- setEnabled(flags.isEnabled(flagKey) || defaultValue);
+ const read = () =>
+ !isFlagForcedOff(flagKey) && (flags.isEnabled(flagKey) || defaultValue);
+ setEnabled(read());
return flags.onFlagsLoaded(() => {
- setEnabled(flags.isEnabled(flagKey) || defaultValue);
+ setEnabled(read());
});
}, [flags, flagKey, defaultValue]);
diff --git a/products/desktop/packages/ui/src/features/inbox/AGENTS.md b/products/desktop/packages/ui/src/features/inbox/AGENTS.md
index f49098b41a88..6373812ebbba 100644
--- a/products/desktop/packages/ui/src/features/inbox/AGENTS.md
+++ b/products/desktop/packages/ui/src/features/inbox/AGENTS.md
@@ -19,14 +19,14 @@ Inbox has four tabs and one reviewer-scope control:
| Tab | Route | Membership |
| --- | --- | --- |
-| Pull requests | `/code/inbox/pulls` | Reports with `implementation_pr_url` set |
-| Reports | `/code/inbox/reports` | Reports without a PR and not currently running |
-| Runs | `/code/inbox/runs` | Reports that are still in progress or waiting on input |
-| Archive | `/code/inbox/dismissed` | Terminal reports: archived/suppressed (`status === "suppressed"`) and resolved-by-merged-PR (`status === "resolved"`) |
+| Pull requests | `/inbox/pulls` | Reports with `implementation_pr_url` set |
+| Reports | `/inbox/reports` | Reports without a PR and not currently running |
+| Runs | `/inbox/runs` | Reports that are still in progress or waiting on input |
+| Archive | `/inbox/dismissed` | Terminal reports: archived/suppressed (`status === "suppressed"`) and resolved-by-merged-PR (`status === "resolved"`) |
-Detail pages live under the same tab: `/code/inbox/<tab>/$reportId`.
+Detail pages live under the same tab: `/inbox/<tab>/$reportId`.
-The Archive tab (route `/code/inbox/dismissed`, user-facing label "Archive") is
+The Archive tab (route `/inbox/dismissed`, user-facing label "Archive") is
the exception: it holds the two terminal, not-in-inbox states — `suppressed`
(user-archived) and `resolved` (implementation PR merged) — both excluded from
the main pipeline query, so the tab fetches them with a dedicated
@@ -53,7 +53,7 @@ same artefact-lift pattern as `priority`/`actionability`/`already_addressed` —
so cards avoid an N+1 per-card artefact fetch. Unknown reason codes fall back to
the raw value; cards with no dismissal artefact simply omit the chip.
-Responder configuration is **not** an Inbox tab. It is the top-level Responders sidebar item at `/code/agents`. The legacy `/code/inbox/agents` route redirects there.
+Responder configuration is **not** an Inbox tab. It is the top-level Responders sidebar item at `/agents`. The legacy `/inbox/agents` route redirects there.
Reviewer scope is a UI preference stored in `inboxReviewerScopeStore`. It filters the list between reports suggested for the current user and reports for someone else. It does not change tab membership; the tab predicates are independent.
@@ -70,7 +70,7 @@ Do not add frontend-only controls that imply a backend capability. If the UI exp
## Routes and Shell
-`InboxView` is the layout shell for `/code/inbox/*`. It owns the page header, tab bar, reviewer scope control, and nested route outlet. Route files live in `apps/code/src/renderer/routes/code/inbox/`.
+`InboxView` is the layout shell for `/inbox/*`. It owns the page header, tab bar, reviewer scope control, and nested route outlet. Route files live in `apps/code/src/renderer/routes/inbox/`.
The tab components are intentionally simple:
@@ -141,7 +141,7 @@ Components come from `@posthog/quill`; layout is `div`s with Tailwind. Radix is
- Do not add any `@radix-ui/*` import. Use `@posthog/quill` plus `div` + Tailwind.
- Do not reuse the deleted legacy `ReportListRow`, `ReportDetailPane`, or old list/detail stores.
- Do not put page-level Inbox title or navigation into the global app header; `InboxView` owns the Inbox page chrome.
-- Responder configuration stays at `/code/agents`. The Inbox header carries a "Configure agents" link to it, but do not embed configuration UI in the Inbox itself.
+- Responder configuration stays at `/agents`. The Inbox header carries a "Configure agents" link to it, but do not embed configuration UI in the Inbox itself.
- Scout (`signals_scout`) is a real Cloud source product. Keep it covered wherever source products surface: `INBOX_SOURCE_OPTIONS`, `SOURCE_PRODUCT_META`, and the scout-name display in `SignalCard`.
- Scout management UI (fleet configuration, run history) lives in `features/scouts/` and is backed by the PostHog Cloud scout endpoints (`/api/projects/{teamId}/signals/scout/`). Do not add scout controls that have no backing endpoint there.
- Do not put preview shims or mock report data in `apps/code/index.html`; the app shell should stay minimal.
diff --git a/products/desktop/packages/ui/src/features/inbox/components/AgentRunCard.tsx b/products/desktop/packages/ui/src/features/inbox/components/AgentRunCard.tsx
index f56d431ebe06..0caa1b4d8beb 100644
--- a/products/desktop/packages/ui/src/features/inbox/components/AgentRunCard.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/components/AgentRunCard.tsx
@@ -111,7 +111,7 @@ export function AgentRunCard({ report }: AgentRunCardProps) {
type="button"
onClick={() =>
navigate({
- to: "/code/inbox/runs/$reportId",
+ to: "/inbox/runs/$reportId",
params: { reportId: report.id },
})
}
diff --git a/products/desktop/packages/ui/src/features/inbox/components/AgentRunDetail.tsx b/products/desktop/packages/ui/src/features/inbox/components/AgentRunDetail.tsx
index 4f32aea5e9e1..188ea77956c1 100644
--- a/products/desktop/packages/ui/src/features/inbox/components/AgentRunDetail.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/components/AgentRunDetail.tsx
@@ -142,9 +142,7 @@ function RunOutputReadyCard({ report }: { report: SignalReport }) {
return (
<Link
- to={
- isPr ? "/code/inbox/pulls/$reportId" : "/code/inbox/reports/$reportId"
- }
+ to={isPr ? "/inbox/pulls/$reportId" : "/inbox/reports/$reportId"}
params={{ reportId: report.id }}
className="group block rounded-(--radius-2) border border-border bg-(--color-panel-solid) px-4 py-3.5 no-underline transition duration-150 hover:border-(--gray-6) hover:bg-(--gray-2) hover:shadow-sm focus-visible:outline-none"
>
@@ -209,7 +207,7 @@ export function AgentRunDetail({ reportId }: AgentRunDetailProps) {
return (
<InboxReportDetailGate
reportId={reportId}
- backTo="/code/inbox/runs"
+ backTo="/inbox/runs"
backLabel="Back to runs"
missingCopy="This run couldn't be found. It may have completed or been removed."
>
@@ -266,7 +264,7 @@ function AgentRunDetailContent({ report }: { report: SignalReport }) {
return (
<Flex direction="column" className="min-h-full">
<InboxDetailPageHeader
- backTo="/code/inbox/runs"
+ backTo="/inbox/runs"
backLabel="Back to runs"
breadcrumb={
<>
diff --git a/products/desktop/packages/ui/src/features/inbox/components/DismissedReportDetail.tsx b/products/desktop/packages/ui/src/features/inbox/components/DismissedReportDetail.tsx
index 54f36bd310de..f1b63292cebe 100644
--- a/products/desktop/packages/ui/src/features/inbox/components/DismissedReportDetail.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/components/DismissedReportDetail.tsx
@@ -44,14 +44,14 @@ export function DismissedReportDetail({
// returns there. Arriving directly (deep link, Archive-tab click, refresh)
// falls back to "Back to archive".
const back = useInboxBackTarget({
- to: "/code/inbox/dismissed",
+ to: "/inbox/dismissed",
label: "Back to archive",
});
return (
<InboxReportDetailGate
reportId={reportId}
cachedReport={cachedReport}
- backTo="/code/inbox/dismissed"
+ backTo="/inbox/dismissed"
backLabel="Back to archive"
backLinkTo={back.to}
backLinkLabel={back.label}
@@ -113,7 +113,7 @@ function RestoreReportButton({ report }: { report: SignalReport }) {
title="Restore this report to the inbox"
onClick={() =>
restore.mutate(report.id, {
- onSuccess: () => navigate({ to: "/code/inbox/dismissed" }),
+ onSuccess: () => navigate({ to: "/inbox/dismissed" }),
})
}
>
diff --git a/products/desktop/packages/ui/src/features/inbox/components/InboxDetailFrame.tsx b/products/desktop/packages/ui/src/features/inbox/components/InboxDetailFrame.tsx
index 85e315fc3b70..f53389c390d2 100644
--- a/products/desktop/packages/ui/src/features/inbox/components/InboxDetailFrame.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/components/InboxDetailFrame.tsx
@@ -30,7 +30,7 @@ import { type ComponentType, type ReactNode, useState } from "react";
interface InboxDetailFrameProps {
report: SignalReport;
- /** List route for the back-link (e.g. "/code/inbox/pulls"). */
+ /** List route for the back-link (e.g. "/inbox/pulls"). */
backTo: InboxListRoute;
backLabel: string;
/**
diff --git a/products/desktop/packages/ui/src/features/inbox/components/InboxPageHeader.tsx b/products/desktop/packages/ui/src/features/inbox/components/InboxPageHeader.tsx
index 0dc57adcd665..1f14f79c137c 100644
--- a/products/desktop/packages/ui/src/features/inbox/components/InboxPageHeader.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/components/InboxPageHeader.tsx
@@ -28,7 +28,7 @@ interface InboxPageHeaderProps {
}
/**
- * Responder configuration lives at /code/agents, not in the inbox. The header
+ * Responder configuration lives at /agents, not in the inbox. The header
* carries this always-visible way there so the config surface stays one click
* away from the work it powers.
*/
@@ -37,7 +37,7 @@ function ConfigureAgentsButton() {
<Button
variant="primary"
size="sm"
- render={<Link to="/code/agents" />}
+ render={<Link to="/agents" />}
className="shrink-0"
>
<RobotIcon size={14} />
diff --git a/products/desktop/packages/ui/src/features/inbox/components/InboxReportDetailGate.tsx b/products/desktop/packages/ui/src/features/inbox/components/InboxReportDetailGate.tsx
index 60691a1f665c..0b55aaf20d59 100644
--- a/products/desktop/packages/ui/src/features/inbox/components/InboxReportDetailGate.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/components/InboxReportDetailGate.tsx
@@ -35,10 +35,10 @@ interface InboxReportDetailGateProps {
}
type InboxDetailRoute =
- | "/code/inbox/pulls/$reportId"
- | "/code/inbox/reports/$reportId"
- | "/code/inbox/runs/$reportId"
- | "/code/inbox/dismissed/$reportId";
+ | "/inbox/pulls/$reportId"
+ | "/inbox/reports/$reportId"
+ | "/inbox/runs/$reportId"
+ | "/inbox/dismissed/$reportId";
/**
* Detail route a non-suppressed report belongs on, by the same tab-membership
@@ -48,9 +48,9 @@ type InboxDetailRoute =
* through to Runs — the only tab that actually lists them.
*/
function nonSuppressedDetailRoute(report: SignalReport): InboxDetailRoute {
- if (isPullRequestReport(report)) return "/code/inbox/pulls/$reportId";
- if (isReportTabReport(report)) return "/code/inbox/reports/$reportId";
- return "/code/inbox/runs/$reportId";
+ if (isPullRequestReport(report)) return "/inbox/pulls/$reportId";
+ if (isReportTabReport(report)) return "/inbox/reports/$reportId";
+ return "/inbox/runs/$reportId";
}
/**
@@ -90,13 +90,13 @@ export function InboxReportDetailGate({
// `initialDataUpdatedAt: 0`). Both terminal states belong on the Archive route,
// so resolved cards keep their reference-only detail view instead of being
// bounced to Runs.
- const onDismissedRoute = backTo === "/code/inbox/dismissed";
+ const onDismissedRoute = backTo === "/inbox/dismissed";
const isArchived =
resolvedReport != null && isDismissedReport(resolvedReport);
let redirectTo: InboxDetailRoute | null = null;
if (resolvedReport && !isFetching) {
if (isArchived && !onDismissedRoute) {
- redirectTo = "/code/inbox/dismissed/$reportId";
+ redirectTo = "/inbox/dismissed/$reportId";
} else if (!isArchived && onDismissedRoute) {
redirectTo = nonSuppressedDetailRoute(resolvedReport);
}
@@ -123,7 +123,7 @@ export function InboxReportDetailGate({
// only fires from a non-Archive route, so `backTo` is the pipeline origin
// the user is returning to.
state:
- redirectTo === "/code/inbox/dismissed/$reportId"
+ redirectTo === "/inbox/dismissed/$reportId"
? { inboxBackOrigin: { to: backTo, label: backLabel } }
: undefined,
});
@@ -182,9 +182,9 @@ export function InboxReportDetailGate({
function tabFromBackTo(
backTo: InboxReportDetailGateProps["backTo"],
): InboxDetailTab | null {
- if (backTo === "/code/inbox/pulls") return "pulls";
- if (backTo === "/code/inbox/runs") return "runs";
- if (backTo === "/code/inbox/dismissed") return null;
+ if (backTo === "/inbox/pulls") return "pulls";
+ if (backTo === "/inbox/runs") return "runs";
+ if (backTo === "/inbox/dismissed") return null;
return "reports";
}
diff --git a/products/desktop/packages/ui/src/features/inbox/components/PullRequestCard.tsx b/products/desktop/packages/ui/src/features/inbox/components/PullRequestCard.tsx
index 85df12aaa4f7..a9de3afe7894 100644
--- a/products/desktop/packages/ui/src/features/inbox/components/PullRequestCard.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/components/PullRequestCard.tsx
@@ -181,7 +181,7 @@ export function PullRequestCard({
isDismissPending = false,
}: PullRequestCardProps) {
const detailRoute = {
- to: "/code/inbox/pulls/$reportId" as const,
+ to: "/inbox/pulls/$reportId" as const,
params: { reportId: report.id },
};
const { prefetch, pointerHandlers } = useInboxReportDetailPrefetch(
diff --git a/products/desktop/packages/ui/src/features/inbox/components/PullRequestDetail.tsx b/products/desktop/packages/ui/src/features/inbox/components/PullRequestDetail.tsx
index e579c19d6843..949d771bddbb 100644
--- a/products/desktop/packages/ui/src/features/inbox/components/PullRequestDetail.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/components/PullRequestDetail.tsx
@@ -37,7 +37,7 @@ export function PullRequestDetail({
<InboxReportDetailGate
reportId={reportId}
cachedReport={cachedReport}
- backTo="/code/inbox/pulls"
+ backTo="/inbox/pulls"
backLabel="Back to pull requests"
missingCopy="This pull request couldn't be found. It may have been deleted."
>
@@ -54,7 +54,7 @@ function PullRequestDetailContent({ report }: { report: SignalReport }) {
return (
<InboxDetailFrame
report={report}
- backTo="/code/inbox/pulls"
+ backTo="/inbox/pulls"
backLabel="Back to pull requests"
fallbackTitle="Untitled pull request"
breadcrumb={
diff --git a/products/desktop/packages/ui/src/features/inbox/components/ReportCard.tsx b/products/desktop/packages/ui/src/features/inbox/components/ReportCard.tsx
index b8db72ef234e..84d1054e84c1 100644
--- a/products/desktop/packages/ui/src/features/inbox/components/ReportCard.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/components/ReportCard.tsx
@@ -325,11 +325,11 @@ export function ReportCard(props: ReportCardProps) {
const detailRoute = isArchived
? {
- to: "/code/inbox/dismissed/$reportId" as const,
+ to: "/inbox/dismissed/$reportId" as const,
params: { reportId: report.id },
}
: {
- to: "/code/inbox/reports/$reportId" as const,
+ to: "/inbox/reports/$reportId" as const,
params: { reportId: report.id },
};
const { prefetch, pointerHandlers } = useInboxReportDetailPrefetch(
diff --git a/products/desktop/packages/ui/src/features/inbox/components/ReportDetail.tsx b/products/desktop/packages/ui/src/features/inbox/components/ReportDetail.tsx
index 9ca41fa44993..4a43652678bf 100644
--- a/products/desktop/packages/ui/src/features/inbox/components/ReportDetail.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/components/ReportDetail.tsx
@@ -27,7 +27,7 @@ export function ReportDetail({
<InboxReportDetailGate
reportId={reportId}
cachedReport={cachedReport}
- backTo="/code/inbox/reports"
+ backTo="/inbox/reports"
backLabel="Back to reports"
missingCopy="This report couldn't be found. It may have been deleted."
>
@@ -40,7 +40,7 @@ function ReportDetailContent({ report }: { report: SignalReport }) {
return (
<InboxDetailFrame
report={report}
- backTo="/code/inbox/reports"
+ backTo="/inbox/reports"
backLabel="Back to reports"
fallbackTitle="Untitled report"
primaryAction={
diff --git a/products/desktop/packages/ui/src/features/inbox/components/ReportTasksSection.tsx b/products/desktop/packages/ui/src/features/inbox/components/ReportTasksSection.tsx
index 5098de0338e1..485f6a7c960c 100644
--- a/products/desktop/packages/ui/src/features/inbox/components/ReportTasksSection.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/components/ReportTasksSection.tsx
@@ -12,7 +12,7 @@ interface ReportTasksSectionProps {
/**
* Slim Runs caption + one row per linked task. Each row opens the run
- * detail at `/code/inbox/runs/$reportId` — the run view is where the task
+ * detail at `/inbox/runs/$reportId` — the run view is where the task
* log lives, this section is the doorway.
*/
export function ReportTasksSection({ report }: ReportTasksSectionProps) {
@@ -30,7 +30,7 @@ export function ReportTasksSection({ report }: ReportTasksSectionProps) {
purposeLabel={purposeLabel}
onOpen={() =>
navigate({
- to: "/code/inbox/runs/$reportId",
+ to: "/inbox/runs/$reportId",
params: { reportId: report.id },
})
}
diff --git a/products/desktop/packages/ui/src/features/inbox/hooks/useInboxBackTarget.test.ts b/products/desktop/packages/ui/src/features/inbox/hooks/useInboxBackTarget.test.ts
index aa6d352b9232..8235c55436b8 100644
--- a/products/desktop/packages/ui/src/features/inbox/hooks/useInboxBackTarget.test.ts
+++ b/products/desktop/packages/ui/src/features/inbox/hooks/useInboxBackTarget.test.ts
@@ -3,16 +3,10 @@ import { asInboxBackTarget } from "./useInboxBackTarget";
describe("asInboxBackTarget", () => {
it.each([
- ["reports origin", { to: "/code/inbox/reports", label: "Back to reports" }],
- [
- "pulls origin",
- { to: "/code/inbox/pulls", label: "Back to pull requests" },
- ],
- ["runs origin", { to: "/code/inbox/runs", label: "Back to runs" }],
- [
- "archive origin",
- { to: "/code/inbox/dismissed", label: "Back to archive" },
- ],
+ ["reports origin", { to: "/inbox/reports", label: "Back to reports" }],
+ ["pulls origin", { to: "/inbox/pulls", label: "Back to pull requests" }],
+ ["runs origin", { to: "/inbox/runs", label: "Back to runs" }],
+ ["archive origin", { to: "/inbox/dismissed", label: "Back to archive" }],
])("accepts a valid %s", (_label, value) => {
expect(asInboxBackTarget(value)).toEqual(value);
});
@@ -21,13 +15,10 @@ describe("asInboxBackTarget", () => {
["undefined (no history state)", undefined],
["null", null],
["a non-object", "reports"],
- ["a route outside the inbox", { to: "/code/tasks", label: "Back" }],
- [
- "a non-list inbox route",
- { to: "/code/inbox/reports/abc", label: "Back" },
- ],
- ["a missing label", { to: "/code/inbox/reports" }],
- ["an empty label", { to: "/code/inbox/reports", label: "" }],
+ ["a route outside the inbox", { to: "/tasks", label: "Back" }],
+ ["a non-list inbox route", { to: "/inbox/reports/abc", label: "Back" }],
+ ["a missing label", { to: "/inbox/reports" }],
+ ["an empty label", { to: "/inbox/reports", label: "" }],
["a missing route", { label: "Back to reports" }],
["a non-string route", { to: 7, label: "Back" }],
])("rejects %s and falls back", (_label, value) => {
diff --git a/products/desktop/packages/ui/src/features/inbox/hooks/useInboxBackTarget.ts b/products/desktop/packages/ui/src/features/inbox/hooks/useInboxBackTarget.ts
index a35413e8c7d3..0b1ca7c65151 100644
--- a/products/desktop/packages/ui/src/features/inbox/hooks/useInboxBackTarget.ts
+++ b/products/desktop/packages/ui/src/features/inbox/hooks/useInboxBackTarget.ts
@@ -1,10 +1,10 @@
import { useLocation } from "@tanstack/react-router";
const INBOX_LIST_ROUTE_VALUES = [
- "/code/inbox/pulls",
- "/code/inbox/reports",
- "/code/inbox/runs",
- "/code/inbox/dismissed",
+ "/inbox/pulls",
+ "/inbox/reports",
+ "/inbox/runs",
+ "/inbox/dismissed",
] as const;
/** List routes an inbox detail screen's back link can return to. */
diff --git a/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportDetailPrefetch.ts b/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportDetailPrefetch.ts
index a88b2def3087..7c72f269b1fb 100644
--- a/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportDetailPrefetch.ts
+++ b/products/desktop/packages/ui/src/features/inbox/hooks/useInboxReportDetailPrefetch.ts
@@ -6,19 +6,19 @@ import { useCallback, useMemo } from "react";
export type InboxDetailRoute =
| {
- to: "/code/inbox/pulls/$reportId";
+ to: "/inbox/pulls/$reportId";
params: { reportId: string };
}
| {
- to: "/code/inbox/reports/$reportId";
+ to: "/inbox/reports/$reportId";
params: { reportId: string };
}
| {
- to: "/code/inbox/runs/$reportId";
+ to: "/inbox/runs/$reportId";
params: { reportId: string };
}
| {
- to: "/code/inbox/dismissed/$reportId";
+ to: "/inbox/dismissed/$reportId";
params: { reportId: string };
};
diff --git a/products/desktop/packages/ui/src/features/loops/components/LoopRow.tsx b/products/desktop/packages/ui/src/features/loops/components/LoopRow.tsx
index c1d9d9c455a0..5b175d33768d 100644
--- a/products/desktop/packages/ui/src/features/loops/components/LoopRow.tsx
+++ b/products/desktop/packages/ui/src/features/loops/components/LoopRow.tsx
@@ -60,7 +60,7 @@ export function LoopRow({
return (
<Link
- to="/code/loops/$loopId"
+ to="/loops/$loopId"
params={{ loopId: loop.id }}
state={{ loopListOrigin: true }}
className="group flex items-center justify-between gap-3 rounded-(--radius-2) border border-border bg-(--color-panel-solid) px-4 py-3.5 no-underline transition-colors duration-150 hover:border-(--gray-6) hover:bg-(--gray-2)"
diff --git a/products/desktop/packages/ui/src/features/loops/components/LoopSpaceBreadcrumb.tsx b/products/desktop/packages/ui/src/features/loops/components/LoopSpaceBreadcrumb.tsx
index c2528fc6772d..35c1a3bdfae5 100644
--- a/products/desktop/packages/ui/src/features/loops/components/LoopSpaceBreadcrumb.tsx
+++ b/products/desktop/packages/ui/src/features/loops/components/LoopSpaceBreadcrumb.tsx
@@ -9,7 +9,7 @@ import { useNavigate } from "@tanstack/react-router";
/**
* Header breadcrumb for a loop that belongs to a space:
* "{space} / Loops / {loop}", with the space and Loops segments both linking
- * back. Loops live outside the space routes (/code/loops/…), so without this a
+ * back. Loops live outside the space routes (/loops/…), so without this a
* space-attached loop is a dead end.
*
* Render this only when the spaces layout is on and the loop has a context
@@ -41,7 +41,7 @@ export function LoopSpaceBreadcrumb({
label: channelPageLabel("loops"),
onClick: () =>
void navigate({
- to: "/website/$channelId/loops",
+ to: "/spaces/$channelId/loops",
params: { channelId: folderId },
}),
}}
diff --git a/products/desktop/packages/ui/src/features/navigation/useReviewInRightPanel.test.ts b/products/desktop/packages/ui/src/features/navigation/useReviewInRightPanel.test.ts
index 24a049a2a294..4e92cb9a349e 100644
--- a/products/desktop/packages/ui/src/features/navigation/useReviewInRightPanel.test.ts
+++ b/products/desktop/packages/ui/src/features/navigation/useReviewInRightPanel.test.ts
@@ -4,7 +4,7 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
const mocks = vi.hoisted(() => ({
channelsLayout: true,
routeParams: {} as { taskId?: string; channelId?: string },
- routeId: "/website/$channelId/tasks/$taskId",
+ fullPath: "/spaces/$channelId/tasks/$taskId",
}));
vi.mock("@posthog/ui/features/canvas/hooks/useChannelsLayout", () => ({
@@ -15,8 +15,8 @@ vi.mock("@tanstack/react-router", () => ({
useRouterState: ({
select,
}: {
- select: (s: { matches: { routeId: string }[] }) => unknown;
- }) => select({ matches: [{ routeId: mocks.routeId }] }),
+ select: (s: { matches: { fullPath: string }[] }) => unknown;
+ }) => select({ matches: [{ fullPath: mocks.fullPath }] }),
}));
import { useActivityDetailStore } from "@posthog/ui/features/canvas/stores/activityDetailStore";
@@ -26,7 +26,7 @@ describe("useReviewInRightPanel", () => {
beforeEach(() => {
mocks.channelsLayout = true;
mocks.routeParams = {};
- mocks.routeId = "/website/$channelId/tasks/$taskId";
+ mocks.fullPath = "/spaces/$channelId/tasks/$taskId";
useActivityDetailStore.setState({ selected: null });
});
@@ -38,7 +38,7 @@ describe("useReviewInRightPanel", () => {
// The regression: no channel in the URL left both surfaces drawing the diff.
it("hands it over for a task read from the activity feed too", () => {
- mocks.routeId = "/website/activity";
+ mocks.fullPath = "/activity";
useActivityDetailStore.setState({
selected: { id: "a1", taskId: "task-1", channelId: null },
});
diff --git a/products/desktop/packages/ui/src/features/scouts/components/FleetMemoryCallout.tsx b/products/desktop/packages/ui/src/features/scouts/components/FleetMemoryCallout.tsx
index 0629c17c243d..e05cd69e2701 100644
--- a/products/desktop/packages/ui/src/features/scouts/components/FleetMemoryCallout.tsx
+++ b/products/desktop/packages/ui/src/features/scouts/components/FleetMemoryCallout.tsx
@@ -25,7 +25,7 @@ export function FleetMemoryCallout() {
return (
<Link
- to="/code/agents/scouts/scratchpad"
+ to="/agents/scouts/scratchpad"
className="flex w-full items-center gap-3 rounded-(--radius-2) border border-border bg-(--color-panel-solid) px-4 py-3.5 text-left no-underline transition-colors duration-150 hover:border-(--gray-6) hover:bg-(--gray-2)"
>
<NotebookIcon size={20} className="shrink-0 text-(--iris-9)" />
diff --git a/products/desktop/packages/ui/src/features/scouts/components/ScoutDetailView.tsx b/products/desktop/packages/ui/src/features/scouts/components/ScoutDetailView.tsx
index 230b9d67b3c1..6f7750241adf 100644
--- a/products/desktop/packages/ui/src/features/scouts/components/ScoutDetailView.tsx
+++ b/products/desktop/packages/ui/src/features/scouts/components/ScoutDetailView.tsx
@@ -138,7 +138,7 @@ export function ScoutDetailView({
className="border-(--gray-5) border-b px-6 pt-5 pb-5"
>
<Link
- to="/code/agents"
+ to="/agents"
className="flex w-fit items-center gap-1 text-[12px] text-gray-10 no-underline hover:text-gray-12"
>
<ArrowLeftIcon size={12} />
diff --git a/products/desktop/packages/ui/src/features/scouts/components/ScoutFindingsView.tsx b/products/desktop/packages/ui/src/features/scouts/components/ScoutFindingsView.tsx
index c3a87630a24c..e06a96e32d8e 100644
--- a/products/desktop/packages/ui/src/features/scouts/components/ScoutFindingsView.tsx
+++ b/products/desktop/packages/ui/src/features/scouts/components/ScoutFindingsView.tsx
@@ -106,7 +106,7 @@ export function ScoutFindingsView() {
className="border-(--gray-5) border-b px-6 pt-5 pb-5"
>
<Link
- to="/code/agents/scouts"
+ to="/agents/scouts"
className="flex w-fit items-center gap-1 text-[12px] text-gray-10 no-underline hover:text-gray-12"
>
<ArrowLeftIcon size={12} />
diff --git a/products/desktop/packages/ui/src/features/scouts/components/ScoutRowCard.tsx b/products/desktop/packages/ui/src/features/scouts/components/ScoutRowCard.tsx
index d53c3ea29c34..616e71ac2528 100644
--- a/products/desktop/packages/ui/src/features/scouts/components/ScoutRowCard.tsx
+++ b/products/desktop/packages/ui/src/features/scouts/components/ScoutRowCard.tsx
@@ -70,7 +70,7 @@ export function ScoutRowCard({
<Flex align="center" gap="2" className="min-w-0 flex-1">
{linkToDetail ? (
<Link
- to="/code/agents/scouts/$skillName"
+ to="/agents/scouts/$skillName"
params={{ skillName: scoutSkillSlug(config.skill_name) }}
className={`flex min-w-0 items-center gap-2 no-underline ${
settingsOpen ? "" : "after:absolute after:inset-0"
diff --git a/products/desktop/packages/ui/src/features/scouts/components/ScratchpadView.tsx b/products/desktop/packages/ui/src/features/scouts/components/ScratchpadView.tsx
index 285d317b9239..9a0045af98a8 100644
--- a/products/desktop/packages/ui/src/features/scouts/components/ScratchpadView.tsx
+++ b/products/desktop/packages/ui/src/features/scouts/components/ScratchpadView.tsx
@@ -71,7 +71,7 @@ export function ScratchpadView() {
className="border-(--gray-5) border-b px-6 pt-5 pb-5"
>
<Link
- to="/code/agents/scouts"
+ to="/agents/scouts"
className="flex w-fit items-center gap-1 text-[12px] text-gray-10 no-underline hover:text-gray-12"
>
<ArrowLeftIcon size={12} />
diff --git a/products/desktop/packages/ui/src/features/settings/hooks/useOpenSettings.ts b/products/desktop/packages/ui/src/features/settings/hooks/useOpenSettings.ts
index 4eebc2cfe4e9..a862996102df 100644
--- a/products/desktop/packages/ui/src/features/settings/hooks/useOpenSettings.ts
+++ b/products/desktop/packages/ui/src/features/settings/hooks/useOpenSettings.ts
@@ -51,7 +51,7 @@ export function closeSettings(): void {
if (nav.canGoBackInHistory()) {
nav.goBackInHistory();
} else {
- nav.navigateToCode();
+ nav.navigateToNewTask();
}
}
diff --git a/products/desktop/packages/ui/src/features/sidebar/components/SidebarNavSection.tsx b/products/desktop/packages/ui/src/features/sidebar/components/SidebarNavSection.tsx
index 35ce94dc222d..14b7c757fc77 100644
--- a/products/desktop/packages/ui/src/features/sidebar/components/SidebarNavSection.tsx
+++ b/products/desktop/packages/ui/src/features/sidebar/components/SidebarNavSection.tsx
@@ -19,14 +19,12 @@ import {
navigateToCommandCenter,
navigateToInbox,
navigateToLoops,
- navigateToWebsiteCommandCenter,
} from "@posthog/ui/router/navigationBridge";
import { useAppView } from "@posthog/ui/router/useAppView";
import { openTaskInput } from "@posthog/ui/router/useOpenTask";
import { track } from "@posthog/ui/shell/analytics";
import { useCommandMenuStore } from "@posthog/ui/shell/commandMenuStore";
import { Box, Flex } from "@radix-ui/themes";
-import { useRouterState } from "@tanstack/react-router";
import type { ReactNode } from "react";
import { ActivityItem } from "./items/ActivityItem";
import { CommandCenterItem } from "./items/CommandCenterItem";
@@ -68,18 +66,7 @@ export function SidebarNavSection({
PROJECT_BLUEBIRD_FLAG,
import.meta.env.DEV,
);
- // When this section renders inside the Channels space, the destinations that
- // have a /website mirror stay in that space; everything else (and the whole
- // section in the Code space) uses the canonical routes. Inbox and New task
- // have no mirror yet, so they intentionally jump back to Code.
- const inChannels = useRouterState({
- select: (s) => s.location.pathname.startsWith("/website"),
- });
- const goNewTask = () =>
- openTaskInput(inChannels ? { space: "website" } : undefined);
- const goCommandCenter = inChannels
- ? navigateToWebsiteCommandCenter
- : navigateToCommandCenter;
+ const goNewTask = () => openTaskInput();
// Active flags are pure functions of the current view — mirror what
// useSidebarData derives, without pulling in its task-loading.
@@ -159,7 +146,7 @@ export function SidebarNavSection({
<CommandCenterItem
depth={depth}
isActive={isCommandCenterActive}
- onClick={withNavTrack("command_center", goCommandCenter, depth)}
+ onClick={withNavTrack("command_center", navigateToCommandCenter, depth)}
activeCount={commandCenterActiveCount}
/>
),
diff --git a/products/desktop/packages/ui/src/router/routes/website/new.tsx b/products/desktop/packages/ui/src/features/task-detail/components/NewTaskScreen.tsx
similarity index 51%
rename from products/desktop/packages/ui/src/router/routes/website/new.tsx
rename to products/desktop/packages/ui/src/features/task-detail/components/NewTaskScreen.tsx
index 0138523a676a..1c24123f0b9c 100644
--- a/products/desktop/packages/ui/src/router/routes/website/new.tsx
+++ b/products/desktop/packages/ui/src/features/task-detail/components/NewTaskScreen.tsx
@@ -1,18 +1,16 @@
import { CHANNEL_TASK_SUGGESTIONS } from "@posthog/ui/features/canvas/channelTaskSuggestions";
+import { useChannelsWorld } from "@posthog/ui/features/canvas/hooks/useChannelsWorld";
import { TaskInput } from "@posthog/ui/features/task-detail/components/TaskInput";
import { useAppView } from "@posthog/ui/router/useAppView";
-import { createFileRoute } from "@tanstack/react-router";
-// Channels-space mirror of the /code/ new-task screen. Renders the same shared
-// TaskInput (reading the same prefill) so the page stays single-source; only
-// the route entry is duplicated so opening it from the channels sidebar keeps
-// the channels chrome. (Per-channel new tasks live at /website/$channelId/new.)
-export const Route = createFileRoute("/website/new")({
- component: WebsiteNewTaskRoute,
-});
-
-function WebsiteNewTaskRoute() {
+/**
+ * The unscoped new-task screen, wired to the router's prefill. Two routes reach
+ * it: `/new`, and `/` for anyone without the spaces layout, whose landing
+ * screen this has always been.
+ */
+export function NewTaskScreen() {
const view = useAppView();
+ const channelsWorld = useChannelsWorld();
return (
<TaskInput
@@ -22,7 +20,7 @@ function WebsiteNewTaskRoute() {
initialModel={view.initialModel}
initialMode={view.initialMode}
reportAssociation={view.reportAssociation}
- suggestions={CHANNEL_TASK_SUGGESTIONS}
+ suggestions={channelsWorld ? CHANNEL_TASK_SUGGESTIONS : undefined}
/>
);
}
diff --git a/products/desktop/packages/ui/src/features/task-detail/components/TaskDetail.tsx b/products/desktop/packages/ui/src/features/task-detail/components/TaskDetail.tsx
index 312991fea626..5a0bc7e4cd2f 100644
--- a/products/desktop/packages/ui/src/features/task-detail/components/TaskDetail.tsx
+++ b/products/desktop/packages/ui/src/features/task-detail/components/TaskDetail.tsx
@@ -78,7 +78,7 @@ export function TaskDetail({
const { enableScope, disableScope } = useHotkeysContext();
const { archiveTask } = useArchiveTask({
- navigateSpace: channelId ? "website" : "code",
+ navigateUnscoped: !channelId,
});
const [showArchiveConfirm, setShowArchiveConfirm] = useState(false);
diff --git a/products/desktop/packages/ui/src/features/task-detail/hooks/useTaskCreation.ts b/products/desktop/packages/ui/src/features/task-detail/hooks/useTaskCreation.ts
index 5c7e1e6d8cc3..234a0eb49cb5 100644
--- a/products/desktop/packages/ui/src/features/task-detail/hooks/useTaskCreation.ts
+++ b/products/desktop/packages/ui/src/features/task-detail/hooks/useTaskCreation.ts
@@ -95,7 +95,7 @@ interface UseTaskCreationOptions {
channelId?: string;
/**
* Desktop file-system folder id that owns the channel's CONTEXT.md (the
- * `/website/$channelId` id, distinct from the feed `channelId`). Lets the
+ * `/spaces/$channelId` id, distinct from the feed `channelId`). Lets the
* injected context address CONTEXT.md upkeep writes by a stable id.
*/
channelContextId?: string;
diff --git a/products/desktop/packages/ui/src/router/RouteNotFound.tsx b/products/desktop/packages/ui/src/router/RouteNotFound.tsx
index 5b737069fb3a..abf37712bba6 100644
--- a/products/desktop/packages/ui/src/router/RouteNotFound.tsx
+++ b/products/desktop/packages/ui/src/router/RouteNotFound.tsx
@@ -1,5 +1,5 @@
import { Navigate } from "@tanstack/react-router";
export function RouteNotFound() {
- return <Navigate replace to="/code" />;
+ return <Navigate replace to="/new" />;
}
diff --git a/products/desktop/packages/ui/src/router/legacyPaths.test.ts b/products/desktop/packages/ui/src/router/legacyPaths.test.ts
new file mode 100644
index 000000000000..253fc48b541c
--- /dev/null
+++ b/products/desktop/packages/ui/src/router/legacyPaths.test.ts
@@ -0,0 +1,99 @@
+import {
+ createMemoryHistory,
+ createRootRoute,
+ createRoute,
+ createRouter,
+} from "@tanstack/react-router";
+import { describe, expect, it } from "vitest";
+import {
+ redirectFromLegacyPath,
+ rewriteLegacyHref,
+ rewriteLegacyPath,
+} from "./legacyPaths";
+
+describe("rewriteLegacyPath", () => {
+ // Old hrefs outlive the route flatten: saved startup locations, deep links,
+ // shared links, notifications. Each has to land on the page it named.
+ it.each([
+ ["/website", "/spaces"],
+ ["/website/eng", "/spaces/eng"],
+ ["/website/eng/loops", "/spaces/eng/loops"],
+ ["/website/eng/tasks/t1", "/spaces/eng/tasks/t1"],
+ ["/website/eng/dashboards/d1", "/spaces/eng/dashboards/d1"],
+ ["/website/home", "/"],
+ ["/website/activity", "/activity"],
+ ["/website/command-center", "/command-center"],
+ ["/website/mcp-servers", "/mcp-servers"],
+ ["/website/skills", "/skills"],
+ ["/website/feeds/f1", "/feeds/f1"],
+ ["/website/new", "/new"],
+ ["/code", "/new"],
+ ["/code/inbox/pulls/42", "/inbox/pulls/42"],
+ ["/code/agents/scouts/flaky", "/agents/scouts/flaky"],
+ ["/code/archived", "/archived"],
+ ["/code/loops/abc/edit", "/loops/abc/edit"],
+ ["/code/tasks/t1", "/tasks/t1"],
+ ["/code/tasks/pending/k1", "/tasks/pending/k1"],
+ ["/code/pr", "/pr"],
+ ])("moves %s to %s", (legacy, expected) => {
+ expect(rewriteLegacyPath(legacy)).toBe(expected);
+ });
+
+ // A crafted old link must not rewrite into a protocol-relative URL, which
+ // names an origin rather than a path and would leave the app.
+ it.each([
+ ["/website/home//evil.example/phish", "/evil.example/phish"],
+ ["/website//evil.example", "/spaces//evil.example"],
+ ])("keeps %s inside the app", (legacy, expected) => {
+ expect(rewriteLegacyPath(legacy)).toBe(expected);
+ });
+
+ it.each(["/spaces/eng", "/inbox", "/settings/general", "/"])(
+ "leaves %s alone",
+ (path) => {
+ expect(rewriteLegacyPath(path)).toBe(path);
+ },
+ );
+});
+
+describe("rewriteLegacyHref", () => {
+ // Query/fragment right at a prefix boundary: rewrite the path, keep the rest
+ // — a saved PR view must not divert to the `/code` → `/new` catch-all.
+ it.each([
+ [
+ "/code/pr?prUrl=https://github.com/o/r/pull/1",
+ "/pr?prUrl=https://github.com/o/r/pull/1",
+ ],
+ ["/code/loops/abc?edit=true", "/loops/abc?edit=true"],
+ ["/code/pr#section", "/pr#section"],
+ ["/website/eng/loops", "/spaces/eng/loops"],
+ ])("moves %s to %s", (legacy, expected) => {
+ expect(rewriteLegacyHref(legacy)).toBe(expected);
+ });
+});
+
+describe("redirectFromLegacyPath", () => {
+ it("lands an old link on the page it named, search and all", async () => {
+ const root = createRootRoute();
+ const current = createRoute({
+ getParentRoute: () => root,
+ path: "/spaces/$channelId/loops",
+ });
+ const legacy = createRoute({
+ getParentRoute: () => root,
+ path: "/website/$",
+ beforeLoad: ({ location }) => redirectFromLegacyPath(location),
+ });
+ const router = createRouter({
+ routeTree: root.addChildren([current, legacy]),
+ history: createMemoryHistory({
+ initialEntries: ["/website/eng/loops?edit=true"],
+ }),
+ });
+
+ await router.load();
+
+ expect(router.state.location.pathname).toBe("/spaces/eng/loops");
+ expect(router.state.location.searchStr).toBe("?edit=true");
+ });
+});
diff --git a/products/desktop/packages/ui/src/router/legacyPaths.ts b/products/desktop/packages/ui/src/router/legacyPaths.ts
new file mode 100644
index 000000000000..f2e8d47e4f73
--- /dev/null
+++ b/products/desktop/packages/ui/src/router/legacyPaths.ts
@@ -0,0 +1,78 @@
+import { type ParsedLocation, redirect } from "@tanstack/react-router";
+
+/**
+ * Route prefixes that moved when the app's routes were flattened, longest
+ * first so `/website/home` can never be eaten by `/website`.
+ *
+ * Old hrefs outlive the move: a saved startup location, a deep link, a shared
+ * link, a notification, a browser-tab history entry. Both the startup restore
+ * and the legacy redirect routes rewrite through this table.
+ */
+const MOVED_PREFIXES: readonly (readonly [string, string])[] = [
+ ["/website/command-center", "/command-center"],
+ ["/website/mcp-servers", "/mcp-servers"],
+ ["/website/activity", "/activity"],
+ ["/website/skills", "/skills"],
+ ["/website/feeds", "/feeds"],
+ ["/website/home", "/"],
+ ["/website/new", "/new"],
+ ["/website", "/spaces"],
+ ["/code/inbox", "/inbox"],
+ ["/code/agents", "/agents"],
+ ["/code/archived", "/archived"],
+ ["/code/loops", "/loops"],
+ ["/code/tasks", "/tasks"],
+ ["/code/pr", "/pr"],
+ ["/code", "/new"],
+];
+
+const MOVED_LONGEST_FIRST = [...MOVED_PREFIXES].sort(
+ (a, b) => b[0].length - a[0].length,
+);
+
+/** A path on today's routes. Unrecognized paths are returned unchanged. */
+export function rewriteLegacyPath(path: string): string {
+ for (const [from, to] of MOVED_LONGEST_FIRST) {
+ if (path === from) return to;
+ if (path.startsWith(`${from}/`)) {
+ const rest = path.slice(from.length);
+ return singleLeadingSlash(to === "/" ? rest : to + rest);
+ }
+ }
+ return path;
+}
+
+/**
+ * A rewritten path always names a route in this app. Doubling the leading
+ * slash would make it protocol-relative (`//evil.example/x` is an origin, not
+ * a path), so a crafted old link can't turn a redirect into a trip off-app.
+ */
+function singleLeadingSlash(path: string): string {
+ return path.replace(/^\/+/, "/");
+}
+
+/**
+ * The same rewrite over a whole href. A `?` or `#` sitting right at a prefix
+ * boundary (`/code/pr?prUrl=…`) matches no prefix, so the href would fall
+ * through to the `/code` → `/new` catch-all and land on a dead route. Match on
+ * the pathname only, then reattach the suffix untouched.
+ */
+export function rewriteLegacyHref(href: string): string {
+ const boundary = href.search(/[?#]/);
+ if (boundary === -1) return rewriteLegacyPath(href);
+ return rewriteLegacyPath(href.slice(0, boundary)) + href.slice(boundary);
+}
+
+/**
+ * Send an old URL to where its page lives now, keeping any search and hash.
+ * Replaces rather than pushes, so Back skips the route that no longer exists.
+ */
+export function redirectFromLegacyPath(location: ParsedLocation): never {
+ throw redirect({
+ href:
+ rewriteLegacyPath(location.pathname) +
+ location.searchStr +
+ (location.hash ? `#${location.hash}` : ""),
+ replace: true,
+ });
+}
diff --git a/products/desktop/packages/ui/src/router/navigationBridge.ts b/products/desktop/packages/ui/src/router/navigationBridge.ts
index 36129da0b00d..805be5715141 100644
--- a/products/desktop/packages/ui/src/router/navigationBridge.ts
+++ b/products/desktop/packages/ui/src/router/navigationBridge.ts
@@ -1,7 +1,5 @@
import type { NotificationTarget } from "@posthog/platform/notifications";
-import { ANALYTICS_EVENTS } from "@posthog/shared";
import type { SettingsCategory } from "@posthog/ui/features/settings/types";
-import { track } from "@posthog/ui/shell/analytics";
import { getRouterOrNull } from "./routerRef";
// This bridge isolates imperative router calls behind a stable API and, by
@@ -15,63 +13,63 @@ import { getRouterOrNull } from "./routerRef";
// (early boot, unit tests). These are renderer conveniences — they must never
// throw just because the router singleton hasn't been created.
-export function navigateToCode(): void {
- void getRouterOrNull()?.navigate({ to: "/code" });
+export function navigateToNewTask(): void {
+ void getRouterOrNull()?.navigate({ to: "/new" });
}
export function navigateToTaskDetail(taskId: string): void {
void getRouterOrNull()?.navigate({
- to: "/code/tasks/$taskId",
+ to: "/tasks/$taskId",
params: { taskId },
});
}
export function navigateToPullRequestView(prUrl: string): void {
void getRouterOrNull()?.navigate({
- to: "/code/pr",
+ to: "/pr",
search: { prUrl },
});
}
export function navigateToTaskPending(key: string): void {
void getRouterOrNull()?.navigate({
- to: "/code/tasks/pending/$key",
+ to: "/tasks/pending/$key",
params: { key },
});
}
export function navigateToActivity(): void {
- void getRouterOrNull()?.navigate({ to: "/website/activity" });
+ void getRouterOrNull()?.navigate({ to: "/activity" });
}
export function navigateToHome(): void {
- void getRouterOrNull()?.navigate({ to: "/website/home" });
+ void getRouterOrNull()?.navigate({ to: "/" });
}
export function navigateToFeed(feedId: string): void {
void getRouterOrNull()?.navigate({
- to: "/website/feeds/$feedId",
+ to: "/feeds/$feedId",
params: { feedId },
});
}
export function navigateToChannel(channelId: string): void {
void getRouterOrNull()?.navigate({
- to: "/website/$channelId",
+ to: "/spaces/$channelId",
params: { channelId },
});
}
export function navigateToChannelTask(channelId: string, taskId: string): void {
void getRouterOrNull()?.navigate({
- to: "/website/$channelId/tasks/$taskId",
+ to: "/spaces/$channelId/tasks/$taskId",
params: { channelId, taskId },
});
}
export function navigateToChannelNewTask(channelId: string): void {
void getRouterOrNull()?.navigate({
- to: "/website/$channelId/new",
+ to: "/spaces/$channelId/new",
params: { channelId },
});
}
@@ -81,7 +79,7 @@ export function navigateToChannelDashboard(
dashboardId: string,
): void {
void getRouterOrNull()?.navigate({
- to: "/website/$channelId/dashboards/$dashboardId",
+ to: "/spaces/$channelId/dashboards/$dashboardId",
params: { channelId, dashboardId },
});
}
@@ -97,7 +95,7 @@ export function navigateToFolderSettings(folderId: string): void {
// useOpenTargetDeepLink (the native-click consumer). Held here so imperative,
// non-React callers — the in-app notification toast's action — open a target
// through the SAME path as a native notification click. Crucially, a task filed
-// to a channel resolves to /website/$channelId/tasks/$taskId; direct
+// to a channel resolves to /spaces/$channelId/tasks/$taskId; direct
// navigateToTaskDetail can't, since it doesn't know the channel.
let openTargetHandler: ((target: NotificationTarget) => void) | null = null;
@@ -113,7 +111,7 @@ export function openNotificationTarget(target: NotificationTarget): void {
return;
}
// Fallback when the deep-link handler isn't mounted yet (early boot, tests).
- // Channel context is unavailable here, so a channel task opens under /code —
+ // Channel context is unavailable here, so a channel task opens unscoped —
// acceptable for this rare gap; the registered handler covers the live app.
if (target.kind === "task") {
navigateToTaskDetail(target.taskId);
@@ -123,26 +121,26 @@ export function openNotificationTarget(target: NotificationTarget): void {
}
export function navigateToInbox(): void {
- void getRouterOrNull()?.navigate({ to: "/code/inbox" });
+ void getRouterOrNull()?.navigate({ to: "/inbox" });
}
export function navigateToInboxPullRequestDetail(reportId: string): void {
void getRouterOrNull()?.navigate({
- to: "/code/inbox/pulls/$reportId",
+ to: "/inbox/pulls/$reportId",
params: { reportId },
});
}
export function navigateToInboxReportDetail(reportId: string): void {
void getRouterOrNull()?.navigate({
- to: "/code/inbox/reports/$reportId",
+ to: "/inbox/reports/$reportId",
params: { reportId },
});
}
export function navigateToInboxDismissedDetail(reportId: string): void {
void getRouterOrNull()?.navigate({
- to: "/code/inbox/dismissed/$reportId",
+ to: "/inbox/dismissed/$reportId",
params: { reportId },
});
}
@@ -152,25 +150,25 @@ export function navigateToScoutDetail(
findingId?: string,
): void {
void getRouterOrNull()?.navigate({
- to: "/code/agents/scouts/$skillName",
+ to: "/agents/scouts/$skillName",
params: { skillName: skillSlug },
search: findingId ? { finding: findingId } : {},
});
}
export function navigateToScoutFindings(): void {
- void getRouterOrNull()?.navigate({ to: "/code/agents/scouts/findings" });
+ void getRouterOrNull()?.navigate({ to: "/agents/scouts/findings" });
}
export function navigateToLoops(options?: { ignoreBlocker?: boolean }): void {
void getRouterOrNull()?.navigate({
- to: "/code/loops",
+ to: "/loops",
ignoreBlocker: options?.ignoreBlocker,
});
}
export function navigateToNewLoop(): void {
- void getRouterOrNull()?.navigate({ to: "/code/loops/new" });
+ void getRouterOrNull()?.navigate({ to: "/loops/new" });
}
export function navigateToLoopDetail(
@@ -178,7 +176,7 @@ export function navigateToLoopDetail(
options?: { ignoreBlocker?: boolean; edit?: boolean },
): void {
void getRouterOrNull()?.navigate({
- to: "/code/loops/$loopId",
+ to: "/loops/$loopId",
params: { loopId },
search: options?.edit ? { edit: true } : {},
ignoreBlocker: options?.ignoreBlocker,
@@ -186,18 +184,15 @@ export function navigateToLoopDetail(
}
export function navigateToAgents(): void {
- void getRouterOrNull()?.navigate({ to: "/code/agents" });
+ void getRouterOrNull()?.navigate({ to: "/agents" });
}
export function navigateToArchived(): void {
- void getRouterOrNull()?.navigate({ to: "/code/archived" });
+ void getRouterOrNull()?.navigate({ to: "/archived" });
}
export function navigateToCommandCenter(): void {
void getRouterOrNull()?.navigate({ to: "/command-center" });
- // Parity with the pre-router navigationStore.navigateToCommandCenter action,
- // which emitted this event; the route component does not track it.
- track(ANALYTICS_EVENTS.COMMAND_CENTER_VIEWED);
}
export function navigateToSkills(): void {
@@ -208,32 +203,9 @@ export function navigateToMcpServers(): void {
void getRouterOrNull()?.navigate({ to: "/mcp-servers" });
}
-// Channels-space mirrors. These render the same shared views as their /code (or
-// top-level) counterparts but under /website, so navigating from the channels
-// sidebar keeps the channels chrome instead of switching back to Code. The
-// SidebarNavSection picks the right variant based on the active space.
-
-export function navigateToWebsiteNew(): void {
- void getRouterOrNull()?.navigate({ to: "/website/new" });
-}
-
-// The Canvas workspace landing (the channels index, where canvases live).
-export function navigateToCanvas(): void {
- void getRouterOrNull()?.navigate({ to: "/website" });
-}
-
-export function navigateToWebsiteSkills(): void {
- void getRouterOrNull()?.navigate({ to: "/website/skills" });
-}
-
-export function navigateToWebsiteMcpServers(): void {
- void getRouterOrNull()?.navigate({ to: "/website/mcp-servers" });
-}
-
-export function navigateToWebsiteCommandCenter(): void {
- void getRouterOrNull()?.navigate({ to: "/website/command-center" });
- // Parity with navigateToCommandCenter's analytics tracking.
- track(ANALYTICS_EVENTS.COMMAND_CENTER_VIEWED);
+// The spaces index, where the project's spaces are listed.
+export function navigateToSpaces(): void {
+ void getRouterOrNull()?.navigate({ to: "/spaces" });
}
export function navigateToSettings(
diff --git a/products/desktop/packages/ui/src/router/routeTree.gen.ts b/products/desktop/packages/ui/src/router/routeTree.gen.ts
index ac7188ed2e99..4bbf0347f11c 100644
--- a/products/desktop/packages/ui/src/router/routeTree.gen.ts
+++ b/products/desktop/packages/ui/src/router/routeTree.gen.ts
@@ -9,753 +9,729 @@
// 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 WebsiteRouteImport } from './routes/website'
import { Route as UsageRouteImport } from './routes/usage'
-import { Route as SkillsRouteImport } from './routes/skills'
-import { Route as McpServersRouteImport } from './routes/mcp-servers'
-import { Route as CommandCenterRouteImport } from './routes/command-center'
-import { Route as IndexRouteImport } from './routes/index'
-import { Route as WebsiteIndexRouteImport } from './routes/website/index'
+import { Route as PrRouteImport } from './routes/pr'
+import { Route as InboxRouteImport } from './routes/inbox'
+import { Route as ArchivedRouteImport } from './routes/archived'
+import { Route as AgentsRouteImport } from './routes/agents'
+import { Route as ShellRouteImport } from './routes/_shell'
+import { Route as WebsiteIndexRouteImport } from './routes/website.index'
import { Route as SettingsIndexRouteImport } from './routes/settings/index'
-import { Route as CodeIndexRouteImport } from './routes/code/index'
-import { Route as WebsiteSkillsRouteImport } from './routes/website/skills'
-import { Route as WebsiteNewRouteImport } from './routes/website/new'
-import { Route as WebsiteMcpServersRouteImport } from './routes/website/mcp-servers'
-import { Route as WebsiteHomeRouteImport } from './routes/website/home'
-import { Route as WebsiteCommandCenterRouteImport } from './routes/website/command-center'
-import { Route as WebsiteActivityRouteImport } from './routes/website/activity'
+import { Route as LoopsIndexRouteImport } from './routes/loops/index'
+import { Route as InboxIndexRouteImport } from './routes/inbox/index'
+import { Route as CodeIndexRouteImport } from './routes/code.index'
+import { Route as AgentsIndexRouteImport } from './routes/agents/index'
+import { Route as ShellIndexRouteImport } from './routes/_shell/index'
+import { Route as WebsiteSplatRouteImport } from './routes/website.$'
+import { Route as TasksTaskIdRouteImport } from './routes/tasks/$taskId'
import { Route as SettingsCategoryRouteImport } from './routes/settings/$category'
+import { Route as LoopsNewRouteImport } from './routes/loops/new'
+import { Route as LoopsLoopIdRouteImport } from './routes/loops/$loopId'
+import { Route as InboxRunsRouteImport } from './routes/inbox/runs'
+import { Route as InboxReportsRouteImport } from './routes/inbox/reports'
+import { Route as InboxPullsRouteImport } from './routes/inbox/pulls'
+import { Route as InboxDismissedRouteImport } from './routes/inbox/dismissed'
+import { Route as InboxAgentsRouteImport } from './routes/inbox/agents'
import { Route as FoldersFolderIdRouteImport } from './routes/folders/$folderId'
-import { Route as CodePrRouteImport } from './routes/code/pr'
-import { Route as CodeInboxRouteImport } from './routes/code/inbox'
-import { Route as CodeArchivedRouteImport } from './routes/code/archived'
-import { Route as CodeAgentsRouteImport } from './routes/code/agents'
-import { Route as WebsiteChannelIdIndexRouteImport } from './routes/website/$channelId/index'
-import { Route as CodeLoopsIndexRouteImport } from './routes/code/loops/index'
-import { Route as CodeInboxIndexRouteImport } from './routes/code/inbox/index'
-import { Route as CodeAgentsIndexRouteImport } from './routes/code/agents/index'
-import { Route as WebsiteFeedsFeedIdRouteImport } from './routes/website/feeds/$feedId'
-import { Route as WebsiteChannelIdNewRouteImport } from './routes/website/$channelId/new'
-import { Route as WebsiteChannelIdLoopsRouteImport } from './routes/website/$channelId/loops'
-import { Route as WebsiteChannelIdHistoryRouteImport } from './routes/website/$channelId/history'
-import { Route as WebsiteChannelIdContextRouteImport } from './routes/website/$channelId/context'
-import { Route as WebsiteChannelIdCanvasesRouteImport } from './routes/website/$channelId/canvases'
-import { Route as WebsiteChannelIdArtifactsRouteImport } from './routes/website/$channelId/artifacts'
-import { Route as CodeTasksTaskIdRouteImport } from './routes/code/tasks/$taskId'
-import { Route as CodeLoopsNewRouteImport } from './routes/code/loops/new'
-import { Route as CodeLoopsLoopIdRouteImport } from './routes/code/loops/$loopId'
-import { Route as CodeInboxRunsRouteImport } from './routes/code/inbox/runs'
-import { Route as CodeInboxReportsRouteImport } from './routes/code/inbox/reports'
-import { Route as CodeInboxPullsRouteImport } from './routes/code/inbox/pulls'
-import { Route as CodeInboxDismissedRouteImport } from './routes/code/inbox/dismissed'
-import { Route as CodeInboxAgentsRouteImport } from './routes/code/inbox/agents'
-import { Route as CodeAgentsScoutsRouteImport } from './routes/code/agents/scouts'
-import { Route as CodeLoopsLoopIdIndexRouteImport } from './routes/code/loops/$loopId/index'
-import { Route as CodeInboxRunsIndexRouteImport } from './routes/code/inbox/runs.index'
-import { Route as CodeInboxReportsIndexRouteImport } from './routes/code/inbox/reports.index'
-import { Route as CodeInboxPullsIndexRouteImport } from './routes/code/inbox/pulls.index'
-import { Route as CodeInboxDismissedIndexRouteImport } from './routes/code/inbox/dismissed.index'
-import { Route as CodeAgentsScoutsIndexRouteImport } from './routes/code/agents/scouts.index'
-import { Route as WebsiteChannelIdTasksTaskIdRouteImport } from './routes/website/$channelId/tasks/$taskId'
-import { Route as WebsiteChannelIdDashboardsDashboardIdRouteImport } from './routes/website/$channelId/dashboards/$dashboardId'
-import { Route as CodeTasksPendingKeyRouteImport } from './routes/code/tasks/pending.$key'
-import { Route as CodeLoopsLoopIdEditRouteImport } from './routes/code/loops/$loopId/edit'
-import { Route as CodeInboxRunsReportIdRouteImport } from './routes/code/inbox/runs.$reportId'
-import { Route as CodeInboxReportsReportIdRouteImport } from './routes/code/inbox/reports.$reportId'
-import { Route as CodeInboxPullsReportIdRouteImport } from './routes/code/inbox/pulls.$reportId'
-import { Route as CodeInboxDismissedReportIdRouteImport } from './routes/code/inbox/dismissed.$reportId'
-import { Route as CodeAgentsScoutsScratchpadRouteImport } from './routes/code/agents/scouts.scratchpad'
-import { Route as CodeAgentsScoutsFindingsRouteImport } from './routes/code/agents/scouts.findings'
-import { Route as CodeAgentsScoutsSkillNameRouteImport } from './routes/code/agents/scouts.$skillName'
-import { Route as CodeAgentsScoutsSkillNameIndexRouteImport } from './routes/code/agents/scouts.$skillName.index'
+import { Route as CodeSplatRouteImport } from './routes/code.$'
+import { Route as AgentsScoutsRouteImport } from './routes/agents/scouts'
+import { Route as ShellSkillsRouteImport } from './routes/_shell/skills'
+import { Route as ShellNewRouteImport } from './routes/_shell/new'
+import { Route as ShellMcpServersRouteImport } from './routes/_shell/mcp-servers'
+import { Route as ShellCommandCenterRouteImport } from './routes/_shell/command-center'
+import { Route as ShellActivityRouteImport } from './routes/_shell/activity'
+import { Route as LoopsLoopIdIndexRouteImport } from './routes/loops/$loopId/index'
+import { Route as InboxRunsIndexRouteImport } from './routes/inbox/runs.index'
+import { Route as InboxReportsIndexRouteImport } from './routes/inbox/reports.index'
+import { Route as InboxPullsIndexRouteImport } from './routes/inbox/pulls.index'
+import { Route as InboxDismissedIndexRouteImport } from './routes/inbox/dismissed.index'
+import { Route as AgentsScoutsIndexRouteImport } from './routes/agents/scouts.index'
+import { Route as ShellSpacesIndexRouteImport } from './routes/_shell/spaces/index'
+import { Route as TasksPendingKeyRouteImport } from './routes/tasks/pending.$key'
+import { Route as LoopsLoopIdEditRouteImport } from './routes/loops/$loopId/edit'
+import { Route as InboxRunsReportIdRouteImport } from './routes/inbox/runs.$reportId'
+import { Route as InboxReportsReportIdRouteImport } from './routes/inbox/reports.$reportId'
+import { Route as InboxPullsReportIdRouteImport } from './routes/inbox/pulls.$reportId'
+import { Route as InboxDismissedReportIdRouteImport } from './routes/inbox/dismissed.$reportId'
+import { Route as AgentsScoutsScratchpadRouteImport } from './routes/agents/scouts.scratchpad'
+import { Route as AgentsScoutsFindingsRouteImport } from './routes/agents/scouts.findings'
+import { Route as AgentsScoutsSkillNameRouteImport } from './routes/agents/scouts.$skillName'
+import { Route as ShellFeedsFeedIdRouteImport } from './routes/_shell/feeds/$feedId'
+import { Route as AgentsScoutsSkillNameIndexRouteImport } from './routes/agents/scouts.$skillName.index'
+import { Route as ShellSpacesChannelIdIndexRouteImport } from './routes/_shell/spaces/$channelId/index'
+import { Route as ShellSpacesChannelIdNewRouteImport } from './routes/_shell/spaces/$channelId/new'
+import { Route as ShellSpacesChannelIdLoopsRouteImport } from './routes/_shell/spaces/$channelId/loops'
+import { Route as ShellSpacesChannelIdHistoryRouteImport } from './routes/_shell/spaces/$channelId/history'
+import { Route as ShellSpacesChannelIdContextRouteImport } from './routes/_shell/spaces/$channelId/context'
+import { Route as ShellSpacesChannelIdCanvasesRouteImport } from './routes/_shell/spaces/$channelId/canvases'
+import { Route as ShellSpacesChannelIdArtifactsRouteImport } from './routes/_shell/spaces/$channelId/artifacts'
+import { Route as ShellSpacesChannelIdTasksTaskIdRouteImport } from './routes/_shell/spaces/$channelId/tasks/$taskId'
+import { Route as ShellSpacesChannelIdDashboardsDashboardIdRouteImport } from './routes/_shell/spaces/$channelId/dashboards/$dashboardId'
-const WebsiteRoute = WebsiteRouteImport.update({
- id: '/website',
- path: '/website',
- getParentRoute: () => rootRouteImport,
-} as any)
const UsageRoute = UsageRouteImport.update({
id: '/usage',
path: '/usage',
getParentRoute: () => rootRouteImport,
} as any)
-const SkillsRoute = SkillsRouteImport.update({
- id: '/skills',
- path: '/skills',
+const PrRoute = PrRouteImport.update({
+ id: '/pr',
+ path: '/pr',
getParentRoute: () => rootRouteImport,
} as any)
-const McpServersRoute = McpServersRouteImport.update({
- id: '/mcp-servers',
- path: '/mcp-servers',
+const InboxRoute = InboxRouteImport.update({
+ id: '/inbox',
+ path: '/inbox',
getParentRoute: () => rootRouteImport,
} as any)
-const CommandCenterRoute = CommandCenterRouteImport.update({
- id: '/command-center',
- path: '/command-center',
+const ArchivedRoute = ArchivedRouteImport.update({
+ id: '/archived',
+ path: '/archived',
getParentRoute: () => rootRouteImport,
} as any)
-const IndexRoute = IndexRouteImport.update({
- id: '/',
- path: '/',
+const AgentsRoute = AgentsRouteImport.update({
+ id: '/agents',
+ path: '/agents',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const ShellRoute = ShellRouteImport.update({
+ id: '/_shell',
getParentRoute: () => rootRouteImport,
} as any)
const WebsiteIndexRoute = WebsiteIndexRouteImport.update({
- id: '/',
- path: '/',
- getParentRoute: () => WebsiteRoute,
+ id: '/website/',
+ path: '/website/',
+ getParentRoute: () => rootRouteImport,
} as any)
const SettingsIndexRoute = SettingsIndexRouteImport.update({
id: '/settings/',
path: '/settings/',
getParentRoute: () => rootRouteImport,
} as any)
-const CodeIndexRoute = CodeIndexRouteImport.update({
- id: '/code/',
- path: '/code/',
+const LoopsIndexRoute = LoopsIndexRouteImport.update({
+ id: '/loops/',
+ path: '/loops/',
getParentRoute: () => rootRouteImport,
} as any)
-const WebsiteSkillsRoute = WebsiteSkillsRouteImport.update({
- id: '/skills',
- path: '/skills',
- getParentRoute: () => WebsiteRoute,
-} as any)
-const WebsiteNewRoute = WebsiteNewRouteImport.update({
- id: '/new',
- path: '/new',
- getParentRoute: () => WebsiteRoute,
-} as any)
-const WebsiteMcpServersRoute = WebsiteMcpServersRouteImport.update({
- id: '/mcp-servers',
- path: '/mcp-servers',
- getParentRoute: () => WebsiteRoute,
-} as any)
-const WebsiteHomeRoute = WebsiteHomeRouteImport.update({
- id: '/home',
- path: '/home',
- getParentRoute: () => WebsiteRoute,
-} as any)
-const WebsiteCommandCenterRoute = WebsiteCommandCenterRouteImport.update({
- id: '/command-center',
- path: '/command-center',
- getParentRoute: () => WebsiteRoute,
-} as any)
-const WebsiteActivityRoute = WebsiteActivityRouteImport.update({
- id: '/activity',
- path: '/activity',
- getParentRoute: () => WebsiteRoute,
-} as any)
-const SettingsCategoryRoute = SettingsCategoryRouteImport.update({
- id: '/settings/$category',
- path: '/settings/$category',
- getParentRoute: () => rootRouteImport,
-} as any)
-const FoldersFolderIdRoute = FoldersFolderIdRouteImport.update({
- id: '/folders/$folderId',
- path: '/folders/$folderId',
- getParentRoute: () => rootRouteImport,
-} as any)
-const CodePrRoute = CodePrRouteImport.update({
- id: '/code/pr',
- path: '/code/pr',
- getParentRoute: () => rootRouteImport,
-} as any)
-const CodeInboxRoute = CodeInboxRouteImport.update({
- id: '/code/inbox',
- path: '/code/inbox',
- getParentRoute: () => rootRouteImport,
-} as any)
-const CodeArchivedRoute = CodeArchivedRouteImport.update({
- id: '/code/archived',
- path: '/code/archived',
- getParentRoute: () => rootRouteImport,
-} as any)
-const CodeAgentsRoute = CodeAgentsRouteImport.update({
- id: '/code/agents',
- path: '/code/agents',
- getParentRoute: () => rootRouteImport,
-} as any)
-const WebsiteChannelIdIndexRoute = WebsiteChannelIdIndexRouteImport.update({
- id: '/$channelId/',
- path: '/$channelId/',
- getParentRoute: () => WebsiteRoute,
+const InboxIndexRoute = InboxIndexRouteImport.update({
+ id: '/',
+ path: '/',
+ getParentRoute: () => InboxRoute,
} as any)
-const CodeLoopsIndexRoute = CodeLoopsIndexRouteImport.update({
- id: '/code/loops/',
- path: '/code/loops/',
+const CodeIndexRoute = CodeIndexRouteImport.update({
+ id: '/code/',
+ path: '/code/',
getParentRoute: () => rootRouteImport,
} as any)
-const CodeInboxIndexRoute = CodeInboxIndexRouteImport.update({
+const AgentsIndexRoute = AgentsIndexRouteImport.update({
id: '/',
path: '/',
- getParentRoute: () => CodeInboxRoute,
+ getParentRoute: () => AgentsRoute,
} as any)
-const CodeAgentsIndexRoute = CodeAgentsIndexRouteImport.update({
+const ShellIndexRoute = ShellIndexRouteImport.update({
id: '/',
path: '/',
- getParentRoute: () => CodeAgentsRoute,
+ getParentRoute: () => ShellRoute,
} as any)
-const WebsiteFeedsFeedIdRoute = WebsiteFeedsFeedIdRouteImport.update({
- id: '/feeds/$feedId',
- path: '/feeds/$feedId',
- getParentRoute: () => WebsiteRoute,
-} as any)
-const WebsiteChannelIdNewRoute = WebsiteChannelIdNewRouteImport.update({
- id: '/$channelId/new',
- path: '/$channelId/new',
- getParentRoute: () => WebsiteRoute,
-} as any)
-const WebsiteChannelIdLoopsRoute = WebsiteChannelIdLoopsRouteImport.update({
- id: '/$channelId/loops',
- path: '/$channelId/loops',
- getParentRoute: () => WebsiteRoute,
-} as any)
-const WebsiteChannelIdHistoryRoute = WebsiteChannelIdHistoryRouteImport.update({
- id: '/$channelId/history',
- path: '/$channelId/history',
- getParentRoute: () => WebsiteRoute,
+const WebsiteSplatRoute = WebsiteSplatRouteImport.update({
+ id: '/website/$',
+ path: '/website/$',
+ getParentRoute: () => rootRouteImport,
} as any)
-const WebsiteChannelIdContextRoute = WebsiteChannelIdContextRouteImport.update({
- id: '/$channelId/context',
- path: '/$channelId/context',
- getParentRoute: () => WebsiteRoute,
+const TasksTaskIdRoute = TasksTaskIdRouteImport.update({
+ id: '/tasks/$taskId',
+ path: '/tasks/$taskId',
+ getParentRoute: () => rootRouteImport,
} as any)
-const WebsiteChannelIdCanvasesRoute =
- WebsiteChannelIdCanvasesRouteImport.update({
- id: '/$channelId/canvases',
- path: '/$channelId/canvases',
- getParentRoute: () => WebsiteRoute,
- } as any)
-const WebsiteChannelIdArtifactsRoute =
- WebsiteChannelIdArtifactsRouteImport.update({
- id: '/$channelId/artifacts',
- path: '/$channelId/artifacts',
- getParentRoute: () => WebsiteRoute,
- } as any)
-const CodeTasksTaskIdRoute = CodeTasksTaskIdRouteImport.update({
- id: '/code/tasks/$taskId',
- path: '/code/tasks/$taskId',
+const SettingsCategoryRoute = SettingsCategoryRouteImport.update({
+ id: '/settings/$category',
+ path: '/settings/$category',
getParentRoute: () => rootRouteImport,
} as any)
-const CodeLoopsNewRoute = CodeLoopsNewRouteImport.update({
- id: '/code/loops/new',
- path: '/code/loops/new',
+const LoopsNewRoute = LoopsNewRouteImport.update({
+ id: '/loops/new',
+ path: '/loops/new',
getParentRoute: () => rootRouteImport,
} as any)
-const CodeLoopsLoopIdRoute = CodeLoopsLoopIdRouteImport.update({
- id: '/code/loops/$loopId',
- path: '/code/loops/$loopId',
+const LoopsLoopIdRoute = LoopsLoopIdRouteImport.update({
+ id: '/loops/$loopId',
+ path: '/loops/$loopId',
getParentRoute: () => rootRouteImport,
} as any)
-const CodeInboxRunsRoute = CodeInboxRunsRouteImport.update({
+const InboxRunsRoute = InboxRunsRouteImport.update({
id: '/runs',
path: '/runs',
- getParentRoute: () => CodeInboxRoute,
+ getParentRoute: () => InboxRoute,
} as any)
-const CodeInboxReportsRoute = CodeInboxReportsRouteImport.update({
+const InboxReportsRoute = InboxReportsRouteImport.update({
id: '/reports',
path: '/reports',
- getParentRoute: () => CodeInboxRoute,
+ getParentRoute: () => InboxRoute,
} as any)
-const CodeInboxPullsRoute = CodeInboxPullsRouteImport.update({
+const InboxPullsRoute = InboxPullsRouteImport.update({
id: '/pulls',
path: '/pulls',
- getParentRoute: () => CodeInboxRoute,
+ getParentRoute: () => InboxRoute,
} as any)
-const CodeInboxDismissedRoute = CodeInboxDismissedRouteImport.update({
+const InboxDismissedRoute = InboxDismissedRouteImport.update({
id: '/dismissed',
path: '/dismissed',
- getParentRoute: () => CodeInboxRoute,
+ getParentRoute: () => InboxRoute,
} as any)
-const CodeInboxAgentsRoute = CodeInboxAgentsRouteImport.update({
+const InboxAgentsRoute = InboxAgentsRouteImport.update({
id: '/agents',
path: '/agents',
- getParentRoute: () => CodeInboxRoute,
+ getParentRoute: () => InboxRoute,
} as any)
-const CodeAgentsScoutsRoute = CodeAgentsScoutsRouteImport.update({
+const FoldersFolderIdRoute = FoldersFolderIdRouteImport.update({
+ id: '/folders/$folderId',
+ path: '/folders/$folderId',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const CodeSplatRoute = CodeSplatRouteImport.update({
+ id: '/code/$',
+ path: '/code/$',
+ getParentRoute: () => rootRouteImport,
+} as any)
+const AgentsScoutsRoute = AgentsScoutsRouteImport.update({
id: '/scouts',
path: '/scouts',
- getParentRoute: () => CodeAgentsRoute,
+ getParentRoute: () => AgentsRoute,
+} as any)
+const ShellSkillsRoute = ShellSkillsRouteImport.update({
+ id: '/skills',
+ path: '/skills',
+ getParentRoute: () => ShellRoute,
+} as any)
+const ShellNewRoute = ShellNewRouteImport.update({
+ id: '/new',
+ path: '/new',
+ getParentRoute: () => ShellRoute,
+} as any)
+const ShellMcpServersRoute = ShellMcpServersRouteImport.update({
+ id: '/mcp-servers',
+ path: '/mcp-servers',
+ getParentRoute: () => ShellRoute,
+} as any)
+const ShellCommandCenterRoute = ShellCommandCenterRouteImport.update({
+ id: '/command-center',
+ path: '/command-center',
+ getParentRoute: () => ShellRoute,
+} as any)
+const ShellActivityRoute = ShellActivityRouteImport.update({
+ id: '/activity',
+ path: '/activity',
+ getParentRoute: () => ShellRoute,
} as any)
-const CodeLoopsLoopIdIndexRoute = CodeLoopsLoopIdIndexRouteImport.update({
+const LoopsLoopIdIndexRoute = LoopsLoopIdIndexRouteImport.update({
id: '/',
path: '/',
- getParentRoute: () => CodeLoopsLoopIdRoute,
+ getParentRoute: () => LoopsLoopIdRoute,
} as any)
-const CodeInboxRunsIndexRoute = CodeInboxRunsIndexRouteImport.update({
+const InboxRunsIndexRoute = InboxRunsIndexRouteImport.update({
id: '/',
path: '/',
- getParentRoute: () => CodeInboxRunsRoute,
+ getParentRoute: () => InboxRunsRoute,
} as any)
-const CodeInboxReportsIndexRoute = CodeInboxReportsIndexRouteImport.update({
+const InboxReportsIndexRoute = InboxReportsIndexRouteImport.update({
id: '/',
path: '/',
- getParentRoute: () => CodeInboxReportsRoute,
+ getParentRoute: () => InboxReportsRoute,
} as any)
-const CodeInboxPullsIndexRoute = CodeInboxPullsIndexRouteImport.update({
+const InboxPullsIndexRoute = InboxPullsIndexRouteImport.update({
id: '/',
path: '/',
- getParentRoute: () => CodeInboxPullsRoute,
+ getParentRoute: () => InboxPullsRoute,
} as any)
-const CodeInboxDismissedIndexRoute = CodeInboxDismissedIndexRouteImport.update({
+const InboxDismissedIndexRoute = InboxDismissedIndexRouteImport.update({
id: '/',
path: '/',
- getParentRoute: () => CodeInboxDismissedRoute,
+ getParentRoute: () => InboxDismissedRoute,
} as any)
-const CodeAgentsScoutsIndexRoute = CodeAgentsScoutsIndexRouteImport.update({
+const AgentsScoutsIndexRoute = AgentsScoutsIndexRouteImport.update({
id: '/',
path: '/',
- getParentRoute: () => CodeAgentsScoutsRoute,
+ getParentRoute: () => AgentsScoutsRoute,
} as any)
-const WebsiteChannelIdTasksTaskIdRoute =
- WebsiteChannelIdTasksTaskIdRouteImport.update({
- id: '/$channelId/tasks/$taskId',
- path: '/$channelId/tasks/$taskId',
- getParentRoute: () => WebsiteRoute,
- } as any)
-const WebsiteChannelIdDashboardsDashboardIdRoute =
- WebsiteChannelIdDashboardsDashboardIdRouteImport.update({
- id: '/$channelId/dashboards/$dashboardId',
- path: '/$channelId/dashboards/$dashboardId',
- getParentRoute: () => WebsiteRoute,
- } as any)
-const CodeTasksPendingKeyRoute = CodeTasksPendingKeyRouteImport.update({
- id: '/code/tasks/pending/$key',
- path: '/code/tasks/pending/$key',
+const ShellSpacesIndexRoute = ShellSpacesIndexRouteImport.update({
+ id: '/spaces/',
+ path: '/spaces/',
+ getParentRoute: () => ShellRoute,
+} as any)
+const TasksPendingKeyRoute = TasksPendingKeyRouteImport.update({
+ id: '/tasks/pending/$key',
+ path: '/tasks/pending/$key',
getParentRoute: () => rootRouteImport,
} as any)
-const CodeLoopsLoopIdEditRoute = CodeLoopsLoopIdEditRouteImport.update({
+const LoopsLoopIdEditRoute = LoopsLoopIdEditRouteImport.update({
id: '/edit',
path: '/edit',
- getParentRoute: () => CodeLoopsLoopIdRoute,
+ getParentRoute: () => LoopsLoopIdRoute,
} as any)
-const CodeInboxRunsReportIdRoute = CodeInboxRunsReportIdRouteImport.update({
+const InboxRunsReportIdRoute = InboxRunsReportIdRouteImport.update({
id: '/$reportId',
path: '/$reportId',
- getParentRoute: () => CodeInboxRunsRoute,
+ getParentRoute: () => InboxRunsRoute,
} as any)
-const CodeInboxReportsReportIdRoute =
- CodeInboxReportsReportIdRouteImport.update({
- id: '/$reportId',
- path: '/$reportId',
- getParentRoute: () => CodeInboxReportsRoute,
- } as any)
-const CodeInboxPullsReportIdRoute = CodeInboxPullsReportIdRouteImport.update({
+const InboxReportsReportIdRoute = InboxReportsReportIdRouteImport.update({
+ id: '/$reportId',
+ path: '/$reportId',
+ getParentRoute: () => InboxReportsRoute,
+} as any)
+const InboxPullsReportIdRoute = InboxPullsReportIdRouteImport.update({
+ id: '/$reportId',
+ path: '/$reportId',
+ getParentRoute: () => InboxPullsRoute,
+} as any)
+const InboxDismissedReportIdRoute = InboxDismissedReportIdRouteImport.update({
id: '/$reportId',
path: '/$reportId',
- getParentRoute: () => CodeInboxPullsRoute,
+ getParentRoute: () => InboxDismissedRoute,
} as any)
-const CodeInboxDismissedReportIdRoute =
- CodeInboxDismissedReportIdRouteImport.update({
- id: '/$reportId',
- path: '/$reportId',
- getParentRoute: () => CodeInboxDismissedRoute,
+const AgentsScoutsScratchpadRoute = AgentsScoutsScratchpadRouteImport.update({
+ id: '/scratchpad',
+ path: '/scratchpad',
+ getParentRoute: () => AgentsScoutsRoute,
+} as any)
+const AgentsScoutsFindingsRoute = AgentsScoutsFindingsRouteImport.update({
+ id: '/findings',
+ path: '/findings',
+ getParentRoute: () => AgentsScoutsRoute,
+} as any)
+const AgentsScoutsSkillNameRoute = AgentsScoutsSkillNameRouteImport.update({
+ id: '/$skillName',
+ path: '/$skillName',
+ getParentRoute: () => AgentsScoutsRoute,
+} as any)
+const ShellFeedsFeedIdRoute = ShellFeedsFeedIdRouteImport.update({
+ id: '/feeds/$feedId',
+ path: '/feeds/$feedId',
+ getParentRoute: () => ShellRoute,
+} as any)
+const AgentsScoutsSkillNameIndexRoute =
+ AgentsScoutsSkillNameIndexRouteImport.update({
+ id: '/',
+ path: '/',
+ getParentRoute: () => AgentsScoutsSkillNameRoute,
} as any)
-const CodeAgentsScoutsScratchpadRoute =
- CodeAgentsScoutsScratchpadRouteImport.update({
- id: '/scratchpad',
- path: '/scratchpad',
- getParentRoute: () => CodeAgentsScoutsRoute,
+const ShellSpacesChannelIdIndexRoute =
+ ShellSpacesChannelIdIndexRouteImport.update({
+ id: '/spaces/$channelId/',
+ path: '/spaces/$channelId/',
+ getParentRoute: () => ShellRoute,
} as any)
-const CodeAgentsScoutsFindingsRoute =
- CodeAgentsScoutsFindingsRouteImport.update({
- id: '/findings',
- path: '/findings',
- getParentRoute: () => CodeAgentsScoutsRoute,
+const ShellSpacesChannelIdNewRoute = ShellSpacesChannelIdNewRouteImport.update({
+ id: '/spaces/$channelId/new',
+ path: '/spaces/$channelId/new',
+ getParentRoute: () => ShellRoute,
+} as any)
+const ShellSpacesChannelIdLoopsRoute =
+ ShellSpacesChannelIdLoopsRouteImport.update({
+ id: '/spaces/$channelId/loops',
+ path: '/spaces/$channelId/loops',
+ getParentRoute: () => ShellRoute,
} as any)
-const CodeAgentsScoutsSkillNameRoute =
- CodeAgentsScoutsSkillNameRouteImport.update({
- id: '/$skillName',
- path: '/$skillName',
- getParentRoute: () => CodeAgentsScoutsRoute,
+const ShellSpacesChannelIdHistoryRoute =
+ ShellSpacesChannelIdHistoryRouteImport.update({
+ id: '/spaces/$channelId/history',
+ path: '/spaces/$channelId/history',
+ getParentRoute: () => ShellRoute,
} as any)
-const CodeAgentsScoutsSkillNameIndexRoute =
- CodeAgentsScoutsSkillNameIndexRouteImport.update({
- id: '/',
- path: '/',
- getParentRoute: () => CodeAgentsScoutsSkillNameRoute,
+const ShellSpacesChannelIdContextRoute =
+ ShellSpacesChannelIdContextRouteImport.update({
+ id: '/spaces/$channelId/context',
+ path: '/spaces/$channelId/context',
+ getParentRoute: () => ShellRoute,
+ } as any)
+const ShellSpacesChannelIdCanvasesRoute =
+ ShellSpacesChannelIdCanvasesRouteImport.update({
+ id: '/spaces/$channelId/canvases',
+ path: '/spaces/$channelId/canvases',
+ getParentRoute: () => ShellRoute,
+ } as any)
+const ShellSpacesChannelIdArtifactsRoute =
+ ShellSpacesChannelIdArtifactsRouteImport.update({
+ id: '/spaces/$channelId/artifacts',
+ path: '/spaces/$channelId/artifacts',
+ getParentRoute: () => ShellRoute,
+ } as any)
+const ShellSpacesChannelIdTasksTaskIdRoute =
+ ShellSpacesChannelIdTasksTaskIdRouteImport.update({
+ id: '/spaces/$channelId/tasks/$taskId',
+ path: '/spaces/$channelId/tasks/$taskId',
+ getParentRoute: () => ShellRoute,
+ } as any)
+const ShellSpacesChannelIdDashboardsDashboardIdRoute =
+ ShellSpacesChannelIdDashboardsDashboardIdRouteImport.update({
+ id: '/spaces/$channelId/dashboards/$dashboardId',
+ path: '/spaces/$channelId/dashboards/$dashboardId',
+ getParentRoute: () => ShellRoute,
} as any)
export interface FileRoutesByFullPath {
- '/': typeof IndexRoute
- '/command-center': typeof CommandCenterRoute
- '/mcp-servers': typeof McpServersRoute
- '/skills': typeof SkillsRoute
+ '/': typeof ShellIndexRoute
+ '/agents': typeof AgentsRouteWithChildren
+ '/archived': typeof ArchivedRoute
+ '/inbox': typeof InboxRouteWithChildren
+ '/pr': typeof PrRoute
'/usage': typeof UsageRoute
- '/website': typeof WebsiteRouteWithChildren
- '/code/agents': typeof CodeAgentsRouteWithChildren
- '/code/archived': typeof CodeArchivedRoute
- '/code/inbox': typeof CodeInboxRouteWithChildren
- '/code/pr': typeof CodePrRoute
+ '/activity': typeof ShellActivityRoute
+ '/command-center': typeof ShellCommandCenterRoute
+ '/mcp-servers': typeof ShellMcpServersRoute
+ '/new': typeof ShellNewRoute
+ '/skills': typeof ShellSkillsRoute
+ '/agents/scouts': typeof AgentsScoutsRouteWithChildren
+ '/code/$': typeof CodeSplatRoute
'/folders/$folderId': typeof FoldersFolderIdRoute
+ '/inbox/agents': typeof InboxAgentsRoute
+ '/inbox/dismissed': typeof InboxDismissedRouteWithChildren
+ '/inbox/pulls': typeof InboxPullsRouteWithChildren
+ '/inbox/reports': typeof InboxReportsRouteWithChildren
+ '/inbox/runs': typeof InboxRunsRouteWithChildren
+ '/loops/$loopId': typeof LoopsLoopIdRouteWithChildren
+ '/loops/new': typeof LoopsNewRoute
'/settings/$category': typeof SettingsCategoryRoute
- '/website/activity': typeof WebsiteActivityRoute
- '/website/command-center': typeof WebsiteCommandCenterRoute
- '/website/home': typeof WebsiteHomeRoute
- '/website/mcp-servers': typeof WebsiteMcpServersRoute
- '/website/new': typeof WebsiteNewRoute
- '/website/skills': typeof WebsiteSkillsRoute
+ '/tasks/$taskId': typeof TasksTaskIdRoute
+ '/website/$': typeof WebsiteSplatRoute
+ '/agents/': typeof AgentsIndexRoute
'/code/': typeof CodeIndexRoute
+ '/inbox/': typeof InboxIndexRoute
+ '/loops/': typeof LoopsIndexRoute
'/settings/': typeof SettingsIndexRoute
'/website/': typeof WebsiteIndexRoute
- '/code/agents/scouts': typeof CodeAgentsScoutsRouteWithChildren
- '/code/inbox/agents': typeof CodeInboxAgentsRoute
- '/code/inbox/dismissed': typeof CodeInboxDismissedRouteWithChildren
- '/code/inbox/pulls': typeof CodeInboxPullsRouteWithChildren
- '/code/inbox/reports': typeof CodeInboxReportsRouteWithChildren
- '/code/inbox/runs': typeof CodeInboxRunsRouteWithChildren
- '/code/loops/$loopId': typeof CodeLoopsLoopIdRouteWithChildren
- '/code/loops/new': typeof CodeLoopsNewRoute
- '/code/tasks/$taskId': typeof CodeTasksTaskIdRoute
- '/website/$channelId/artifacts': typeof WebsiteChannelIdArtifactsRoute
- '/website/$channelId/canvases': typeof WebsiteChannelIdCanvasesRoute
- '/website/$channelId/context': typeof WebsiteChannelIdContextRoute
- '/website/$channelId/history': typeof WebsiteChannelIdHistoryRoute
- '/website/$channelId/loops': typeof WebsiteChannelIdLoopsRoute
- '/website/$channelId/new': typeof WebsiteChannelIdNewRoute
- '/website/feeds/$feedId': typeof WebsiteFeedsFeedIdRoute
- '/code/agents/': typeof CodeAgentsIndexRoute
- '/code/inbox/': typeof CodeInboxIndexRoute
- '/code/loops/': typeof CodeLoopsIndexRoute
- '/website/$channelId/': typeof WebsiteChannelIdIndexRoute
- '/code/agents/scouts/$skillName': typeof CodeAgentsScoutsSkillNameRouteWithChildren
- '/code/agents/scouts/findings': typeof CodeAgentsScoutsFindingsRoute
- '/code/agents/scouts/scratchpad': typeof CodeAgentsScoutsScratchpadRoute
- '/code/inbox/dismissed/$reportId': typeof CodeInboxDismissedReportIdRoute
- '/code/inbox/pulls/$reportId': typeof CodeInboxPullsReportIdRoute
- '/code/inbox/reports/$reportId': typeof CodeInboxReportsReportIdRoute
- '/code/inbox/runs/$reportId': typeof CodeInboxRunsReportIdRoute
- '/code/loops/$loopId/edit': typeof CodeLoopsLoopIdEditRoute
- '/code/tasks/pending/$key': typeof CodeTasksPendingKeyRoute
- '/website/$channelId/dashboards/$dashboardId': typeof WebsiteChannelIdDashboardsDashboardIdRoute
- '/website/$channelId/tasks/$taskId': typeof WebsiteChannelIdTasksTaskIdRoute
- '/code/agents/scouts/': typeof CodeAgentsScoutsIndexRoute
- '/code/inbox/dismissed/': typeof CodeInboxDismissedIndexRoute
- '/code/inbox/pulls/': typeof CodeInboxPullsIndexRoute
- '/code/inbox/reports/': typeof CodeInboxReportsIndexRoute
- '/code/inbox/runs/': typeof CodeInboxRunsIndexRoute
- '/code/loops/$loopId/': typeof CodeLoopsLoopIdIndexRoute
- '/code/agents/scouts/$skillName/': typeof CodeAgentsScoutsSkillNameIndexRoute
+ '/feeds/$feedId': typeof ShellFeedsFeedIdRoute
+ '/agents/scouts/$skillName': typeof AgentsScoutsSkillNameRouteWithChildren
+ '/agents/scouts/findings': typeof AgentsScoutsFindingsRoute
+ '/agents/scouts/scratchpad': typeof AgentsScoutsScratchpadRoute
+ '/inbox/dismissed/$reportId': typeof InboxDismissedReportIdRoute
+ '/inbox/pulls/$reportId': typeof InboxPullsReportIdRoute
+ '/inbox/reports/$reportId': typeof InboxReportsReportIdRoute
+ '/inbox/runs/$reportId': typeof InboxRunsReportIdRoute
+ '/loops/$loopId/edit': typeof LoopsLoopIdEditRoute
+ '/tasks/pending/$key': typeof TasksPendingKeyRoute
+ '/spaces/': typeof ShellSpacesIndexRoute
+ '/agents/scouts/': typeof AgentsScoutsIndexRoute
+ '/inbox/dismissed/': typeof InboxDismissedIndexRoute
+ '/inbox/pulls/': typeof InboxPullsIndexRoute
+ '/inbox/reports/': typeof InboxReportsIndexRoute
+ '/inbox/runs/': typeof InboxRunsIndexRoute
+ '/loops/$loopId/': typeof LoopsLoopIdIndexRoute
+ '/spaces/$channelId/artifacts': typeof ShellSpacesChannelIdArtifactsRoute
+ '/spaces/$channelId/canvases': typeof ShellSpacesChannelIdCanvasesRoute
+ '/spaces/$channelId/context': typeof ShellSpacesChannelIdContextRoute
+ '/spaces/$channelId/history': typeof ShellSpacesChannelIdHistoryRoute
+ '/spaces/$channelId/loops': typeof ShellSpacesChannelIdLoopsRoute
+ '/spaces/$channelId/new': typeof ShellSpacesChannelIdNewRoute
+ '/spaces/$channelId/': typeof ShellSpacesChannelIdIndexRoute
+ '/agents/scouts/$skillName/': typeof AgentsScoutsSkillNameIndexRoute
+ '/spaces/$channelId/dashboards/$dashboardId': typeof ShellSpacesChannelIdDashboardsDashboardIdRoute
+ '/spaces/$channelId/tasks/$taskId': typeof ShellSpacesChannelIdTasksTaskIdRoute
}
export interface FileRoutesByTo {
- '/': typeof IndexRoute
- '/command-center': typeof CommandCenterRoute
- '/mcp-servers': typeof McpServersRoute
- '/skills': typeof SkillsRoute
+ '/archived': typeof ArchivedRoute
+ '/pr': typeof PrRoute
'/usage': typeof UsageRoute
- '/code/archived': typeof CodeArchivedRoute
- '/code/pr': typeof CodePrRoute
+ '/activity': typeof ShellActivityRoute
+ '/command-center': typeof ShellCommandCenterRoute
+ '/mcp-servers': typeof ShellMcpServersRoute
+ '/new': typeof ShellNewRoute
+ '/skills': typeof ShellSkillsRoute
+ '/code/$': typeof CodeSplatRoute
'/folders/$folderId': typeof FoldersFolderIdRoute
+ '/inbox/agents': typeof InboxAgentsRoute
+ '/loops/new': typeof LoopsNewRoute
'/settings/$category': typeof SettingsCategoryRoute
- '/website/activity': typeof WebsiteActivityRoute
- '/website/command-center': typeof WebsiteCommandCenterRoute
- '/website/home': typeof WebsiteHomeRoute
- '/website/mcp-servers': typeof WebsiteMcpServersRoute
- '/website/new': typeof WebsiteNewRoute
- '/website/skills': typeof WebsiteSkillsRoute
+ '/tasks/$taskId': typeof TasksTaskIdRoute
+ '/website/$': typeof WebsiteSplatRoute
+ '/': typeof ShellIndexRoute
+ '/agents': typeof AgentsIndexRoute
'/code': typeof CodeIndexRoute
+ '/inbox': typeof InboxIndexRoute
+ '/loops': typeof LoopsIndexRoute
'/settings': typeof SettingsIndexRoute
'/website': typeof WebsiteIndexRoute
- '/code/inbox/agents': typeof CodeInboxAgentsRoute
- '/code/loops/new': typeof CodeLoopsNewRoute
- '/code/tasks/$taskId': typeof CodeTasksTaskIdRoute
- '/website/$channelId/artifacts': typeof WebsiteChannelIdArtifactsRoute
- '/website/$channelId/canvases': typeof WebsiteChannelIdCanvasesRoute
- '/website/$channelId/context': typeof WebsiteChannelIdContextRoute
- '/website/$channelId/history': typeof WebsiteChannelIdHistoryRoute
- '/website/$channelId/loops': typeof WebsiteChannelIdLoopsRoute
- '/website/$channelId/new': typeof WebsiteChannelIdNewRoute
- '/website/feeds/$feedId': typeof WebsiteFeedsFeedIdRoute
- '/code/agents': typeof CodeAgentsIndexRoute
- '/code/inbox': typeof CodeInboxIndexRoute
- '/code/loops': typeof CodeLoopsIndexRoute
- '/website/$channelId': typeof WebsiteChannelIdIndexRoute
- '/code/agents/scouts/findings': typeof CodeAgentsScoutsFindingsRoute
- '/code/agents/scouts/scratchpad': typeof CodeAgentsScoutsScratchpadRoute
- '/code/inbox/dismissed/$reportId': typeof CodeInboxDismissedReportIdRoute
- '/code/inbox/pulls/$reportId': typeof CodeInboxPullsReportIdRoute
- '/code/inbox/reports/$reportId': typeof CodeInboxReportsReportIdRoute
- '/code/inbox/runs/$reportId': typeof CodeInboxRunsReportIdRoute
- '/code/loops/$loopId/edit': typeof CodeLoopsLoopIdEditRoute
- '/code/tasks/pending/$key': typeof CodeTasksPendingKeyRoute
- '/website/$channelId/dashboards/$dashboardId': typeof WebsiteChannelIdDashboardsDashboardIdRoute
- '/website/$channelId/tasks/$taskId': typeof WebsiteChannelIdTasksTaskIdRoute
- '/code/agents/scouts': typeof CodeAgentsScoutsIndexRoute
- '/code/inbox/dismissed': typeof CodeInboxDismissedIndexRoute
- '/code/inbox/pulls': typeof CodeInboxPullsIndexRoute
- '/code/inbox/reports': typeof CodeInboxReportsIndexRoute
- '/code/inbox/runs': typeof CodeInboxRunsIndexRoute
- '/code/loops/$loopId': typeof CodeLoopsLoopIdIndexRoute
- '/code/agents/scouts/$skillName': typeof CodeAgentsScoutsSkillNameIndexRoute
+ '/feeds/$feedId': typeof ShellFeedsFeedIdRoute
+ '/agents/scouts/findings': typeof AgentsScoutsFindingsRoute
+ '/agents/scouts/scratchpad': typeof AgentsScoutsScratchpadRoute
+ '/inbox/dismissed/$reportId': typeof InboxDismissedReportIdRoute
+ '/inbox/pulls/$reportId': typeof InboxPullsReportIdRoute
+ '/inbox/reports/$reportId': typeof InboxReportsReportIdRoute
+ '/inbox/runs/$reportId': typeof InboxRunsReportIdRoute
+ '/loops/$loopId/edit': typeof LoopsLoopIdEditRoute
+ '/tasks/pending/$key': typeof TasksPendingKeyRoute
+ '/spaces': typeof ShellSpacesIndexRoute
+ '/agents/scouts': typeof AgentsScoutsIndexRoute
+ '/inbox/dismissed': typeof InboxDismissedIndexRoute
+ '/inbox/pulls': typeof InboxPullsIndexRoute
+ '/inbox/reports': typeof InboxReportsIndexRoute
+ '/inbox/runs': typeof InboxRunsIndexRoute
+ '/loops/$loopId': typeof LoopsLoopIdIndexRoute
+ '/spaces/$channelId/artifacts': typeof ShellSpacesChannelIdArtifactsRoute
+ '/spaces/$channelId/canvases': typeof ShellSpacesChannelIdCanvasesRoute
+ '/spaces/$channelId/context': typeof ShellSpacesChannelIdContextRoute
+ '/spaces/$channelId/history': typeof ShellSpacesChannelIdHistoryRoute
+ '/spaces/$channelId/loops': typeof ShellSpacesChannelIdLoopsRoute
+ '/spaces/$channelId/new': typeof ShellSpacesChannelIdNewRoute
+ '/spaces/$channelId': typeof ShellSpacesChannelIdIndexRoute
+ '/agents/scouts/$skillName': typeof AgentsScoutsSkillNameIndexRoute
+ '/spaces/$channelId/dashboards/$dashboardId': typeof ShellSpacesChannelIdDashboardsDashboardIdRoute
+ '/spaces/$channelId/tasks/$taskId': typeof ShellSpacesChannelIdTasksTaskIdRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
- '/': typeof IndexRoute
- '/command-center': typeof CommandCenterRoute
- '/mcp-servers': typeof McpServersRoute
- '/skills': typeof SkillsRoute
+ '/_shell': typeof ShellRouteWithChildren
+ '/agents': typeof AgentsRouteWithChildren
+ '/archived': typeof ArchivedRoute
+ '/inbox': typeof InboxRouteWithChildren
+ '/pr': typeof PrRoute
'/usage': typeof UsageRoute
- '/website': typeof WebsiteRouteWithChildren
- '/code/agents': typeof CodeAgentsRouteWithChildren
- '/code/archived': typeof CodeArchivedRoute
- '/code/inbox': typeof CodeInboxRouteWithChildren
- '/code/pr': typeof CodePrRoute
+ '/_shell/activity': typeof ShellActivityRoute
+ '/_shell/command-center': typeof ShellCommandCenterRoute
+ '/_shell/mcp-servers': typeof ShellMcpServersRoute
+ '/_shell/new': typeof ShellNewRoute
+ '/_shell/skills': typeof ShellSkillsRoute
+ '/agents/scouts': typeof AgentsScoutsRouteWithChildren
+ '/code/$': typeof CodeSplatRoute
'/folders/$folderId': typeof FoldersFolderIdRoute
+ '/inbox/agents': typeof InboxAgentsRoute
+ '/inbox/dismissed': typeof InboxDismissedRouteWithChildren
+ '/inbox/pulls': typeof InboxPullsRouteWithChildren
+ '/inbox/reports': typeof InboxReportsRouteWithChildren
+ '/inbox/runs': typeof InboxRunsRouteWithChildren
+ '/loops/$loopId': typeof LoopsLoopIdRouteWithChildren
+ '/loops/new': typeof LoopsNewRoute
'/settings/$category': typeof SettingsCategoryRoute
- '/website/activity': typeof WebsiteActivityRoute
- '/website/command-center': typeof WebsiteCommandCenterRoute
- '/website/home': typeof WebsiteHomeRoute
- '/website/mcp-servers': typeof WebsiteMcpServersRoute
- '/website/new': typeof WebsiteNewRoute
- '/website/skills': typeof WebsiteSkillsRoute
+ '/tasks/$taskId': typeof TasksTaskIdRoute
+ '/website/$': typeof WebsiteSplatRoute
+ '/_shell/': typeof ShellIndexRoute
+ '/agents/': typeof AgentsIndexRoute
'/code/': typeof CodeIndexRoute
+ '/inbox/': typeof InboxIndexRoute
+ '/loops/': typeof LoopsIndexRoute
'/settings/': typeof SettingsIndexRoute
'/website/': typeof WebsiteIndexRoute
- '/code/agents/scouts': typeof CodeAgentsScoutsRouteWithChildren
- '/code/inbox/agents': typeof CodeInboxAgentsRoute
- '/code/inbox/dismissed': typeof CodeInboxDismissedRouteWithChildren
- '/code/inbox/pulls': typeof CodeInboxPullsRouteWithChildren
- '/code/inbox/reports': typeof CodeInboxReportsRouteWithChildren
- '/code/inbox/runs': typeof CodeInboxRunsRouteWithChildren
- '/code/loops/$loopId': typeof CodeLoopsLoopIdRouteWithChildren
- '/code/loops/new': typeof CodeLoopsNewRoute
- '/code/tasks/$taskId': typeof CodeTasksTaskIdRoute
- '/website/$channelId/artifacts': typeof WebsiteChannelIdArtifactsRoute
- '/website/$channelId/canvases': typeof WebsiteChannelIdCanvasesRoute
- '/website/$channelId/context': typeof WebsiteChannelIdContextRoute
- '/website/$channelId/history': typeof WebsiteChannelIdHistoryRoute
- '/website/$channelId/loops': typeof WebsiteChannelIdLoopsRoute
- '/website/$channelId/new': typeof WebsiteChannelIdNewRoute
- '/website/feeds/$feedId': typeof WebsiteFeedsFeedIdRoute
- '/code/agents/': typeof CodeAgentsIndexRoute
- '/code/inbox/': typeof CodeInboxIndexRoute
- '/code/loops/': typeof CodeLoopsIndexRoute
- '/website/$channelId/': typeof WebsiteChannelIdIndexRoute
- '/code/agents/scouts/$skillName': typeof CodeAgentsScoutsSkillNameRouteWithChildren
- '/code/agents/scouts/findings': typeof CodeAgentsScoutsFindingsRoute
- '/code/agents/scouts/scratchpad': typeof CodeAgentsScoutsScratchpadRoute
- '/code/inbox/dismissed/$reportId': typeof CodeInboxDismissedReportIdRoute
- '/code/inbox/pulls/$reportId': typeof CodeInboxPullsReportIdRoute
- '/code/inbox/reports/$reportId': typeof CodeInboxReportsReportIdRoute
- '/code/inbox/runs/$reportId': typeof CodeInboxRunsReportIdRoute
- '/code/loops/$loopId/edit': typeof CodeLoopsLoopIdEditRoute
- '/code/tasks/pending/$key': typeof CodeTasksPendingKeyRoute
- '/website/$channelId/dashboards/$dashboardId': typeof WebsiteChannelIdDashboardsDashboardIdRoute
- '/website/$channelId/tasks/$taskId': typeof WebsiteChannelIdTasksTaskIdRoute
- '/code/agents/scouts/': typeof CodeAgentsScoutsIndexRoute
- '/code/inbox/dismissed/': typeof CodeInboxDismissedIndexRoute
- '/code/inbox/pulls/': typeof CodeInboxPullsIndexRoute
- '/code/inbox/reports/': typeof CodeInboxReportsIndexRoute
- '/code/inbox/runs/': typeof CodeInboxRunsIndexRoute
- '/code/loops/$loopId/': typeof CodeLoopsLoopIdIndexRoute
- '/code/agents/scouts/$skillName/': typeof CodeAgentsScoutsSkillNameIndexRoute
+ '/_shell/feeds/$feedId': typeof ShellFeedsFeedIdRoute
+ '/agents/scouts/$skillName': typeof AgentsScoutsSkillNameRouteWithChildren
+ '/agents/scouts/findings': typeof AgentsScoutsFindingsRoute
+ '/agents/scouts/scratchpad': typeof AgentsScoutsScratchpadRoute
+ '/inbox/dismissed/$reportId': typeof InboxDismissedReportIdRoute
+ '/inbox/pulls/$reportId': typeof InboxPullsReportIdRoute
+ '/inbox/reports/$reportId': typeof InboxReportsReportIdRoute
+ '/inbox/runs/$reportId': typeof InboxRunsReportIdRoute
+ '/loops/$loopId/edit': typeof LoopsLoopIdEditRoute
+ '/tasks/pending/$key': typeof TasksPendingKeyRoute
+ '/_shell/spaces/': typeof ShellSpacesIndexRoute
+ '/agents/scouts/': typeof AgentsScoutsIndexRoute
+ '/inbox/dismissed/': typeof InboxDismissedIndexRoute
+ '/inbox/pulls/': typeof InboxPullsIndexRoute
+ '/inbox/reports/': typeof InboxReportsIndexRoute
+ '/inbox/runs/': typeof InboxRunsIndexRoute
+ '/loops/$loopId/': typeof LoopsLoopIdIndexRoute
+ '/_shell/spaces/$channelId/artifacts': typeof ShellSpacesChannelIdArtifactsRoute
+ '/_shell/spaces/$channelId/canvases': typeof ShellSpacesChannelIdCanvasesRoute
+ '/_shell/spaces/$channelId/context': typeof ShellSpacesChannelIdContextRoute
+ '/_shell/spaces/$channelId/history': typeof ShellSpacesChannelIdHistoryRoute
+ '/_shell/spaces/$channelId/loops': typeof ShellSpacesChannelIdLoopsRoute
+ '/_shell/spaces/$channelId/new': typeof ShellSpacesChannelIdNewRoute
+ '/_shell/spaces/$channelId/': typeof ShellSpacesChannelIdIndexRoute
+ '/agents/scouts/$skillName/': typeof AgentsScoutsSkillNameIndexRoute
+ '/_shell/spaces/$channelId/dashboards/$dashboardId': typeof ShellSpacesChannelIdDashboardsDashboardIdRoute
+ '/_shell/spaces/$channelId/tasks/$taskId': typeof ShellSpacesChannelIdTasksTaskIdRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths:
| '/'
+ | '/agents'
+ | '/archived'
+ | '/inbox'
+ | '/pr'
+ | '/usage'
+ | '/activity'
| '/command-center'
| '/mcp-servers'
+ | '/new'
| '/skills'
- | '/usage'
- | '/website'
- | '/code/agents'
- | '/code/archived'
- | '/code/inbox'
- | '/code/pr'
+ | '/agents/scouts'
+ | '/code/$'
| '/folders/$folderId'
+ | '/inbox/agents'
+ | '/inbox/dismissed'
+ | '/inbox/pulls'
+ | '/inbox/reports'
+ | '/inbox/runs'
+ | '/loops/$loopId'
+ | '/loops/new'
| '/settings/$category'
- | '/website/activity'
- | '/website/command-center'
- | '/website/home'
- | '/website/mcp-servers'
- | '/website/new'
- | '/website/skills'
+ | '/tasks/$taskId'
+ | '/website/$'
+ | '/agents/'
| '/code/'
+ | '/inbox/'
+ | '/loops/'
| '/settings/'
| '/website/'
- | '/code/agents/scouts'
- | '/code/inbox/agents'
- | '/code/inbox/dismissed'
- | '/code/inbox/pulls'
- | '/code/inbox/reports'
- | '/code/inbox/runs'
- | '/code/loops/$loopId'
- | '/code/loops/new'
- | '/code/tasks/$taskId'
- | '/website/$channelId/artifacts'
- | '/website/$channelId/canvases'
- | '/website/$channelId/context'
- | '/website/$channelId/history'
- | '/website/$channelId/loops'
- | '/website/$channelId/new'
- | '/website/feeds/$feedId'
- | '/code/agents/'
- | '/code/inbox/'
- | '/code/loops/'
- | '/website/$channelId/'
- | '/code/agents/scouts/$skillName'
- | '/code/agents/scouts/findings'
- | '/code/agents/scouts/scratchpad'
- | '/code/inbox/dismissed/$reportId'
- | '/code/inbox/pulls/$reportId'
- | '/code/inbox/reports/$reportId'
- | '/code/inbox/runs/$reportId'
- | '/code/loops/$loopId/edit'
- | '/code/tasks/pending/$key'
- | '/website/$channelId/dashboards/$dashboardId'
- | '/website/$channelId/tasks/$taskId'
- | '/code/agents/scouts/'
- | '/code/inbox/dismissed/'
- | '/code/inbox/pulls/'
- | '/code/inbox/reports/'
- | '/code/inbox/runs/'
- | '/code/loops/$loopId/'
- | '/code/agents/scouts/$skillName/'
+ | '/feeds/$feedId'
+ | '/agents/scouts/$skillName'
+ | '/agents/scouts/findings'
+ | '/agents/scouts/scratchpad'
+ | '/inbox/dismissed/$reportId'
+ | '/inbox/pulls/$reportId'
+ | '/inbox/reports/$reportId'
+ | '/inbox/runs/$reportId'
+ | '/loops/$loopId/edit'
+ | '/tasks/pending/$key'
+ | '/spaces/'
+ | '/agents/scouts/'
+ | '/inbox/dismissed/'
+ | '/inbox/pulls/'
+ | '/inbox/reports/'
+ | '/inbox/runs/'
+ | '/loops/$loopId/'
+ | '/spaces/$channelId/artifacts'
+ | '/spaces/$channelId/canvases'
+ | '/spaces/$channelId/context'
+ | '/spaces/$channelId/history'
+ | '/spaces/$channelId/loops'
+ | '/spaces/$channelId/new'
+ | '/spaces/$channelId/'
+ | '/agents/scouts/$skillName/'
+ | '/spaces/$channelId/dashboards/$dashboardId'
+ | '/spaces/$channelId/tasks/$taskId'
fileRoutesByTo: FileRoutesByTo
to:
- | '/'
+ | '/archived'
+ | '/pr'
+ | '/usage'
+ | '/activity'
| '/command-center'
| '/mcp-servers'
+ | '/new'
| '/skills'
- | '/usage'
- | '/code/archived'
- | '/code/pr'
+ | '/code/$'
| '/folders/$folderId'
+ | '/inbox/agents'
+ | '/loops/new'
| '/settings/$category'
- | '/website/activity'
- | '/website/command-center'
- | '/website/home'
- | '/website/mcp-servers'
- | '/website/new'
- | '/website/skills'
+ | '/tasks/$taskId'
+ | '/website/$'
+ | '/'
+ | '/agents'
| '/code'
+ | '/inbox'
+ | '/loops'
| '/settings'
| '/website'
- | '/code/inbox/agents'
- | '/code/loops/new'
- | '/code/tasks/$taskId'
- | '/website/$channelId/artifacts'
- | '/website/$channelId/canvases'
- | '/website/$channelId/context'
- | '/website/$channelId/history'
- | '/website/$channelId/loops'
- | '/website/$channelId/new'
- | '/website/feeds/$feedId'
- | '/code/agents'
- | '/code/inbox'
- | '/code/loops'
- | '/website/$channelId'
- | '/code/agents/scouts/findings'
- | '/code/agents/scouts/scratchpad'
- | '/code/inbox/dismissed/$reportId'
- | '/code/inbox/pulls/$reportId'
- | '/code/inbox/reports/$reportId'
- | '/code/inbox/runs/$reportId'
- | '/code/loops/$loopId/edit'
- | '/code/tasks/pending/$key'
- | '/website/$channelId/dashboards/$dashboardId'
- | '/website/$channelId/tasks/$taskId'
- | '/code/agents/scouts'
- | '/code/inbox/dismissed'
- | '/code/inbox/pulls'
- | '/code/inbox/reports'
- | '/code/inbox/runs'
- | '/code/loops/$loopId'
- | '/code/agents/scouts/$skillName'
+ | '/feeds/$feedId'
+ | '/agents/scouts/findings'
+ | '/agents/scouts/scratchpad'
+ | '/inbox/dismissed/$reportId'
+ | '/inbox/pulls/$reportId'
+ | '/inbox/reports/$reportId'
+ | '/inbox/runs/$reportId'
+ | '/loops/$loopId/edit'
+ | '/tasks/pending/$key'
+ | '/spaces'
+ | '/agents/scouts'
+ | '/inbox/dismissed'
+ | '/inbox/pulls'
+ | '/inbox/reports'
+ | '/inbox/runs'
+ | '/loops/$loopId'
+ | '/spaces/$channelId/artifacts'
+ | '/spaces/$channelId/canvases'
+ | '/spaces/$channelId/context'
+ | '/spaces/$channelId/history'
+ | '/spaces/$channelId/loops'
+ | '/spaces/$channelId/new'
+ | '/spaces/$channelId'
+ | '/agents/scouts/$skillName'
+ | '/spaces/$channelId/dashboards/$dashboardId'
+ | '/spaces/$channelId/tasks/$taskId'
id:
| '__root__'
- | '/'
- | '/command-center'
- | '/mcp-servers'
- | '/skills'
+ | '/_shell'
+ | '/agents'
+ | '/archived'
+ | '/inbox'
+ | '/pr'
| '/usage'
- | '/website'
- | '/code/agents'
- | '/code/archived'
- | '/code/inbox'
- | '/code/pr'
+ | '/_shell/activity'
+ | '/_shell/command-center'
+ | '/_shell/mcp-servers'
+ | '/_shell/new'
+ | '/_shell/skills'
+ | '/agents/scouts'
+ | '/code/$'
| '/folders/$folderId'
+ | '/inbox/agents'
+ | '/inbox/dismissed'
+ | '/inbox/pulls'
+ | '/inbox/reports'
+ | '/inbox/runs'
+ | '/loops/$loopId'
+ | '/loops/new'
| '/settings/$category'
- | '/website/activity'
- | '/website/command-center'
- | '/website/home'
- | '/website/mcp-servers'
- | '/website/new'
- | '/website/skills'
+ | '/tasks/$taskId'
+ | '/website/$'
+ | '/_shell/'
+ | '/agents/'
| '/code/'
+ | '/inbox/'
+ | '/loops/'
| '/settings/'
| '/website/'
- | '/code/agents/scouts'
- | '/code/inbox/agents'
- | '/code/inbox/dismissed'
- | '/code/inbox/pulls'
- | '/code/inbox/reports'
- | '/code/inbox/runs'
- | '/code/loops/$loopId'
- | '/code/loops/new'
- | '/code/tasks/$taskId'
- | '/website/$channelId/artifacts'
- | '/website/$channelId/canvases'
- | '/website/$channelId/context'
- | '/website/$channelId/history'
- | '/website/$channelId/loops'
- | '/website/$channelId/new'
- | '/website/feeds/$feedId'
- | '/code/agents/'
- | '/code/inbox/'
- | '/code/loops/'
- | '/website/$channelId/'
- | '/code/agents/scouts/$skillName'
- | '/code/agents/scouts/findings'
- | '/code/agents/scouts/scratchpad'
- | '/code/inbox/dismissed/$reportId'
- | '/code/inbox/pulls/$reportId'
- | '/code/inbox/reports/$reportId'
- | '/code/inbox/runs/$reportId'
- | '/code/loops/$loopId/edit'
- | '/code/tasks/pending/$key'
- | '/website/$channelId/dashboards/$dashboardId'
- | '/website/$channelId/tasks/$taskId'
- | '/code/agents/scouts/'
- | '/code/inbox/dismissed/'
- | '/code/inbox/pulls/'
- | '/code/inbox/reports/'
- | '/code/inbox/runs/'
- | '/code/loops/$loopId/'
- | '/code/agents/scouts/$skillName/'
+ | '/_shell/feeds/$feedId'
+ | '/agents/scouts/$skillName'
+ | '/agents/scouts/findings'
+ | '/agents/scouts/scratchpad'
+ | '/inbox/dismissed/$reportId'
+ | '/inbox/pulls/$reportId'
+ | '/inbox/reports/$reportId'
+ | '/inbox/runs/$reportId'
+ | '/loops/$loopId/edit'
+ | '/tasks/pending/$key'
+ | '/_shell/spaces/'
+ | '/agents/scouts/'
+ | '/inbox/dismissed/'
+ | '/inbox/pulls/'
+ | '/inbox/reports/'
+ | '/inbox/runs/'
+ | '/loops/$loopId/'
+ | '/_shell/spaces/$channelId/artifacts'
+ | '/_shell/spaces/$channelId/canvases'
+ | '/_shell/spaces/$channelId/context'
+ | '/_shell/spaces/$channelId/history'
+ | '/_shell/spaces/$channelId/loops'
+ | '/_shell/spaces/$channelId/new'
+ | '/_shell/spaces/$channelId/'
+ | '/agents/scouts/$skillName/'
+ | '/_shell/spaces/$channelId/dashboards/$dashboardId'
+ | '/_shell/spaces/$channelId/tasks/$taskId'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
- IndexRoute: typeof IndexRoute
- CommandCenterRoute: typeof CommandCenterRoute
- McpServersRoute: typeof McpServersRoute
- SkillsRoute: typeof SkillsRoute
+ ShellRoute: typeof ShellRouteWithChildren
+ AgentsRoute: typeof AgentsRouteWithChildren
+ ArchivedRoute: typeof ArchivedRoute
+ InboxRoute: typeof InboxRouteWithChildren
+ PrRoute: typeof PrRoute
UsageRoute: typeof UsageRoute
- WebsiteRoute: typeof WebsiteRouteWithChildren
- CodeAgentsRoute: typeof CodeAgentsRouteWithChildren
- CodeArchivedRoute: typeof CodeArchivedRoute
- CodeInboxRoute: typeof CodeInboxRouteWithChildren
- CodePrRoute: typeof CodePrRoute
+ CodeSplatRoute: typeof CodeSplatRoute
FoldersFolderIdRoute: typeof FoldersFolderIdRoute
+ LoopsLoopIdRoute: typeof LoopsLoopIdRouteWithChildren
+ LoopsNewRoute: typeof LoopsNewRoute
SettingsCategoryRoute: typeof SettingsCategoryRoute
+ TasksTaskIdRoute: typeof TasksTaskIdRoute
+ WebsiteSplatRoute: typeof WebsiteSplatRoute
CodeIndexRoute: typeof CodeIndexRoute
+ LoopsIndexRoute: typeof LoopsIndexRoute
SettingsIndexRoute: typeof SettingsIndexRoute
- CodeLoopsLoopIdRoute: typeof CodeLoopsLoopIdRouteWithChildren
- CodeLoopsNewRoute: typeof CodeLoopsNewRoute
- CodeTasksTaskIdRoute: typeof CodeTasksTaskIdRoute
- CodeLoopsIndexRoute: typeof CodeLoopsIndexRoute
- CodeTasksPendingKeyRoute: typeof CodeTasksPendingKeyRoute
+ WebsiteIndexRoute: typeof WebsiteIndexRoute
+ TasksPendingKeyRoute: typeof TasksPendingKeyRoute
}
declare module '@tanstack/react-router' {
interface FileRoutesByPath {
- '/website': {
- id: '/website'
- path: '/website'
- fullPath: '/website'
- preLoaderRoute: typeof WebsiteRouteImport
- parentRoute: typeof rootRouteImport
- }
'/usage': {
id: '/usage'
path: '/usage'
@@ -763,40 +739,47 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof UsageRouteImport
parentRoute: typeof rootRouteImport
}
- '/skills': {
- id: '/skills'
- path: '/skills'
- fullPath: '/skills'
- preLoaderRoute: typeof SkillsRouteImport
+ '/pr': {
+ id: '/pr'
+ path: '/pr'
+ fullPath: '/pr'
+ preLoaderRoute: typeof PrRouteImport
parentRoute: typeof rootRouteImport
}
- '/mcp-servers': {
- id: '/mcp-servers'
- path: '/mcp-servers'
- fullPath: '/mcp-servers'
- preLoaderRoute: typeof McpServersRouteImport
+ '/inbox': {
+ id: '/inbox'
+ path: '/inbox'
+ fullPath: '/inbox'
+ preLoaderRoute: typeof InboxRouteImport
parentRoute: typeof rootRouteImport
}
- '/command-center': {
- id: '/command-center'
- path: '/command-center'
- fullPath: '/command-center'
- preLoaderRoute: typeof CommandCenterRouteImport
+ '/archived': {
+ id: '/archived'
+ path: '/archived'
+ fullPath: '/archived'
+ preLoaderRoute: typeof ArchivedRouteImport
parentRoute: typeof rootRouteImport
}
- '/': {
- id: '/'
- path: '/'
+ '/agents': {
+ id: '/agents'
+ path: '/agents'
+ fullPath: '/agents'
+ preLoaderRoute: typeof AgentsRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/_shell': {
+ id: '/_shell'
+ path: ''
fullPath: '/'
- preLoaderRoute: typeof IndexRouteImport
+ preLoaderRoute: typeof ShellRouteImport
parentRoute: typeof rootRouteImport
}
'/website/': {
id: '/website/'
- path: '/'
+ path: '/website'
fullPath: '/website/'
preLoaderRoute: typeof WebsiteIndexRouteImport
- parentRoute: typeof WebsiteRoute
+ parentRoute: typeof rootRouteImport
}
'/settings/': {
id: '/settings/'
@@ -805,6 +788,20 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof SettingsIndexRouteImport
parentRoute: typeof rootRouteImport
}
+ '/loops/': {
+ id: '/loops/'
+ path: '/loops'
+ fullPath: '/loops/'
+ preLoaderRoute: typeof LoopsIndexRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ '/inbox/': {
+ id: '/inbox/'
+ path: '/'
+ fullPath: '/inbox/'
+ preLoaderRoute: typeof InboxIndexRouteImport
+ parentRoute: typeof InboxRoute
+ }
'/code/': {
id: '/code/'
path: '/code'
@@ -812,47 +809,33 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof CodeIndexRouteImport
parentRoute: typeof rootRouteImport
}
- '/website/skills': {
- id: '/website/skills'
- path: '/skills'
- fullPath: '/website/skills'
- preLoaderRoute: typeof WebsiteSkillsRouteImport
- parentRoute: typeof WebsiteRoute
- }
- '/website/new': {
- id: '/website/new'
- path: '/new'
- fullPath: '/website/new'
- preLoaderRoute: typeof WebsiteNewRouteImport
- parentRoute: typeof WebsiteRoute
- }
- '/website/mcp-servers': {
- id: '/website/mcp-servers'
- path: '/mcp-servers'
- fullPath: '/website/mcp-servers'
- preLoaderRoute: typeof WebsiteMcpServersRouteImport
- parentRoute: typeof WebsiteRoute
+ '/agents/': {
+ id: '/agents/'
+ path: '/'
+ fullPath: '/agents/'
+ preLoaderRoute: typeof AgentsIndexRouteImport
+ parentRoute: typeof AgentsRoute
}
- '/website/home': {
- id: '/website/home'
- path: '/home'
- fullPath: '/website/home'
- preLoaderRoute: typeof WebsiteHomeRouteImport
- parentRoute: typeof WebsiteRoute
+ '/_shell/': {
+ id: '/_shell/'
+ path: '/'
+ fullPath: '/'
+ preLoaderRoute: typeof ShellIndexRouteImport
+ parentRoute: typeof ShellRoute
}
- '/website/command-center': {
- id: '/website/command-center'
- path: '/command-center'
- fullPath: '/website/command-center'
- preLoaderRoute: typeof WebsiteCommandCenterRouteImport
- parentRoute: typeof WebsiteRoute
+ '/website/$': {
+ id: '/website/$'
+ path: '/website/$'
+ fullPath: '/website/$'
+ preLoaderRoute: typeof WebsiteSplatRouteImport
+ parentRoute: typeof rootRouteImport
}
- '/website/activity': {
- id: '/website/activity'
- path: '/activity'
- fullPath: '/website/activity'
- preLoaderRoute: typeof WebsiteActivityRouteImport
- parentRoute: typeof WebsiteRoute
+ '/tasks/$taskId': {
+ id: '/tasks/$taskId'
+ path: '/tasks/$taskId'
+ fullPath: '/tasks/$taskId'
+ preLoaderRoute: typeof TasksTaskIdRouteImport
+ parentRoute: typeof rootRouteImport
}
'/settings/$category': {
id: '/settings/$category'
@@ -861,509 +844,499 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof SettingsCategoryRouteImport
parentRoute: typeof rootRouteImport
}
- '/folders/$folderId': {
- id: '/folders/$folderId'
- path: '/folders/$folderId'
- fullPath: '/folders/$folderId'
- preLoaderRoute: typeof FoldersFolderIdRouteImport
- parentRoute: typeof rootRouteImport
- }
- '/code/pr': {
- id: '/code/pr'
- path: '/code/pr'
- fullPath: '/code/pr'
- preLoaderRoute: typeof CodePrRouteImport
- parentRoute: typeof rootRouteImport
- }
- '/code/inbox': {
- id: '/code/inbox'
- path: '/code/inbox'
- fullPath: '/code/inbox'
- preLoaderRoute: typeof CodeInboxRouteImport
- parentRoute: typeof rootRouteImport
- }
- '/code/archived': {
- id: '/code/archived'
- path: '/code/archived'
- fullPath: '/code/archived'
- preLoaderRoute: typeof CodeArchivedRouteImport
- parentRoute: typeof rootRouteImport
- }
- '/code/agents': {
- id: '/code/agents'
- path: '/code/agents'
- fullPath: '/code/agents'
- preLoaderRoute: typeof CodeAgentsRouteImport
+ '/loops/new': {
+ id: '/loops/new'
+ path: '/loops/new'
+ fullPath: '/loops/new'
+ preLoaderRoute: typeof LoopsNewRouteImport
parentRoute: typeof rootRouteImport
}
- '/website/$channelId/': {
- id: '/website/$channelId/'
- path: '/$channelId'
- fullPath: '/website/$channelId/'
- preLoaderRoute: typeof WebsiteChannelIdIndexRouteImport
- parentRoute: typeof WebsiteRoute
- }
- '/code/loops/': {
- id: '/code/loops/'
- path: '/code/loops'
- fullPath: '/code/loops/'
- preLoaderRoute: typeof CodeLoopsIndexRouteImport
+ '/loops/$loopId': {
+ id: '/loops/$loopId'
+ path: '/loops/$loopId'
+ fullPath: '/loops/$loopId'
+ preLoaderRoute: typeof LoopsLoopIdRouteImport
parentRoute: typeof rootRouteImport
}
- '/code/inbox/': {
- id: '/code/inbox/'
- path: '/'
- fullPath: '/code/inbox/'
- preLoaderRoute: typeof CodeInboxIndexRouteImport
- parentRoute: typeof CodeInboxRoute
- }
- '/code/agents/': {
- id: '/code/agents/'
- path: '/'
- fullPath: '/code/agents/'
- preLoaderRoute: typeof CodeAgentsIndexRouteImport
- parentRoute: typeof CodeAgentsRoute
- }
- '/website/feeds/$feedId': {
- id: '/website/feeds/$feedId'
- path: '/feeds/$feedId'
- fullPath: '/website/feeds/$feedId'
- preLoaderRoute: typeof WebsiteFeedsFeedIdRouteImport
- parentRoute: typeof WebsiteRoute
- }
- '/website/$channelId/new': {
- id: '/website/$channelId/new'
- path: '/$channelId/new'
- fullPath: '/website/$channelId/new'
- preLoaderRoute: typeof WebsiteChannelIdNewRouteImport
- parentRoute: typeof WebsiteRoute
- }
- '/website/$channelId/loops': {
- id: '/website/$channelId/loops'
- path: '/$channelId/loops'
- fullPath: '/website/$channelId/loops'
- preLoaderRoute: typeof WebsiteChannelIdLoopsRouteImport
- parentRoute: typeof WebsiteRoute
- }
- '/website/$channelId/history': {
- id: '/website/$channelId/history'
- path: '/$channelId/history'
- fullPath: '/website/$channelId/history'
- preLoaderRoute: typeof WebsiteChannelIdHistoryRouteImport
- parentRoute: typeof WebsiteRoute
+ '/inbox/runs': {
+ id: '/inbox/runs'
+ path: '/runs'
+ fullPath: '/inbox/runs'
+ preLoaderRoute: typeof InboxRunsRouteImport
+ parentRoute: typeof InboxRoute
}
- '/website/$channelId/context': {
- id: '/website/$channelId/context'
- path: '/$channelId/context'
- fullPath: '/website/$channelId/context'
- preLoaderRoute: typeof WebsiteChannelIdContextRouteImport
- parentRoute: typeof WebsiteRoute
+ '/inbox/reports': {
+ id: '/inbox/reports'
+ path: '/reports'
+ fullPath: '/inbox/reports'
+ preLoaderRoute: typeof InboxReportsRouteImport
+ parentRoute: typeof InboxRoute
}
- '/website/$channelId/canvases': {
- id: '/website/$channelId/canvases'
- path: '/$channelId/canvases'
- fullPath: '/website/$channelId/canvases'
- preLoaderRoute: typeof WebsiteChannelIdCanvasesRouteImport
- parentRoute: typeof WebsiteRoute
+ '/inbox/pulls': {
+ id: '/inbox/pulls'
+ path: '/pulls'
+ fullPath: '/inbox/pulls'
+ preLoaderRoute: typeof InboxPullsRouteImport
+ parentRoute: typeof InboxRoute
}
- '/website/$channelId/artifacts': {
- id: '/website/$channelId/artifacts'
- path: '/$channelId/artifacts'
- fullPath: '/website/$channelId/artifacts'
- preLoaderRoute: typeof WebsiteChannelIdArtifactsRouteImport
- parentRoute: typeof WebsiteRoute
+ '/inbox/dismissed': {
+ id: '/inbox/dismissed'
+ path: '/dismissed'
+ fullPath: '/inbox/dismissed'
+ preLoaderRoute: typeof InboxDismissedRouteImport
+ parentRoute: typeof InboxRoute
}
- '/code/tasks/$taskId': {
- id: '/code/tasks/$taskId'
- path: '/code/tasks/$taskId'
- fullPath: '/code/tasks/$taskId'
- preLoaderRoute: typeof CodeTasksTaskIdRouteImport
- parentRoute: typeof rootRouteImport
+ '/inbox/agents': {
+ id: '/inbox/agents'
+ path: '/agents'
+ fullPath: '/inbox/agents'
+ preLoaderRoute: typeof InboxAgentsRouteImport
+ parentRoute: typeof InboxRoute
}
- '/code/loops/new': {
- id: '/code/loops/new'
- path: '/code/loops/new'
- fullPath: '/code/loops/new'
- preLoaderRoute: typeof CodeLoopsNewRouteImport
+ '/folders/$folderId': {
+ id: '/folders/$folderId'
+ path: '/folders/$folderId'
+ fullPath: '/folders/$folderId'
+ preLoaderRoute: typeof FoldersFolderIdRouteImport
parentRoute: typeof rootRouteImport
}
- '/code/loops/$loopId': {
- id: '/code/loops/$loopId'
- path: '/code/loops/$loopId'
- fullPath: '/code/loops/$loopId'
- preLoaderRoute: typeof CodeLoopsLoopIdRouteImport
+ '/code/$': {
+ id: '/code/$'
+ path: '/code/$'
+ fullPath: '/code/$'
+ preLoaderRoute: typeof CodeSplatRouteImport
parentRoute: typeof rootRouteImport
}
- '/code/inbox/runs': {
- id: '/code/inbox/runs'
- path: '/runs'
- fullPath: '/code/inbox/runs'
- preLoaderRoute: typeof CodeInboxRunsRouteImport
- parentRoute: typeof CodeInboxRoute
+ '/agents/scouts': {
+ id: '/agents/scouts'
+ path: '/scouts'
+ fullPath: '/agents/scouts'
+ preLoaderRoute: typeof AgentsScoutsRouteImport
+ parentRoute: typeof AgentsRoute
}
- '/code/inbox/reports': {
- id: '/code/inbox/reports'
- path: '/reports'
- fullPath: '/code/inbox/reports'
- preLoaderRoute: typeof CodeInboxReportsRouteImport
- parentRoute: typeof CodeInboxRoute
+ '/_shell/skills': {
+ id: '/_shell/skills'
+ path: '/skills'
+ fullPath: '/skills'
+ preLoaderRoute: typeof ShellSkillsRouteImport
+ parentRoute: typeof ShellRoute
}
- '/code/inbox/pulls': {
- id: '/code/inbox/pulls'
- path: '/pulls'
- fullPath: '/code/inbox/pulls'
- preLoaderRoute: typeof CodeInboxPullsRouteImport
- parentRoute: typeof CodeInboxRoute
+ '/_shell/new': {
+ id: '/_shell/new'
+ path: '/new'
+ fullPath: '/new'
+ preLoaderRoute: typeof ShellNewRouteImport
+ parentRoute: typeof ShellRoute
}
- '/code/inbox/dismissed': {
- id: '/code/inbox/dismissed'
- path: '/dismissed'
- fullPath: '/code/inbox/dismissed'
- preLoaderRoute: typeof CodeInboxDismissedRouteImport
- parentRoute: typeof CodeInboxRoute
+ '/_shell/mcp-servers': {
+ id: '/_shell/mcp-servers'
+ path: '/mcp-servers'
+ fullPath: '/mcp-servers'
+ preLoaderRoute: typeof ShellMcpServersRouteImport
+ parentRoute: typeof ShellRoute
}
- '/code/inbox/agents': {
- id: '/code/inbox/agents'
- path: '/agents'
- fullPath: '/code/inbox/agents'
- preLoaderRoute: typeof CodeInboxAgentsRouteImport
- parentRoute: typeof CodeInboxRoute
+ '/_shell/command-center': {
+ id: '/_shell/command-center'
+ path: '/command-center'
+ fullPath: '/command-center'
+ preLoaderRoute: typeof ShellCommandCenterRouteImport
+ parentRoute: typeof ShellRoute
}
- '/code/agents/scouts': {
- id: '/code/agents/scouts'
- path: '/scouts'
- fullPath: '/code/agents/scouts'
- preLoaderRoute: typeof CodeAgentsScoutsRouteImport
- parentRoute: typeof CodeAgentsRoute
+ '/_shell/activity': {
+ id: '/_shell/activity'
+ path: '/activity'
+ fullPath: '/activity'
+ preLoaderRoute: typeof ShellActivityRouteImport
+ parentRoute: typeof ShellRoute
}
- '/code/loops/$loopId/': {
- id: '/code/loops/$loopId/'
+ '/loops/$loopId/': {
+ id: '/loops/$loopId/'
path: '/'
- fullPath: '/code/loops/$loopId/'
- preLoaderRoute: typeof CodeLoopsLoopIdIndexRouteImport
- parentRoute: typeof CodeLoopsLoopIdRoute
+ fullPath: '/loops/$loopId/'
+ preLoaderRoute: typeof LoopsLoopIdIndexRouteImport
+ parentRoute: typeof LoopsLoopIdRoute
}
- '/code/inbox/runs/': {
- id: '/code/inbox/runs/'
+ '/inbox/runs/': {
+ id: '/inbox/runs/'
path: '/'
- fullPath: '/code/inbox/runs/'
- preLoaderRoute: typeof CodeInboxRunsIndexRouteImport
- parentRoute: typeof CodeInboxRunsRoute
+ fullPath: '/inbox/runs/'
+ preLoaderRoute: typeof InboxRunsIndexRouteImport
+ parentRoute: typeof InboxRunsRoute
}
- '/code/inbox/reports/': {
- id: '/code/inbox/reports/'
+ '/inbox/reports/': {
+ id: '/inbox/reports/'
path: '/'
- fullPath: '/code/inbox/reports/'
- preLoaderRoute: typeof CodeInboxReportsIndexRouteImport
- parentRoute: typeof CodeInboxReportsRoute
+ fullPath: '/inbox/reports/'
+ preLoaderRoute: typeof InboxReportsIndexRouteImport
+ parentRoute: typeof InboxReportsRoute
}
- '/code/inbox/pulls/': {
- id: '/code/inbox/pulls/'
+ '/inbox/pulls/': {
+ id: '/inbox/pulls/'
path: '/'
- fullPath: '/code/inbox/pulls/'
- preLoaderRoute: typeof CodeInboxPullsIndexRouteImport
- parentRoute: typeof CodeInboxPullsRoute
+ fullPath: '/inbox/pulls/'
+ preLoaderRoute: typeof InboxPullsIndexRouteImport
+ parentRoute: typeof InboxPullsRoute
}
- '/code/inbox/dismissed/': {
- id: '/code/inbox/dismissed/'
+ '/inbox/dismissed/': {
+ id: '/inbox/dismissed/'
path: '/'
- fullPath: '/code/inbox/dismissed/'
- preLoaderRoute: typeof CodeInboxDismissedIndexRouteImport
- parentRoute: typeof CodeInboxDismissedRoute
+ fullPath: '/inbox/dismissed/'
+ preLoaderRoute: typeof InboxDismissedIndexRouteImport
+ parentRoute: typeof InboxDismissedRoute
}
- '/code/agents/scouts/': {
- id: '/code/agents/scouts/'
+ '/agents/scouts/': {
+ id: '/agents/scouts/'
path: '/'
- fullPath: '/code/agents/scouts/'
- preLoaderRoute: typeof CodeAgentsScoutsIndexRouteImport
- parentRoute: typeof CodeAgentsScoutsRoute
- }
- '/website/$channelId/tasks/$taskId': {
- id: '/website/$channelId/tasks/$taskId'
- path: '/$channelId/tasks/$taskId'
- fullPath: '/website/$channelId/tasks/$taskId'
- preLoaderRoute: typeof WebsiteChannelIdTasksTaskIdRouteImport
- parentRoute: typeof WebsiteRoute
+ fullPath: '/agents/scouts/'
+ preLoaderRoute: typeof AgentsScoutsIndexRouteImport
+ parentRoute: typeof AgentsScoutsRoute
}
- '/website/$channelId/dashboards/$dashboardId': {
- id: '/website/$channelId/dashboards/$dashboardId'
- path: '/$channelId/dashboards/$dashboardId'
- fullPath: '/website/$channelId/dashboards/$dashboardId'
- preLoaderRoute: typeof WebsiteChannelIdDashboardsDashboardIdRouteImport
- parentRoute: typeof WebsiteRoute
+ '/_shell/spaces/': {
+ id: '/_shell/spaces/'
+ path: '/spaces'
+ fullPath: '/spaces/'
+ preLoaderRoute: typeof ShellSpacesIndexRouteImport
+ parentRoute: typeof ShellRoute
}
- '/code/tasks/pending/$key': {
- id: '/code/tasks/pending/$key'
- path: '/code/tasks/pending/$key'
- fullPath: '/code/tasks/pending/$key'
- preLoaderRoute: typeof CodeTasksPendingKeyRouteImport
+ '/tasks/pending/$key': {
+ id: '/tasks/pending/$key'
+ path: '/tasks/pending/$key'
+ fullPath: '/tasks/pending/$key'
+ preLoaderRoute: typeof TasksPendingKeyRouteImport
parentRoute: typeof rootRouteImport
}
- '/code/loops/$loopId/edit': {
- id: '/code/loops/$loopId/edit'
+ '/loops/$loopId/edit': {
+ id: '/loops/$loopId/edit'
path: '/edit'
- fullPath: '/code/loops/$loopId/edit'
- preLoaderRoute: typeof CodeLoopsLoopIdEditRouteImport
- parentRoute: typeof CodeLoopsLoopIdRoute
+ fullPath: '/loops/$loopId/edit'
+ preLoaderRoute: typeof LoopsLoopIdEditRouteImport
+ parentRoute: typeof LoopsLoopIdRoute
}
- '/code/inbox/runs/$reportId': {
- id: '/code/inbox/runs/$reportId'
+ '/inbox/runs/$reportId': {
+ id: '/inbox/runs/$reportId'
path: '/$reportId'
- fullPath: '/code/inbox/runs/$reportId'
- preLoaderRoute: typeof CodeInboxRunsReportIdRouteImport
- parentRoute: typeof CodeInboxRunsRoute
+ fullPath: '/inbox/runs/$reportId'
+ preLoaderRoute: typeof InboxRunsReportIdRouteImport
+ parentRoute: typeof InboxRunsRoute
}
- '/code/inbox/reports/$reportId': {
- id: '/code/inbox/reports/$reportId'
+ '/inbox/reports/$reportId': {
+ id: '/inbox/reports/$reportId'
path: '/$reportId'
- fullPath: '/code/inbox/reports/$reportId'
- preLoaderRoute: typeof CodeInboxReportsReportIdRouteImport
- parentRoute: typeof CodeInboxReportsRoute
+ fullPath: '/inbox/reports/$reportId'
+ preLoaderRoute: typeof InboxReportsReportIdRouteImport
+ parentRoute: typeof InboxReportsRoute
}
- '/code/inbox/pulls/$reportId': {
- id: '/code/inbox/pulls/$reportId'
+ '/inbox/pulls/$reportId': {
+ id: '/inbox/pulls/$reportId'
path: '/$reportId'
- fullPath: '/code/inbox/pulls/$reportId'
- preLoaderRoute: typeof CodeInboxPullsReportIdRouteImport
- parentRoute: typeof CodeInboxPullsRoute
+ fullPath: '/inbox/pulls/$reportId'
+ preLoaderRoute: typeof InboxPullsReportIdRouteImport
+ parentRoute: typeof InboxPullsRoute
}
- '/code/inbox/dismissed/$reportId': {
- id: '/code/inbox/dismissed/$reportId'
+ '/inbox/dismissed/$reportId': {
+ id: '/inbox/dismissed/$reportId'
path: '/$reportId'
- fullPath: '/code/inbox/dismissed/$reportId'
- preLoaderRoute: typeof CodeInboxDismissedReportIdRouteImport
- parentRoute: typeof CodeInboxDismissedRoute
+ fullPath: '/inbox/dismissed/$reportId'
+ preLoaderRoute: typeof InboxDismissedReportIdRouteImport
+ parentRoute: typeof InboxDismissedRoute
}
- '/code/agents/scouts/scratchpad': {
- id: '/code/agents/scouts/scratchpad'
+ '/agents/scouts/scratchpad': {
+ id: '/agents/scouts/scratchpad'
path: '/scratchpad'
- fullPath: '/code/agents/scouts/scratchpad'
- preLoaderRoute: typeof CodeAgentsScoutsScratchpadRouteImport
- parentRoute: typeof CodeAgentsScoutsRoute
+ fullPath: '/agents/scouts/scratchpad'
+ preLoaderRoute: typeof AgentsScoutsScratchpadRouteImport
+ parentRoute: typeof AgentsScoutsRoute
}
- '/code/agents/scouts/findings': {
- id: '/code/agents/scouts/findings'
+ '/agents/scouts/findings': {
+ id: '/agents/scouts/findings'
path: '/findings'
- fullPath: '/code/agents/scouts/findings'
- preLoaderRoute: typeof CodeAgentsScoutsFindingsRouteImport
- parentRoute: typeof CodeAgentsScoutsRoute
+ fullPath: '/agents/scouts/findings'
+ preLoaderRoute: typeof AgentsScoutsFindingsRouteImport
+ parentRoute: typeof AgentsScoutsRoute
}
- '/code/agents/scouts/$skillName': {
- id: '/code/agents/scouts/$skillName'
+ '/agents/scouts/$skillName': {
+ id: '/agents/scouts/$skillName'
path: '/$skillName'
- fullPath: '/code/agents/scouts/$skillName'
- preLoaderRoute: typeof CodeAgentsScoutsSkillNameRouteImport
- parentRoute: typeof CodeAgentsScoutsRoute
+ fullPath: '/agents/scouts/$skillName'
+ preLoaderRoute: typeof AgentsScoutsSkillNameRouteImport
+ parentRoute: typeof AgentsScoutsRoute
}
- '/code/agents/scouts/$skillName/': {
- id: '/code/agents/scouts/$skillName/'
+ '/_shell/feeds/$feedId': {
+ id: '/_shell/feeds/$feedId'
+ path: '/feeds/$feedId'
+ fullPath: '/feeds/$feedId'
+ preLoaderRoute: typeof ShellFeedsFeedIdRouteImport
+ parentRoute: typeof ShellRoute
+ }
+ '/agents/scouts/$skillName/': {
+ id: '/agents/scouts/$skillName/'
path: '/'
- fullPath: '/code/agents/scouts/$skillName/'
- preLoaderRoute: typeof CodeAgentsScoutsSkillNameIndexRouteImport
- parentRoute: typeof CodeAgentsScoutsSkillNameRoute
+ fullPath: '/agents/scouts/$skillName/'
+ preLoaderRoute: typeof AgentsScoutsSkillNameIndexRouteImport
+ parentRoute: typeof AgentsScoutsSkillNameRoute
+ }
+ '/_shell/spaces/$channelId/': {
+ id: '/_shell/spaces/$channelId/'
+ path: '/spaces/$channelId'
+ fullPath: '/spaces/$channelId/'
+ preLoaderRoute: typeof ShellSpacesChannelIdIndexRouteImport
+ parentRoute: typeof ShellRoute
+ }
+ '/_shell/spaces/$channelId/new': {
+ id: '/_shell/spaces/$channelId/new'
+ path: '/spaces/$channelId/new'
+ fullPath: '/spaces/$channelId/new'
+ preLoaderRoute: typeof ShellSpacesChannelIdNewRouteImport
+ parentRoute: typeof ShellRoute
+ }
+ '/_shell/spaces/$channelId/loops': {
+ id: '/_shell/spaces/$channelId/loops'
+ path: '/spaces/$channelId/loops'
+ fullPath: '/spaces/$channelId/loops'
+ preLoaderRoute: typeof ShellSpacesChannelIdLoopsRouteImport
+ parentRoute: typeof ShellRoute
+ }
+ '/_shell/spaces/$channelId/history': {
+ id: '/_shell/spaces/$channelId/history'
+ path: '/spaces/$channelId/history'
+ fullPath: '/spaces/$channelId/history'
+ preLoaderRoute: typeof ShellSpacesChannelIdHistoryRouteImport
+ parentRoute: typeof ShellRoute
+ }
+ '/_shell/spaces/$channelId/context': {
+ id: '/_shell/spaces/$channelId/context'
+ path: '/spaces/$channelId/context'
+ fullPath: '/spaces/$channelId/context'
+ preLoaderRoute: typeof ShellSpacesChannelIdContextRouteImport
+ parentRoute: typeof ShellRoute
+ }
+ '/_shell/spaces/$channelId/canvases': {
+ id: '/_shell/spaces/$channelId/canvases'
+ path: '/spaces/$channelId/canvases'
+ fullPath: '/spaces/$channelId/canvases'
+ preLoaderRoute: typeof ShellSpacesChannelIdCanvasesRouteImport
+ parentRoute: typeof ShellRoute
+ }
+ '/_shell/spaces/$channelId/artifacts': {
+ id: '/_shell/spaces/$channelId/artifacts'
+ path: '/spaces/$channelId/artifacts'
+ fullPath: '/spaces/$channelId/artifacts'
+ preLoaderRoute: typeof ShellSpacesChannelIdArtifactsRouteImport
+ parentRoute: typeof ShellRoute
+ }
+ '/_shell/spaces/$channelId/tasks/$taskId': {
+ id: '/_shell/spaces/$channelId/tasks/$taskId'
+ path: '/spaces/$channelId/tasks/$taskId'
+ fullPath: '/spaces/$channelId/tasks/$taskId'
+ preLoaderRoute: typeof ShellSpacesChannelIdTasksTaskIdRouteImport
+ parentRoute: typeof ShellRoute
+ }
+ '/_shell/spaces/$channelId/dashboards/$dashboardId': {
+ id: '/_shell/spaces/$channelId/dashboards/$dashboardId'
+ path: '/spaces/$channelId/dashboards/$dashboardId'
+ fullPath: '/spaces/$channelId/dashboards/$dashboardId'
+ preLoaderRoute: typeof ShellSpacesChannelIdDashboardsDashboardIdRouteImport
+ parentRoute: typeof ShellRoute
}
}
}
-interface WebsiteRouteChildren {
- WebsiteActivityRoute: typeof WebsiteActivityRoute
- WebsiteCommandCenterRoute: typeof WebsiteCommandCenterRoute
- WebsiteHomeRoute: typeof WebsiteHomeRoute
- WebsiteMcpServersRoute: typeof WebsiteMcpServersRoute
- WebsiteNewRoute: typeof WebsiteNewRoute
- WebsiteSkillsRoute: typeof WebsiteSkillsRoute
- WebsiteIndexRoute: typeof WebsiteIndexRoute
- WebsiteChannelIdArtifactsRoute: typeof WebsiteChannelIdArtifactsRoute
- WebsiteChannelIdCanvasesRoute: typeof WebsiteChannelIdCanvasesRoute
- WebsiteChannelIdContextRoute: typeof WebsiteChannelIdContextRoute
- WebsiteChannelIdHistoryRoute: typeof WebsiteChannelIdHistoryRoute
- WebsiteChannelIdLoopsRoute: typeof WebsiteChannelIdLoopsRoute
- WebsiteChannelIdNewRoute: typeof WebsiteChannelIdNewRoute
- WebsiteFeedsFeedIdRoute: typeof WebsiteFeedsFeedIdRoute
- WebsiteChannelIdIndexRoute: typeof WebsiteChannelIdIndexRoute
- WebsiteChannelIdDashboardsDashboardIdRoute: typeof WebsiteChannelIdDashboardsDashboardIdRoute
- WebsiteChannelIdTasksTaskIdRoute: typeof WebsiteChannelIdTasksTaskIdRoute
+interface ShellRouteChildren {
+ ShellActivityRoute: typeof ShellActivityRoute
+ ShellCommandCenterRoute: typeof ShellCommandCenterRoute
+ ShellMcpServersRoute: typeof ShellMcpServersRoute
+ ShellNewRoute: typeof ShellNewRoute
+ ShellSkillsRoute: typeof ShellSkillsRoute
+ ShellIndexRoute: typeof ShellIndexRoute
+ ShellFeedsFeedIdRoute: typeof ShellFeedsFeedIdRoute
+ ShellSpacesIndexRoute: typeof ShellSpacesIndexRoute
+ ShellSpacesChannelIdArtifactsRoute: typeof ShellSpacesChannelIdArtifactsRoute
+ ShellSpacesChannelIdCanvasesRoute: typeof ShellSpacesChannelIdCanvasesRoute
+ ShellSpacesChannelIdContextRoute: typeof ShellSpacesChannelIdContextRoute
+ ShellSpacesChannelIdHistoryRoute: typeof ShellSpacesChannelIdHistoryRoute
+ ShellSpacesChannelIdLoopsRoute: typeof ShellSpacesChannelIdLoopsRoute
+ ShellSpacesChannelIdNewRoute: typeof ShellSpacesChannelIdNewRoute
+ ShellSpacesChannelIdIndexRoute: typeof ShellSpacesChannelIdIndexRoute
+ ShellSpacesChannelIdDashboardsDashboardIdRoute: typeof ShellSpacesChannelIdDashboardsDashboardIdRoute
+ ShellSpacesChannelIdTasksTaskIdRoute: typeof ShellSpacesChannelIdTasksTaskIdRoute
}
-const WebsiteRouteChildren: WebsiteRouteChildren = {
- WebsiteActivityRoute: WebsiteActivityRoute,
- WebsiteCommandCenterRoute: WebsiteCommandCenterRoute,
- WebsiteHomeRoute: WebsiteHomeRoute,
- WebsiteMcpServersRoute: WebsiteMcpServersRoute,
- WebsiteNewRoute: WebsiteNewRoute,
- WebsiteSkillsRoute: WebsiteSkillsRoute,
- WebsiteIndexRoute: WebsiteIndexRoute,
- WebsiteChannelIdArtifactsRoute: WebsiteChannelIdArtifactsRoute,
- WebsiteChannelIdCanvasesRoute: WebsiteChannelIdCanvasesRoute,
- WebsiteChannelIdContextRoute: WebsiteChannelIdContextRoute,
- WebsiteChannelIdHistoryRoute: WebsiteChannelIdHistoryRoute,
- WebsiteChannelIdLoopsRoute: WebsiteChannelIdLoopsRoute,
- WebsiteChannelIdNewRoute: WebsiteChannelIdNewRoute,
- WebsiteFeedsFeedIdRoute: WebsiteFeedsFeedIdRoute,
- WebsiteChannelIdIndexRoute: WebsiteChannelIdIndexRoute,
- WebsiteChannelIdDashboardsDashboardIdRoute:
- WebsiteChannelIdDashboardsDashboardIdRoute,
- WebsiteChannelIdTasksTaskIdRoute: WebsiteChannelIdTasksTaskIdRoute,
+const ShellRouteChildren: ShellRouteChildren = {
+ ShellActivityRoute: ShellActivityRoute,
+ ShellCommandCenterRoute: ShellCommandCenterRoute,
+ ShellMcpServersRoute: ShellMcpServersRoute,
+ ShellNewRoute: ShellNewRoute,
+ ShellSkillsRoute: ShellSkillsRoute,
+ ShellIndexRoute: ShellIndexRoute,
+ ShellFeedsFeedIdRoute: ShellFeedsFeedIdRoute,
+ ShellSpacesIndexRoute: ShellSpacesIndexRoute,
+ ShellSpacesChannelIdArtifactsRoute: ShellSpacesChannelIdArtifactsRoute,
+ ShellSpacesChannelIdCanvasesRoute: ShellSpacesChannelIdCanvasesRoute,
+ ShellSpacesChannelIdContextRoute: ShellSpacesChannelIdContextRoute,
+ ShellSpacesChannelIdHistoryRoute: ShellSpacesChannelIdHistoryRoute,
+ ShellSpacesChannelIdLoopsRoute: ShellSpacesChannelIdLoopsRoute,
+ ShellSpacesChannelIdNewRoute: ShellSpacesChannelIdNewRoute,
+ ShellSpacesChannelIdIndexRoute: ShellSpacesChannelIdIndexRoute,
+ ShellSpacesChannelIdDashboardsDashboardIdRoute:
+ ShellSpacesChannelIdDashboardsDashboardIdRoute,
+ ShellSpacesChannelIdTasksTaskIdRoute: ShellSpacesChannelIdTasksTaskIdRoute,
}
-const WebsiteRouteWithChildren =
- WebsiteRoute._addFileChildren(WebsiteRouteChildren)
+const ShellRouteWithChildren = ShellRoute._addFileChildren(ShellRouteChildren)
-interface CodeAgentsScoutsSkillNameRouteChildren {
- CodeAgentsScoutsSkillNameIndexRoute: typeof CodeAgentsScoutsSkillNameIndexRoute
+interface AgentsScoutsSkillNameRouteChildren {
+ AgentsScoutsSkillNameIndexRoute: typeof AgentsScoutsSkillNameIndexRoute
}
-const CodeAgentsScoutsSkillNameRouteChildren: CodeAgentsScoutsSkillNameRouteChildren =
- {
- CodeAgentsScoutsSkillNameIndexRoute: CodeAgentsScoutsSkillNameIndexRoute,
- }
+const AgentsScoutsSkillNameRouteChildren: AgentsScoutsSkillNameRouteChildren = {
+ AgentsScoutsSkillNameIndexRoute: AgentsScoutsSkillNameIndexRoute,
+}
-const CodeAgentsScoutsSkillNameRouteWithChildren =
- CodeAgentsScoutsSkillNameRoute._addFileChildren(
- CodeAgentsScoutsSkillNameRouteChildren,
+const AgentsScoutsSkillNameRouteWithChildren =
+ AgentsScoutsSkillNameRoute._addFileChildren(
+ AgentsScoutsSkillNameRouteChildren,
)
-interface CodeAgentsScoutsRouteChildren {
- CodeAgentsScoutsSkillNameRoute: typeof CodeAgentsScoutsSkillNameRouteWithChildren
- CodeAgentsScoutsFindingsRoute: typeof CodeAgentsScoutsFindingsRoute
- CodeAgentsScoutsScratchpadRoute: typeof CodeAgentsScoutsScratchpadRoute
- CodeAgentsScoutsIndexRoute: typeof CodeAgentsScoutsIndexRoute
+interface AgentsScoutsRouteChildren {
+ AgentsScoutsSkillNameRoute: typeof AgentsScoutsSkillNameRouteWithChildren
+ AgentsScoutsFindingsRoute: typeof AgentsScoutsFindingsRoute
+ AgentsScoutsScratchpadRoute: typeof AgentsScoutsScratchpadRoute
+ AgentsScoutsIndexRoute: typeof AgentsScoutsIndexRoute
}
-const CodeAgentsScoutsRouteChildren: CodeAgentsScoutsRouteChildren = {
- CodeAgentsScoutsSkillNameRoute: CodeAgentsScoutsSkillNameRouteWithChildren,
- CodeAgentsScoutsFindingsRoute: CodeAgentsScoutsFindingsRoute,
- CodeAgentsScoutsScratchpadRoute: CodeAgentsScoutsScratchpadRoute,
- CodeAgentsScoutsIndexRoute: CodeAgentsScoutsIndexRoute,
+const AgentsScoutsRouteChildren: AgentsScoutsRouteChildren = {
+ AgentsScoutsSkillNameRoute: AgentsScoutsSkillNameRouteWithChildren,
+ AgentsScoutsFindingsRoute: AgentsScoutsFindingsRoute,
+ AgentsScoutsScratchpadRoute: AgentsScoutsScratchpadRoute,
+ AgentsScoutsIndexRoute: AgentsScoutsIndexRoute,
}
-const CodeAgentsScoutsRouteWithChildren =
- CodeAgentsScoutsRoute._addFileChildren(CodeAgentsScoutsRouteChildren)
+const AgentsScoutsRouteWithChildren = AgentsScoutsRoute._addFileChildren(
+ AgentsScoutsRouteChildren,
+)
-interface CodeAgentsRouteChildren {
- CodeAgentsScoutsRoute: typeof CodeAgentsScoutsRouteWithChildren
- CodeAgentsIndexRoute: typeof CodeAgentsIndexRoute
+interface AgentsRouteChildren {
+ AgentsScoutsRoute: typeof AgentsScoutsRouteWithChildren
+ AgentsIndexRoute: typeof AgentsIndexRoute
}
-const CodeAgentsRouteChildren: CodeAgentsRouteChildren = {
- CodeAgentsScoutsRoute: CodeAgentsScoutsRouteWithChildren,
- CodeAgentsIndexRoute: CodeAgentsIndexRoute,
+const AgentsRouteChildren: AgentsRouteChildren = {
+ AgentsScoutsRoute: AgentsScoutsRouteWithChildren,
+ AgentsIndexRoute: AgentsIndexRoute,
}
-const CodeAgentsRouteWithChildren = CodeAgentsRoute._addFileChildren(
- CodeAgentsRouteChildren,
-)
+const AgentsRouteWithChildren =
+ AgentsRoute._addFileChildren(AgentsRouteChildren)
-interface CodeInboxDismissedRouteChildren {
- CodeInboxDismissedReportIdRoute: typeof CodeInboxDismissedReportIdRoute
- CodeInboxDismissedIndexRoute: typeof CodeInboxDismissedIndexRoute
+interface InboxDismissedRouteChildren {
+ InboxDismissedReportIdRoute: typeof InboxDismissedReportIdRoute
+ InboxDismissedIndexRoute: typeof InboxDismissedIndexRoute
}
-const CodeInboxDismissedRouteChildren: CodeInboxDismissedRouteChildren = {
- CodeInboxDismissedReportIdRoute: CodeInboxDismissedReportIdRoute,
- CodeInboxDismissedIndexRoute: CodeInboxDismissedIndexRoute,
+const InboxDismissedRouteChildren: InboxDismissedRouteChildren = {
+ InboxDismissedReportIdRoute: InboxDismissedReportIdRoute,
+ InboxDismissedIndexRoute: InboxDismissedIndexRoute,
}
-const CodeInboxDismissedRouteWithChildren =
- CodeInboxDismissedRoute._addFileChildren(CodeInboxDismissedRouteChildren)
+const InboxDismissedRouteWithChildren = InboxDismissedRoute._addFileChildren(
+ InboxDismissedRouteChildren,
+)
-interface CodeInboxPullsRouteChildren {
- CodeInboxPullsReportIdRoute: typeof CodeInboxPullsReportIdRoute
- CodeInboxPullsIndexRoute: typeof CodeInboxPullsIndexRoute
+interface InboxPullsRouteChildren {
+ InboxPullsReportIdRoute: typeof InboxPullsReportIdRoute
+ InboxPullsIndexRoute: typeof InboxPullsIndexRoute
}
-const CodeInboxPullsRouteChildren: CodeInboxPullsRouteChildren = {
- CodeInboxPullsReportIdRoute: CodeInboxPullsReportIdRoute,
- CodeInboxPullsIndexRoute: CodeInboxPullsIndexRoute,
+const InboxPullsRouteChildren: InboxPullsRouteChildren = {
+ InboxPullsReportIdRoute: InboxPullsReportIdRoute,
+ InboxPullsIndexRoute: InboxPullsIndexRoute,
}
-const CodeInboxPullsRouteWithChildren = CodeInboxPullsRoute._addFileChildren(
- CodeInboxPullsRouteChildren,
+const InboxPullsRouteWithChildren = InboxPullsRoute._addFileChildren(
+ InboxPullsRouteChildren,
)
-interface CodeInboxReportsRouteChildren {
- CodeInboxReportsReportIdRoute: typeof CodeInboxReportsReportIdRoute
- CodeInboxReportsIndexRoute: typeof CodeInboxReportsIndexRoute
+interface InboxReportsRouteChildren {
+ InboxReportsReportIdRoute: typeof InboxReportsReportIdRoute
+ InboxReportsIndexRoute: typeof InboxReportsIndexRoute
}
-const CodeInboxReportsRouteChildren: CodeInboxReportsRouteChildren = {
- CodeInboxReportsReportIdRoute: CodeInboxReportsReportIdRoute,
- CodeInboxReportsIndexRoute: CodeInboxReportsIndexRoute,
+const InboxReportsRouteChildren: InboxReportsRouteChildren = {
+ InboxReportsReportIdRoute: InboxReportsReportIdRoute,
+ InboxReportsIndexRoute: InboxReportsIndexRoute,
}
-const CodeInboxReportsRouteWithChildren =
- CodeInboxReportsRoute._addFileChildren(CodeInboxReportsRouteChildren)
+const InboxReportsRouteWithChildren = InboxReportsRoute._addFileChildren(
+ InboxReportsRouteChildren,
+)
-interface CodeInboxRunsRouteChildren {
- CodeInboxRunsReportIdRoute: typeof CodeInboxRunsReportIdRoute
- CodeInboxRunsIndexRoute: typeof CodeInboxRunsIndexRoute
+interface InboxRunsRouteChildren {
+ InboxRunsReportIdRoute: typeof InboxRunsReportIdRoute
+ InboxRunsIndexRoute: typeof InboxRunsIndexRoute
}
-const CodeInboxRunsRouteChildren: CodeInboxRunsRouteChildren = {
- CodeInboxRunsReportIdRoute: CodeInboxRunsReportIdRoute,
- CodeInboxRunsIndexRoute: CodeInboxRunsIndexRoute,
+const InboxRunsRouteChildren: InboxRunsRouteChildren = {
+ InboxRunsReportIdRoute: InboxRunsReportIdRoute,
+ InboxRunsIndexRoute: InboxRunsIndexRoute,
}
-const CodeInboxRunsRouteWithChildren = CodeInboxRunsRoute._addFileChildren(
- CodeInboxRunsRouteChildren,
+const InboxRunsRouteWithChildren = InboxRunsRoute._addFileChildren(
+ InboxRunsRouteChildren,
)
-interface CodeInboxRouteChildren {
- CodeInboxAgentsRoute: typeof CodeInboxAgentsRoute
- CodeInboxDismissedRoute: typeof CodeInboxDismissedRouteWithChildren
- CodeInboxPullsRoute: typeof CodeInboxPullsRouteWithChildren
- CodeInboxReportsRoute: typeof CodeInboxReportsRouteWithChildren
- CodeInboxRunsRoute: typeof CodeInboxRunsRouteWithChildren
- CodeInboxIndexRoute: typeof CodeInboxIndexRoute
+interface InboxRouteChildren {
+ InboxAgentsRoute: typeof InboxAgentsRoute
+ InboxDismissedRoute: typeof InboxDismissedRouteWithChildren
+ InboxPullsRoute: typeof InboxPullsRouteWithChildren
+ InboxReportsRoute: typeof InboxReportsRouteWithChildren
+ InboxRunsRoute: typeof InboxRunsRouteWithChildren
+ InboxIndexRoute: typeof InboxIndexRoute
}
-const CodeInboxRouteChildren: CodeInboxRouteChildren = {
- CodeInboxAgentsRoute: CodeInboxAgentsRoute,
- CodeInboxDismissedRoute: CodeInboxDismissedRouteWithChildren,
- CodeInboxPullsRoute: CodeInboxPullsRouteWithChildren,
- CodeInboxReportsRoute: CodeInboxReportsRouteWithChildren,
- CodeInboxRunsRoute: CodeInboxRunsRouteWithChildren,
- CodeInboxIndexRoute: CodeInboxIndexRoute,
+const InboxRouteChildren: InboxRouteChildren = {
+ InboxAgentsRoute: InboxAgentsRoute,
+ InboxDismissedRoute: InboxDismissedRouteWithChildren,
+ InboxPullsRoute: InboxPullsRouteWithChildren,
+ InboxReportsRoute: InboxReportsRouteWithChildren,
+ InboxRunsRoute: InboxRunsRouteWithChildren,
+ InboxIndexRoute: InboxIndexRoute,
}
-const CodeInboxRouteWithChildren = CodeInboxRoute._addFileChildren(
- CodeInboxRouteChildren,
-)
+const InboxRouteWithChildren = InboxRoute._addFileChildren(InboxRouteChildren)
-interface CodeLoopsLoopIdRouteChildren {
- CodeLoopsLoopIdEditRoute: typeof CodeLoopsLoopIdEditRoute
- CodeLoopsLoopIdIndexRoute: typeof CodeLoopsLoopIdIndexRoute
+interface LoopsLoopIdRouteChildren {
+ LoopsLoopIdEditRoute: typeof LoopsLoopIdEditRoute
+ LoopsLoopIdIndexRoute: typeof LoopsLoopIdIndexRoute
}
-const CodeLoopsLoopIdRouteChildren: CodeLoopsLoopIdRouteChildren = {
- CodeLoopsLoopIdEditRoute: CodeLoopsLoopIdEditRoute,
- CodeLoopsLoopIdIndexRoute: CodeLoopsLoopIdIndexRoute,
+const LoopsLoopIdRouteChildren: LoopsLoopIdRouteChildren = {
+ LoopsLoopIdEditRoute: LoopsLoopIdEditRoute,
+ LoopsLoopIdIndexRoute: LoopsLoopIdIndexRoute,
}
-const CodeLoopsLoopIdRouteWithChildren = CodeLoopsLoopIdRoute._addFileChildren(
- CodeLoopsLoopIdRouteChildren,
+const LoopsLoopIdRouteWithChildren = LoopsLoopIdRoute._addFileChildren(
+ LoopsLoopIdRouteChildren,
)
const rootRouteChildren: RootRouteChildren = {
- IndexRoute: IndexRoute,
- CommandCenterRoute: CommandCenterRoute,
- McpServersRoute: McpServersRoute,
- SkillsRoute: SkillsRoute,
+ ShellRoute: ShellRouteWithChildren,
+ AgentsRoute: AgentsRouteWithChildren,
+ ArchivedRoute: ArchivedRoute,
+ InboxRoute: InboxRouteWithChildren,
+ PrRoute: PrRoute,
UsageRoute: UsageRoute,
- WebsiteRoute: WebsiteRouteWithChildren,
- CodeAgentsRoute: CodeAgentsRouteWithChildren,
- CodeArchivedRoute: CodeArchivedRoute,
- CodeInboxRoute: CodeInboxRouteWithChildren,
- CodePrRoute: CodePrRoute,
+ CodeSplatRoute: CodeSplatRoute,
FoldersFolderIdRoute: FoldersFolderIdRoute,
+ LoopsLoopIdRoute: LoopsLoopIdRouteWithChildren,
+ LoopsNewRoute: LoopsNewRoute,
SettingsCategoryRoute: SettingsCategoryRoute,
+ TasksTaskIdRoute: TasksTaskIdRoute,
+ WebsiteSplatRoute: WebsiteSplatRoute,
CodeIndexRoute: CodeIndexRoute,
+ LoopsIndexRoute: LoopsIndexRoute,
SettingsIndexRoute: SettingsIndexRoute,
- CodeLoopsLoopIdRoute: CodeLoopsLoopIdRouteWithChildren,
- CodeLoopsNewRoute: CodeLoopsNewRoute,
- CodeTasksTaskIdRoute: CodeTasksTaskIdRoute,
- CodeLoopsIndexRoute: CodeLoopsIndexRoute,
- CodeTasksPendingKeyRoute: CodeTasksPendingKeyRoute,
+ WebsiteIndexRoute: WebsiteIndexRoute,
+ TasksPendingKeyRoute: TasksPendingKeyRoute,
}
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)
diff --git a/products/desktop/packages/ui/src/router/routes/__root.tsx b/products/desktop/packages/ui/src/router/routes/__root.tsx
index 8f3fae767ca2..7b28265e5c9d 100644
--- a/products/desktop/packages/ui/src/router/routes/__root.tsx
+++ b/products/desktop/packages/ui/src/router/routes/__root.tsx
@@ -19,6 +19,7 @@ import { BrowserTabStrip } from "@posthog/ui/features/browser-tabs/BrowserTabStr
import { BrowserTabsDndProvider } from "@posthog/ui/features/browser-tabs/BrowserTabsDnd";
import { TabShortcutFallback } from "@posthog/ui/features/browser-tabs/TabShortcutFallback";
import { useActiveTabIsBlank } from "@posthog/ui/features/browser-tabs/useBrowserTabs";
+import { isBluebirdOnlyPath } from "@posthog/ui/features/canvas/bluebirdRoutes";
import { ChannelHotkeys } from "@posthog/ui/features/canvas/components/ChannelHotkeys";
import { ChannelRouteSync } from "@posthog/ui/features/canvas/components/ChannelRouteSync";
import { ChannelsSidebar } from "@posthog/ui/features/canvas/components/ChannelsSidebar";
@@ -28,11 +29,14 @@ import {
type FeedbackModalMode,
} from "@posthog/ui/features/canvas/components/FeedbackModal";
import { NavRail } from "@posthog/ui/features/canvas/components/NavRail";
+import { RailHistorySync } from "@posthog/ui/features/canvas/components/RailHistorySync";
import { useCanvasDeepLink } from "@posthog/ui/features/canvas/hooks/useCanvasDeepLink";
import { useChannelDeepLink } from "@posthog/ui/features/canvas/hooks/useChannelDeepLink";
import { useChannelsLayout } from "@posthog/ui/features/canvas/hooks/useChannelsLayout";
+import { useChannelsWorld } from "@posthog/ui/features/canvas/hooks/useChannelsWorld";
import { useRailSurface } from "@posthog/ui/features/canvas/hooks/useRailSurface";
import { useShareLinkInterceptor } from "@posthog/ui/features/canvas/hooks/useShareLinkInterceptor";
+import { useShellOwnsHeader } from "@posthog/ui/features/canvas/hooks/useShellOwnsHeader";
import { usePostHogWebFeedbackStore } from "@posthog/ui/features/canvas/stores/posthogWebFeedbackStore";
import { CommandMenu } from "@posthog/ui/features/command/CommandMenu";
import { CommandSearchBar } from "@posthog/ui/features/command/CommandSearchBar";
@@ -204,8 +208,7 @@ function RootLayout() {
PROJECT_BLUEBIRD_FLAG,
import.meta.env.DEV,
);
- const channelsToggleOn = useSidebarStore((s) => s.channelsEnabled);
- const channelsEnabled = channelsToggleOn && bluebirdEnabled;
+ const channelsWorld = useChannelsWorld();
// The new channels layout has exactly one gate: its feature flag (no
// sidebar toggle). When on it subsumes the channels alpha entirely.
const channelsLayout = useChannelsLayout();
@@ -290,35 +293,32 @@ function RootLayout() {
select: (s) => s.matches.some((m) => m.routeId.startsWith("/settings")),
});
- // The Bluebird chrome is the app shell for every non-settings route now. The
- // /website (Channels) routes own their own in-pane header (WebsiteLayout), so
- // the shared ContentHeader is mounted only outside that space.
- const onWebsitePath = useRouterState({
- select: (s) =>
- s.location.pathname === "/website" ||
- s.location.pathname.startsWith("/website/"),
- });
+ // ShellLayout draws the in-pane header under `_shell`, so the shared
+ // ContentHeader is mounted only where that layout isn't.
+ const shellOwnsHeader = useShellOwnsHeader();
- // The /website (Channels) routes stay registered regardless of the flag, so a
- // stale URL, a restored session, or a persisted channel browser tab could
- // strand a flag-off user on the channel layout with no way back (the Channels
- // toggle is hidden and ContentHeader is suppressed on /website). Once flags
- // resolve, send them back to Code.
+ // The bluebird routes stay registered regardless of the flag, so a stale URL,
+ // a restored session, or a persisted browser tab could strand a flag-off user
+ // on chrome they have no way back out of. Once flags resolve, send them back
+ // to a new task.
+ const onBluebirdOnlyPath = useRouterState({
+ select: (s) => isBluebirdOnlyPath(s.location.pathname),
+ });
useEffect(() => {
- if (flagsLoaded && !bluebirdEnabled && onWebsitePath) {
+ if (flagsLoaded && !bluebirdEnabled && onBluebirdOnlyPath) {
openTaskInput();
}
- }, [flagsLoaded, bluebirdEnabled, onWebsitePath]);
+ }, [flagsLoaded, bluebirdEnabled, onBluebirdOnlyPath]);
// A blank browser tab (the "+" new-tab page) shows an empty placeholder — but
- // ONLY on the channels index. Inside a channel (`/website/$channelId…`) the
- // route owns the content (channel home, inbox, artifacts, a canvas, …), so the
- // placeholder must never replace it, otherwise channel navigation looks dead.
- const onChannelsIndex = useRouterState({
- select: (s) => s.location.pathname === "/website",
+ // ONLY on the spaces index. Inside a space (`/spaces/$channelId…`) the route
+ // owns the content (space feed, artifacts, a canvas, …), so the placeholder
+ // must never replace it, otherwise space navigation looks dead.
+ const onSpacesIndex = useRouterState({
+ select: (s) => s.location.pathname === "/spaces",
});
const activeTabBlank = useActiveTabIsBlank();
- const showBlankTab = onChannelsIndex && activeTabBlank;
+ const showBlankTab = onSpacesIndex && activeTabBlank;
if (isSettingsRoute) {
return (
@@ -372,7 +372,7 @@ function RootLayout() {
<Flex
id="title-bar-left"
align="center"
- justify="between"
+ justify="start"
gap="3"
className="shrink-0 pr-2"
style={{
@@ -442,10 +442,10 @@ function RootLayout() {
{/* Gated so an empty right-side group can't claim a no-drag rect
in the title bar for nothing — every pixel without controls
should drag the window. */}
- {(billingEnabled || channelsEnabled || channelsLayout) && (
+ {(billingEnabled || channelsWorld) && (
<Flex align="center" gap="2" className="no-drag ml-auto pr-3">
<UsageButton />
- {(channelsEnabled || channelsLayout) && (
+ {channelsWorld && (
<Button
variant="outline"
size="sm"
@@ -499,10 +499,10 @@ function RootLayout() {
{/* Inside the framed pane, not the app column: announcements
overlay the content, never the sidebar. */}
<AnnouncementBanner />
- {/* The /website space renders its own header (WebsiteLayout);
+ {/* The shell renders its own header (ShellLayout);
everywhere else the shared header carries the view title
and, on a task, its action row. */}
- {!onWebsitePath && <ContentHeader />}
+ {!shellOwnsHeader && <ContentHeader />}
<Box flexGrow="1" overflow="hidden">
{showBlankTab ? <BlankTabView /> : <Outlet />}
</Box>
@@ -530,6 +530,9 @@ function RootLayout() {
but the rail can take that column away and the scoping still has to
happen. */}
<ChannelRouteSync />
+ {/* Renders nothing — remembers where each rail destination was, so a
+ pick returns you there rather than to its index. */}
+ <RailHistorySync />
{/* Renders nothing — wires the ⌥↑/⌥↓ task-cycling shortcuts. */}
<SpaceSwitcher
tasks={visualTaskOrder}
diff --git a/products/desktop/packages/ui/src/router/routes/_shell.tsx b/products/desktop/packages/ui/src/router/routes/_shell.tsx
new file mode 100644
index 000000000000..ce60d5d5c824
--- /dev/null
+++ b/products/desktop/packages/ui/src/router/routes/_shell.tsx
@@ -0,0 +1,21 @@
+import { ShellLayout } from "@posthog/ui/features/canvas/components/ShellLayout";
+import { useShellOwnsHeader } from "@posthog/ui/features/canvas/hooks/useShellOwnsHeader";
+import { createFileRoute, Outlet } from "@tanstack/react-router";
+
+/**
+ * Pathless layout for the routes that wear the spaces chrome — Home, Activity,
+ * the spaces themselves, and the pages the rail reaches beside them.
+ *
+ * Pathless because the chrome used to be inferred from a `/website` prefix, and
+ * flattening the routes took that prefix away. Grouping them here keeps the
+ * layout without putting a segment in every URL.
+ */
+export const Route = createFileRoute("/_shell")({
+ component: ShellRoute,
+});
+
+function ShellRoute() {
+ // Outside the channels world these same routes render bare and the root's
+ // ContentHeader carries the title, which is what they did before the flatten.
+ return useShellOwnsHeader() ? <ShellLayout /> : <Outlet />;
+}
diff --git a/products/desktop/packages/ui/src/router/routes/website/activity.tsx b/products/desktop/packages/ui/src/router/routes/_shell/activity.tsx
similarity index 93%
rename from products/desktop/packages/ui/src/router/routes/website/activity.tsx
rename to products/desktop/packages/ui/src/router/routes/_shell/activity.tsx
index 3091251e60a1..eb6938c59f39 100644
--- a/products/desktop/packages/ui/src/router/routes/website/activity.tsx
+++ b/products/desktop/packages/ui/src/router/routes/_shell/activity.tsx
@@ -5,7 +5,7 @@ import { createFileRoute } from "@tanstack/react-router";
// Activity: every task the viewer is involved in — created, @-mentioned in, or
// messaged in — across spaces. The rail's Activity badge counts what's new here.
-export const Route = createFileRoute("/website/activity")({
+export const Route = createFileRoute("/_shell/activity")({
component: ActivityRoute,
});
diff --git a/products/desktop/packages/ui/src/router/routes/command-center.tsx b/products/desktop/packages/ui/src/router/routes/_shell/command-center.tsx
similarity index 83%
rename from products/desktop/packages/ui/src/router/routes/command-center.tsx
rename to products/desktop/packages/ui/src/router/routes/_shell/command-center.tsx
index 45e47f988937..89cf2e041098 100644
--- a/products/desktop/packages/ui/src/router/routes/command-center.tsx
+++ b/products/desktop/packages/ui/src/router/routes/_shell/command-center.tsx
@@ -5,7 +5,7 @@ import {
} from "@posthog/ui/router/routeSkeletons";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/command-center")({
+export const Route = createFileRoute("/_shell/command-center")({
component: CommandCenterView,
...withRouteSkeleton(AppPageSkeleton),
});
diff --git a/products/desktop/packages/ui/src/router/routes/website/feeds/$feedId.tsx b/products/desktop/packages/ui/src/router/routes/_shell/feeds/$feedId.tsx
similarity index 91%
rename from products/desktop/packages/ui/src/router/routes/website/feeds/$feedId.tsx
rename to products/desktop/packages/ui/src/router/routes/_shell/feeds/$feedId.tsx
index ca1c5852c181..ed081756b7b8 100644
--- a/products/desktop/packages/ui/src/router/routes/website/feeds/$feedId.tsx
+++ b/products/desktop/packages/ui/src/router/routes/_shell/feeds/$feedId.tsx
@@ -7,7 +7,7 @@ import {
} from "@posthog/ui/router/routeSkeletons";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/website/feeds/$feedId")({
+export const Route = createFileRoute("/_shell/feeds/$feedId")({
component: TaskFeedRoute,
...withRouteSkeleton(ChannelSkeleton),
});
diff --git a/products/desktop/packages/ui/src/router/routes/_shell/index.tsx b/products/desktop/packages/ui/src/router/routes/_shell/index.tsx
new file mode 100644
index 000000000000..aa103d0b1a14
--- /dev/null
+++ b/products/desktop/packages/ui/src/router/routes/_shell/index.tsx
@@ -0,0 +1,14 @@
+import { HomeView } from "@posthog/ui/features/canvas/grid/HomeView";
+import { useChannelsLayout } from "@posthog/ui/features/canvas/hooks/useChannelsLayout";
+import { NewTaskScreen } from "@posthog/ui/features/task-detail/components/NewTaskScreen";
+import { createFileRoute } from "@tanstack/react-router";
+
+export const Route = createFileRoute("/_shell/")({
+ component: RootRoute,
+});
+
+function RootRoute() {
+ // Home is the spaces layout's landing screen. Without that layout there is no
+ // Home, and the app opens on a new task the way it always did.
+ return useChannelsLayout() ? <HomeView /> : <NewTaskScreen />;
+}
diff --git a/products/desktop/packages/ui/src/router/routes/mcp-servers.tsx b/products/desktop/packages/ui/src/router/routes/_shell/mcp-servers.tsx
similarity index 78%
rename from products/desktop/packages/ui/src/router/routes/mcp-servers.tsx
rename to products/desktop/packages/ui/src/router/routes/_shell/mcp-servers.tsx
index 69b2f20e0d1c..0562e6a3ca8c 100644
--- a/products/desktop/packages/ui/src/router/routes/mcp-servers.tsx
+++ b/products/desktop/packages/ui/src/router/routes/_shell/mcp-servers.tsx
@@ -1,6 +1,6 @@
import { createFileRoute, redirect } from "@tanstack/react-router";
-export const Route = createFileRoute("/mcp-servers")({
+export const Route = createFileRoute("/_shell/mcp-servers")({
beforeLoad: () => {
throw redirect({
to: "/settings/$category",
diff --git a/products/desktop/packages/ui/src/router/routes/_shell/new.tsx b/products/desktop/packages/ui/src/router/routes/_shell/new.tsx
new file mode 100644
index 000000000000..1f03a0d337e4
--- /dev/null
+++ b/products/desktop/packages/ui/src/router/routes/_shell/new.tsx
@@ -0,0 +1,7 @@
+import { NewTaskScreen } from "@posthog/ui/features/task-detail/components/NewTaskScreen";
+import { createFileRoute } from "@tanstack/react-router";
+
+// A new task filed to no space. Per-space new tasks live at /spaces/$id/new.
+export const Route = createFileRoute("/_shell/new")({
+ component: NewTaskScreen,
+});
diff --git a/products/desktop/packages/ui/src/router/routes/skills.tsx b/products/desktop/packages/ui/src/router/routes/_shell/skills.tsx
similarity index 79%
rename from products/desktop/packages/ui/src/router/routes/skills.tsx
rename to products/desktop/packages/ui/src/router/routes/_shell/skills.tsx
index 973ae90db42d..d65cc6e487f6 100644
--- a/products/desktop/packages/ui/src/router/routes/skills.tsx
+++ b/products/desktop/packages/ui/src/router/routes/_shell/skills.tsx
@@ -1,6 +1,6 @@
import { createFileRoute, redirect } from "@tanstack/react-router";
-export const Route = createFileRoute("/skills")({
+export const Route = createFileRoute("/_shell/skills")({
beforeLoad: () => {
throw redirect({
to: "/settings/$category",
diff --git a/products/desktop/packages/ui/src/router/routes/website/$channelId/artifacts.tsx b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/artifacts.tsx
similarity index 65%
rename from products/desktop/packages/ui/src/router/routes/website/$channelId/artifacts.tsx
rename to products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/artifacts.tsx
index f58c3f317f45..826b4a442d92 100644
--- a/products/desktop/packages/ui/src/router/routes/website/$channelId/artifacts.tsx
+++ b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/artifacts.tsx
@@ -1,9 +1,9 @@
import { createFileRoute, redirect } from "@tanstack/react-router";
-export const Route = createFileRoute("/website/$channelId/artifacts")({
+export const Route = createFileRoute("/_shell/spaces/$channelId/artifacts")({
beforeLoad: ({ params }) => {
throw redirect({
- to: "/website/$channelId",
+ to: "/spaces/$channelId",
params: { channelId: params.channelId },
replace: true,
});
diff --git a/products/desktop/packages/ui/src/router/routes/website/$channelId/canvases.tsx b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/canvases.tsx
similarity index 81%
rename from products/desktop/packages/ui/src/router/routes/website/$channelId/canvases.tsx
rename to products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/canvases.tsx
index 67d0c67c6761..2457ffa49b25 100644
--- a/products/desktop/packages/ui/src/router/routes/website/$channelId/canvases.tsx
+++ b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/canvases.tsx
@@ -1,7 +1,7 @@
import { WebsiteDashboardsIndex } from "@posthog/ui/features/canvas/components/WebsiteDashboardsIndex";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/website/$channelId/canvases")({
+export const Route = createFileRoute("/_shell/spaces/$channelId/canvases")({
component: ChannelCanvasesRoute,
});
diff --git a/products/desktop/packages/ui/src/router/routes/website/$channelId/context.tsx b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/context.tsx
similarity index 85%
rename from products/desktop/packages/ui/src/router/routes/website/$channelId/context.tsx
rename to products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/context.tsx
index 5798033c8b07..e057a18b0800 100644
--- a/products/desktop/packages/ui/src/router/routes/website/$channelId/context.tsx
+++ b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/context.tsx
@@ -5,7 +5,7 @@ import {
} from "@posthog/ui/router/routeSkeletons";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/website/$channelId/context")({
+export const Route = createFileRoute("/_shell/spaces/$channelId/context")({
component: ContextRoute,
...withRouteSkeleton(ChannelSkeleton),
});
diff --git a/products/desktop/packages/ui/src/router/routes/website/$channelId/dashboards/$dashboardId.tsx b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/dashboards/$dashboardId.tsx
similarity index 89%
rename from products/desktop/packages/ui/src/router/routes/website/$channelId/dashboards/$dashboardId.tsx
rename to products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/dashboards/$dashboardId.tsx
index 9e555781b7e9..df20518580bc 100644
--- a/products/desktop/packages/ui/src/router/routes/website/$channelId/dashboards/$dashboardId.tsx
+++ b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/dashboards/$dashboardId.tsx
@@ -6,7 +6,7 @@ import {
import { createFileRoute } from "@tanstack/react-router";
export const Route = createFileRoute(
- "/website/$channelId/dashboards/$dashboardId",
+ "/_shell/spaces/$channelId/dashboards/$dashboardId",
)({
component: DashboardRoute,
...withRouteSkeleton(CanvasSkeleton),
diff --git a/products/desktop/packages/ui/src/router/routes/website/$channelId/history.tsx b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/history.tsx
similarity index 86%
rename from products/desktop/packages/ui/src/router/routes/website/$channelId/history.tsx
rename to products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/history.tsx
index 2584a2856e74..095fd1bba3ce 100644
--- a/products/desktop/packages/ui/src/router/routes/website/$channelId/history.tsx
+++ b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/history.tsx
@@ -5,7 +5,7 @@ import {
} from "@posthog/ui/router/routeSkeletons";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/website/$channelId/history")({
+export const Route = createFileRoute("/_shell/spaces/$channelId/history")({
component: ChannelHistoryRoute,
...withRouteSkeleton(ChannelSkeleton),
});
diff --git a/products/desktop/packages/ui/src/router/routes/website/$channelId/index.tsx b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/index.tsx
similarity index 86%
rename from products/desktop/packages/ui/src/router/routes/website/$channelId/index.tsx
rename to products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/index.tsx
index bc7547d7d8dc..0a7c50952a03 100644
--- a/products/desktop/packages/ui/src/router/routes/website/$channelId/index.tsx
+++ b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/index.tsx
@@ -5,7 +5,7 @@ import {
} from "@posthog/ui/router/routeSkeletons";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/website/$channelId/")({
+export const Route = createFileRoute("/_shell/spaces/$channelId/")({
component: ChannelHomeRoute,
...withRouteSkeleton(ChannelSkeleton),
});
diff --git a/products/desktop/packages/ui/src/router/routes/website/$channelId/loops.tsx b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/loops.tsx
similarity index 86%
rename from products/desktop/packages/ui/src/router/routes/website/$channelId/loops.tsx
rename to products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/loops.tsx
index 5af3cb6d25b4..a7d7a0ecbc04 100644
--- a/products/desktop/packages/ui/src/router/routes/website/$channelId/loops.tsx
+++ b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/loops.tsx
@@ -5,7 +5,7 @@ import {
} from "@posthog/ui/router/routeSkeletons";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/website/$channelId/loops")({
+export const Route = createFileRoute("/_shell/spaces/$channelId/loops")({
component: ChannelLoopsRoute,
...withRouteSkeleton(ChannelSkeleton),
});
diff --git a/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/new.tsx b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/new.tsx
new file mode 100644
index 000000000000..966bad2d9cbd
--- /dev/null
+++ b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/new.tsx
@@ -0,0 +1,11 @@
+import { SpaceNewTask } from "@posthog/ui/features/canvas/components/SpaceNewTask";
+import { createFileRoute } from "@tanstack/react-router";
+
+export const Route = createFileRoute("/_shell/spaces/$channelId/new")({
+ component: NewTaskRoute,
+});
+
+function NewTaskRoute() {
+ const { channelId } = Route.useParams();
+ return <SpaceNewTask channelId={channelId} />;
+}
diff --git a/products/desktop/packages/ui/src/router/routes/website/$channelId/tasks/$taskId.tsx b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/tasks/$taskId.tsx
similarity index 82%
rename from products/desktop/packages/ui/src/router/routes/website/$channelId/tasks/$taskId.tsx
rename to products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/tasks/$taskId.tsx
index 80a102b4c5eb..07c6365b8231 100644
--- a/products/desktop/packages/ui/src/router/routes/website/$channelId/tasks/$taskId.tsx
+++ b/products/desktop/packages/ui/src/router/routes/_shell/spaces/$channelId/tasks/$taskId.tsx
@@ -19,21 +19,23 @@ import { useQuery } from "@tanstack/react-query";
import { createFileRoute, Navigate } from "@tanstack/react-router";
import { useEffect } from "react";
-export const Route = createFileRoute("/website/$channelId/tasks/$taskId")({
- component: ChannelTaskDetailRoute,
- pendingComponent: TaskDetailSkeleton,
- // Cache-only loader (same as /code/tasks/$taskId): never block navigation on
- // the network; the cold-miss fetch lives in the component. The single-frame
- // yield lets the skeleton paint before TaskDetail's heavy mount.
- loader: async ({ params }): Promise<Task | null> => {
- const task =
- getCachedTaskDetail(params.taskId) ??
- getCachedTask(params.taskId) ??
- null;
- await yieldToPaint();
- return task;
+export const Route = createFileRoute("/_shell/spaces/$channelId/tasks/$taskId")(
+ {
+ component: ChannelTaskDetailRoute,
+ pendingComponent: TaskDetailSkeleton,
+ // Cache-only loader (same as /tasks/$taskId): never block navigation on
+ // the network; the cold-miss fetch lives in the component. The single-frame
+ // yield lets the skeleton paint before TaskDetail's heavy mount.
+ loader: async ({ params }): Promise<Task | null> => {
+ const task =
+ getCachedTaskDetail(params.taskId) ??
+ getCachedTask(params.taskId) ??
+ null;
+ await yieldToPaint();
+ return task;
+ },
},
-});
+);
function ChannelTaskDetailRoute() {
const spacesLayout = useChannelsLayout();
@@ -71,11 +73,11 @@ function ChannelTaskDetailRoute() {
// and cloud-pending tasks aren't returnable by the API yet — see the loader
// comment), so only treat the task as gone when nothing cached is usable.
if (!initialTask && isTaskDetailNotFoundError(error)) {
- return <Navigate replace to="/website/$channelId" params={{ channelId }} />;
+ return <Navigate replace to="/spaces/$channelId" params={{ channelId }} />;
}
if (!task && isSuccess && !fetched) {
- return <Navigate replace to="/website/$channelId" params={{ channelId }} />;
+ return <Navigate replace to="/spaces/$channelId" params={{ channelId }} />;
}
if (!task && isError) {
diff --git a/products/desktop/packages/ui/src/router/routes/_shell/spaces/index.tsx b/products/desktop/packages/ui/src/router/routes/_shell/spaces/index.tsx
new file mode 100644
index 000000000000..e44efdd7cc4a
--- /dev/null
+++ b/products/desktop/packages/ui/src/router/routes/_shell/spaces/index.tsx
@@ -0,0 +1,6 @@
+import { SpacesIndex } from "@posthog/ui/features/canvas/components/SpacesIndex";
+import { createFileRoute } from "@tanstack/react-router";
+
+export const Route = createFileRoute("/_shell/spaces/")({
+ component: SpacesIndex,
+});
diff --git a/products/desktop/packages/ui/src/router/routes/code/agents.tsx b/products/desktop/packages/ui/src/router/routes/agents.tsx
similarity index 83%
rename from products/desktop/packages/ui/src/router/routes/code/agents.tsx
rename to products/desktop/packages/ui/src/router/routes/agents.tsx
index 46a68ca205c8..56f6602df3fa 100644
--- a/products/desktop/packages/ui/src/router/routes/code/agents.tsx
+++ b/products/desktop/packages/ui/src/router/routes/agents.tsx
@@ -4,7 +4,7 @@ import {
} from "@posthog/ui/router/routeSkeletons";
import { createFileRoute, Outlet } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/agents")({
+export const Route = createFileRoute("/agents")({
component: AgentsLayout,
...withRouteSkeleton(AppPageSkeleton),
});
diff --git a/products/desktop/packages/ui/src/router/routes/index.tsx b/products/desktop/packages/ui/src/router/routes/agents/index.tsx
similarity index 50%
rename from products/desktop/packages/ui/src/router/routes/index.tsx
rename to products/desktop/packages/ui/src/router/routes/agents/index.tsx
index fef5274c3296..d3f555862395 100644
--- a/products/desktop/packages/ui/src/router/routes/index.tsx
+++ b/products/desktop/packages/ui/src/router/routes/agents/index.tsx
@@ -1,7 +1,7 @@
import { createFileRoute, redirect } from "@tanstack/react-router";
-export const Route = createFileRoute("/")({
+export const Route = createFileRoute("/agents/")({
beforeLoad: () => {
- throw redirect({ to: "/code" });
+ throw redirect({ to: "/agents/scouts" });
},
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/agents/scouts.$skillName.index.tsx b/products/desktop/packages/ui/src/router/routes/agents/scouts.$skillName.index.tsx
similarity index 88%
rename from products/desktop/packages/ui/src/router/routes/code/agents/scouts.$skillName.index.tsx
rename to products/desktop/packages/ui/src/router/routes/agents/scouts.$skillName.index.tsx
index 4fe841fe7a57..e08ef072523e 100644
--- a/products/desktop/packages/ui/src/router/routes/code/agents/scouts.$skillName.index.tsx
+++ b/products/desktop/packages/ui/src/router/routes/agents/scouts.$skillName.index.tsx
@@ -1,7 +1,7 @@
import { ScoutDetailView } from "@posthog/ui/features/scouts/components/ScoutDetailView";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/agents/scouts/$skillName/")({
+export const Route = createFileRoute("/agents/scouts/$skillName/")({
validateSearch: (search: Record<string, unknown>): { finding?: string } => ({
finding: typeof search.finding === "string" ? search.finding : undefined,
}),
diff --git a/products/desktop/packages/ui/src/router/routes/code/inbox/dismissed.tsx b/products/desktop/packages/ui/src/router/routes/agents/scouts.$skillName.tsx
similarity index 57%
rename from products/desktop/packages/ui/src/router/routes/code/inbox/dismissed.tsx
rename to products/desktop/packages/ui/src/router/routes/agents/scouts.$skillName.tsx
index e71a17de80de..8c6b34709c7c 100644
--- a/products/desktop/packages/ui/src/router/routes/code/inbox/dismissed.tsx
+++ b/products/desktop/packages/ui/src/router/routes/agents/scouts.$skillName.tsx
@@ -1,5 +1,5 @@
import { createFileRoute, Outlet } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/inbox/dismissed")({
+export const Route = createFileRoute("/agents/scouts/$skillName")({
component: Outlet,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/agents/scouts.findings.tsx b/products/desktop/packages/ui/src/router/routes/agents/scouts.findings.tsx
similarity index 72%
rename from products/desktop/packages/ui/src/router/routes/code/agents/scouts.findings.tsx
rename to products/desktop/packages/ui/src/router/routes/agents/scouts.findings.tsx
index 1a619d90b71e..14afedcb1a86 100644
--- a/products/desktop/packages/ui/src/router/routes/code/agents/scouts.findings.tsx
+++ b/products/desktop/packages/ui/src/router/routes/agents/scouts.findings.tsx
@@ -1,6 +1,6 @@
import { ScoutFindingsView } from "@posthog/ui/features/scouts/components/ScoutFindingsView";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/agents/scouts/findings")({
+export const Route = createFileRoute("/agents/scouts/findings")({
component: ScoutFindingsView,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/agents/scouts.index.tsx b/products/desktop/packages/ui/src/router/routes/agents/scouts.index.tsx
similarity index 72%
rename from products/desktop/packages/ui/src/router/routes/code/agents/scouts.index.tsx
rename to products/desktop/packages/ui/src/router/routes/agents/scouts.index.tsx
index f7d9a69b9098..f45ea5b130bd 100644
--- a/products/desktop/packages/ui/src/router/routes/code/agents/scouts.index.tsx
+++ b/products/desktop/packages/ui/src/router/routes/agents/scouts.index.tsx
@@ -1,6 +1,6 @@
import { AgentsView } from "@posthog/ui/features/agents/components/AgentsView";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/agents/scouts/")({
+export const Route = createFileRoute("/agents/scouts/")({
component: AgentsView,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/agents/scouts.scratchpad.tsx b/products/desktop/packages/ui/src/router/routes/agents/scouts.scratchpad.tsx
similarity index 71%
rename from products/desktop/packages/ui/src/router/routes/code/agents/scouts.scratchpad.tsx
rename to products/desktop/packages/ui/src/router/routes/agents/scouts.scratchpad.tsx
index 053ae313f8ae..9c4a9d28ba00 100644
--- a/products/desktop/packages/ui/src/router/routes/code/agents/scouts.scratchpad.tsx
+++ b/products/desktop/packages/ui/src/router/routes/agents/scouts.scratchpad.tsx
@@ -1,6 +1,6 @@
import { ScratchpadView } from "@posthog/ui/features/scouts/components/ScratchpadView";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/agents/scouts/scratchpad")({
+export const Route = createFileRoute("/agents/scouts/scratchpad")({
component: ScratchpadView,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/agents/scouts.tsx b/products/desktop/packages/ui/src/router/routes/agents/scouts.tsx
similarity index 59%
rename from products/desktop/packages/ui/src/router/routes/code/agents/scouts.tsx
rename to products/desktop/packages/ui/src/router/routes/agents/scouts.tsx
index dcdbb7f9c9ca..4aa03dd25cbe 100644
--- a/products/desktop/packages/ui/src/router/routes/code/agents/scouts.tsx
+++ b/products/desktop/packages/ui/src/router/routes/agents/scouts.tsx
@@ -1,5 +1,5 @@
import { createFileRoute, Outlet } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/agents/scouts")({
+export const Route = createFileRoute("/agents/scouts")({
component: Outlet,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/archived.tsx b/products/desktop/packages/ui/src/router/routes/archived.tsx
similarity index 75%
rename from products/desktop/packages/ui/src/router/routes/code/archived.tsx
rename to products/desktop/packages/ui/src/router/routes/archived.tsx
index 7dadc963168e..c22aa78440b1 100644
--- a/products/desktop/packages/ui/src/router/routes/code/archived.tsx
+++ b/products/desktop/packages/ui/src/router/routes/archived.tsx
@@ -1,6 +1,6 @@
import { ArchivedTasksView } from "@posthog/ui/features/archive/ArchivedTasksView";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/archived")({
+export const Route = createFileRoute("/archived")({
component: ArchivedTasksView,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code.$.tsx b/products/desktop/packages/ui/src/router/routes/code.$.tsx
new file mode 100644
index 000000000000..1ecc3fc9a181
--- /dev/null
+++ b/products/desktop/packages/ui/src/router/routes/code.$.tsx
@@ -0,0 +1,9 @@
+import { redirectFromLegacyPath } from "@posthog/ui/router/legacyPaths";
+import { createFileRoute } from "@tanstack/react-router";
+
+// Tasks, the inbox, agents and loops lost their `/code` prefix when the routes
+// were flattened. Old links still arrive from deep links, notifications and
+// restored history, so they get sent on to where the page lives now.
+export const Route = createFileRoute("/code/$")({
+ beforeLoad: ({ location }) => redirectFromLegacyPath(location),
+});
diff --git a/products/desktop/packages/ui/src/router/routes/code.index.tsx b/products/desktop/packages/ui/src/router/routes/code.index.tsx
new file mode 100644
index 000000000000..b409b956c1ad
--- /dev/null
+++ b/products/desktop/packages/ui/src/router/routes/code.index.tsx
@@ -0,0 +1,7 @@
+import { redirectFromLegacyPath } from "@posthog/ui/router/legacyPaths";
+import { createFileRoute } from "@tanstack/react-router";
+
+// `/code` itself, which was the new-task screen. See code.$.tsx.
+export const Route = createFileRoute("/code/")({
+ beforeLoad: ({ location }) => redirectFromLegacyPath(location),
+});
diff --git a/products/desktop/packages/ui/src/router/routes/code/agents/index.tsx b/products/desktop/packages/ui/src/router/routes/code/agents/index.tsx
deleted file mode 100644
index 32120558f2b0..000000000000
--- a/products/desktop/packages/ui/src/router/routes/code/agents/index.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import { createFileRoute, redirect } from "@tanstack/react-router";
-
-export const Route = createFileRoute("/code/agents/")({
- beforeLoad: () => {
- throw redirect({ to: "/code/agents/scouts" });
- },
-});
diff --git a/products/desktop/packages/ui/src/router/routes/code/agents/scouts.$skillName.tsx b/products/desktop/packages/ui/src/router/routes/code/agents/scouts.$skillName.tsx
deleted file mode 100644
index 426ca62018af..000000000000
--- a/products/desktop/packages/ui/src/router/routes/code/agents/scouts.$skillName.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { createFileRoute, Outlet } from "@tanstack/react-router";
-
-export const Route = createFileRoute("/code/agents/scouts/$skillName")({
- component: Outlet,
-});
diff --git a/products/desktop/packages/ui/src/router/routes/code/index.tsx b/products/desktop/packages/ui/src/router/routes/code/index.tsx
deleted file mode 100644
index 5a7372512d09..000000000000
--- a/products/desktop/packages/ui/src/router/routes/code/index.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { TaskInput } from "@posthog/ui/features/task-detail/components/TaskInput";
-import { useAppView } from "@posthog/ui/router/useAppView";
-import { createFileRoute } from "@tanstack/react-router";
-
-export const Route = createFileRoute("/code/")({
- component: CodeIndexRoute,
-});
-
-function CodeIndexRoute() {
- const view = useAppView();
-
- return (
- <TaskInput
- initialPrompt={view.initialPrompt}
- initialPromptKey={view.taskInputRequestId}
- initialCloudRepository={view.initialCloudRepository}
- initialModel={view.initialModel}
- initialMode={view.initialMode}
- reportAssociation={view.reportAssociation}
- />
- );
-}
diff --git a/products/desktop/packages/ui/src/router/routes/code/inbox.tsx b/products/desktop/packages/ui/src/router/routes/inbox.tsx
similarity index 84%
rename from products/desktop/packages/ui/src/router/routes/code/inbox.tsx
rename to products/desktop/packages/ui/src/router/routes/inbox.tsx
index edd58890d132..d436c1f24f95 100644
--- a/products/desktop/packages/ui/src/router/routes/code/inbox.tsx
+++ b/products/desktop/packages/ui/src/router/routes/inbox.tsx
@@ -5,7 +5,7 @@ import {
} from "@posthog/ui/router/routeSkeletons";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/inbox")({
+export const Route = createFileRoute("/inbox")({
component: InboxView,
...withRouteSkeleton(AppPageSkeleton),
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/inbox/agents.tsx b/products/desktop/packages/ui/src/router/routes/inbox/agents.tsx
similarity index 56%
rename from products/desktop/packages/ui/src/router/routes/code/inbox/agents.tsx
rename to products/desktop/packages/ui/src/router/routes/inbox/agents.tsx
index 85c584d2462a..e421cb955b52 100644
--- a/products/desktop/packages/ui/src/router/routes/code/inbox/agents.tsx
+++ b/products/desktop/packages/ui/src/router/routes/inbox/agents.tsx
@@ -1,9 +1,9 @@
import { createFileRoute, Navigate } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/inbox/agents")({
+export const Route = createFileRoute("/inbox/agents")({
component: InboxAgentsRedirect,
});
function InboxAgentsRedirect() {
- return <Navigate to="/code/agents" replace />;
+ return <Navigate to="/agents" replace />;
}
diff --git a/products/desktop/packages/ui/src/router/routes/code/inbox/dismissed.$reportId.tsx b/products/desktop/packages/ui/src/router/routes/inbox/dismissed.$reportId.tsx
similarity index 90%
rename from products/desktop/packages/ui/src/router/routes/code/inbox/dismissed.$reportId.tsx
rename to products/desktop/packages/ui/src/router/routes/inbox/dismissed.$reportId.tsx
index 4b24fa3868d7..5c18630aace7 100644
--- a/products/desktop/packages/ui/src/router/routes/code/inbox/dismissed.$reportId.tsx
+++ b/products/desktop/packages/ui/src/router/routes/inbox/dismissed.$reportId.tsx
@@ -3,7 +3,7 @@ import { DismissedReportDetail } from "@posthog/ui/features/inbox/components/Dis
import { getCachedInboxReportDetail } from "@posthog/ui/features/inbox/inboxQueries";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/inbox/dismissed/$reportId")({
+export const Route = createFileRoute("/inbox/dismissed/$reportId")({
component: DismissedReportDetailRoute,
pendingComponent: () => null,
loader: ({ params }): SignalReport | null =>
diff --git a/products/desktop/packages/ui/src/router/routes/code/inbox/dismissed.index.tsx b/products/desktop/packages/ui/src/router/routes/inbox/dismissed.index.tsx
similarity index 72%
rename from products/desktop/packages/ui/src/router/routes/code/inbox/dismissed.index.tsx
rename to products/desktop/packages/ui/src/router/routes/inbox/dismissed.index.tsx
index 6669bac334c8..a723847731c4 100644
--- a/products/desktop/packages/ui/src/router/routes/code/inbox/dismissed.index.tsx
+++ b/products/desktop/packages/ui/src/router/routes/inbox/dismissed.index.tsx
@@ -1,6 +1,6 @@
import { DismissedTab } from "@posthog/ui/features/inbox/components/DismissedTab";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/inbox/dismissed/")({
+export const Route = createFileRoute("/inbox/dismissed/")({
component: DismissedTab,
});
diff --git a/products/desktop/packages/ui/src/router/routes/inbox/dismissed.tsx b/products/desktop/packages/ui/src/router/routes/inbox/dismissed.tsx
new file mode 100644
index 000000000000..efbd6823bfdc
--- /dev/null
+++ b/products/desktop/packages/ui/src/router/routes/inbox/dismissed.tsx
@@ -0,0 +1,5 @@
+import { createFileRoute, Outlet } from "@tanstack/react-router";
+
+export const Route = createFileRoute("/inbox/dismissed")({
+ component: Outlet,
+});
diff --git a/products/desktop/packages/ui/src/router/routes/code/inbox/index.tsx b/products/desktop/packages/ui/src/router/routes/inbox/index.tsx
similarity index 56%
rename from products/desktop/packages/ui/src/router/routes/code/inbox/index.tsx
rename to products/desktop/packages/ui/src/router/routes/inbox/index.tsx
index 3005f5e1e5f4..08b720d256fa 100644
--- a/products/desktop/packages/ui/src/router/routes/code/inbox/index.tsx
+++ b/products/desktop/packages/ui/src/router/routes/inbox/index.tsx
@@ -1,9 +1,9 @@
import { createFileRoute, Navigate } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/inbox/")({
+export const Route = createFileRoute("/inbox/")({
component: InboxIndexRedirect,
});
function InboxIndexRedirect() {
- return <Navigate to="/code/inbox/pulls" replace />;
+ return <Navigate to="/inbox/pulls" replace />;
}
diff --git a/products/desktop/packages/ui/src/router/routes/code/inbox/pulls.$reportId.tsx b/products/desktop/packages/ui/src/router/routes/inbox/pulls.$reportId.tsx
similarity index 90%
rename from products/desktop/packages/ui/src/router/routes/code/inbox/pulls.$reportId.tsx
rename to products/desktop/packages/ui/src/router/routes/inbox/pulls.$reportId.tsx
index 63e697feabeb..6babaefc3b2b 100644
--- a/products/desktop/packages/ui/src/router/routes/code/inbox/pulls.$reportId.tsx
+++ b/products/desktop/packages/ui/src/router/routes/inbox/pulls.$reportId.tsx
@@ -3,7 +3,7 @@ import { PullRequestDetail } from "@posthog/ui/features/inbox/components/PullReq
import { getCachedInboxReportDetail } from "@posthog/ui/features/inbox/inboxQueries";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/inbox/pulls/$reportId")({
+export const Route = createFileRoute("/inbox/pulls/$reportId")({
component: PullRequestDetailRoute,
pendingComponent: () => null,
loader: ({ params }): SignalReport | null =>
diff --git a/products/desktop/packages/ui/src/router/routes/code/inbox/pulls.index.tsx b/products/desktop/packages/ui/src/router/routes/inbox/pulls.index.tsx
similarity index 74%
rename from products/desktop/packages/ui/src/router/routes/code/inbox/pulls.index.tsx
rename to products/desktop/packages/ui/src/router/routes/inbox/pulls.index.tsx
index 5672777f93e5..a5ac1da2eebb 100644
--- a/products/desktop/packages/ui/src/router/routes/code/inbox/pulls.index.tsx
+++ b/products/desktop/packages/ui/src/router/routes/inbox/pulls.index.tsx
@@ -1,6 +1,6 @@
import { PullRequestsTab } from "@posthog/ui/features/inbox/components/PullRequestsTab";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/inbox/pulls/")({
+export const Route = createFileRoute("/inbox/pulls/")({
component: PullRequestsTab,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/inbox/pulls.tsx b/products/desktop/packages/ui/src/router/routes/inbox/pulls.tsx
similarity index 60%
rename from products/desktop/packages/ui/src/router/routes/code/inbox/pulls.tsx
rename to products/desktop/packages/ui/src/router/routes/inbox/pulls.tsx
index 5e172dfe5a00..2d50dee84b12 100644
--- a/products/desktop/packages/ui/src/router/routes/code/inbox/pulls.tsx
+++ b/products/desktop/packages/ui/src/router/routes/inbox/pulls.tsx
@@ -1,5 +1,5 @@
import { createFileRoute, Outlet } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/inbox/pulls")({
+export const Route = createFileRoute("/inbox/pulls")({
component: Outlet,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/inbox/reports.$reportId.tsx b/products/desktop/packages/ui/src/router/routes/inbox/reports.$reportId.tsx
similarity index 90%
rename from products/desktop/packages/ui/src/router/routes/code/inbox/reports.$reportId.tsx
rename to products/desktop/packages/ui/src/router/routes/inbox/reports.$reportId.tsx
index c3b7bf993613..7aab6bb21355 100644
--- a/products/desktop/packages/ui/src/router/routes/code/inbox/reports.$reportId.tsx
+++ b/products/desktop/packages/ui/src/router/routes/inbox/reports.$reportId.tsx
@@ -3,7 +3,7 @@ import { ReportDetail } from "@posthog/ui/features/inbox/components/ReportDetail
import { getCachedInboxReportDetail } from "@posthog/ui/features/inbox/inboxQueries";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/inbox/reports/$reportId")({
+export const Route = createFileRoute("/inbox/reports/$reportId")({
component: ReportDetailRoute,
pendingComponent: () => null,
loader: ({ params }): SignalReport | null =>
diff --git a/products/desktop/packages/ui/src/router/routes/code/inbox/reports.index.tsx b/products/desktop/packages/ui/src/router/routes/inbox/reports.index.tsx
similarity index 72%
rename from products/desktop/packages/ui/src/router/routes/code/inbox/reports.index.tsx
rename to products/desktop/packages/ui/src/router/routes/inbox/reports.index.tsx
index 72a61f138121..c7968422b2ee 100644
--- a/products/desktop/packages/ui/src/router/routes/code/inbox/reports.index.tsx
+++ b/products/desktop/packages/ui/src/router/routes/inbox/reports.index.tsx
@@ -1,6 +1,6 @@
import { ReportsTab } from "@posthog/ui/features/inbox/components/ReportsTab";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/inbox/reports/")({
+export const Route = createFileRoute("/inbox/reports/")({
component: ReportsTab,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/inbox/reports.tsx b/products/desktop/packages/ui/src/router/routes/inbox/reports.tsx
similarity index 59%
rename from products/desktop/packages/ui/src/router/routes/code/inbox/reports.tsx
rename to products/desktop/packages/ui/src/router/routes/inbox/reports.tsx
index 03957fb16ab6..d304f091297d 100644
--- a/products/desktop/packages/ui/src/router/routes/code/inbox/reports.tsx
+++ b/products/desktop/packages/ui/src/router/routes/inbox/reports.tsx
@@ -1,5 +1,5 @@
import { createFileRoute, Outlet } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/inbox/reports")({
+export const Route = createFileRoute("/inbox/reports")({
component: Outlet,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/inbox/runs.$reportId.tsx b/products/desktop/packages/ui/src/router/routes/inbox/runs.$reportId.tsx
similarity index 81%
rename from products/desktop/packages/ui/src/router/routes/code/inbox/runs.$reportId.tsx
rename to products/desktop/packages/ui/src/router/routes/inbox/runs.$reportId.tsx
index b014e33270c0..3e1430779203 100644
--- a/products/desktop/packages/ui/src/router/routes/code/inbox/runs.$reportId.tsx
+++ b/products/desktop/packages/ui/src/router/routes/inbox/runs.$reportId.tsx
@@ -1,7 +1,7 @@
import { AgentRunDetail } from "@posthog/ui/features/inbox/components/AgentRunDetail";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/inbox/runs/$reportId")({
+export const Route = createFileRoute("/inbox/runs/$reportId")({
component: RunDetailRoute,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/inbox/runs.index.tsx b/products/desktop/packages/ui/src/router/routes/inbox/runs.index.tsx
similarity index 72%
rename from products/desktop/packages/ui/src/router/routes/code/inbox/runs.index.tsx
rename to products/desktop/packages/ui/src/router/routes/inbox/runs.index.tsx
index 8efec2cc51bf..4967c1d27978 100644
--- a/products/desktop/packages/ui/src/router/routes/code/inbox/runs.index.tsx
+++ b/products/desktop/packages/ui/src/router/routes/inbox/runs.index.tsx
@@ -1,6 +1,6 @@
import { RunsTab } from "@posthog/ui/features/inbox/components/RunsTab";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/inbox/runs/")({
+export const Route = createFileRoute("/inbox/runs/")({
component: RunsTab,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/inbox/runs.tsx b/products/desktop/packages/ui/src/router/routes/inbox/runs.tsx
similarity index 60%
rename from products/desktop/packages/ui/src/router/routes/code/inbox/runs.tsx
rename to products/desktop/packages/ui/src/router/routes/inbox/runs.tsx
index b9a27b237a9e..2e126e4197e5 100644
--- a/products/desktop/packages/ui/src/router/routes/code/inbox/runs.tsx
+++ b/products/desktop/packages/ui/src/router/routes/inbox/runs.tsx
@@ -1,5 +1,5 @@
import { createFileRoute, Outlet } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/inbox/runs")({
+export const Route = createFileRoute("/inbox/runs")({
component: Outlet,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/loops/$loopId.tsx b/products/desktop/packages/ui/src/router/routes/loops/$loopId.tsx
similarity index 59%
rename from products/desktop/packages/ui/src/router/routes/code/loops/$loopId.tsx
rename to products/desktop/packages/ui/src/router/routes/loops/$loopId.tsx
index 1341d8428cb3..8eb21b69b586 100644
--- a/products/desktop/packages/ui/src/router/routes/code/loops/$loopId.tsx
+++ b/products/desktop/packages/ui/src/router/routes/loops/$loopId.tsx
@@ -1,5 +1,5 @@
import { createFileRoute, Outlet } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/loops/$loopId")({
+export const Route = createFileRoute("/loops/$loopId")({
component: Outlet,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/loops/$loopId/edit.tsx b/products/desktop/packages/ui/src/router/routes/loops/$loopId/edit.tsx
similarity index 73%
rename from products/desktop/packages/ui/src/router/routes/code/loops/$loopId/edit.tsx
rename to products/desktop/packages/ui/src/router/routes/loops/$loopId/edit.tsx
index a0dc897f4562..6d39012d2c1b 100644
--- a/products/desktop/packages/ui/src/router/routes/code/loops/$loopId/edit.tsx
+++ b/products/desktop/packages/ui/src/router/routes/loops/$loopId/edit.tsx
@@ -1,6 +1,6 @@
import { createFileRoute, Navigate } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/loops/$loopId/edit")({
+export const Route = createFileRoute("/loops/$loopId/edit")({
component: EditLoopRoute,
});
@@ -9,7 +9,7 @@ function EditLoopRoute() {
return (
<Navigate
replace
- to="/code/loops/$loopId"
+ to="/loops/$loopId"
params={{ loopId }}
search={{ edit: true }}
/>
diff --git a/products/desktop/packages/ui/src/router/routes/code/loops/$loopId/index.tsx b/products/desktop/packages/ui/src/router/routes/loops/$loopId/index.tsx
similarity index 88%
rename from products/desktop/packages/ui/src/router/routes/code/loops/$loopId/index.tsx
rename to products/desktop/packages/ui/src/router/routes/loops/$loopId/index.tsx
index 90f48f3d80bb..c8d0554e28cd 100644
--- a/products/desktop/packages/ui/src/router/routes/code/loops/$loopId/index.tsx
+++ b/products/desktop/packages/ui/src/router/routes/loops/$loopId/index.tsx
@@ -1,7 +1,7 @@
import { LoopDetailView } from "@posthog/ui/features/loops/components/LoopDetailView";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/loops/$loopId/")({
+export const Route = createFileRoute("/loops/$loopId/")({
component: LoopDetailRoute,
validateSearch: (search: Record<string, unknown>): { edit?: boolean } => ({
edit: search.edit === true || search.edit === "true",
diff --git a/products/desktop/packages/ui/src/router/routes/code/loops/index.tsx b/products/desktop/packages/ui/src/router/routes/loops/index.tsx
similarity index 76%
rename from products/desktop/packages/ui/src/router/routes/code/loops/index.tsx
rename to products/desktop/packages/ui/src/router/routes/loops/index.tsx
index 2058a53ebb06..df87a0c322a7 100644
--- a/products/desktop/packages/ui/src/router/routes/code/loops/index.tsx
+++ b/products/desktop/packages/ui/src/router/routes/loops/index.tsx
@@ -1,6 +1,6 @@
import { LoopsListView } from "@posthog/ui/features/loops/components/LoopsListView";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/loops/")({
+export const Route = createFileRoute("/loops/")({
component: LoopsListView,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/loops/new.tsx b/products/desktop/packages/ui/src/router/routes/loops/new.tsx
similarity index 73%
rename from products/desktop/packages/ui/src/router/routes/code/loops/new.tsx
rename to products/desktop/packages/ui/src/router/routes/loops/new.tsx
index 8d6ea42eee93..ca62ad289cbc 100644
--- a/products/desktop/packages/ui/src/router/routes/code/loops/new.tsx
+++ b/products/desktop/packages/ui/src/router/routes/loops/new.tsx
@@ -1,6 +1,6 @@
import { LoopForm } from "@posthog/ui/features/loops/components/LoopForm";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/loops/new")({
+export const Route = createFileRoute("/loops/new")({
component: LoopForm,
});
diff --git a/products/desktop/packages/ui/src/router/routes/code/pr.tsx b/products/desktop/packages/ui/src/router/routes/pr.tsx
similarity index 89%
rename from products/desktop/packages/ui/src/router/routes/code/pr.tsx
rename to products/desktop/packages/ui/src/router/routes/pr.tsx
index 1a361a29e4d5..b3cf4b93d5f3 100644
--- a/products/desktop/packages/ui/src/router/routes/code/pr.tsx
+++ b/products/desktop/packages/ui/src/router/routes/pr.tsx
@@ -1,7 +1,7 @@
import { PullRequestView } from "@posthog/ui/features/pr-review/PullRequestView";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/pr")({
+export const Route = createFileRoute("/pr")({
component: PullRequestRoute,
validateSearch: (search: Record<string, unknown>): { prUrl: string } => ({
prUrl: typeof search.prUrl === "string" ? search.prUrl : "",
diff --git a/products/desktop/packages/ui/src/router/routes/code/tasks/$taskId.tsx b/products/desktop/packages/ui/src/router/routes/tasks/$taskId.tsx
similarity index 96%
rename from products/desktop/packages/ui/src/router/routes/code/tasks/$taskId.tsx
rename to products/desktop/packages/ui/src/router/routes/tasks/$taskId.tsx
index dcea2e4bd554..3d71e9227126 100644
--- a/products/desktop/packages/ui/src/router/routes/code/tasks/$taskId.tsx
+++ b/products/desktop/packages/ui/src/router/routes/tasks/$taskId.tsx
@@ -12,7 +12,7 @@ import { yieldToPaint } from "@posthog/ui/router/yieldToPaint";
import { useQuery } from "@tanstack/react-query";
import { createFileRoute, Navigate } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/tasks/$taskId")({
+export const Route = createFileRoute("/tasks/$taskId")({
component: TaskDetailRoute,
pendingComponent: TaskDetailSkeleton,
// Cache-only: return whatever is already cached (the detail entry seeded by
@@ -58,7 +58,7 @@ function TaskDetailRoute() {
// comment), so never redirect away from a usable task.
const needsFetch = !initialTask;
if (needsFetch && (isError || (isSuccess && !fetched))) {
- return <Navigate replace to="/code" />;
+ return <Navigate replace to="/new" />;
}
if (!task) {
diff --git a/products/desktop/packages/ui/src/router/routes/code/tasks/pending.$key.tsx b/products/desktop/packages/ui/src/router/routes/tasks/pending.$key.tsx
similarity index 82%
rename from products/desktop/packages/ui/src/router/routes/code/tasks/pending.$key.tsx
rename to products/desktop/packages/ui/src/router/routes/tasks/pending.$key.tsx
index 00ff210c8f0b..adcc240ba9da 100644
--- a/products/desktop/packages/ui/src/router/routes/code/tasks/pending.$key.tsx
+++ b/products/desktop/packages/ui/src/router/routes/tasks/pending.$key.tsx
@@ -1,7 +1,7 @@
import { TaskPendingView } from "@posthog/ui/features/task-detail/components/TaskPendingView";
import { createFileRoute } from "@tanstack/react-router";
-export const Route = createFileRoute("/code/tasks/pending/$key")({
+export const Route = createFileRoute("/tasks/pending/$key")({
component: TaskPendingRoute,
});
diff --git a/products/desktop/packages/ui/src/router/routes/website.$.tsx b/products/desktop/packages/ui/src/router/routes/website.$.tsx
new file mode 100644
index 000000000000..ac6e3e03f9d8
--- /dev/null
+++ b/products/desktop/packages/ui/src/router/routes/website.$.tsx
@@ -0,0 +1,9 @@
+import { redirectFromLegacyPath } from "@posthog/ui/router/legacyPaths";
+import { createFileRoute } from "@tanstack/react-router";
+
+// The spaces and the pages beside them lost their `/website` prefix when the
+// routes were flattened. Old links still arrive from deep links, notifications
+// and restored history, so they get sent on to where the page lives now.
+export const Route = createFileRoute("/website/$")({
+ beforeLoad: ({ location }) => redirectFromLegacyPath(location),
+});
diff --git a/products/desktop/packages/ui/src/router/routes/website.index.tsx b/products/desktop/packages/ui/src/router/routes/website.index.tsx
new file mode 100644
index 000000000000..46884d497b1b
--- /dev/null
+++ b/products/desktop/packages/ui/src/router/routes/website.index.tsx
@@ -0,0 +1,7 @@
+import { redirectFromLegacyPath } from "@posthog/ui/router/legacyPaths";
+import { createFileRoute } from "@tanstack/react-router";
+
+// `/website` itself, which is now the spaces index. See website.$.tsx.
+export const Route = createFileRoute("/website/")({
+ beforeLoad: ({ location }) => redirectFromLegacyPath(location),
+});
diff --git a/products/desktop/packages/ui/src/router/routes/website.tsx b/products/desktop/packages/ui/src/router/routes/website.tsx
deleted file mode 100644
index e6e0bce7ac97..000000000000
--- a/products/desktop/packages/ui/src/router/routes/website.tsx
+++ /dev/null
@@ -1,6 +0,0 @@
-import { WebsiteLayout } from "@posthog/ui/features/canvas/components/WebsiteLayout";
-import { createFileRoute } from "@tanstack/react-router";
-
-export const Route = createFileRoute("/website")({
- component: WebsiteLayout,
-});
diff --git a/products/desktop/packages/ui/src/router/routes/website/$channelId/new.tsx b/products/desktop/packages/ui/src/router/routes/website/$channelId/new.tsx
deleted file mode 100644
index b2cd673c0ef0..000000000000
--- a/products/desktop/packages/ui/src/router/routes/website/$channelId/new.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import { WebsiteNewTask } from "@posthog/ui/features/canvas/components/WebsiteNewTask";
-import { createFileRoute } from "@tanstack/react-router";
-
-export const Route = createFileRoute("/website/$channelId/new")({
- component: NewTaskRoute,
-});
-
-function NewTaskRoute() {
- const { channelId } = Route.useParams();
- return <WebsiteNewTask channelId={channelId} />;
-}
diff --git a/products/desktop/packages/ui/src/router/routes/website/command-center.tsx b/products/desktop/packages/ui/src/router/routes/website/command-center.tsx
deleted file mode 100644
index 2e3924e040fd..000000000000
--- a/products/desktop/packages/ui/src/router/routes/website/command-center.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import { CommandCenterView } from "@posthog/ui/features/command-center/components/CommandCenterView";
-import { createFileRoute } from "@tanstack/react-router";
-
-// Channels-space mirror of /command-center. Renders the same shared
-// CommandCenterView so the page stays single-source; only the route entry is
-// duplicated so navigating here keeps the channels chrome (rail + channel
-// sidebar).
-export const Route = createFileRoute("/website/command-center")({
- component: CommandCenterView,
-});
diff --git a/products/desktop/packages/ui/src/router/routes/website/home.tsx b/products/desktop/packages/ui/src/router/routes/website/home.tsx
deleted file mode 100644
index 3e2d681619ab..000000000000
--- a/products/desktop/packages/ui/src/router/routes/website/home.tsx
+++ /dev/null
@@ -1,6 +0,0 @@
-import { WebsiteHome } from "@posthog/ui/features/canvas/grid/WebsiteHome";
-import { createFileRoute } from "@tanstack/react-router";
-
-export const Route = createFileRoute("/website/home")({
- component: WebsiteHome,
-});
diff --git a/products/desktop/packages/ui/src/router/routes/website/index.tsx b/products/desktop/packages/ui/src/router/routes/website/index.tsx
deleted file mode 100644
index 980fe3ccac84..000000000000
--- a/products/desktop/packages/ui/src/router/routes/website/index.tsx
+++ /dev/null
@@ -1,6 +0,0 @@
-import { WebsiteChannelsIndex } from "@posthog/ui/features/canvas/components/WebsiteChannelsIndex";
-import { createFileRoute } from "@tanstack/react-router";
-
-export const Route = createFileRoute("/website/")({
- component: WebsiteChannelsIndex,
-});
diff --git a/products/desktop/packages/ui/src/router/routes/website/mcp-servers.tsx b/products/desktop/packages/ui/src/router/routes/website/mcp-servers.tsx
deleted file mode 100644
index ac8cccef1948..000000000000
--- a/products/desktop/packages/ui/src/router/routes/website/mcp-servers.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import { createFileRoute, redirect } from "@tanstack/react-router";
-
-export const Route = createFileRoute("/website/mcp-servers")({
- beforeLoad: () => {
- throw redirect({
- to: "/settings/$category",
- params: { category: "mcp-servers" },
- replace: true,
- });
- },
-});
diff --git a/products/desktop/packages/ui/src/router/routes/website/skills.tsx b/products/desktop/packages/ui/src/router/routes/website/skills.tsx
deleted file mode 100644
index c01c82aa6f44..000000000000
--- a/products/desktop/packages/ui/src/router/routes/website/skills.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import { createFileRoute, redirect } from "@tanstack/react-router";
-
-export const Route = createFileRoute("/website/skills")({
- beforeLoad: () => {
- throw redirect({
- to: "/settings/$category",
- params: { category: "skills" },
- replace: true,
- });
- },
-});
diff --git a/products/desktop/packages/ui/src/router/useAppView.ts b/products/desktop/packages/ui/src/router/useAppView.ts
index 8452e7de6e1f..eba00b87288c 100644
--- a/products/desktop/packages/ui/src/router/useAppView.ts
+++ b/products/desktop/packages/ui/src/router/useAppView.ts
@@ -37,69 +37,64 @@ export interface AppView {
reportAssociation?: TaskInputReportAssociation;
}
-type Match = { routeId: string; params: Record<string, string | undefined> };
+type Match = { fullPath: string; params: Record<string, string | undefined> };
function deriveFromMatches(matches: Match[]): AppView {
const last = matches[matches.length - 1];
if (!last) return { type: "task-input" };
- switch (last.routeId) {
- // Both the /code task detail and the channels-space task detail render the
- // same task-detail view, so consumers (active-state highlighting, archive's
- // navigate-away-if-active check) treat them identically.
- case "/code/tasks/$taskId":
- case "/website/$channelId/tasks/$taskId": {
+ switch (last.fullPath) {
+ // The unscoped task detail and the space-scoped one render the same view, so
+ // consumers (active-state highlighting, archive's navigate-away-if-active
+ // check) treat them identically.
+ case "/tasks/$taskId":
+ case "/spaces/$channelId/tasks/$taskId": {
const taskId = last.params.taskId;
if (!taskId) return { type: "task-input" };
// Intentionally no `data` snapshot: consumers read live task state via
// their own query hooks (e.g. useTasks) keyed on `taskId`.
return { type: "task-detail", taskId };
}
- case "/code/tasks/pending/$key":
+ case "/tasks/pending/$key":
return { type: "task-pending", pendingTaskKey: last.params.key };
- // Channels-space new-task screen — same task-input view (and prefill merge
- // below) as the /code/ index, so the New task item highlights identically.
- case "/website/new":
+ case "/new":
return { type: "task-input" };
case "/folders/$folderId":
return { type: "folder-settings", folderId: last.params.folderId };
- case "/website/activity":
+ case "/activity":
return { type: "activity" };
- case "/website/home":
+ case "/":
return { type: "home" };
- case "/code/inbox":
+ case "/inbox":
return { type: "inbox" };
- case "/code/agents":
+ case "/agents":
return { type: "agents" };
- case "/code/loops":
+ case "/loops":
return { type: "loops" };
- case "/code/archived":
+ case "/archived":
return { type: "archived" };
case "/command-center":
- case "/website/command-center":
return { type: "command-center" };
case "/skills":
- case "/website/skills":
return { type: "skills" };
case "/mcp-servers":
- case "/website/mcp-servers":
return { type: "mcp-servers" };
case "/settings/$category":
case "/settings/":
return { type: "settings" };
default:
- if (last.routeId.startsWith("/code/inbox")) {
+ if (last.fullPath.startsWith("/inbox")) {
return { type: "inbox" };
}
- // /code/agents is now an Outlet layout; the view lives at the index
- // child (/code/agents/) and scout detail routes nest deeper, so match
- // the whole subtree rather than only the bare layout route.
- if (last.routeId.startsWith("/code/agents")) {
+ // /agents is an Outlet layout; the view lives at the index child and
+ // scout detail routes nest deeper, so match the whole subtree rather
+ // than only the bare layout route.
+ if (last.fullPath.startsWith("/agents")) {
return { type: "agents" };
}
- // /code/loops covers the list, create form, and the per-loop detail /
- // edit subtree ($loopId is an Outlet layout), so match the prefix.
- if (last.routeId.startsWith("/code/loops")) {
+ // /loops covers the list, create form, and the per-loop detail / edit
+ // subtree ($loopId is an Outlet layout), so match the prefix.
+ if (last.fullPath.startsWith("/loops")) {
return { type: "loops" };
}
return { type: "task-input" };
@@ -123,7 +118,7 @@ export function useAppView(): AppView {
const m = s.matches[s.matches.length - 1];
return m
? {
- routeId: m.routeId,
+ fullPath: m.fullPath,
params: m.params as Record<string, string | undefined>,
}
: null;
@@ -131,7 +126,7 @@ export function useAppView(): AppView {
});
const prefill = useTaskInputPrefillStore((s) => s.prefill);
- const routeId = last?.routeId ?? "";
+ const fullPath = last?.fullPath ?? "";
const taskId = last?.params.taskId;
const pendingKey = last?.params.key;
const folderId = last?.params.folderId;
@@ -139,8 +134,8 @@ export function useAppView(): AppView {
return useMemo(() => {
// Rebuild the match from primitives so the memo depends only on stable
// values — the `last` selector returns a fresh object every render.
- const match = routeId
- ? { routeId, params: { taskId, key: pendingKey, folderId } }
+ const match = fullPath
+ ? { fullPath, params: { taskId, key: pendingKey, folderId } }
: null;
const view = deriveFromMatches(match ? [match] : []);
@@ -160,7 +155,7 @@ export function useAppView(): AppView {
};
}
return view;
- }, [routeId, taskId, pendingKey, folderId, prefill]);
+ }, [fullPath, taskId, pendingKey, folderId, prefill]);
}
/**
@@ -168,6 +163,6 @@ export function useAppView(): AppView {
* Components should prefer `useAppView()` for proper subscription.
*/
export function getAppViewSnapshot(): AppView {
- const matches = getCurrentMatches() as unknown as Match[];
+ const matches = getCurrentMatches() as Match[];
return deriveFromMatches(matches);
}
diff --git a/products/desktop/packages/ui/src/router/useOpenTask.test.ts b/products/desktop/packages/ui/src/router/useOpenTask.test.ts
index 941bc6745d4a..beaaea1b2bb8 100644
--- a/products/desktop/packages/ui/src/router/useOpenTask.test.ts
+++ b/products/desktop/packages/ui/src/router/useOpenTask.test.ts
@@ -1,14 +1,12 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
const navigateToChannelNewTask = vi.fn();
-const navigateToWebsiteNew = vi.fn();
-const navigateToCode = vi.fn();
+const navigateToNewTask = vi.fn();
vi.mock("./navigationBridge", () => ({
navigateToChannelNewTask: (...args: unknown[]) =>
navigateToChannelNewTask(...args),
- navigateToWebsiteNew: () => navigateToWebsiteNew(),
- navigateToCode: () => navigateToCode(),
+ navigateToNewTask: () => navigateToNewTask(),
navigateToChannelTask: vi.fn(),
navigateToTaskDetail: vi.fn(),
navigateToFolderSettings: vi.fn(),
@@ -38,15 +36,9 @@ describe("openTaskInput channel scoping", () => {
// Without the channels layout nothing sets a current channel, so creates must
// land where they always did rather than being pulled into a channel.
- it("routes to Code when no channel is current", () => {
+ it("opens the unscoped new task when no channel is current", () => {
openTaskInput();
- expect(navigateToCode).toHaveBeenCalledTimes(1);
- expect(navigateToChannelNewTask).not.toHaveBeenCalled();
- });
-
- it("still honours an explicit website space when no channel is current", () => {
- openTaskInput({ space: "website" });
- expect(navigateToWebsiteNew).toHaveBeenCalledTimes(1);
+ expect(navigateToNewTask).toHaveBeenCalledTimes(1);
expect(navigateToChannelNewTask).not.toHaveBeenCalled();
});
@@ -54,7 +46,7 @@ describe("openTaskInput channel scoping", () => {
useCurrentChannelStore.setState({ currentChannelId: "chan-1" });
openTaskInput();
expect(navigateToChannelNewTask).toHaveBeenCalledWith("chan-1");
- expect(navigateToCode).not.toHaveBeenCalled();
+ expect(navigateToNewTask).not.toHaveBeenCalled();
});
it("carries prefill into the channel route", () => {
@@ -71,22 +63,22 @@ describe("openTaskInput channel scoping", () => {
expect(navigateToChannelNewTask).toHaveBeenCalledWith("chan-9");
});
- // useArchiveTask and friends pass space: "code" deliberately; a scoped
- // channel silently hijacking that is how a create lands in the wrong place.
- it("honours an explicit Code space even while a channel is scoped", () => {
+ // useArchiveTask and friends pass `unscoped` deliberately; a scoped channel
+ // silently hijacking that is how a create lands in the wrong place.
+ it("files nowhere when the caller asks, even while a channel is scoped", () => {
useCurrentChannelStore.setState({ currentChannelId: "chan-1" });
- openTaskInput({ space: "code" });
- expect(navigateToCode).toHaveBeenCalledTimes(1);
+ openTaskInput({ unscoped: true });
+ expect(navigateToNewTask).toHaveBeenCalledTimes(1);
expect(navigateToChannelNewTask).not.toHaveBeenCalled();
});
// The auth side effects call resetCurrentChannel() before openTaskInput() so
// a project switch can't file the next task into the old project's channel.
- it("routes to Code again once the channel is reset", () => {
+ it("opens the unscoped new task again once the channel is reset", () => {
useCurrentChannelStore.setState({ currentChannelId: "chan-1" });
resetCurrentChannel();
openTaskInput();
- expect(navigateToCode).toHaveBeenCalledTimes(1);
+ expect(navigateToNewTask).toHaveBeenCalledTimes(1);
expect(navigateToChannelNewTask).not.toHaveBeenCalled();
});
diff --git a/products/desktop/packages/ui/src/router/useOpenTask.ts b/products/desktop/packages/ui/src/router/useOpenTask.ts
index a43f1e22d56c..723eb2528684 100644
--- a/products/desktop/packages/ui/src/router/useOpenTask.ts
+++ b/products/desktop/packages/ui/src/router/useOpenTask.ts
@@ -23,8 +23,8 @@ import * as nav from "./navigationBridge";
* stale folder, we redirect to folder settings.
*
* When `opts.channelId` is provided (the task is filed to a Project Bluebird
- * channel), navigation targets the channel-organized view under /website,
- * keeping the channels chrome; otherwise it targets /code/tasks/$taskId. Every
+ * channel), navigation targets the channel-organized view under /spaces,
+ * keeping the channels chrome; otherwise it targets /tasks/$taskId. Every
* other side effect is identical — channel tasks still need workspace
* provisioning so TaskDetail resolves a cwd.
*
@@ -80,9 +80,8 @@ export interface TaskInputNavigationOptions {
*/
folderRunEnvironment?: "local" | "cloud";
reportAssociation?: { reportId: string; title: string };
- // Which space's new-task screen to open. Both render the same TaskInput; the
- // channels variant keeps the channels chrome instead of switching to Code.
- space?: "code" | "website";
+ /** Ignore whichever space is scoped and file the task nowhere. */
+ unscoped?: boolean;
/**
* Create inside this channel. Callers that already know the channel should
* say so rather than relying on the sidebar's scope agreeing with them — and
@@ -137,16 +136,11 @@ export function openTaskInput(
// of channel scoping; otherwise the scoped channel decides.
const channelId =
options.channelId ??
- (options.space === "code"
+ (options.unscoped
? null
: useCurrentChannelStore.getState().currentChannelId);
- if (channelId) {
- nav.navigateToChannelNewTask(channelId);
- } else if (options.space === "website") {
- nav.navigateToWebsiteNew();
- } else {
- nav.navigateToCode();
- }
+ if (channelId) nav.navigateToChannelNewTask(channelId);
+ else nav.navigateToNewTask();
}
export function useOpenTaskInput(): typeof openTaskInput {
diff --git a/products/desktop/packages/ui/src/shell/App.tsx b/products/desktop/packages/ui/src/shell/App.tsx
index 261db483831d..a55ae27e11d9 100644
--- a/products/desktop/packages/ui/src/shell/App.tsx
+++ b/products/desktop/packages/ui/src/shell/App.tsx
@@ -14,10 +14,7 @@ import { ScopeReauthPrompt } from "@posthog/ui/features/auth/components/ScopeRea
import { useAuthSession } from "@posthog/ui/features/auth/useAuthSession";
import { useIsOrgAdmin } from "@posthog/ui/features/auth/useOrgRole";
import { CanvasGenerationToaster } from "@posthog/ui/features/canvas/freeform/useCanvasGenerationToasts";
-import {
- keepListForRoute,
- showChannelList,
-} from "@posthog/ui/features/canvas/stores/channelPaneStore";
+import { showChannelList } from "@posthog/ui/features/canvas/stores/channelPaneStore";
import { useSpaceTreeStore } from "@posthog/ui/features/canvas/stores/spaceTreeStore";
import { AddDirectoryDialog } from "@posthog/ui/features/folder-picker/AddDirectoryDialog";
import { ErrorDetailsDialog } from "@posthog/ui/features/notifications/ErrorDetailsDialog";
@@ -122,8 +119,7 @@ function App({ devToolbar }: AppProps) {
authenticatedClient,
);
if (firstRun) {
- showChannelList();
- keepListForRoute(firstRun.generalChannelId);
+ showChannelList(firstRun.generalChannelId);
useSpaceTreeStore.getState().expandSpace(firstRun.generalChannelId);
}
router.history.replace(href);
diff --git a/products/desktop/packages/ui/src/shell/ContentHeader.tsx b/products/desktop/packages/ui/src/shell/ContentHeader.tsx
index 741a785734b0..54356f30d435 100644
--- a/products/desktop/packages/ui/src/shell/ContentHeader.tsx
+++ b/products/desktop/packages/ui/src/shell/ContentHeader.tsx
@@ -14,7 +14,7 @@ import { Flex } from "@radix-ui/themes";
// task detail, and the loop scenes (list / detail / form), which live outside
// the space routes but can belong to a space. Every other page drops it (the
// title bar search carries wayfinding instead). The /website (Channels) space
-// keeps its own header (WebsiteLayout), so it's unaffected — this is mounted
+// keeps its own header (ShellLayout), so it's unaffected — this is mounted
// only outside it.
//
// A loop with no space pushes null, so the row collapses for it too: what a
diff --git a/products/desktop/packages/ui/src/shell/posthogAnalyticsImpl.ts b/products/desktop/packages/ui/src/shell/posthogAnalyticsImpl.ts
index b628bd20ff56..8b58b9872be1 100644
--- a/products/desktop/packages/ui/src/shell/posthogAnalyticsImpl.ts
+++ b/products/desktop/packages/ui/src/shell/posthogAnalyticsImpl.ts
@@ -65,6 +65,10 @@ type PendingFlagListener = {
// Subscribers added before initializePostHog runs.
const pendingFlagListeners = new Set<PendingFlagListener>();
+// A build with no project key: flags keep their defaults and no remote answer
+// is coming, which counts as resolved for anything waiting on them.
+let flagsUnavailable = false;
+
const SESSION_IDLE_TIMEOUT_SECONDS = 36_000;
export function initializePostHog(sessionId?: string) {
@@ -74,7 +78,16 @@ export function initializePostHog(sessionId?: string) {
const uiHost =
import.meta.env.VITE_POSTHOG_UI_HOST || "https://us.i.posthog.com";
- if (!apiKey || isInitialized) {
+ if (!apiKey) {
+ // Settle the waiters instead of leaving them pending forever — a gate that
+ // waits for "flags resolved" would never open in a keyless build.
+ flagsUnavailable = true;
+ for (const listener of pendingFlagListeners) listener.callback();
+ pendingFlagListeners.clear();
+ return;
+ }
+
+ if (isInitialized) {
return;
}
@@ -386,6 +399,11 @@ export function onFeatureFlagsLoaded(callback: () => void): () => void {
return posthog.onFeatureFlags(callback);
}
+ if (flagsUnavailable) {
+ callback();
+ return () => {};
+ }
+
const listener: PendingFlagListener = { callback, unsubscribe: null };
pendingFlagListeners.add(listener);
return () => {
diff --git a/products/desktop/packages/ui/src/shell/startupLocation.test.ts b/products/desktop/packages/ui/src/shell/startupLocation.test.ts
index ec89a69ae1e1..d45428f4e4c4 100644
--- a/products/desktop/packages/ui/src/shell/startupLocation.test.ts
+++ b/products/desktop/packages/ui/src/shell/startupLocation.test.ts
@@ -25,12 +25,22 @@ const general = {
describe("startup location", () => {
afterEach(() => vi.restoreAllMocks());
+ it("reopens a location saved before the routes were flattened", async () => {
+ vi.spyOn(stateStorage, "getItem").mockResolvedValue("/website/eng/loops");
+ const client = { provisionDefaultTaskChannels: vi.fn() };
+
+ await expect(resolveStartupLocation("project", client)).resolves.toEqual({
+ href: "/spaces/eng/loops",
+ firstRun: null,
+ });
+ });
+
it("restores the exact last location without provisioning", async () => {
- vi.spyOn(stateStorage, "getItem").mockResolvedValue("/code");
+ vi.spyOn(stateStorage, "getItem").mockResolvedValue("/new");
const client = { provisionDefaultTaskChannels: vi.fn() };
await expect(resolveStartupLocation("project", client)).resolves.toEqual({
- href: "/code",
+ href: "/new",
firstRun: null,
});
expect(client.provisionDefaultTaskChannels).not.toHaveBeenCalled();
@@ -47,7 +57,7 @@ describe("startup location", () => {
};
await expect(resolveStartupLocation("project", client)).resolves.toEqual({
- href: "/website/general-id",
+ href: "/spaces/general-id",
firstRun: { generalChannelId: "general-id" },
});
});
@@ -64,7 +74,7 @@ describe("startup location", () => {
};
await expect(resolveStartupLocation("project", client)).resolves.toEqual({
- href: "/website/general-id",
+ href: "/spaces/general-id",
firstRun: null,
});
});
@@ -73,7 +83,7 @@ describe("startup location", () => {
// The old key is the only trace of an install that predates the default
// spaces, and it still has to land where the user left off.
vi.spyOn(stateStorage, "getItem").mockImplementation(async (key) =>
- key.includes(":v2:") ? null : "/website/old-space",
+ key.includes(":v2:") ? null : "/spaces/old-space",
);
const removeItem = vi
.spyOn(stateStorage, "removeItem")
@@ -87,7 +97,7 @@ describe("startup location", () => {
};
await expect(resolveStartupLocation("project", client)).resolves.toEqual({
- href: "/website/old-space",
+ href: "/spaces/old-space",
firstRun: null,
});
expect(client.provisionDefaultTaskChannels).toHaveBeenCalledOnce();
@@ -97,7 +107,7 @@ describe("startup location", () => {
it("opens anyway when provisioning is unavailable", async () => {
// A server that cannot provision yet must not cost someone their location.
vi.spyOn(stateStorage, "getItem").mockImplementation(async (key) =>
- key.includes(":v2:") ? null : "/website/old-space",
+ key.includes(":v2:") ? null : "/spaces/old-space",
);
const removeItem = vi
.spyOn(stateStorage, "removeItem")
@@ -107,7 +117,7 @@ describe("startup location", () => {
};
await expect(resolveStartupLocation("project", client)).resolves.toEqual({
- href: "/website/old-space",
+ href: "/spaces/old-space",
firstRun: null,
});
expect(removeItem).not.toHaveBeenCalled();
@@ -135,7 +145,7 @@ describe("startup location", () => {
);
await expect(resolveStartupLocation("project", client)).resolves.toEqual({
- href: "/website/general-id",
+ href: "/spaces/general-id",
firstRun: null,
});
expect(client.provisionDefaultTaskChannels).toHaveBeenCalledOnce();
@@ -154,7 +164,7 @@ describe("startup location", () => {
);
await expect(resolveStartupLocation("project", client)).resolves.toEqual({
- href: "/website/general-id",
+ href: "/spaces/general-id",
firstRun: { generalChannelId: "general-id" },
});
expect(client.provisionDefaultTaskChannels).not.toHaveBeenCalled();
diff --git a/products/desktop/packages/ui/src/shell/startupLocation.ts b/products/desktop/packages/ui/src/shell/startupLocation.ts
index b20abd7c2ccc..d69063f4fdde 100644
--- a/products/desktop/packages/ui/src/shell/startupLocation.ts
+++ b/products/desktop/packages/ui/src/shell/startupLocation.ts
@@ -1,6 +1,7 @@
import type { PostHogAPIClient } from "@posthog/api-client/posthog-client";
import { isGeneralChannel } from "@posthog/core/canvas/channelName";
import type { ProvisionedTaskChannels } from "@posthog/shared/domain-types";
+import { rewriteLegacyHref } from "@posthog/ui/router/legacyPaths";
import { stateStorage } from "@posthog/ui/shell/rendererStorage";
type StartupLocationClient = Pick<
@@ -63,7 +64,7 @@ export async function resolveStartupLocation(
client: StartupLocationClient,
): Promise<StartupLocation> {
const saved = await stateStorage.getItem(storageKey(identity));
- if (saved) return { href: saved, firstRun: null };
+ if (saved) return { href: rewriteLegacyHref(saved), firstRun: null };
const legacy = await stateStorage.getItem(legacyStorageKey(identity));
if (legacy) {
@@ -73,7 +74,7 @@ export async function resolveStartupLocation(
await client.provisionDefaultTaskChannels();
void stateStorage.removeItem(legacyStorageKey(identity));
} catch {}
- return { href: legacy, firstRun: null };
+ return { href: rewriteLegacyHref(legacy), firstRun: null };
}
const provisioned = await consumePrimedProvision(identity, client);
@@ -87,7 +88,7 @@ export async function resolveStartupLocation(
const isFirstRun =
provisioned.personal_created || provisioned.general_created;
return {
- href: `/website/${general.id}`,
+ href: `/spaces/${general.id}`,
firstRun: isFirstRun ? { generalChannelId: general.id } : null,
};
}