Expand description
majordomus ui: the primary surface, a product of its own, server-rendered (ADR 0135).
Two surfaces of this process are for a person. The UI (/ui) is the product: the
delivery in the project’s own words — how the work stands, what is planned and blocked,
what is in the queue, which release is live, who is on the mesh, what holds as evidence
and which rules are proven. The Cockpit (/cockpit) is the technical layer beneath it,
the registry rendered, and the UI refers to it only as the low-level reference of a value
(“technical view” on a source line).
It is a projection, never an application. Every screen composes capabilities through the
executor every transport calls, and every value carries the capability and pointer it
was read from (source): inferred, derived and projected, never kept. It holds no data,
no status vocabulary and no route list beyond SCREENS and PANELS, which a test
holds against the dispatcher. It shares mechanics rather than copying them:
- the element builder and the asset server, pointed at
share/ui/; - the content-security policy, with its one hash-pinned inline script;
- the design tokens, the kit and the icon set every surface draws from.
flowchart LR
declaration["capability!"] --> registry["registry"] --> executor["executor"]
executor --> api["MCP, HTTP, command line"]
executor --> ui["UI · /ui<br/>(the product)"]
executor --> cockpit["Cockpit · /cockpit<br/>(its technical reference)"]With no JavaScript, every screen is complete HTML and the menu still opens. The one script adds two things: it pulls in the panels whose sources are slow, which are otherwise reached by their own links, and it reveals the theme toggle.
The UI is mounted on its own prefix, named in the web topology and among the local services by one id, and is a surface apart from the Cockpit:
use majordomus_cli::ui::{PREFIX, SURFACE};
assert_eq!(PREFIX, "/ui");
assert_eq!(SURFACE, "ui");
assert_ne!(PREFIX, majordomus_cli::cockpit::PREFIX, "the Cockpit is another surface");Constants§
- ASSETS_
DIR - The directory of the distribution’s
share/that holds the UI’s files. - ASSETS_
PREFIX - The URL prefix the UI’s files are served under.
- FAVICON
- The UI’s favicon, written from the canonical mark by
majordomus generate. - FRAGMENT
- The query parameter that asks a panel route for the panel alone, without the frame: what the script fetches to fill a slow panel in place.
- GRAPH_
LIB - The vendored graph library, loaded only by a screen that draws a graph.
- PREFIX
- Every UI route starts here.
- SCRIPT
- The script every screen loads.
- STYLESHEET
- The stylesheet every screen links.
- SURFACE
- The UI’s id in the web topology and among the local services, the one name every reader of “which surface is the UI” asks.