Repository navigation
Closed
Labels
task:readySpec checked. An agent may implement it once its Depends on allow.
Description
Part of #88.
Scope
The console looks like Callstack's other consoles (Apex), with orange as
Simlock's accent. The operator gets the same views, laid out the Apex
way: a top tab bar, a page header, stat cards, charts, and tables in cards.
Technical spec
Restyles what #271–#276 built. No new routes, contract changes or views.
The charts read only routes the console already uses.
Modules touched
ui/src/styles.css: new tokens and components.- Page background is off-white, and cards are a shade darker with a
1px border. Square corners, as now. - The accent is orange, used the same way Apex uses its green: the
wordmark block, the active tab underline, filled buttons, links and
focus. Orange never marks a status (DESIGN.md's rule stays). - Labels, tab names, table headers and buttons use Geist Mono,
uppercase and letter-spaced. Titles and body text use Geist. - Buttons:
- Primary is filled orange with dark text.
- Secondary is outlined.
- Quiet is text only.
- Inputs have a grey fill and a 1px border.
- Both themes keep working. The dark theme gets the same structure.
- Page background is off-white, and cards are a shade darker with a
ui/src/shell.tsx: a header and a top tab bar in place of the sidebar.- Header, left: the "SIMLOCK" wordmark in an orange block, and a
"BY CALLSTACK" chip. - Header, right: the connection state in a bordered box (a word
and its colour), then sign-out. - Tab bar: WORKERS, LEASES, WAITING, ATTENTION (with its count),
EVENTS. The active tab has an orange underline. Below 640px wide the
bar scrolls sideways inside itself; the page does not.
- Header, left: the "SIMLOCK" wordmark in an orange block, and a
- Each view (
ui/src/views/*.tsx):- A page header with a title and a one-line muted subtitle. Actions sit
on the right. - A row of stat cards: a mono uppercase label, a big number, and a
small caption. Each card shows only numbers the view already loads,
with no new requests:- Workers: workers (connected of total), devices (running of
total), leases, waiting. - Leases: leases, holders, expiring within 15 minutes.
- Waiting: requests waiting, longest wait.
- Attention: items, workers affected, devices affected.
- Events: events shown, time of the newest.
- Workers: workers (connected of total), devices (running of
- Charts, drawn with Recharts (a dev dependency, bundled like the rest)
in the Apex style: an orange line with a faint orange fill, light grid
lines, and mono axis labels. Every chart has a text title and a caption
stating what it counts. The data and its numbers are also shown as text
beside or under the chart, so nothing is visible only in the picture.- Workers: "Leases, last hour", an area chart of how many leases
were held, minute by minute. It starts from today's lease count and
walks back throughGET /v1/events?since=1h:lease.grantedadds
one, andlease.releasedandlease.expiredtake one away. Beside
it, "Busiest workers": workers ranked by leases held. - Events: "Events per minute", a column chart of the events the
view holds, over the last hour.
- Workers: "Leases, last hour", an area chart of how many leases
- Tables sit in a card with a header (title and description). Headers
are mono uppercase, rows are roomy, and numbers are right-aligned. - Long ids (lease, worker, device) stay on one line, cut with an
ellipsis. The full id is in atitleattribute and on the details
page.
- A page header with a title and a one-line muted subtitle. Actions sit
ui/src/sign-in.tsx: the same card, input and button style, under the
same header.package.json:rechartsas a dev dependency.docs/internal/DESIGN.md: rewritten to match the type, colour use,
components and layout above.docs/CONSOLE.md: only where it names the sidebar or a layout detail.
Contract and event changes
None.
Rules in play
documentation.md: DESIGN.md is a maintainer doc. CONSOLE.md stays
self-contained.testing.md: update locators that relied on the sidebar. Do not weaken
any claim.- ADR 0011 §4 and §5: the CSP stays as it is. Recharts must work under it,
with no<style>element and nothing loaded from another host. If it
cannot, stop and hand off; do not loosen the CSP.
Tests
the shell shows the five tabs and marks the current onethe attention count shows on its tab and hides at zeroeach view shows its stat cards with the numbers its data givesa long lease id stays on one line and its full id is in its titlethe lease history counts back from today's leases through granted, released and expired eventsevents per minute counts each held event in its minute- Browser lane, in Chromium, Firefox and WebKit:
every view has no horizontal page scroll at 360px wideevery view is usable with the keyboard alonethe tab bar moves between views and the page URL followsno view reports a Content-Security-Policy violationa lease taken with the CLI raises the lease chart within a second- every existing browser test still passes.
Done when
- Every view matches the layout above in light and dark themes.
Screenshots of each view in both themes are in the PR. - No status uses orange.
- The browser lane passes in all three browsers.
Out of scope
- An Overview page.
- New routes, or history beyond what
GET /v1/eventsreturns. - Changing what the existing tables and actions do.
Depends on
Approval
- Approved for delivery
Written by an agent.
Metadata
Metadata
Assignees
Labels
task:readySpec checked. An agent may implement it once its Depends on allow.
Activity
chore: screenshots of the console's Apex look for #297
feat(ui): the Apex look in the console (#298)