fix(webui): reset the stage filter on an attempt switch

A stage filter is a command scoped to the attempt it was made on: the
rail set it against that attempt's stage list. selectAttempt and
performRetry left filters untouched, so a stage selected on attempt 2
carried into attempt 1 -- a same-named stage there rendered as selected
without ever being commanded, or the log stayed narrowed to a stage the
new attempt does not have. The stage filter now resets when the selected
attempt changes; the level filter is attempt-agnostic and survives.

The master-detail PRD absorbs the adversarial review's verified findings:
the reload claim is narrowed to the URL contract (filters are not in the
URL), the unimplemented scroll and pinned claims are dropped, the
unnamed-stage and level-filter contracts are stated, the rail inventory
is corrected, and the acceptance list gains criteria for the
command-not-binding rule, attempt-switch reset, and keyboard selection.
This commit is contained in:
sam committed 2026-09-23 11:31:58 +10:00
1 parent 89fc8fc7f1
commit 00cfd6bda0
4 files changed
+51 -30

No files matched your search

+9
View File
@@ -297,6 +297,15 @@ export function provideTaskRun(id: ComputedRef<number | null>): TaskRun {
loadEvents();
});
// A stage filter is a command scoped to the attempt it was made on: the rail
// set it against that attempt's stage list. A different attempt presents a
// different list, so the stage filter resets on an attempt switch and the
// rail can never highlight a stage the operator did not select here. The
// level filter is attempt-agnostic and survives.
watch(attemptNumber, () => {
if (filters.value.stage) filters.value = { ...filters.value, stage: "" };
});
watch([tab, attemptNumber, filters, refreshToken], () => {
const attempt = attemptNumber.value;
if (attempt == null) return;