Documentation
Open app

Workspace pages

A workspace page is a full app-owned screen reached from workspace navigation. Core resolves the current app execution for the installed lane, owns routing and the mount boundary, then renders the exported component. The content inside that boundary belongs to the app; Core does not inject an artifact launcher, environment badge, or use-case-specific controls.

YAML
contributes:
  ui:
    - id: reports-page
      kind: nativeModule
      surface: page
      slot: workspace.nav
      sectionId: reports
      label: Reports
      icon: chart
      route: /reports/*
      module:
        entry: dist/ui/app.js
        export: ReportsPage
        styles: dist/ui/app.css

Use workspace.nav for a normal navigation entry or workspace.nav.section for a section placement. Supply a leading-slash route; /* allows nested app routes. A navigable slot must have a route or sectionId. Optional roles and activation further restrict placement.

TSX
import { useAppContext } from '@sota/platform';

type PageProps = { route?: string; subroute?: string };

export function ReportsPage({ route, subroute }: PageProps) {
  const { workspaceId, ui } = useAppContext();
  return (
    <main>
      <h1>Reports</h1>
      <button type="button" onClick={() => ui.openArtifact('reports.viewer')}>
        Open latest report
      </button>
      <small>Workspace: {workspaceId}</small>
      <small>Route: {subroute ?? route}</small>
    </main>
  );
}

Core passes the selected app route as route and subroute; use it as input to an app-local router. Read identity, locale, theme, backend access, lifecycle, and host actions through platform hooks. Do not derive the exact app execution from the route.

Contents

Esc

Search titles and body text across every chapter.