moving
Some checks failed
Installer Smoke / installer-smoke (push) Has been cancelled

This commit is contained in:
Oleg Maslov
2026-09-02 10:10:29 +02:00
commit 0c3e2ead3b
3841 changed files with 970576 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
/** P1a route wrapper — `/agents` → AgentsApp (props from Desktop.tsx:434). */
import AgentsApp from '@/components/os/apps/AgentsApp';
import SurfaceBoundary from './SurfaceBoundary';
import { useShell } from '@/providers/ShellContext';
const AgentsRoute = () => {
const { workspaces, activeWorkspaceId } = useShell();
return (
<SurfaceBoundary appName="Agents">
<AgentsApp workspaces={workspaces} activeWorkspaceId={activeWorkspaceId} />
</SurfaceBoundary>
);
};
export default AgentsRoute;

View File

@@ -0,0 +1,16 @@
/**
* P1a route wrapper — `/approvals` → ApprovalsApp (bare mount, Desktop.tsx:462).
* D5: route registered for everyone; the NAV entry carries minBillingTier
* 'TEAMS' exactly as the dock entry does (dock-tiers.ts) — tier-hidden, not
* stripped (§1.1).
*/
import ApprovalsApp from '@/components/os/apps/ApprovalsApp';
import SurfaceBoundary from './SurfaceBoundary';
const ApprovalsRoute = () => (
<SurfaceBoundary appName="Approvals">
<ApprovalsApp />
</SurfaceBoundary>
);
export default ApprovalsRoute;

View File

@@ -0,0 +1,22 @@
/**
* P1a route wrapper — `/artifacts` → ArtifactCenterApp (§1.1: wrapper passes
* `?workspace ?? activeWorkspaceId`; prop today Desktop.tsx:435).
*/
import { useSearchParams } from 'react-router-dom';
import ArtifactCenterApp from '@/components/os/apps/ArtifactCenterApp';
import SurfaceBoundary from './SurfaceBoundary';
import { useShell } from '@/providers/ShellContext';
const ArtifactsRoute = () => {
const [searchParams] = useSearchParams();
const { workspaces, activeWorkspaceId } = useShell();
const wsId = searchParams.get('workspace') ?? activeWorkspaceId ?? undefined;
const ws = workspaces.find(w => w.id === wsId);
return (
<SurfaceBoundary appName="Library">
<ArtifactCenterApp activeWorkspaceId={wsId} workspaceName={ws?.name} />
</SurfaceBoundary>
);
};
export default ArtifactsRoute;

View File

@@ -0,0 +1,20 @@
/** PR7b — `/auth` pre-shell route.
*
* Sibling route OUTSIDE the `/`→AppShell subtree (App.tsx), so it renders with no
* sidebar / StatusBar / boot gate — just the warm split layout. The form content is
* gated on Clerk config (D2(b)): with explicit enablement plus a valid key, the themed
* Clerk <SignIn/>/<SignUp/> (B2); otherwise, the honest accountless local-first state
* (B1). The gate matches WaggleClerkProvider's, so ClerkAuthForm only renders when a
* ClerkProvider is actually mounted above it. */
import AuthScreen from '@/components/os/auth/AuthScreen';
import AccountlessNotice from '@/components/os/auth/AccountlessNotice';
import ClerkAuthForm from '@/components/os/auth/ClerkAuthForm';
import { clerkPublishableKey } from '@/lib/clerk';
const AuthRoute = () => (
<AuthScreen>
{clerkPublishableKey() ? <ClerkAuthForm /> : <AccountlessNotice />}
</AuthScreen>
);
export default AuthRoute;

View File

