The console¶
The console is where you talk to the steward: an installable web app that repo-steward inbox serves itself on port 8000, behind your TLS proxy at console.url. RetroSpeedLab's runs at steward.retrospeedlab.com, in its brass-on-ink theme.
What it shows¶
Every screen is described as A2UI messages, protocol v1.0 with its basic catalog. The steward builds them with a2ui-core 0.8.0 and streams them over Server-Sent Events; the page renders them with the official Lit renderer, @a2ui/lit and @a2ui/web_core 0.17.0. Your button presses go back as A2UI action messages.
| Screen | What it holds |
|---|---|
| New request | A text field and Send: a request opens a new thread, a command such as pause plans answers at once |
| Plans | The plan and step in progress, plans stopped after two failures, a usage-limit pause, the latest notices, and Pause plans / Resume plans |
| A card per thread | Its title, its status line, a short summary, the latest three notes, its pull requests with their CI state, any approvals, and the buttons |
| The thread view | Every note of the thread, oldest first, and a reply field |
| Cards of other services | Whatever another service put in through the producer API |
The buttons¶
| Button | Effect |
|---|---|
| Work on it now / Work on it again | Queues the thread first and starts a session on it, or says when it starts |
| Done, check again | You say the task is done: a session verifies the result, and answers with ✅ only when it really passed |
| Dismiss | Deletes the thread and its queued requests |
| Approve / Deny | Opens your backend's decision page for a proposed server step (see Approvals) |
| A reply in the thread | Continues the thread's work with your message and the thread so far |
A button that no longer fits the thread's state, for example Work on it while a session already works on it, answers with what is happening instead.
Status lines¶
Each note the steward writes starts with a mark. The card's status line is the latest note with one of these marks, apart from ⏳:
| Mark | Meaning | Pushed |
|---|---|---|
| ⏳ | Queued behind the running session | No |
| 🔧 | A session works on it | No |
| 🔀 | A pull request opened or merged | Yes |
| ⚠️ | CI failed or the change was dropped; it is queued again | Yes |
| ♻️ | Bugsink saw a resolved issue again | Yes |
| ⏸️ | Paused for a usage limit until the reset | No |
| 🧑 | Needs you: an answer, an approval or an owner merge | Yes |
| ✅ | Done | Yes |
Web Push¶
Press Notify me in the console once on each device. The browser subscribes with the steward's VAPID public key, which the console derives from VAPID_PRIVATE_KEY, and the steward keeps the subscription in /workspace/push.json. A note with one of the pushed marks above, a new Bugsink alert, a plan that stopped and a producer card with notify: true reach every subscribed device. A tap on the notification opens its thread.
Pushes are signed with the VAPID key, with console.url as the contact, and live for a day: a phone that is off longer misses the note, and the console still shows it. A subscription the push service reports as gone is dropped. On an iPhone, Web Push needs the console installed on the home screen.
Generate the key pair once and keep the private key in your vault:
npx web-push generate-vapid-keys
VAPID_PRIVATE_KEY is the private key exactly as printed: 32 bytes in base64url. The steward refuses to start with any other length.
Discord sign-in¶
Discord only proves who you are; the session is the steward's own.
GET /loginsends you to Discord with an OAuth2 authorization code request with PKCE (S256), theidentifyscope andprompt=none. The state and the code verifier travel in a signed,HttpOnlycookie that lasts ten minutes.- Discord sends you back to
GET /auth/discord. The steward checks the state, exchanges the code with the verifier, and asks Discord's API for your user id. - Only when the id equals
console.ownerdoes the steward set its session cookie,__Host-steward-session: signed withCONSOLE_SESSION_SECRET,Secure,HttpOnly,SameSite=Strict, valid for 30 days. Everyone else gets 403, and the attempt is logged.
Every POST needs the session's CSRF token in the X-CSRF-Token header and the console's own Origin. Every response carries a strict Content-Security-Policy that lets the page run only its own bundled script and talk only to the steward, plus HSTS, nosniff, no-referrer and a same-origin opener policy.
Changing CONSOLE_SESSION_SECRET signs every device out.
Approvals¶
A destructive server step needs your signature, and the steward never holds the key that makes it. Approve and Deny on a card are links to your backend's decision page, GET {backend.url}/maintainer/decisions/{component}, with approve_<id>, deny_<id> or enable_<commit> as the component. The backend shows the step from its own record, signs you in with Discord itself, checks your user id, signs or records the decision with ops-gate, and redirects you to {console.url}/?decided=<component>. The console then tells the steward, which fetches the signature from the backend and runs the step once. So a session that took over the steward still cannot approve its own commands. The backend's calls are listed in the reference.
Routes¶
| Route | Purpose |
|---|---|
GET /login, GET /auth/discord |
Discord OAuth2 sign-in |
GET / |
The page; without a session it redirects to /login |
GET /session |
The session's CSRF token and the VAPID public key |
GET /stream, GET /stream/{thread} |
The A2UI stream of the board or one thread |
POST /actions |
Your A2UI actions |
POST /decisions |
The decision the backend sent you back with |
POST /push |
A Web Push subscription |
POST /logout |
Signs out |
GET /theme.css |
The colours of console.theme |
/api/... |
The producer API, with its own key |
Theme¶
The package's look is neutral. console.theme sets a light or dark scheme and five colours; RetroSpeedLab's brass on ink:
console:
theme:
scheme: dark
accent: "#e6b85c"
on_accent: "#120f12"
background: "#120f12"
surface: "#1d171c"
text: "#fff8e8"