yera.ui.rendering.context
Define the trusted rendering boundary and complete shell input.
TrustedHTML identifies fragments already assembled by Yera renderers. The
type adds no runtime sanitization: callers must escape untrusted values before
marking a fragment trusted. ShellContext keeps those fragments distinct from
plain values that the shell renderer escapes itself.
Symbols
ShellContext
Supply all dynamic content required to render one browser shell.
Fields typed as TrustedHTML are inserted as complete fragments. Plain
string fields are data and are escaped by render_shell before template
substitution.
Fields
Trusted input-composer fragment.
Trusted SSE-listener fragment.
Plain browser-page title.
Stable key of the active top-level screen.
Plain sidebar context identifier.
Whether the desktop sidebar starts expanded.
Plain active-session identifier.
Plain user-facing session title.
Plain active-app identifier.
Trusted primary-screen fragment.
Plain URL used to load contextual sidebar content.
Trusted Live-screen workspace fragment.
Trusted optional activity-drawer fragment.
URL used to refresh the drawer content.
Methods
ShellContext.__init__
__init__(
composer: TrustedHTML,
listener: TrustedHTML,
page_title: str = '',
current_screen: str = '',
initial_sidebar: str = '',
sidebar_open: bool = False,
session_id: str = '',
session_title: str = '',
app_id: str = '',
main_content: TrustedHTML = TrustedHTML(''),
initial_sidebar_url: str = '',
live_workspace_content: TrustedHTML = TrustedHTML(''),
activity_drawer_content: TrustedHTML = TrustedHTML(''),
activity_drawer_refresh_url: str = '',
) → None