@@ -0,0 +1,36 @@
/**
* P1a route wrapper — `/automations` → AutomationCenterApp (bare mount,
* Desktop.tsx:452). `?tab=logs&automationId=<id>` replaces the Journey-16
* CustomEvent payload (§1.1): the params are stashed through the existing
* app-deeplink channel BEFORE the app's mount effect runs, so its
* consumeDeepLink consumer (AutomationCenterApp.tsx:104-114) preselects the
* Logs tab without any component edit — typed URLs and the §2.3 shim share
* one mechanism.
*/
import { useRef } from 'react';
import { useSearchParams } from 'react-router-dom';
import AutomationCenterApp from '@/components/os/apps/AutomationCenterApp';
import SurfaceBoundary from './SurfaceBoundary';
import { stashDeepLink } from '@/lib/app-deeplink';
const AutomationsRoute = () => {
const [searchParams] = useSearchParams();
// Stash once per mount, during render, so it precedes the child's mount
// effect (the ref keeps StrictMode double-render from double-stashing).
const stashedRef = useRef(false);
if (!stashedRef.current) {
stashedRef.current = true;
const tab = searchParams.get('tab') ?? undefined;
const automationId = searchParams.get('automationId') ?? undefined;
if (tab || automationId) {
stashDeepLink({ appId: 'scheduled-jobs', tab, automationId });
}
}
return (
<SurfaceBoundary appName="Automation Center">
<AutomationCenterApp />
</SurfaceBoundary>
);
};
export default AutomationsRoute;

View File

@@ -0,0 +1,11 @@
/** PR6a route wrapper — `/benchmarks` → BenchmarkApp (static, ⌘K-only surface). */
import BenchmarkApp from '@/components/os/apps/BenchmarkApp';
import SurfaceBoundary from './SurfaceBoundary';
const BenchmarkRoute = () => (
<SurfaceBoundary appName="Benchmarks">
<BenchmarkApp />
</SurfaceBoundary>
);
export default BenchmarkRoute;

View File

@@ -0,0 +1,15 @@
/** P1a route wrapper — `/connectors` → ConnectorsApp (props from Desktop.tsx:410). */
import ConnectorsApp from '@/components/os/apps/ConnectorsApp';
import SurfaceBoundary from './SurfaceBoundary';
import { useShell } from '@/providers/ShellContext';
const ConnectorsRoute = () => {
const { activeWorkspace } = useShell();
return (
<SurfaceBoundary appName="Connector Hub">
<ConnectorsApp personaId={activeWorkspace?.persona} />
</SurfaceBoundary>
);
};
export default ConnectorsRoute;

View File

@@ -0,0 +1,24 @@
/**
* P1a route wrapper — `/settings/events` → EventsApp (§5.1: wrapper hosts the
* useEvents bundle, relocated from Desktop.tsx:121; props + onAbort verbatim
* from Desktop.tsx:424-429).
*/
import EventsApp from '@/components/os/apps/EventsApp';
import SurfaceBoundary from './SurfaceBoundary';
import { useShell } from '@/providers/ShellContext';
import { useEvents } from '@/hooks/useEvents';
import { adapter } from '@/lib/adapter';
const EventsRoute = () => {
const { activeWorkspaceId } = useShell();
const events = useEvents(activeWorkspaceId);
return (
<SurfaceBoundary appName="Events">
<EventsApp steps={events.steps} autoScroll={events.autoScroll} onToggleAutoScroll={events.toggleAutoScroll}
filter={events.filter} onFilterChange={events.setFilter} error={events.error}
onAbort={() => { if (activeWorkspaceId) adapter.abortAgent(activeWorkspaceId).catch(() => {}); }} />
</SurfaceBoundary>
);
};
export default EventsRoute;

View File

@@ -0,0 +1,38 @@
/**
* P1a route wrapper — `/files` → StorageAndFilesApp (§1.1: `?workspace=<id>`
* replaces the Phase-B.1 `filesViewWorkspaceId` local state plumbing,
* Desktop.tsx:211,436-451; props otherwise verbatim).
*
* PR6b/B2 (screen 07): the route now renders the A/B `StorageAndFilesApp`
* wrapper — Variation A ("Where it lives") + Variation B (the existing
* FilesAppTabs browser). All previous FilesAppTabs props pass through B
* verbatim; the resolved workspace record additionally feeds Variation A.
*/
import { useSearchParams } from 'react-router-dom';
import StorageAndFilesApp from '@/components/os/apps/StorageAndFilesApp';
import SurfaceBoundary from './SurfaceBoundary';
import { useShell } from '@/providers/ShellContext';
const FilesRoute = () => {
const [searchParams, setSearchParams] = useSearchParams();
const { workspaces, activeWorkspaceId, setContextRailTarget } = useShell();
// Prefer the URL-chosen workspace, falling back to the global active one on
// first open — same precedence as filesViewWorkspaceId ?? activeWorkspaceId.
const wsId = searchParams.get('workspace') ?? activeWorkspaceId ?? 'local-default';
const ws = workspaces.find(w => w.id === wsId);
return (
<SurfaceBoundary appName="Files">
<StorageAndFilesApp
workspaceId={wsId}
workspaceName={ws?.name}
defaultStorageType={ws?.storageType}
workspace={ws}
workspaces={workspaces}
onSelectWorkspace={(id) => setSearchParams({ workspace: id })}
onContextRail={(target) => setContextRailTarget({ ...target, workspaceId: wsId })}
/>
</SurfaceBoundary>
);
};
export default FilesRoute;

