yera.ui.rendering.views.apps

Render app discovery, inspection, and session-starting interfaces.

App metadata is normalized into declarative inspector fields before rendering. Names, identifiers, documentation, source paths, and parameter descriptions are escaped when converted into trusted screen, sidebar, and mobile-detail fragments.

Symbols

class AppInspectorField — Describe one normalized value shown in an app inspector.
def build_app_inspector_fields — Build ordered inspector fields from available app metadata.
def render_app_inspector_fields — Render app metadata fields for the sidebar inspector.
def render_app_sidebar — Render app metadata and session creation in the sidebar.
def render_apps_home — Render the app-selection main screen.
def render_mobile_app_detail — Render app metadata as a pushed mobile detail screen.

AppInspectorField

Describe one normalized value shown in an app inspector.

Fields

label
type: str (required)

User-facing field label.

value
type: str (required)

Complete field value.

summary
type: str | None = None

Optional compact value displayed before expansion.

expandable
type: bool = False

Whether the inspector exposes disclosure controls.

preview_lines
type: int = 1

Number of lines retained in the collapsed preview.

Methods


AppInspectorField.__init__

__init__(
    label: str,
    value: str,
    summary: str | None = None,
    expandable: bool = False,
    preview_lines: int = 1,
) → None

build_app_inspector_fields

build_app_inspector_fields(
    app_id: str,
    metadata: AppMetadata,
) → list[AppInspectorField]

Build ordered inspector fields from available app metadata.

Parameters

app_id
type: str

Canonical identifier used to determine the app's source.

metadata
type: AppMetadata

App metadata from which to build the inspector contents.

Returns

type: list[AppInspectorField]

Ordered declarative fields describing the app.

render_app_inspector_fields

render_app_inspector_fields(
    fields: list[AppInspectorField],
) → TrustedHTML

Render app metadata fields for the sidebar inspector.

Field labels and values are escaped before being inserted into the generated markup.

Parameters

fields
type: list[AppInspectorField]

Ordered declarative fields to render.

Returns

type: TrustedHTML

Trusted HTML containing the sidebar's app metadata fields.

render_app_sidebar

render_app_sidebar(
    app_name: str,
    app_icon: TrustedHTML,
    new_session_url: str,
    fields: list[AppInspectorField],
) → TrustedHTML

Render app metadata and session creation in the sidebar.

Parameters

app_name
type: str

Plain-text display name of the selected app.

app_icon
type: TrustedHTML

Trusted, already-rendered icon markup.

new_session_url
type: str

URL used to create a session for the selected app.

fields
type: list[AppInspectorField]

Ordered declarative metadata fields to display.

Returns

type: TrustedHTML

Trusted HTML for the selected app's sidebar inspector.

render_apps_home

render_apps_home(
    apps: Mapping[str, AppReference],
    selected_app_id: str | None = None,
) → TrustedHTML

Render the app-selection main screen.

Visible built-in apps and project apps are presented in separate tree sections.

Parameters

apps
type: Mapping[str, AppReference]

Available apps indexed by canonical identifier.

selected_app_id
type: str | None = None

Optional identifier of the currently selected app.

Returns

type: TrustedHTML

Trusted HTML for the app-selection screen.

render_mobile_app_detail

render_mobile_app_detail(
    app_name: str,
    app_icon: TrustedHTML,
    new_session_url: str,
    fields: list[AppInspectorField],
) → TrustedHTML

Render app metadata as a pushed mobile detail screen.

Parameters

app_name
type: str

Plain-text display name of the selected app.

app_icon
type: TrustedHTML

Trusted, already-rendered icon markup.

new_session_url
type: str

URL used to create a session for the selected app.

fields
type: list[AppInspectorField]

Ordered declarative metadata fields to display.

Returns

type: TrustedHTML

Trusted HTML for the selected app's mobile detail screen.