web: wrap run titles and give applied filters a separate row

This commit is contained in:
2026-10-20 17:23:07 +01:00
parent c78def70dd
commit 35040fe13f
3 changed files with 68 additions and 17 deletions
+19 -7
View File
@@ -9,6 +9,8 @@
/* The filter/sort menus hang below the toolbar; keep them unclipped so their
bounded, scrollable box can be reached over the rows beneath. */
overflow: visible;
min-width: 0;
width: 100%;
}
.run-toolbar {
@@ -19,20 +21,30 @@
border-bottom: 1px solid var(--border);
}
.run-toolbar .spacer { flex: 1; }
.run-toolbar .pipeline-filter-chip {
.run-applied-filters {
display: flex;
flex-wrap: wrap;
gap: 6px;
min-width: 0;
padding: 0 12px 8px;
border-bottom: 1px solid var(--border);
}
.run-applied-filters .run-filter-chip {
display: inline-flex;
align-items: center;
gap: 8px;
min-width: 0;
max-width: 100%;
border-color: var(--accent);
color: var(--color-text);
padding: 4px 10px;
font-size: 12px;
}
.pipeline-filter-chip > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-filter-chip > span:first-child { min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.run-filter-chip > span:last-child { flex: none; }
@media (max-width: 599px) {
.run-toolbar { flex-wrap: wrap; gap: 6px; padding: 8px 12px; }
.run-toolbar .pipeline-filter-chip { max-width: 100%; min-height: 44px; }
.run-applied-filters .run-filter-chip { min-height: 44px; }
}
.run-toolbar button.ghost { padding: 4px 10px; font-size: 12px; }
.filter-btn.active { border-color: var(--accent); color: var(--accent); }
@@ -135,7 +147,7 @@
color: var(--muted);
}
.run-row { display: block; padding: 8px 12px; }
.run-row { display: block; padding: 8px 12px; width: 100%; min-width: 0; box-sizing: border-box; }
.run-row-head { display: flex; align-items: center; gap: 8px; }
/* The pipeline name leads the row; the stored task title is its second line. */
.run-row-head .run-row-pipeline-name {
@@ -147,9 +159,9 @@
white-space: nowrap;
}
.run-row-title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
white-space: normal;
overflow-wrap: anywhere;
color: var(--color-text);
font-weight: 500;
}
+24 -9
View File
@@ -36,6 +36,8 @@ export function createRunsView(rt) {
function renderRunList(now = Date.now()) {
const pane = h("div", { class: "list runs" });
pane.append(renderRunToolbar());
const applied = renderAppliedRunFilters();
if (applied) pane.append(applied);
const scroll = h("div", { class: "run-scroll list-scroll" });
if (state.loading && !state.runs.length) {
@@ -200,20 +202,33 @@ function renderRunToolbar() {
h("span", { class: "spacer" }),
renderAttentionBell(),
);
return toolbar;
}
function renderAppliedRunFilters() {
if (runFiltersActiveCount(state.runFilters) === 0) return null;
const applied = h("div", { class: "run-applied-filters", "aria-label": "Applied run filters" });
const chip = (label, clear, className = "") => h("button", {
class: `run-filter-chip ${className}`,
type: "button",
"aria-label": `Clear filter: ${label}`,
title: `Clear filter: ${label}`,
onclick: clear,
}, h("span", { text: label }), h("span", { "aria-hidden": "true", text: "×" }));
const pipelineId = state.runFilters.pipelineId;
if (pipelineId != null) {
const name = state.pipelines.find((pipeline) => pipeline.id === pipelineId)?.name ??
state.runs.find((run) => run.pipeline_id === pipelineId)?.name ?? `Pipeline ${pipelineId}`;
const chip = h("button", {
class: "pipeline-filter-chip",
type: "button",
"aria-label": `Clear pipeline filter: ${name}`,
title: `Showing only ${name}`,
onclick: () => setPipelineFilter(null),
}, h("span", { text: name }), h("span", { "aria-hidden": "true", text: "×" }));
toolbar.insertBefore(chip, toolbar.querySelector(".spacer"));
applied.append(chip(name, () => setPipelineFilter(null), "pipeline-filter-chip"));
}
return toolbar;
for (const status of state.runFilters.statuses) {
applied.append(chip(status, () => toggleStatusFilter(status)));
}
const range = RUN_TIME_RANGES.find((entry) => entry.value === state.runFilters.timeRange);
if (range && state.runFilters.timeRange !== defaultRunFilters().timeRange) {
applied.append(chip(range.label, () => setTimeRangeFilter(defaultRunFilters().timeRange)));
}
return applied;
}
/** One small live-stream badge (LiveBadge.kt): a dot plus the honest word. */
+25 -1
View File
@@ -69,7 +69,7 @@ try {
await page.waitForSelector(".run-pipeline");
await page.click(".run-pipeline");
await page.waitForSelector("#runPrompt");
await page.fill("#runPrompt", "Scratch admission reconciliation");
await page.fill("#runPrompt", "Scratch admission reconciliation with a deliberately long title that must wrap cleanly across the run list without clipping or widening the selected row");
await page.fill("#runWorkspace", workspace);
await page.click(".run-start-confirm");
await eventually(() => page.evaluate("sessionStorage.getItem('probe-dropped') === 'yes'"));
@@ -128,6 +128,30 @@ try {
await page.waitForSelector(".pipeline-filter-chip");
assert.equal(await page.evaluate("document.querySelectorAll('.list.runs .run-row').length"), 1);
if (process.env.PIPELINES_CAPTURE_DIR) await page.screenshot(join(process.env.PIPELINES_CAPTURE_DIR, "pipeline-filtered-runs.png"));
for(const width of [390,420]) {
await page.resize(width,844);
await eventually(() => page.evaluate("document.getAnimations().every(a=>a.playState!=='running')"));
const dimensions=await page.evaluate(`(() => {
const toolbar=document.querySelector('.run-toolbar').getBoundingClientRect();
const applied=document.querySelector('.run-applied-filters').getBoundingClientRect();
const title=document.querySelector('.run-row-title');
const row=document.querySelector('.run-row').getBoundingClientRect();
const scroll=document.querySelector('.run-scroll');
return {toolbarBottom:toolbar.bottom,filterTop:applied.top,titleHeight:title.getBoundingClientRect().height,lineHeight:parseFloat(getComputedStyle(title).lineHeight),whiteSpace:getComputedStyle(title).whiteSpace,rowWidth:row.width,listWidth:scroll.clientWidth,scrollWidth:scroll.scrollWidth,pageWidth:document.documentElement.scrollWidth};
})()`);
assert.ok(dimensions.filterTop>=dimensions.toolbarBottom-1);
assert.equal(dimensions.whiteSpace,'normal');
assert.ok(dimensions.titleHeight>dimensions.lineHeight*1.5);
assert.ok(Math.abs(dimensions.rowWidth-dimensions.listWidth)<1);
assert.ok(dimensions.scrollWidth<=dimensions.listWidth && dimensions.pageWidth<=width);
if(process.env.PIPELINES_CAPTURE_DIR) await page.screenshot(join(process.env.PIPELINES_CAPTURE_DIR,`wrapped-run-title-${width}.png`));
}
await page.resize(1100,844);
await page.click('.run-row');
await page.waitForSelector('.run-row.selected');
await eventually(() => page.evaluate("document.getAnimations().every(a=>a.playState!=='running')"));
assert.equal(await page.evaluate("Math.round(document.querySelector('.run-row.selected').getBoundingClientRect().width)===document.querySelector('.run-scroll').clientWidth"),true);
if(process.env.PIPELINES_CAPTURE_DIR) await page.screenshot(join(process.env.PIPELINES_CAPTURE_DIR,'full-width-selected-run.png'));
console.log("Lost launch acknowledgement + reload reconciled to the single admitted run.");
} finally {
await browser?.close();