View File

@@ -0,0 +1,38 @@
/** P1a route wrapper — `/home` → HomeCockpit (§5.1; props from Desktop.tsx:363-382). */
import { useNavigate } from 'react-router-dom';
import HomeCockpit from '@/components/os/apps/HomeCockpit';
import SurfaceBoundary from './SurfaceBoundary';
import { useShell } from '@/providers/ShellContext';
import { routeFor } from '@/lib/routes';
import { NoModelBanner } from '@/components/os/model-gate/NoModelBanner';
import { workspaceCounts } from '@/lib/workspace-counts';
const HomeRoute = () => {
const navigate = useNavigate();
const { selectWorkspace, overlays, workspaces } = useShell();
return (
<SurfaceBoundary appName="Home">
{/* PR5 D2 — persists on Home until a working model exists (the soft-escape
safety net for the onboarding model gate). */}
<NoModelBanner onSetup={() => navigate(routeFor('settings'))} />
<HomeCockpit
onContinue={(workspaceId, sessionId) => {
selectWorkspace(workspaceId);
// sessionId: same known gap as the windowed shell (Desktop.tsx:366-373)
// — `?session=` targeted restore lands when the chat runtime accepts a
// sessionId seed (plan §5.3 #5; URL shape reserved).
void sessionId;
navigate(routeFor('chat', { activeWorkspaceId: workspaceId }));
}}
onOpenWorkspaceDesktop={(workspaceId) => {
selectWorkspace(workspaceId);
navigate(routeFor('workspace-desktop', { activeWorkspaceId: workspaceId }));
}}
onCreateWorkspace={() => overlays.setShowCreateWorkspace(true)}
totalWorkspaceCount={workspaceCounts(workspaces).visible}
/>
</SurfaceBoundary>
);
};
export default HomeRoute;

View File

@@ -0,0 +1,21 @@
/** P1a route wrapper — `/launcher` → LauncherApp (props from Desktop.tsx:454). */
import LauncherApp from '@/components/os/apps/LauncherApp';
import SurfaceBoundary from './SurfaceBoundary';
import { useShell } from '@/providers/ShellContext';
import { useNavigate } from 'react-router-dom';
const LauncherRoute = () => {
const { activeWorkspaceId, workspaces } = useShell();
const navigate = useNavigate();
return (
<SurfaceBoundary appName="Tool Launcher">
<LauncherApp
activeWorkspaceId={activeWorkspaceId ?? undefined}
workspaces={workspaces}
onOpenRoom={(roomId) => navigate(`/room?room=${encodeURIComponent(roomId)}`)}
/>
</SurfaceBoundary>
);
};
export default LauncherRoute;

View File

@@ -0,0 +1,11 @@
/** P1a route wrapper — `/marketplace` → MarketplaceApp (bare mount, Desktop.tsx:453). */
import MarketplaceApp from '@/components/os/apps/MarketplaceApp';
import SurfaceBoundary from './SurfaceBoundary';
const MarketplaceRoute = () => (
<SurfaceBoundary appName="Marketplace">
<MarketplaceApp />
</SurfaceBoundary>
);
export default MarketplaceRoute;

View File

@@ -0,0 +1,15 @@
/** P1a route wrapper — `/mcps` → MCPHubApp (props from Desktop.tsx:411). */
import MCPHubApp from '@/components/os/apps/MCPHubApp';
import SurfaceBoundary from './SurfaceBoundary';
import { useShell } from '@/providers/ShellContext';
const McpsRoute = () => {
const { activeWorkspace } = useShell();
return (
<SurfaceBoundary appName="MCP Hub">
<MCPHubApp personaId={activeWorkspace?.persona} />
</SurfaceBoundary>
);
};
export default McpsRoute;

View File

