Directories | |
| common | |
| tk | |
| tui | |
| web | |
| x11 | |
frontends contains reusable concrete UI implementations. The current graphical frontend uses Tkinter, and frontends/tui provides reusable curses views. Another frontend, such as Qt, can implement the same contracts without changing the toolkit-independent models under ui.
Frontend code must not import apps.carUi. Application routes, domain controllers, resource ownership, and product-specific composition remain in the application package.
The common input dispatcher consumes only the neutral physical-input contracts from input_events. It does not import controller policy or implementations. It queues physical events until the selected frontend thread can deliver them.
A new frontend supplies its own shell, dispatcher, screen host, menu renderer, and application screen factory. It can reuse the contracts and menu models in ui while making no dependency on Tkinter.
Generated API documentation is written under build/doxygen/html.
The native weather map adapter is frontends/common/map_weather_overlay_ui.py. It implements WeatherOverlayUiIf, converts SI weather snapshots into display values and renderer commands, and leaves provider/cache/timer work to controllers. weather_overlay_ui_group.py fans the same immutable snapshot out to map and controls. Toolkit widgets bind explicit request-handler interfaces; composition connects and owns the controllers.
python scripts/check_ui_boundaries.py recursively discovers production Python modules in frontends/, app frontend/ and screens/ directories, controllers/, and ui/. Views cannot add controller, service, transport, network, worker, or process imports; controllers cannot add frontend/framework imports, and UI contracts cannot add either. Relative imports and aliased imports are checked. Composition roots remain outside frontend directories.
Existing dependencies are listed individually in scripts/ui_boundary_exceptions.json, with a reason and occurrence count. The check rejects new dependencies, increased counts, and stale exceptions. Remove entries as coupling is fixed; do not regenerate the baseline to accept new code. The weather gate additionally rejects backend private-state access. These checks run locally in the quality gate and in CI. They check static imports; behavioral contract tests and review remain necessary for indirect runtime dependencies.