fix: stabilize oracle and bundled pillar routes
Some checks failed
Velocity-OS Deployment Pipeline / lint (push) Has been cancelled
Velocity-OS Deployment Pipeline / build-and-push (agents) (push) Has been cancelled
Velocity-OS Deployment Pipeline / build-and-push (core) (push) Has been cancelled
Velocity-OS Deployment Pipeline / build-and-push (media-engine) (push) Has been cancelled
Velocity-OS Deployment Pipeline / build-and-push (webos) (push) Has been cancelled
Velocity-OS Deployment Pipeline / sign-images (agents) (push) Has been cancelled
Velocity-OS Deployment Pipeline / sign-images (core) (push) Has been cancelled
Velocity-OS Deployment Pipeline / sign-images (media-engine) (push) Has been cancelled
Velocity-OS Deployment Pipeline / sign-images (webos) (push) Has been cancelled
Velocity-OS Deployment Pipeline / notify-ingress (push) Has been cancelled

This commit is contained in:
2026-05-03 01:06:50 +05:30
parent 600716a69d
commit f495b513ff
3 changed files with 245 additions and 84 deletions

View File

@@ -3,35 +3,21 @@ import { AuthGuard } from './shared/layout/AuthGuard';
import { AdminGuard } from './shared/layout/AdminGuard';
import { AuthenticatedShell } from './shared/layout/AuthenticatedShell';
import { LoginPage } from './shared/layout/LoginPage';
import CommandPillar from './pillars/command/CommandPillar';
import OracleWorkspacePage from './pillars/command/OracleWorkspacePage';
import PipelinePillar from './pillars/pipeline/PipelinePillar';
import Client360 from './pillars/pipeline/client360/Client360';
import ShowroomMode from './pillars/pipeline/ShowroomMode';
import StudioPillar from './pillars/studio/StudioPillar';
import PropertyEntity from './pillars/studio/PropertyEntity';
import ControlRoom from './control-room/ControlRoom';
import VaultPublicPage from './shared/layout/VaultPublicPage';
// ── Pillar pages (lazy loaded for performance) ────────────────
import { lazy, Suspense } from 'react';
import { PillarSkeleton } from './shared/layout/PillarSkeleton';
const CommandPillar = lazy(() => import('./pillars/command/CommandPillar'));
const OracleWorkspacePage = lazy(() => import('./pillars/command/OracleWorkspacePage'));
const PipelinePillar = lazy(() => import('./pillars/pipeline/PipelinePillar'));
const Client360 = lazy(() => import('./pillars/pipeline/client360/Client360'));
const ShowroomMode = lazy(() => import('./pillars/pipeline/ShowroomMode'));
const StudioPillar = lazy(() => import('./pillars/studio/StudioPillar'));
const PropertyEntity = lazy(() => import('./pillars/studio/PropertyEntity'));
const ControlRoom = lazy(() => import('./control-room/ControlRoom'));
const VaultPublicPage = lazy(() => import('./shared/layout/VaultPublicPage'));
// ── Lazy wrapper with branded skeleton ───────────────────────
const Lazy = ({ children }: { children: React.ReactNode }) => (
<Suspense fallback={<PillarSkeleton />}>{children}</Suspense>
);
// ── Router definition ─────────────────────────────────────────
const router = createBrowserRouter([
// ── Unauthenticated ──
{
path: '/login',
element: <LoginPage />,
},
// ── Authenticated WebOS Shell ──
{
path: '/',
element: (
@@ -40,67 +26,30 @@ const router = createBrowserRouter([
</AuthGuard>
),
children: [
// Default redirect
{ index: true, element: <Navigate to="/command" replace /> },
// Pillar 1: COMMAND — Morning Briefing (Dashboard + Oracle)
{
path: 'command',
element: <Lazy><CommandPillar /></Lazy>,
},
{
path: 'oracle',
element: <Lazy><OracleWorkspacePage /></Lazy>,
},
// Pillar 2: PIPELINE — Deal Intelligence (CRM + Comms + Sentinel)
{
path: 'pipeline',
element: <Lazy><PipelinePillar /></Lazy>,
},
// Client 360 entity — drills in over Pipeline
{
path: 'pipeline/:personId',
element: <Lazy><Client360 /></Lazy>,
},
// Showroom Mode — contextual full-screen overlay
{
path: 'showroom',
element: <Lazy><ShowroomMode /></Lazy>,
},
// Pillar 3: STUDIO — Asset + Marketing Hub (Inventory + Catalyst)
{
path: 'studio',
element: <Lazy><StudioPillar /></Lazy>,
},
// Property Entity — drills in over Studio
{
path: 'studio/:propertyId',
element: <Lazy><PropertyEntity /></Lazy>,
},
{ path: 'command', element: <CommandPillar /> },
{ path: 'oracle', element: <OracleWorkspacePage /> },
{ path: 'pipeline', element: <PipelinePillar /> },
{ path: 'pipeline/:personId', element: <Client360 /> },
{ path: 'showroom', element: <ShowroomMode /> },
{ path: 'studio', element: <StudioPillar /> },
{ path: 'studio/:propertyId', element: <PropertyEntity /> },
],
},
// ── Admin-Only Control Room (RBAC gated at component + API level) ──
{
path: '/control-room/:panel?',
element: (
<AuthGuard>
<AdminGuard>
<Lazy><ControlRoom /></Lazy>
<ControlRoom />
</AdminGuard>
</AuthGuard>
),
},
// ── Public vault links (no auth) ──
{
path: '/vault/:trackingHash',
element: <Lazy><VaultPublicPage /></Lazy>,
element: <VaultPublicPage />,
},
// ── 404 fallback ──
{
path: '*',
element: <Navigate to="/command" replace />,