@@ -0,0 +1,128 @@
/**
* Route wrapper — `/memory/:mindScope?` → MemoryCenterApp (P3/D2 standalone
* promotion; the P1a-era MemoryApp shell is retired, its views live on as
* MemoryCenterApp tabs).
*
* URL is the single navigation authority:
* - `:mindScope` (personal|workspace; anything else → personal) drives the
* two-mind split. `/memory` ≡ `/memory/personal` — J08's banner target and
* the personal-mind-only needsReviewCount stay aligned by default.
* - `?tab=` (validated against MEMORY_VIEWS) drives the view; absent →
* 'memories'. The AppShell §2.3 shim already carries `tab` through
* queryString(), so `waggle:open-app {appId:'memory', tab:'graph'}` lands
* here with no extra wiring.
* - `?filter=` (P2/J08) is re-stashed through the app-deeplink channel on
* cold load, so a hard refresh or typed/shared `/memory?filter=unreviewed`
* URL seeds the Memory Center status filter the same way the Home banner's
* CustomEvent does — typed URLs and the §2.3 shim share one mechanism.
*
* useMemory + useKnowledgeGraph stay hoisted here (P1a §5.1) feeding the
* legacy Timeline/Graph tabs verbatim.
*/
import { useEffect, useRef } from 'react';
import { useNavigate, useParams, useSearchParams } from 'react-router-dom';
import MemoryCenterApp, { MEMORY_VIEWS, type MemoryView, type MindScope } from '@/components/os/apps/MemoryCenterApp';
import SurfaceBoundary from './SurfaceBoundary';
import { useShell } from '@/providers/ShellContext';
import { useMemory } from '@/hooks/useMemory';
import { useKnowledgeGraph } from '@/hooks/useKnowledgeGraph';
import { stashDeepLink } from '@/lib/app-deeplink';
const MemoryRoute = () => {
const { mindScope } = useParams();
const [searchParams, setSearchParams] = useSearchParams();
const navigate = useNavigate();
const mind: MindScope = mindScope === 'workspace' ? 'workspace' : 'personal';
const tabParam = searchParams.get('tab');
// PR3.5: 'trust' (screen 19) is the new default landing; ?tab= still selects
// any view (incl. the legacy 'memories' list and the 6 secondary views).
const view: MemoryView = MEMORY_VIEWS.includes(tabParam as MemoryView)
? (tabParam as MemoryView)
: 'trust';
// Stash once per mount, during render, so it precedes the child's mount
// effect (the ref keeps StrictMode double-render from double-stashing).
// Only when the Memories view is the landing target — a filter aimed at a
// legacy tab would strand in the stash and replay on a later visit (P3
// review finding).
const stashedRef = useRef(false);
if (!stashedRef.current) {
stashedRef.current = true;
const filter = searchParams.get('filter') ?? undefined;
// J08 "N need review" deep-links here with ?filter=unreviewed and no tab →
// lands on the default 'trust' view, whose Manage body embeds the same
// MemoryCenterTab that consumes the stash. 'memories' (the secondary list)
// also consumes it when explicitly targeted. Other tabs must not strand it.
if (filter && (view === 'trust' || view === 'memories')) {
stashDeepLink({ appId: 'memory', filter });
}
}
// `?filter=` is a one-shot intent carrier, not state — strip it once the
// child has consumed the stash (child mount effects run before this), so the
// URL stops advertising a filter the user may have since changed, and a
// refresh/share of the URL doesn't re-seed a stale filter.
useEffect(() => {
if (searchParams.has('filter')) {
setSearchParams((prev) => {
const next = new URLSearchParams(prev);
next.delete('filter');
return next;
}, { replace: true });
}
}, [searchParams, setSearchParams]);
const { activeWorkspaceId, workspaces, setContextRailTarget } = useShell();
const memory = useMemory(activeWorkspaceId);
const kg = useKnowledgeGraph(activeWorkspaceId);
const wsId = activeWorkspaceId && activeWorkspaceId !== 'local-default' ? activeWorkspaceId : undefined;
const wsName = wsId ? workspaces.find(w => w.id === wsId)?.name : undefined;
return (
<SurfaceBoundary appName="Memory">
<MemoryCenterApp
mind={mind}
onMindChange={(m) => {
// `/memory` is canonical for personal; keep ?tab/?filter across the switch.
const search = searchParams.toString();
navigate(`/memory${m === 'workspace' ? '/workspace' : ''}${search ? `?${search}` : ''}`);
}}
view={view}
onViewChange={(v) => {
setSearchParams((prev) => {
const next = new URLSearchParams(prev);
// 'trust' is the canonical no-tab default now; everything else (incl.
// the legacy 'memories' list) carries an explicit ?tab=.
if (v === 'trust') next.delete('tab'); else next.set('tab', v);
return next;
}, { replace: true });
}}
workspaceId={wsId}
workspaceName={wsName}
timeline={{
frames: memory.frames,
selectedFrame: memory.selectedFrame,
onSelectFrame: memory.setSelectedFrame,
searchQuery: memory.filters.searchQuery,
onSearchChange: (q) => memory.setFilters({ ...memory.filters, searchQuery: q }),
onDeleteFrame: memory.deleteFrame,
loading: memory.loading,
error: memory.error,
stats: memory.stats,
typeFilters: memory.filters.types,
onTypeFiltersChange: (types) => memory.setFilters({ ...memory.filters, types }),
minImportance: memory.filters.minImportance,
onMinImportanceChange: (val) => memory.setFilters({ ...memory.filters, minImportance: val }),
}}
knowledgeGraph={{ nodes: kg.nodes, edges: kg.edges }} onRefreshKG={kg.refresh}
kgScope={kg.scope} onKGScopeChange={kg.setScope}
kgLoading={kg.loading && kg.nodes.length === 0} kgError={kg.error}
onContextRail={(target) => setContextRailTarget({ ...target, workspaceId: activeWorkspaceId ?? undefined })}
/>
</SurfaceBoundary>
);
};
export default MemoryRoute;

