Module

cli.dashboard.screens

Screen classes for Bengal unified dashboard.

Each screen represents a mode of the unified dashboard:

  • LandingScreen: Site overview and quick actions
  • BuildScreen: Build progress and phase timing
  • ServeScreen: Dev server with file watching
  • HealthScreen: Site health explorer

Screens are navigated via number keys (0, 1, 2, 3) or command palette.

Classes

BengalScreen 8
Base screen for Bengal unified dashboard. All screens share common bindings and styling. Subscribe…

Base screen for Bengal unified dashboard.

All screens share common bindings and styling. Subscribes to config_changed_signal for reactive updates.

Attributes

Name Type Description
BINDINGS ClassVar[list[Binding]]

Methods

on_mount 0
Subscribe to config changes when mounted.
def on_mount(self) -> None
on_config_changed 1
Handle config changes from app.
def on_config_changed(self, data: tuple[str, object]) -> None
Parameters
Name Type Description
data

Tuple of (key, value) for the changed config

action_goto_landing 0
Switch to landing screen.
def action_goto_landing(self) -> None
action_goto_build 0
Switch to build screen.
def action_goto_build(self) -> None
action_goto_serve 0
Switch to serve screen.
def action_goto_serve(self) -> None
action_goto_health 0
Switch to health screen.
def action_goto_health(self) -> None
action_toggle_help 0
Toggle help screen.
def action_toggle_help(self) -> None
LandingScreen 7
Landing screen with site overview and quick actions. Shows: - Bengal branding with version - Site …

Landing screen with site overview and quick actions.

Shows:

  • Bengal branding with version
  • Site summary (pages, assets, last build)
  • Quick action grid (Build, Serve, Health)
  • Recent activity log

Attributes

Name Type Description
BINDINGS ClassVar[list[Binding]]

Methods

compose 0 ComposeResult
Compose landing screen layout.
def compose(self) -> ComposeResult
Returns
ComposeResult
on_mount 0
Set up landing screen.
def on_mount(self) -> None
on_quick_action_selected 1
Handle quick action selection.
def on_quick_action_selected(self, message) -> None
Parameters
Name Type Description
message
Internal Methods 3
__init__ 2
Initialize landing screen.
def __init__(self, site: Site | None = None, **kwargs) -> None
Parameters
Name Type Description
site Default:None
**kwargs
_get_branding 0 str
Get Bengal branding text with version.
def _get_branding(self) -> str
Returns
str
_get_site_summary 0 str
Get rich site summary text.
def _get_site_summary(self) -> str
Returns
str
BuildScreen 8
Build screen for the unified dashboard. Shows build progress, phase timing, and output log. Integr…

Build screen for the unified dashboard.

Shows build progress, phase timing, and output log. Integrates BengalThrobber for animated loading and BuildFlash for status.

Dashboard API Integration (RFC: rfc-dashboard-api-integration):

  • PhaseProgress widget with real-time streaming updates
  • Deep BuildStats display after completion

Attributes

Name Type Description
BINDINGS ClassVar[list[Binding]]

Methods

compose 0 ComposeResult
Compose build screen layout.
def compose(self) -> ComposeResult
Returns
ComposeResult
on_mount 0
Set up build screen.
def on_mount(self) -> None
on_config_changed 1
Handle config changes for UI toggles.
def on_config_changed(self, data: tuple[str, object]) -> None
Parameters
Name Type Description
data
action_rebuild 0
Trigger rebuild.
def action_rebuild(self) -> None
action_clear_log 0
Clear the build log.
def action_clear_log(self) -> None
Internal Methods 2
__init__ 2
Initialize build screen.
def __init__(self, site: Site | None = None, **kwargs) -> None
Parameters
Name Type Description
site Default:None
**kwargs
_run_build 0
Run the build in a background thread.
async
async def _run_build(self) -> None
ServeScreen 10
Serve screen for the unified dashboard. Shows dev server status, file changes, and build history. …

Serve screen for the unified dashboard.

Shows dev server status, file changes, and build history. Reuses components from BengalServeDashboard.

Dashboard API Integration (RFC: rfc-dashboard-api-integration):

  • FileWatcherLog for real-time file change display
  • RequestLog for HTTP request logging
  • ContentBrowser for page/section navigation

Attributes

Name Type Description
BINDINGS ClassVar[list[Binding]]

Methods

compose 0 ComposeResult
Compose serve screen layout.
def compose(self) -> ComposeResult
Returns
ComposeResult
on_mount 0
Set up serve screen.
def on_mount(self) -> None
action_open_browser 0
Open browser to dev server.
def action_open_browser(self) -> None
action_force_rebuild 0
Force rebuild - switch to build screen and trigger rebuild.
def action_force_rebuild(self) -> None
Internal Methods 5
__init__ 2
Initialize serve screen.
def __init__(self, site: Site | None = None, **kwargs)
Parameters
Name Type Description
site Default:None
**kwargs
_get_server_info 0 str
Get server info text.
def _get_server_info(self) -> str
Returns
str
_get_full_server_url 0 str
Get the full server URL including site baseurl.
def _get_full_server_url(self) -> str
Returns
str
_get_page_count 0 str
Get page count.
def _get_page_count(self) -> str
Returns
str
_get_asset_count 0 str
Get asset count.
def _get_asset_count(self) -> str
Returns
str
HealthScreen 6
Health screen for the unified dashboard. Shows health issues in a tree with details panel. Reuses …

Health screen for the unified dashboard.

Shows health issues in a tree with details panel. Reuses components from BengalHealthDashboard.

Dashboard API Integration (RFC: rfc-dashboard-api-integration):

  • ContentBrowser for page/section navigation
  • AssetExplorer for asset inspection
  • TaxonomyExplorer for taxonomy drill-down
  • Deep HealthReport integration with issue categorization

Attributes

Name Type Description
BINDINGS ClassVar[list[Binding]]

Methods

compose 0 ComposeResult
Compose health screen layout.
def compose(self) -> ComposeResult
Returns
ComposeResult
on_mount 0
Set up health screen.
def on_mount(self) -> None
action_rescan 0
Rescan site health.
def action_rescan(self) -> None
Internal Methods 2
__init__ 2
Initialize health screen.
def __init__(self, site: Site | None = None, **kwargs)
Parameters
Name Type Description
site Default:None
**kwargs
_run_health_scan 0
Run health scan in background thread.
async
async def _run_health_scan(self) -> None
HelpScreen 3
Help screen showing keyboard shortcuts.

Help screen showing keyboard shortcuts.

Attributes

Name Type Description
BINDINGS ClassVar[list[Binding]]

Methods

compose 0 ComposeResult
Compose help screen.
def compose(self) -> ComposeResult
Returns
ComposeResult
action_pop_screen 0
Close help screen.
def action_pop_screen(self) -> None