From b3390353277920eb4c97fa36ffd70fe326798acf Mon Sep 17 00:00:00 2001 From: "exe.dev user" Date: Thu, 12 Nov 2026 17:29:04 +0000 Subject: [PATCH] Share stable run table metadata widths --- docs/run-table-layout.md | 30 ++++++ packages/app/src/features/runs/history.tsx | 7 +- packages/app/src/features/runs/list.tsx | 5 +- .../app/src/features/runs/table-layout.ts | 17 +++ packages/app/src/shared/ui.tsx | 6 +- packages/app/test/runs.browser.test.mjs | 100 +++++++++++++++++- 6 files changed, 156 insertions(+), 9 deletions(-) create mode 100644 docs/run-table-layout.md create mode 100644 packages/app/src/features/runs/table-layout.ts diff --git a/docs/run-table-layout.md b/docs/run-table-layout.md new file mode 100644 index 00000000..462edef6 --- /dev/null +++ b/docs/run-table-layout.md @@ -0,0 +1,30 @@ +# Run table sizing + +RunList and RunHistory share the widths in `packages/app/src/features/runs/table-layout.ts`. +The width envelope was checked in Chromium against the built app and its actual +table font, header weight, and responsive cell padding (`px-2` below `sm`, `px-3` +from `sm` upward): + +| Column | Fixed width | Representative content used | +| --- | ---: | --- | +| Status | 120px (7.5rem) | `Status (11)` with both sort arrows; all 11 supported statuses selected | +| Elapsed | 160px (10rem) | `59m 59s–1h 2m`, `99999h 59m`, short and missing values | +| Created | 208px (13rem) | Full English and French medium-date/short-time strings and a recent relative date | + +These are border-box table column widths, so they include the responsive cell +padding. The Status cell uses the widest bounded label and arrow state and stays +one line. Elapsed and Created fit the representative content without changing +the existing formatters. Longer durations and locale-specific dates stay in the +same columns, truncate within the cell, and expose the formatted value in the +native title tooltip. The rendered text remains left-aligned. + +Run has no fixed width in either table. With the bounded Project/Job columns, +the minimum table widths leave at least 160px for Run: 62rem for the all-runs +listing, 52rem for RunList with one bounded context column, and 42rem for job +history. On narrow screens, the existing table shell owns horizontal scrolling; +the page itself does not grow horizontally. The fixed metadata widths do not +depend on visible rows, filters, sort direction, pagination, or row updates. + +The browser coverage in `packages/app/test/runs.browser.test.mjs` checks the +header measurements and content matrix at wide and narrow viewports, including +the broader all-runs listing with both Project and Job columns. diff --git a/packages/app/src/features/runs/history.tsx b/packages/app/src/features/runs/history.tsx index d2c99060..0e100a6a 100644 --- a/packages/app/src/features/runs/history.tsx +++ b/packages/app/src/features/runs/history.tsx @@ -4,6 +4,7 @@ import { useQuery } from "@tanstack/react-query"; import { historyQuery } from "./queries"; import { formatElapsedTime } from "../../shared/elapsed-time"; import { formatCreated } from "./format-created"; +import { runTableColumnWidths, runTableMinimumWidths } from "./table-layout"; export type HistorySort = "run" | "status" | "created"; export type HistorySearch = { cursor?: string; previous?: string; states?: RunStatus[]; sort?: HistorySort; direction?: "asc" | "desc" }; export function RunHistory({ jobId }: { jobId: string }) { @@ -23,12 +24,12 @@ export function RunHistory({ jobId }: { jobId: string }) { const clearStatuses = () => void navigate({ to: "/jobs/$jobId", params: { jobId }, search: { ...search, states: undefined, sort: undefined, direction: undefined, cursor: undefined, previous: undefined } }); return
{runs.isPending &&

Loading run history…

}{runs.error &&

{runs.error.message}

} - {runs.data && <> - {columns.slice(1, 2).map(([column, label]) => sortColumn(column)} />)}{columns.slice(2).map(([column, label]) => sortColumn(column)} />)} + {runs.data && <>
Job runs{search.sort ? "" : ", queued and starting first, running second, then other states; newest first within each group"}
Elapsed
+ {columns.slice(1, 2).map(([column, label]) => sortColumn(column)} />)}{columns.slice(2).map(([column, label]) => sortColumn(column)} />)}{runs.data.items.map(run => - + )}{runs.data.items.length === 0 && }
Job runs{search.sort ? "" : ", queued and starting first, running second, then other states; newest first within each group"}
Elapsed
{run.run_name || run.issue_title || "Run"}{(run.failure?.reason || (run.agent_error as any)?.reason) &&

{(run.failure?.reason || (run.agent_error as any).reason)}

}
{run.elapsed_time ? formatElapsedTime(run.elapsed_time) : "—"}{run.elapsed_time ? formatElapsedTime(run.elapsed_time) : "—"}
{search.states?.length ? <>

No runs match the selected statuses.

: "No runs found."}
}