View File

@@ -0,0 +1,16 @@
/**
* P1a route wrapper — `/settings/mission-control` → CockpitApp (bare mount,
* Desktop.tsx:430). D8: nav label "Mission Control"; "Command Center" is
* reserved for the Ctrl+K palette. (The legacy `mission-control` AppId /
* MissionControlApp is KILLED — §1.1.)
*/
import CockpitApp from '@/components/os/apps/CockpitApp';
import SurfaceBoundary from './SurfaceBoundary';
const MissionControlRoute = () => (
<SurfaceBoundary appName="Cockpit">
<CockpitApp />
</SurfaceBoundary>
);
export default MissionControlRoute;

View File

@@ -0,0 +1,13 @@
/** PR7a route wrapper — `/payment-success` → PaymentSuccessApp (post-Stripe-Checkout
* landing; `checkout.ts:42` success_url). AppShell child: the user is back inside the
* app after the hosted redirect. */
import PaymentSuccessApp from '@/components/os/apps/PaymentSuccessApp';
import SurfaceBoundary from './SurfaceBoundary';
const PaymentSuccessRoute = () => (
<SurfaceBoundary appName="Payment">
<PaymentSuccessApp />
</SurfaceBoundary>
);
export default PaymentSuccessRoute;

View File

@@ -0,0 +1,11 @@
/** PR6a route wrapper — `/platform` → PlatformApp (static showcase, ⌘K-only surface). */
import PlatformApp from '@/components/os/apps/PlatformApp';
import SurfaceBoundary from './SurfaceBoundary';
const PlatformRoute = () => (
<SurfaceBoundary appName="Platform">
<PlatformApp />
</SurfaceBoundary>
);
export default PlatformRoute;

View File

@@ -0,0 +1,16 @@
/**
* P1a route wrapper — `/settings/profile` → UserProfileApp (bare mount,
* Desktop.tsx:409). No nav entry — parity with today (§1.1). `?tab=identity`
* deep links arrive via the §2.3 shim's post-render re-dispatch (the app's
* live `waggle:open-app` listener; it never reads the deeplink stash).
*/
import UserProfileApp from '@/components/os/apps/UserProfileApp';
import SurfaceBoundary from './SurfaceBoundary';
const ProfileRoute = () => (
<SurfaceBoundary appName="My Profile">
<UserProfileApp />
</SurfaceBoundary>
);
export default ProfileRoute;

View File

