yera.ui.fastapi_routes.shell

Serve complete browser UI screens and canonical navigation redirects.

These routes return full shell documents rather than HTMX sidebar fragments. They render app discovery, live sessions, persisted history, and individual session transcripts from the app registry and session store.

Symbols

def register_shell_routes — Register full-page shell routes and stable navigation destinations.

register_shell_routes

register_shell_routes(
    app: FastAPI,
    apps: Mapping[str, AppReference],
    session_store: BaseSessionStore,
    enter_server: EnterServer,
    session_requires_replay: SessionRequiresReplay,
) → None

Register full-page shell routes and stable navigation destinations.

The route family serves Apps, Live, Sessions, and individual session screens. It also owns the root-entry redirect and the stable Yera Link handoff. Unknown app selections return 404 responses; an unknown direct session URL redirects to the root entry flow.

Session shells choose live streaming or persisted replay through session_requires_replay. Screen and sidebar HTML is produced by the rendering layer before being wrapped in an HTML response.

Parameters

app
type: FastAPI

FastAPI application receiving the routes.

apps
type: Mapping[str, AppReference]

Available applications keyed by stable identifier.

session_store
type: BaseSessionStore

Store used to list and retrieve persisted sessions.

enter_server
type: EnterServer

Callback that resolves the configured root destination.

session_requires_replay
type: SessionRequiresReplay

Callback that reports whether a session shell must request stored replay instead of attaching to a live stream.