Skip to content

src/dazzle_ui/runtime/workspace_renderer.py

Generated: 2026-03-30T04:38:49.319124+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_ui

Purpose

Workspace layout renderer (v0.20.0).

Converts WorkspaceSpec from the DSL IR into template-ready context models, with stage-driven CSS grid classes for different layout patterns.

Stage → Layout mapping:

FOCUS_METRIC    → Single column, hero stat + supporting regions
DUAL_PANE_FLOW  → 2...

Key Exports

  • SourceTabContext
  • RegionContext
  • WorkspaceContext
  • build_workspace_context
  • migrate_v1_to_v2
  • apply_layout_preferences
  • build_catalog

Dependencies

Imports

  • __future__.annotations
  • typing.Any
  • pydantic.BaseModel
  • pydantic.Field
  • json
  • json
  • dazzle.core.admin_builder.get_region_actions
  • re

Event Interactions

None detected.

Invariants and Assumptions

  • Resolve action surface → URL pattern (must use /app/ prefix for app shell)

Tests

  • tests/integration/test_runtime_e2e.py
  • tests/integration/test_runtime_pipeline.py
  • tests/unit/test_runtime_test_routes.py
  • tests/unit/test_runtime_services.py
  • tests/unit/test_runtime_mcp_tools.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.