@@ -0,0 +1,21 @@
/** P1a route wrapper — `/room` → RoomApp (workspaceNames map verbatim from Desktop.tsx:456-461). */
import RoomApp from '@/components/os/apps/RoomApp';
import SurfaceBoundary from './SurfaceBoundary';
import { useShell } from '@/providers/ShellContext';
import { useSearchParams } from 'react-router-dom';
const RoomRoute = () => {
const { workspaces } = useShell();
const [searchParams] = useSearchParams();
const roomId = searchParams.get('room')?.trim() || undefined;
// Phase A.3: build a workspace name lookup for the Room tiles.
const wsNames: Record<string, string> = {};
for (const w of workspaces) wsNames[w.id] = w.name;
return (
<SurfaceBoundary appName="Room">
<RoomApp roomId={roomId} workspaceNames={wsNames} />
</SurfaceBoundary>
);
};
export default RoomRoute;

View File

@@ -0,0 +1,16 @@
/**
* P1a route wrapper — `/settings` → SettingsApp (bare mount, Desktop.tsx:407).
* `?tab=` URL→internal-tab wiring is excluded conversion work (§5.3 #1 — the
* component lacks a tab prop); `/settings?tab=backup` remains the canonical
* ADDRESS for the killed `backup` AppId (§1.1).
*/
import SettingsApp from '@/components/os/apps/SettingsApp';
import SurfaceBoundary from './SurfaceBoundary';
const SettingsRoute = () => (
<SurfaceBoundary appName="Settings">
<SettingsApp />
</SurfaceBoundary>
);
export default SettingsRoute;

View File

@@ -0,0 +1,11 @@
/** P1a route wrapper — `/skills` → CapabilitiesApp (bare mount, Desktop.tsx:432). */
import CapabilitiesApp from '@/components/os/apps/CapabilitiesApp';
import SurfaceBoundary from './SurfaceBoundary';
const SkillsRoute = () => (
<SurfaceBoundary appName="Skills Hub">
<CapabilitiesApp />
</SurfaceBoundary>
);
export default SkillsRoute;

View File

@@ -0,0 +1,19 @@
/**
* UX Refactor v2.1 P1a — route-world port of Desktop.tsx:556-558: every route
* surface renders inside AppErrorBoundary with the appConfig title as appName.
* The window-close affordance becomes leave-the-route (→ /home).
*/
import type { ReactNode } from 'react';
import { useNavigate } from 'react-router-dom';
import AppErrorBoundary from '@/components/os/ErrorBoundary';
const SurfaceBoundary = ({ appName, children }: { appName: string; children: ReactNode }) => {
const navigate = useNavigate();
return (
<AppErrorBoundary appName={appName} onClose={() => navigate('/home')}>
{children}
</AppErrorBoundary>
);
};
export default SurfaceBoundary;

View File

@@ -0,0 +1,15 @@
/**
* P1a route wrapper — `/team` → TeamGovernanceApp (bare mount, Desktop.tsx:466).
* Reserved (§1.1): renders the legacy app for TEAMS+; FREE/PRO never see the
* nav zone (filterByBillingTier parity). No new Team work (D5).
*/
import TeamGovernanceApp from '@/components/os/apps/TeamGovernanceApp';
import SurfaceBoundary from './SurfaceBoundary';
const TeamRoute = () => (
<SurfaceBoundary appName="Team Governance">
<TeamGovernanceApp />
</SurfaceBoundary>
);
export default TeamRoute;

View File

@@ -0,0 +1,15 @@
/** P1a route wrapper — `/settings/timeline` → TimelineApp (props from Desktop.tsx:463). */
import TimelineApp from '@/components/os/apps/TimelineApp';
import SurfaceBoundary from './SurfaceBoundary';
import { useShell } from '@/providers/ShellContext';
const TimelineRoute = () => {
const { activeWorkspaceId, activeWorkspace } = useShell();
return (
<SurfaceBoundary appName="Timeline">
<TimelineApp workspaceId={activeWorkspaceId ?? undefined} workspaceName={activeWorkspace?.name} />
</SurfaceBoundary>
);
};
export default TimelineRoute;

View File

@@ -0,0 +1,11 @@
/** P1a route wrapper — `/settings/usage` → TelemetryApp (bare mount, Desktop.tsx:465). */
import TelemetryApp from '@/components/os/apps/TelemetryApp';
import SurfaceBoundary from './SurfaceBoundary';
const UsageRoute = () => (
<SurfaceBoundary appName="Usage & Telemetry">
<TelemetryApp />
</SurfaceBoundary>
);
export default UsageRoute;

View File

