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

+1 -1
View File
@@ -418,7 +418,7 @@
"url": "/dev/prds/task-run-master-detail/",
"title": "Task run detail as a master-detail split pane",
"section": "PRDs",
"body": "# Task run detail as a master-detail split pane\n\n**Status:** Draft\n**Authority:** the panel contracts stay as ratified in\n`docs/prds/task-run-detail.md`; this document changes only the run page's\narrangement of them.\n**Compounds with:** `docs/prds/task-run-detail.md` (attempt attribution, the\nlog stage filter, the per-panel honesty rules).\n\n## Decision\n\nThe run page's five tabs become two panes. The stage rail is the **master**,\nalways visible on the left. The four context panels — log, changed files,\nconfiguration, debug — are the **inspector** on the right, and their tab bar\nmoves into the inspector. The \"Stages\" tab stops existing: the rail is not a\nview of the page, it is the page's spine.\n\nSelecting a stage in the rail is a command, not a binding: it switches the\ninspector to the log tab and sets the log pane's stage filter to that stage.\nChanging the filter afterwards is the operator's choice and is not overridden.\nClearing the selection returns the filter to \"all stages\". Changed files,\nconfiguration and debug stay attempt-scoped; a stage selection never pretends\nto scope them.\n\n## What does not change\n\n- No new endpoint, RPC, table or configuration field. Every read is one the\n page already makes.\n- The URL contract: `tab` and `attempt` ride in the query string and every\n view survives a reload. `tab=stages` stays a valid URL and renders the\n inspector with the log tab; the page never generates it again.\n- Attempt attribution, the log stage filter's coverage limit, and every\n honesty rule in `task-run-detail.md`. Each pane states what it cannot show\n under the same rendering rules that document defines.\n- The attempt selector and the task header stay pinned above both panes.\n\n## Arrangement\n\n- Left pane: fixed-width rail (~320px) with the attempt's stage rows. Status,\n duration, error and per-stage events render in the rail; the rail scrolls\n independently.\n- Right pane: the inspector's tab bar plus the selected panel, filling the\n remaining width.\n- Below 900px (the shell's existing frame breakpoint) the rail stacks above\n the inspector; neither pane is hidden.\n- Keyboard: the rail keeps its list semantics; the inspector keeps the\n WAI-ARIA tabs pattern the tab bar already provides.\n\n## Acceptance\n\n1. The rail is visible without opening any tab, and no \"Stages\" trigger exists.\n2. Clicking a stage opens the log filtered to that stage; clearing the\n selection shows all stages.\n3. `tab=stages` loads and renders the log tab.\n4. Every inspector tab and attempt deep-link survives a reload.\n5. Below 900px the rail stacks above the inspector.\n6. `task check` passes clean and `ui/dist` matches the sources."
"body": "# Task run detail as a master-detail split pane\n\n**Status:** Draft\n**Authority:** the panel contracts stay as ratified in\n`docs/prds/task-run-detail.md`; this document changes only the run page's\narrangement of them.\n**Compounds with:** `docs/prds/task-run-detail.md` (attempt attribution, the\nlog stage filter, the per-panel honesty rules).\n\n## Decision\n\nThe run page's five tabs become two panes. The stage rail is the **master**,\nalways visible on the left. The four context panels — log, changed files,\nconfiguration, debug — are the **inspector** on the right, and their tab bar\nmoves into the inspector. The \"Stages\" tab stops existing.\n\nSelecting a stage switches the inspector to the log tab and sets the log\npane's stage filter to that stage. Changing the filter afterwards is the\noperator's choice and is not overridden; rail selection never touches the\nlevel filter. Clicking the selected stage again returns the filter to all\nstages. A stage with no name is rendered but not selectable.\n\nSwitching attempts resets the stage filter to all stages: a selection was\ncommanded on the attempt it was made on, and a different attempt presents a\ndifferent stage list. Changed files, configuration and debug stay\nattempt-scoped; a stage selection never scopes them.\n\n## What does not change\n\n- No new endpoint, RPC, table or configuration field. Every read is one the\n page already makes.\n- The URL contract: `tab` and `attempt` ride in the query string and survive\n a reload. Log filters are not part of the URL; a reload returns the log to\n all stages. `tab=stages` stays a valid URL and renders the log tab; the\n page never generates it again.\n- Attempt attribution, the log stage filter's coverage limit and every\n honesty rule in `task-run-detail.md` still apply: each pane states what it\n cannot show under that document's rendering rules.\n- The task header and the attempt selector sit above both panes.\n\n## Arrangement\n\n- Left pane: fixed-width rail (20rem) with the attempt's stage rows. Status,\n duration, error, the stage's agent report, the attempt's status badge and\n start time, and the attempt-attribution footnotes render in the rail.\n- Right pane: the inspector's tab bar plus the selected panel, filling the\n remaining width.\n- Below the shell's 900px frame breakpoint the rail stacks above the\n inspector; neither pane is hidden.\n- Keyboard: the rail keeps its list semantics and each stage row is a real\n button, so selection and deselection work without a pointer; the inspector\n keeps the WAI-ARIA tabs pattern the tab bar already provides.\n\n## Acceptance\n\n1. The rail is visible without opening any tab, and no \"Stages\" trigger exists.\n2. Clicking a stage opens the log filtered to that stage; clicking it again\n shows all stages.\n3. After a stage selection, a filter change made by the operator is kept, and\n the level filter survives the selection.\n4. Switching attempts resets the stage filter to all stages, and no rail row\n on the new attempt renders as selected unless the operator selected it\n there.\n5. `tab=stages` loads and renders the log tab.\n6. Every inspector tab and attempt deep-link survives a reload.\n7. A stage is selectable and deselectable by keyboard, and the selection\n mirrors the log pane's stage filter.\n8. Below 900px the rail stacks above the inspector.\n9. `task check` passes clean and `ui/dist` matches the sources."
},
{
"url": "/dev/prds/ui-service-boundary/",