cadrumo.entrypoints.tui.modelo.routes module

The closed route table for the Modelo workspace read destinations.

This is a FIRST CONSTRUCTION, not a migration. No route registry existed before it: the TUI had no route ids, no destination table and no factory map, and destinations were reached by a CLI handler importing a screen directly. So the census this module supports is derived from what it BUILDS – every declared destination resolves to exactly one factory, and every factory answers exactly one declared destination – and never asserted as “zero remaining” over a structure that never had entries to remove.

The destination identities come from ModeloWorkspaceDestinationIdV1 rather than being restated here. That alias is the single definition of the closed set, so a destination cannot be routed that no view model can address, and the completeness check below compares this table against the alias rather than against a copy of it. A hand-listed census would agree with itself.

Factories take an admitted ModeloWorkspaceReadSession and return a screen. They resolve nothing: admission has already happened by the time a route is taken, and a factory that re-resolved would give a destination a different read from the one the operator navigated within.

MODELO_WORKSPACE_DESTINATIONS: Final[dict[ModeloWorkspaceDestinationIdV1, ModeloWorkspaceDestinationFactoryV1]]

Every read destination, keyed by its route identity.

The C1 selection outcome is modelo.workspace.overview: a picker that has resolved a work unit hands the operator the workspace frame, not the bounded review screen it used to reach.

WORKSPACE_SELECTION_OUTCOME: Final[ModeloWorkspaceDestinationIdV1]

The destination a completed work-unit selection lands on.

Named rather than inlined at the call site so the selection outcome has one definition. A launcher that hardcoded a screen class would make the outcome a property of whichever CLI module happened to import it.

declared_destination_ids()[source]

Return the closed destination set, read from its own type alias.

Read from get_args rather than restated, so this cannot drift from the alias the view models address. A literal copy here would be a second definition that agrees with the first only until someone edits one of them.

Return type:

frozenset[str]

resolve_destination(destination)[source]

Return the one factory registered for this destination identity.

Return type:

TypeAliasType

Parameters:

destination (ModeloWorkspaceDestinationIdV1)