@@ -0,0 +1,15 @@
/**
* P1a route wrapper — `/settings/vault` → VaultApp (bare mount, Desktop.tsx:408).
* Renders full-canvas with the System nav section active; NOT embedded inside
* SettingsApp's UI (zero-rewrite, §1.1).
*/
import VaultApp from '@/components/os/apps/VaultApp';
import SurfaceBoundary from './SurfaceBoundary';
const VaultRoute = () => (
<SurfaceBoundary appName="Vault">
<VaultApp />
</SurfaceBoundary>
);
export default VaultRoute;

View File

@@ -0,0 +1,11 @@
/** P1a route wrapper — `/waggle-dance` → WaggleDanceApp (bare mount, Desktop.tsx:433). */
import WaggleDanceApp from '@/components/os/apps/WaggleDanceApp';
import SurfaceBoundary from './SurfaceBoundary';
const WaggleDanceRoute = () => (
<SurfaceBoundary appName="Waggle Dance">
<WaggleDanceApp />
</SurfaceBoundary>
);
export default WaggleDanceRoute;

View File

@@ -0,0 +1,69 @@
/**
* P1a route wrapper — `/workspaces/:workspaceId/:tab?` → WorkspaceDesktopApp
* (§1.1 /workspaces row; props from Desktop.tsx:392-406).
*
* Stage B: `:tab?` drives the founder-ratified controlled-tab seam (§5.2a) —
* the URL is the tab state, tab clicks navigate (overview is the canonical
* bare `/workspaces/:id`). The chat tab body receives the ChatSlot (§5.2b)
* that ChatHost portals the live per-workspace ChatWindowInstance into
* (§4.2). `?session=` stays reserved (§5.3 #5).
*/
import { useEffect } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
import WorkspaceDesktopApp, { type WorkspaceTabId } from '@/components/os/apps/WorkspaceDesktopApp';
import { ChatSlot } from '@/components/os/ChatHost';
import SurfaceBoundary from './SurfaceBoundary';
import { useShell } from '@/providers/ShellContext';
// The warm-Hive 6-tab bar + `tasks` (deep-link-reachable, not shown in the bar
// — the Overview "Up next" card routes to it). Dropped Research/Timeline/
// Settings fall through to the overview default instead of an empty panel.
const WS_TABS: readonly WorkspaceTabId[] = [
'overview', 'chat', 'memory', 'artifacts', 'files', 'team', 'tasks',
];
const WorkspaceRoute = () => {
const navigate = useNavigate();
const { workspaceId, tab } = useParams();
const { workspaces, activeWorkspaceId, selectWorkspace } = useShell();
// §2.1: the URL is the single source of truth — sync the routed workspace
// into shell state, so shell-global surfaces (StatusBar, PersonaSwitcher,
// Ctrl+Shift+N / nav-Chat) track what is on screen. Covers the two
// navigation paths that bypass every explicit selectWorkspace call site:
// typed deep links (W2A: useWorkspaces no longer auto-selects — this sync is
// now the persistence trigger for deep links) and browser Back/Forward. The
// pre-fetch placeholder never syncs (§3.3/§4.2 rule).
useEffect(() => {
if (workspaceId && workspaceId !== 'local-default' && workspaceId !== activeWorkspaceId) {
selectWorkspace(workspaceId);
}
}, [workspaceId, activeWorkspaceId, selectWorkspace]);
// Fall back to the active workspace if the param is missing (parity with the
// restored-window fallback, Desktop.tsx:393).
const wsId = workspaceId || activeWorkspaceId || 'local-default';
const ws = workspaces.find(w => w.id === wsId);
const activeTab: WorkspaceTabId = WS_TABS.includes(tab as WorkspaceTabId)
? (tab as WorkspaceTabId)
: 'overview';
return (
<SurfaceBoundary appName="Workspace">
<WorkspaceDesktopApp
workspaceId={wsId}
workspaceName={ws?.name ?? 'Workspace'}
activeTab={activeTab}
onTabChange={(next) => navigate(
next === 'overview' ? `/workspaces/${wsId}` : `/workspaces/${wsId}/${next}`,
)}
// The pre-fetch placeholder id never gets a live widget (§3.3/§4.2);
// it keeps the deep-link placeholder body instead.
chatSlot={wsId !== 'local-default' ? <ChatSlot workspaceId={wsId} /> : undefined}
onOpenChat={(id) => {
selectWorkspace(id);
navigate(`/workspaces/${id}/chat`);
}}
/>
</SurfaceBoundary>
);
};
export default WorkspaceRoute;

