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
AppInspectorField
Describe one normalized value shown in an app inspector.
Fields
User-facing field label.
Complete field value.
Optional compact value displayed before expansion.
Whether the inspector exposes disclosure controls.
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,
) → Nonebuild_app_inspector_fields
build_app_inspector_fields(
app_id: str,
metadata: AppMetadata,
) → list[AppInspectorField]Build ordered inspector fields from available app metadata.
Parameters
Canonical identifier used to determine the app's source.
App metadata from which to build the inspector contents.
Returns
Ordered declarative fields describing the app.
render_app_inspector_fields
render_app_inspector_fields(
fields: list[AppInspectorField],
) → TrustedHTMLRender app metadata fields for the sidebar inspector.
Field labels and values are escaped before being inserted into the generated markup.
Parameters
Ordered declarative fields to render.
Returns
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],
) → TrustedHTMLRender app metadata and session creation in the sidebar.
Parameters
Plain-text display name of the selected app.
Trusted, already-rendered icon markup.
URL used to create a session for the selected app.
Ordered declarative metadata fields to display.
Returns
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,
) → TrustedHTMLRender the app-selection main screen.
Visible built-in apps and project apps are presented in separate tree sections.
Parameters
Available apps indexed by canonical identifier.
Optional identifier of the currently selected app.
Returns
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],
) → TrustedHTMLRender app metadata as a pushed mobile detail screen.
Parameters
Plain-text display name of the selected app.
Trusted, already-rendered icon markup.
URL used to create a session for the selected app.
Ordered declarative metadata fields to display.
Returns
Trusted HTML for the selected app's mobile detail screen.