Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
36574cf
test: a lease row opens a drawer named after its holder over the tabl…
V3RON Oct 20, 2026
99256a3
feat(console): a lease opens in a drawer over the leases table (#765)
V3RON Oct 20, 2026
e3fb0ac
test(console): the other specs follow the leases table and drawer (#765)
V3RON Oct 20, 2026
e8dc7a5
test: Escape, the close button and the dim layer each close the drawe…
V3RON Oct 20, 2026
765d23b
feat(console): closing the drawer goes back a step when it was opened…
V3RON Oct 20, 2026
6cebe1c
test: loaded directly at a lease, closing replaces the address and fo…
V3RON Oct 20, 2026
bcbdc2e
feat(console): closing a drawer opened directly replaces the address …
V3RON Oct 20, 2026
bf058d1
test: a lease that ends while its drawer is open, and one never held,…
V3RON Oct 20, 2026
0b7aacf
feat(console): a lease that is not held says so in the drawer (#765)
V3RON Oct 20, 2026
8ffb989
test: switching tabs keeps the capture running, closing the drawer st…
V3RON Oct 20, 2026
65d1937
test: the dim layer covers the sidebar, the drawer animates once, fil…
V3RON Oct 20, 2026
69933fa
test: the Events tab lists the held events whose payload.leaseId is t…
V3RON Oct 20, 2026
9f1d227
feat(console): the events that name a lease (#765)
V3RON Oct 20, 2026
9c39373
test: on a gateway the Events tab shows a worker's relayed event for …
V3RON Oct 20, 2026
a2e8940
test: the Events tab lists the events that name the lease (#765)
V3RON Oct 20, 2026
9ee0f32
feat(console): the drawer's Events tab (#765)
V3RON Oct 20, 2026
ba0e957
test: the Leases search matches part of the holder, model, worker or …
V3RON Oct 20, 2026
54c65fd
feat(console): match a lease search against holder, model, worker and…
V3RON Oct 20, 2026
9a93254
test: the search sets ?q=, a lease opened from it keeps ?q=, closing …
V3RON Oct 20, 2026
04335ff
feat(console): search leases by holder, model, worker or id, kept in …
V3RON Oct 20, 2026
6204682
test: search resets the page, and the toolbar lays out chips left and…
V3RON Oct 20, 2026
7bd769b
test: ui-base-ui-in-ds-only fires for an import of Base UI from the s…
V3RON Oct 20, 2026
fd59a09
feat(console): only the design system imports Base UI (#765)
V3RON Oct 20, 2026
733fb42
test: Overview's tiles and links land on /queue, /fleet and /activity…
V3RON Oct 20, 2026
66e2742
feat(console): Workers, Waiting and Events live at /fleet, /queue and…
V3RON Oct 20, 2026
268bb85
test: the sidebar shows Overview and Attention, then Operate, then Ob…
V3RON Oct 20, 2026
5f53d88
feat(console): a grouped sidebar, and Fleet, Queue and Activity as pa…
V3RON Oct 20, 2026
8eecd3f
test: /fleet, /queue and /activity open the pages titled Fleet, Queue…
V3RON Oct 20, 2026
e8ef7cb
test: itemPath and itemIdFrom round-trip an id with a slash for /flee…
V3RON Oct 20, 2026
bf41e9f
test: the CSP and axe passes open a lease drawer (#765)
V3RON Oct 20, 2026
7435631
feat(console): IconButton in the design system, used by the drawer's …
V3RON Oct 20, 2026
ab1f075
docs(console): the grouped sidebar, the renamed pages and the lease d…
V3RON Oct 20, 2026
0f99884
refactor(console): export IconButton only where used, and simplify th…
V3RON Oct 20, 2026
f237acf
fix(console): the real-proxy lane follows the Fleet rename, Escape's …
V3RON Oct 20, 2026
dc523c0
fix(console): an empty search says so, the drawer's route logic lives…
V3RON Oct 20, 2026
d995753
test(console): the empty-list text names the search (#765)
V3RON Oct 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .dependency-cruiser.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const escape = (path) => path.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
const testFile = "(\\.test\\.tsx?|/test-[^/]+\\.tsx?)$";
const linkTestFile = "(\\.test\\.tsx?|/test-[^/]+\\.tsx?|/testing\\.ts)$";
// why: the console layers below the screens are plain TypeScript, so a test drives them without a browser.
const uiLibrary = "(^|node_modules/)(react|react-dom|recharts|@tanstack/[^/]+)(/|$)";
const uiLibrary = "(^|node_modules/)(react|react-dom|recharts|@base-ui/react|@tanstack/[^/]+)(/|$)";
const fsOrProcess = "^(node:)?(fs|fs/promises|child_process)$";

// why: e2e imports the compiled package from dist/, which mirrors src/, so each component's rule covers its compiled copy too.
Expand Down Expand Up @@ -252,6 +252,12 @@ export default {
"^ui/src/screens/",
{ path: "^ui/src/(app|data|model)/" },
),
direction(
"ui-base-ui-in-ds-only",
"only the console's design system imports Base UI; everything else uses its wrapped parts",
"^ui/src/(?!ds/)",
{ path: "(^|node_modules/)@base-ui/react(/|$)" },
),
direction(
"cli-router-imports-no-component-values",
"the CLI's router answers --help and a usage error before any component loads: these files reach another component only for types, by dynamic import, or statically for agent-identity alone, so the fast paths load no component code",
Expand Down
1 change: 1 addition & 0 deletions .fallowrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"@fontsource-variable/geist",
"@fontsource-variable/geist-mono",
"recharts",
"@base-ui/react",
"@tanstack/react-table",
"@tanstack/react-virtual",
// Recharts' peer dependency: installed for it, never imported by the console itself.
Expand Down
17 changes: 12 additions & 5 deletions docs/internal/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ put together from them and draws nothing of its own that one of them already dra

- **Sidebar.** The console's navigation, on the left of every signed-in page: the "SIMLOCK"
wordmark (`--on-accent` on an `--accent` block), one link per page in a fixed order (Overview,
Workers, Leases, Waiting, Attention, Events, Usage), then at the bottom the connection as a status,
Attention, then the **Operate** group: Fleet, Leases, Queue; then the **Observe** group:
Activity, Usage; each group under its small label, hidden when collapsed), then at the bottom the connection as a status,
"Signed in as <name>" (hidden when collapsed, where the Sign out tooltip reads "Sign out (<name>)"),
**Sign out** (absent for a proxy person with no sign-out address) and the collapse button. A link is an icon and its label in `--text-muted`; the
current one is `--text` on `--field` with a 2px `--accent` bar on its left and
Expand All @@ -146,15 +147,21 @@ put together from them and draws nothing of its own that one of them already dra
opens the links and the bottom block under it.
- **Page.** A page that is not a list, as the overview: its title (`h1`) and its actions on the
right, then its content. No subtitle: the title and what is under it say what the page is.
- **List and inspector.** Every page of things (workers, leases, waiting requests, attention
items, events) is a list on the left, 260–360px wide (wider for events), and the chosen thing in
- **List and inspector.** Fleet, Queue, Attention and Activity (workers, waiting requests,
attention items, events) are each a list on the left, 260–360px wide (wider for events), and the chosen thing in
an inspector filling the rest. The list has a header (the page's title as `h1`, a short count
in mono beside it, then its filters), its rows, and the pager under them. A row is one or two
short lines: a status square, a title, one figure on the right, and at most one muted line or
bar under them; the chosen row is `--surface` with a 2px `--accent` bar on its left and
`aria-current="page"`. The address names the chosen thing (`/workers/<id>`). The inspector
`aria-current="page"`. The address names the chosen thing (`/fleet/<id>`). The inspector
has a breadcrumb, the thing's title (`h2`), one muted line under it, actions on the right, and
then cards, facts, tabs and panels.
- **Table and drawer.** Leases is a toolbar (the filter chips on the left, a search box on the
right, at the page title's padding) over a table. Choosing a row opens a **drawer**: a 480px
panel (full width under 768px) at the right edge over the page, with a dim layer over everything
else, the sidebar included. It has a title (the holder), a 40px square close button (`IconButton`)
and tabs. Escape, the close button and the dim layer close it. It slides in once, when it opens,
and switching its tabs does not replay that. It uses no status colour of its own.
- **Stat tiles.** A row of tiles: a label, a big number (`--text-xl`), and a short unit in mono
beside it ("of 48", "last hour"). A tile that leads somewhere is a link as a whole. A tile
shows only numbers its page already has; it never makes a request of its own.
Expand Down Expand Up @@ -252,7 +259,7 @@ put together from them and draws nothing of its own that one of them already dra
Short, and only where it says where something came from. Colour changes on hover take 120ms
(`--duration`). Moves take 220ms (`--duration-move`) on one easing (`--ease`): the sidebar
widens and narrows; a page rises 10px as it opens; a list slides in from the left and an
inspector from the right, again each time another thing is chosen; the chosen row's bar and a
inspector from the right, again each time another thing is chosen; a drawer from the right, once, when it opens; the chosen row's bar and a
meter or share bar slide to their new place. Nothing loops, nothing moves on its own, and
charts never animate. With `prefers-reduced-motion: reduce`, there are no transitions and no
animations at all.
Expand Down
6 changes: 3 additions & 3 deletions e2e/console/attention.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ test.describe("the attention view", () => {
await expect(page.getByRole("heading", { level: 2, name: "worker-b" })).toBeVisible();
await expect(page.getByRole("link", { name: "Open worker" })).toHaveAttribute(
"href",
`/workers/${encodeURIComponent(b?.id ?? "")}`,
`/fleet/${encodeURIComponent(b?.id ?? "")}`,
);
await expect(facts(page)).toContainText("Leases still held");
const recent = page.getByRole("region", { name: "Recent events" });
await expect(recent.getByRole("link", { name: /worker\.drain-started/ })).toHaveAttribute(
"href",
/^\/events\/.+/,
/^\/activity\/.+/,
);
} finally {
await disposeFleet(fleet);
Expand Down Expand Up @@ -485,7 +485,7 @@ test.describe("the attention view", () => {
await expect(page.getByRole("heading", { level: 2, name: "old-worker" })).toBeVisible();

await follow(page.getByRole("link", { name: "Open worker" }));
await expect(page).toHaveURL(/\/workers\/wrk_old$/);
await expect(page).toHaveURL(/\/fleet\/wrk_old$/);
} finally {
hangUp();
await gateway.dispose();
Expand Down
24 changes: 12 additions & 12 deletions e2e/console/events.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ async function cliEvents(daemon: RunningDaemon): Promise<readonly Envelope[]> {
.map((line) => JSON.parse(line) as Envelope);
}

async function openEvents(page: Page, daemon: RunningDaemon, path = "/events"): Promise<void> {
async function openEvents(page: Page, daemon: RunningDaemon, path = "/activity"): Promise<void> {
await page.goto(new URL(path, daemon.url).href);
await signIn(page, daemon.tokens.operator);
await expect(page.getByRole("heading", { level: 1, name: "Events" })).toBeVisible();
await expect(page.getByRole("heading", { level: 1, name: "Activity" })).toBeVisible();
}

function feed(page: Page): Locator {
Expand Down Expand Up @@ -80,7 +80,7 @@ async function shownEvents(page: Page): Promise<string[]> {
[
item.querySelector("time")?.getAttribute("datetime") ?? "",
name?.textContent ?? "",
link?.getAttribute("href")?.replace("/events/", "") ?? "",
link?.getAttribute("href")?.replace("/activity/", "") ?? "",
].join(" "),
);
}
Expand All @@ -97,7 +97,7 @@ function asShown(event: Envelope): string {
}

async function openEvent(page: Page, id: string): Promise<void> {
const link = feed(page).locator(`a[href="/events/${encodeURIComponent(id)}"]`);
const link = feed(page).locator(`a[href="/activity/${encodeURIComponent(id)}"]`);
await feed(page).evaluate((box) => box.scrollTo({ top: 0 }));
for (let step = 0; step < 200 && (await link.count()) === 0; step += 1) {
await feed(page).evaluate((box) => box.scrollBy({ top: box.clientHeight / 2 }));
Expand Down Expand Up @@ -129,7 +129,7 @@ test.describe("the events page", () => {
await expect(granted).toHaveCount(1, { timeout: 1_000 });
await granted.click();
await expect(title(page)).toHaveText("lease.granted");
await expect(page).toHaveURL(/\/events\/[^/]+$/);
await expect(page).toHaveURL(/\/activity\/[^/]+$/);
await expect(page.getByText("leaseId", { exact: true })).toBeVisible();
await expect(page.locator("dd", { hasText: new RegExp(`^${id}$`) })).toBeVisible();

Expand Down Expand Up @@ -176,7 +176,7 @@ test.describe("the events page", () => {

await openEvent(page, (started as Envelope).id);

await expect(page).toHaveURL(new RegExp(`/events/${(started as Envelope).id}$`));
await expect(page).toHaveURL(new RegExp(`/activity/${(started as Envelope).id}$`));
await expect(title(page)).toHaveText("daemon.started");
await expect(page.getByRole("heading", { level: 2, name: "Payload" })).toBeVisible();
await page.reload();
Expand All @@ -189,11 +189,11 @@ test.describe("the events page", () => {
test("an event the feed does not hold says so and links back", async ({ page }) => {
const host = await startDaemon("worker", { driverScript: { ios: IOS } });
try {
await openEvents(page, host, "/events/evt_not_there");
await openEvents(page, host, "/activity/evt_not_there");

await expect(page.getByText("Event not in the last hour.")).toBeVisible();
await page.getByRole("link", { name: "Back to events" }).click();
await expect(page).toHaveURL(/\/events$/);
await page.getByRole("link", { name: "Back to Activity" }).click();
await expect(page).toHaveURL(/\/activity$/);
} finally {
await host.dispose();
}
Expand Down Expand Up @@ -330,13 +330,13 @@ async function keyboardOnly(page: Page, host: RunningDaemon, tab: string): Promi
await page.keyboard.press("Enter");
await expect(page.getByRole("navigation").first()).toBeVisible();

const nav = page.getByRole("link", { name: "Events", exact: true });
const nav = page.getByRole("link", { name: "Activity", exact: true });
for (let step = 0; step < 30 && !(await isFocused(nav)); step += 1) {
await page.keyboard.press(tab);
}
await expect(nav).toBeFocused();
await page.keyboard.press("Enter");
await expect(page.getByRole("heading", { level: 1, name: "Events" })).toBeVisible();
await expect(page.getByRole("heading", { level: 1, name: "Activity" })).toBeVisible();
await expect(rows(page).filter({ hasText: "lease.granted" })).not.toHaveCount(0);

const all = page.getByRole("radio", { name: "All" });
Expand All @@ -358,7 +358,7 @@ async function keyboardOnly(page: Page, host: RunningDaemon, tab: string): Promi
await expect(feed(page)).toBeFocused();
await page.keyboard.press(tab);
await page.keyboard.press("Enter");
await expect(page).toHaveURL(/\/events\/[^/?]+\?subject=lease$/);
await expect(page).toHaveURL(/\/activity\/[^/?]+\?subject=lease$/);
}

async function isFocused(locator: Locator): Promise<boolean> {
Expand Down
13 changes: 9 additions & 4 deletions e2e/console/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,14 +503,19 @@ export async function signIn(page: Page, token: string): Promise<void> {

export const NAV = [
{ label: "Overview", path: "/" },
{ label: "Workers", path: "/workers" },
{ label: "Leases", path: "/leases" },
{ label: "Waiting", path: "/waiting" },
{ label: "Attention", path: "/attention" },
{ label: "Events", path: "/events" },
{ label: "Fleet", path: "/fleet" },
{ label: "Leases", path: "/leases" },
{ label: "Queue", path: "/queue" },
{ label: "Activity", path: "/activity" },
{ label: "Usage", path: "/usage" },
] as const;

export const NAV_GROUPS = [
{ label: "Operate", links: ["Fleet", "Leases", "Queue"] },
{ label: "Observe", links: ["Activity", "Usage"] },
] as const;

export const NAV_LABELS = NAV.map((entry) => entry.label);

// why: pages slide and fade in; an audit or a measurement taken mid-way reads a half-faded colour.
Expand Down
Loading
Loading