App Dashboard Contract¶
The App Dashboard is the canonical owner/operator surface every Mozaiks app can expose. It is not App Zero-specific. App Zero is the richest first consumer, but the contract belongs in OSS so generated apps, customer workspaces, hosted apps, and self-hosted apps share the same management model.
Dashboard Scopes¶
Mozaiks has two dashboard levels:
| Scope | Canonical route | Purpose |
|---|---|---|
| Workspace Dashboard | /apps | Portfolio-level management for all apps owned by a user, team, or workspace. |
| App Dashboard | /apps/:appId/... | Focused management for one app. |
The Workspace Dashboard answers cross-app questions: what apps exist, what needs attention, where cost is coming from, and which shared integrations are ready. The App Dashboard answers app-specific questions: what is being built, what is branded, what is launched, who can use it, and what workflows or support threads need attention.
Directory Composition¶
AppsDirectory, exported through @mozaiks/factory-app-ui, accepts an already authorized app list and optional navigationForApp callbacks. Hosts with a paged data source can supply:
pagination:{ page, hasNext, hasPrevious, onNext, onPrevious, onRetry };- controlled
searchValue/onSearchChangeandactiveFilter/onFilterChangepairs; loadinganderrorfor the current request.
With pagination, the host owns querying, cursor state, search and filtering. The directory renders the supplied page without filtering its rows again, labels counts as belonging to that page, and provides Previous/Next and retry controls. Loading preserves the search controls and disables page navigation. Without pagination, the existing local portfolio search, filters and summary remain available. The shared component does not define hosted app ownership, provider calls, or the host's paging API.
Canonical File¶
Apps declare dashboard structure in:
At runtime the active app root is already app/, so framework loaders resolve:
The schema version is:
When the file is missing, Studio uses the OSS default manifest. App-owned files can overlay the default with extends: default and override portals by id. The dashboard/ directory is a canonical app-root plane, and app/provenance.yaml can reference dashboard/dashboard.yaml as the app's dashboard overlay.
Ownership Boundaries¶
| File | Owns | Does not own |
|---|---|---|
dashboard/dashboard.yaml | Workspace/App Dashboard portals, panel composition, dashboard actions, workflow launch affordances. | Workflow sequencing, arbitrary route registration, raw React pages, admin module panel contracts. |
workflows/extended_orchestration/extension_registry.json | Workflow registry, workflow sequences, transition routing. | Product navigation, dashboard portals, persistent page IA. |
ui/route_manifest.json | Concrete React route registration. | Canonical dashboard semantics. |
admin/admin_registry.yaml | AdminPortal extension page ids used by module contracts/admin.yaml. | First-party Studio/App Dashboard pages. |
modules/*/contracts/admin.yaml | Module-owned admin panels bound to declared module actions. | Cross-app dashboard IA or workflow orchestration. |
The dashboard manifest may reference workflow sequences, but it does not define them. The sequence must already exist in extension_registry.json.
Manifest Shape¶
schema_version: mozaiks.dashboard.v1
extends: default
workspace:
portals:
- id: portfolio
label: Apps
route: /apps
icon: apps
order: 0
panels:
- id: portfolio
type: app_portfolio_table
title: Apps
app:
portals:
- id: building
label: Project
route: /apps/:appId/building
icon: hammer
order: 10
panels:
- id: project
type: build_project
title: Project
Canonical App Portals¶
The default App Dashboard lanes are:
| Portal | Purpose |
|---|---|
overview | App identity, lifecycle, KPIs, next step, and top-level alerts. |
building | The app's Project: where the build stands, its saved build documents, and every version. |
branding | Brand kit, logos, themes, generated media, and promoted brand assets. |
launch | Landing page status, hosting, domains, deployment readiness, and launch workflows. |
growth | Landing-page improvement, marketing campaigns, campaign assets, and growth workflow launch actions. |
users | App users, roles, access blockers, invitations, and policy summaries. |
usage | App-specific chats, workflows, token usage, cost, and usage limits. |
support | App-specific support threads and user follow-up. |
settings | App-level settings and configuration forms. |
An app does not have to show every portal. Capability packs and app-specific overlays can disable a portal or add panels.
Determinism Rules¶
- Portal ids, panel ids, capabilities, and action ids are stable lowercase identifiers.
- Portal routes are app-local paths. App-scoped portal routes include
:appId. - Panels use known panel types. Arbitrary JSX is only allowed through the explicit
custom_componentpanel type. - Workflow launch actions reference existing workflow ids or workflow sequence ids; they do not inline routing graphs.
- Module actions use
<module_id>.<action_id>targets and must bind to actions declared inmodule.yaml. - The manifest is declarative. It contains no secrets, provider credentials, payment-provider ids, or hosted-product internals.
Runtime Primitives¶
The OSS runtime provides:
mozaiksai.core.dashboard.DashboardManifestload_dashboard_manifest(app_root)build_default_dashboard_manifest()validate_dashboard_manifest_routes(manifest, route_pages)GET /api/studio/dashboardDashboardPortalPage, the generic factory UI renderer for manifest-declared portal panels
Existing ui/route_manifest.json pages remain valid while the Dashboard Portal renderer is adopted.
DashboardPortalPage reads the active mozaiks.dashboard.v1 manifest through /api/studio/dashboard, matches the current route to an enabled portal, then renders known panel types against Studio data. The generic renderer currently covers summary, next step, portal links, the build_project Project panel, and custom_component panels. Apps should mount it by declaring a normal route-manifest entry with component: DashboardPortalPage; they should not copy the factory page into their workspace to activate a default portal.
The Project Panel¶
build_project renders an app's Project from records the server already keeps:
- the saved build documents, read from
GET /api/studio/build/historyin one unfiltered request of 100 rows. History sorts by version number across families, so when that page is full a document can sit behind internal records; only then is each document family missing from it read with its ownbuild_familyfilter (25 rows). A full page means older versions may exist, and the version list says it shows only the latest ones. A failed read shows an error with a retry inside the Project panel; the rest of the page stays. Each document shows its latestcurrentversion, or its newest version when none is current. Internal families (app_context_version,app_intelligence_snapshot,app_context_graph,source_context_bundle,brownfield_registration) are not shown; - a document's text, which is its saved
commit_metadata.metadata.summary_payload(the content of its single JSON file), rendered as headings, paragraphs, and lists. The App document links to the build review page instead; - the build steps in the
buildworkflow sequence order (Idea, Look & feel, Design, Plans & pricing, AI workflows, App). A step is done when a current version of its document exists; - one status sentence and one button. The button opens the app's recorded build conversation (
/chat?workflow=…&chat_id=…&app_id=<chat_app_id>), the build review page, or asksPOST /api/workflows/triggerto startValueEngine(a draft with no conversation) orAppReview(a built app) bound to the app'sbuild_registry_id. When the server records no entry the page can open, it says so.
My Apps lists up to five in-build apps under "Builds in progress" with the same sentence and button, using one history request per listed app, plus one for the app version only when a full first page left it out. A next step whose document family a full page left out is not guessed ("First build in progress.").
Saved Document Work¶
The Project version list can open a specific saved document using the document query selector. The version shown remains selected when a newer version is saved. Studio resolves the exact record through GET /api/studio/apps/{appId}/documents/{artifactVersionId} and returns its recorded input versions, available revision routes, and eligible saved session. The descriptor is owner-scoped and does not grant collaborators access to private build records.
View is an observation. Continue uses the document resume endpoint to recheck the unfinished owned chat and attach the server-derived return origin; it does not allocate a new run. Revise submits a change against the selected record through the existing refinement trigger. Completed conversations are never reopened as unfinished work. Unsupported document revision types have an explicit unavailable reason rather than silently starting a different workflow. Selecting a historical conversation does not move the active journey cursor. An explicit initial workflow entry or initial choice starts a new instance after completion; an old completion event cannot advance that new instance.
Selected DesignDocs revisions capture their document and exact canonical input records before invalidation. The persisted, exclusively router-owned document_revision_baseline uses the existing context source.snapshot contract to supply concept and theme inputs before model prompts are assembled. Missing selected snapshots fail rather than reading current input records. The saved revision records the selected document as its parent and retains those input references. Historical branching also checks the registered current build at proposal, confirmation, and allocation; it stages a draft for normal review.
The admitted snapshot establishes the selected summary's owned-session binding. Continuation rechecks its immutable record against that snapshot, allowing only later lifecycle invalidation. It does not require app-archive binding metadata on summary records or relax the separate accepted app-archive checks.
scripts/smoke_project_documents.py --change-class design --prove-continuation checks the browser entry, canonical revision save and next-step allocation with an isolated Mongo instance supplied through --mongo-uri. Its classifier, document output and completion are controlled fixtures; it does not run models or demonstrate completion of every downstream generator.
The UI renders registry-derived sequence effects and saved version lineage. workflow_sequences owns the work run now, artifact_dependency_graph owns potential downstream invalidation, and saved records own actual input versions and progress. The graph projection and UI actions do not redefine those owners.
Dashboard return URLs are derived on the server from the saved document origin and authorized app binding. Caller-supplied return URLs are not accepted.
The status follows the app's lifecycle state where it says more than the documents: Needs Revision, Review, Deploying ("Being deployed."), Archived ("Archived."), and a rebuild in progress (a building state with a recorded build conversation, even when an earlier app version passed). An active app without a passing app version, such as an imported one, reads "This app is live." with a link to its overview.
Host Sections¶
A custom_component panel renders the component registered under its component name in the shell component registry, with props panel, appId, app (the app's Factory registry entry), and buildRegistryId. A host adds a section to the Project page by overlaying the building portal by id; panels merge by id, so the Project panel stays and the host panel is appended:
app:
portals:
- id: building
panels:
- id: host_section
type: custom_component
source: custom
component: HostProjectSection
order: 10
The OSS Project page has no voting, discussion, or governance; a host product that offers those renders them in its own registered component.
App-owned Management Composition¶
@mozaiks/factory-app-ui exports AppsDirectory, DashboardPortalPage, and HarnessDecisionCard for app-owned composition around the shared Studio presentation. AppsDirectory accepts apps, loading, error, an optional deleteApp callback, and an optional navigationForApp(app) callback returning primaryAction and dashboardHref. Without that callback, the standard Studio directory retains its existing navigation. Without a delete callback, it offers no delete action.
An app whose management record differs from the Factory record must resolve that relationship through its own authorized data source. Its wrapper can pass targetAppId and buildRegistryId to DashboardPortalPage: Studio finds that exact target and verifies its Factory registry association before loading build data. The route's appId remains the management selector for portal navigation; workflow launches use the resolved Factory record's execution host and build registry. No identity is rewritten or inferred from another identifier.
Ordinary Studio routes need no wrapper or extra props. Workspace-scoped portal routes have no appId and require no selected-app lookup. Product wrappers must preserve that workspace behavior and show an unavailable or unlinked state when their own authorized record cannot resolve a Factory target.
The OSS dashboard contract intentionally stops at build/review management. Collaborative development product behavior such as proposal discussion, voting, community moderation, and proprietary approval policy belongs in app-owned modules and app-specific routes. Apps can surface a compact admin summary through module_panel_ref or custom_component panels, but those product semantics are not generic Factory/Studio defaults.
validate_dashboard_manifest_routes() is the CI contract for apps that mount concrete Studio pages. It validates that every enabled dashboard portal points to a registered route, every portal intended for navigation is visible in the matching workspace-studio or app-studio route group, and every visible Studio navigation route has a matching enabled dashboard portal. Planned portals should stay enabled: false until their route and product surface exist.
Multimodal Integration¶
Generated media is a dashboard capability, not a dashboard architecture. Branding, Launch, and Growth portals can use the OSS media primitives to show generated images, promoted assets, campaign media, and landing page visuals. The user-facing operation is still deterministic: review an asset, promote it to a target, or launch a workflow sequence.
Cleanup Direction¶
The long-term target is:
- Keep
extension_registry.jsonlimited to workflow routing and sequences. - Keep
admin_registry.yamllimited to AdminPortal extension pages. - Keep
route_manifest.jsonas concrete route mounting, not the semantic App Dashboard source. - Move App Studio portal definitions into
dashboard/dashboard.yaml. - Let generated apps customize dashboards through manifest overlays and capability-contributed panels instead of bespoke hardcoded dashboard pages.