View File

@@ -0,0 +1,24 @@
/** PR6c route wrapper — `/workspaces` → AllWorkspacesApp (the full shelf; replaces
* the §9.7 `/workspaces`→`/home` redirect, D15). */
import { useNavigate } from 'react-router-dom';
import AllWorkspacesApp from '@/components/os/apps/AllWorkspacesApp';
import SurfaceBoundary from './SurfaceBoundary';
import { useShell } from '@/providers/ShellContext';
import { routeFor } from '@/lib/routes';
const WorkspacesRoute = () => {
const navigate = useNavigate();
const { selectWorkspace } = useShell();
return (
<SurfaceBoundary appName="All workspaces">
<AllWorkspacesApp
onOpenWorkspace={(workspaceId) => {
selectWorkspace(workspaceId);
navigate(routeFor('workspace-desktop', { activeWorkspaceId: workspaceId }));
}}
/>
</SurfaceBoundary>
);
};
export default WorkspacesRoute;

View File

@@ -0,0 +1,63 @@
/**
* UX Refactor v2.1 P1a — route wrapper barrel (conversion plan §5.1).
*
* One thin wrapper per §1.1 routed surface; each re-hosts Desktop.tsx's prop
* plumbing and renders the existing screen component with byte-identical
* props, inside SurfaceBoundary (the Desktop.tsx:556-558 AppErrorBoundary
* relocation). Stage C registers these under the AppShell layout route:
*
* /home HomeRoute
* /workspaces/:workspaceId/:tab? WorkspaceRoute (bare /workspaces → /home, §9.7)
* /memory/:mindScope? MemoryRoute (:mindScope reserved for P3/D2)
* /artifacts ArtifactsRoute
* /files FilesRoute
* /agents AgentsRoute
* /automations AutomationsRoute
* /skills SkillsRoute
* /connectors ConnectorsRoute
* /mcps McpsRoute
* /marketplace MarketplaceRoute
* /launcher LauncherRoute
* /room RoomRoute
* /waggle-dance WaggleDanceRoute
* /approvals ApprovalsRoute
* /team TeamRoute
* /settings SettingsRoute
* /settings/vault VaultRoute
* /settings/profile ProfileRoute
* /settings/mission-control MissionControlRoute
* /settings/timeline TimelineRoute
* /settings/events EventsRoute
* /settings/usage UsageRoute
*/
export { default as HomeRoute } from './HomeRoute';
export { default as WorkspaceRoute } from './WorkspaceRoute';
export { default as MemoryRoute } from './MemoryRoute';
export { default as ArtifactsRoute } from './ArtifactsRoute';
export { default as FilesRoute } from './FilesRoute';
export { default as AgentsRoute } from './AgentsRoute';
export { default as AutomationsRoute } from './AutomationsRoute';
export { default as SkillsRoute } from './SkillsRoute';
export { default as ConnectorsRoute } from './ConnectorsRoute';
export { default as McpsRoute } from './McpsRoute';
export { default as MarketplaceRoute } from './MarketplaceRoute';
export { default as LauncherRoute } from './LauncherRoute';
export { default as RoomRoute } from './RoomRoute';
export { default as WaggleDanceRoute } from './WaggleDanceRoute';
export { default as ApprovalsRoute } from './ApprovalsRoute';
export { default as TeamRoute } from './TeamRoute';
export { default as SettingsRoute } from './SettingsRoute';
export { default as VaultRoute } from './VaultRoute';
export { default as ProfileRoute } from './ProfileRoute';
export { default as MissionControlRoute } from './MissionControlRoute';
export { default as TimelineRoute } from './TimelineRoute';
export { default as EventsRoute } from './EventsRoute';
export { default as UsageRoute } from './UsageRoute';
// PR6a — ⌘K-only static surfaces (Benchmarks · Platform)
export { default as BenchmarkRoute } from './BenchmarkRoute';
export { default as PlatformRoute } from './PlatformRoute';
export { default as WorkspacesRoute } from './WorkspacesRoute';
// PR7a — post-Stripe-Checkout landing (success_url; checkout.ts:42)
export { default as PaymentSuccessRoute } from './PaymentSuccessRoute';
// PR7b — pre-shell /auth route (sibling outside AppShell)
export { default as AuthRoute } from './AuthRoute';