The queue shows on the Queue page, above a project's task list and in its Queue view, each reordering, removing and sizing it #201

Merged
agra merged 5 commits from task/3764-s6-the-queue-s-three-surfaces-s4 into master 2026-10-31 07:05:19 +02:00
Owner

Tracker: #3764

Step 6 of #3672's planspec: S4 V1, V2 and V3.

What it delivers

  • Queue page (S4 V1). /queue sits in the sidebar under Needs you, with the number of flow runs queued across every queue. It has one section per queue (GET /api/queues), named by its project and base. Each section lists the runs going, the runs queued in order and the runs done today. /queue?run=<id>, the link behind the Flow card's "Queued 2nd", opens with that run selected and scrolled into view.
  • The project's queue (S4 V2). Above the project's task list sits each of its queues with a run going or queued (GET /api/projects/:id/queues). It shows the runs going, the first three queued, and a count ("2 more") that unfolds the rest.
  • Queue view (S4 V3). Queue sits beside List and Board on the project page (?mode=queue). Each of the project's queues shows in three lanes: Queued, Going and Done today. The view reads none of the project's tasks.
  • What each surface does. A queued run drags by its handle, which sits at its left in a segment of its own, and its arrow keys move it one place; one moved past the first three of the project's folded queue unfolds the rest, and its grip keeps focus. A move sends POST /api/flow-runs/:id/move: {"at":"top"} when the run lands first, {"after":<the run ahead>} otherwise. Remove in a queued run's ⋯ menu sends POST /api/flow-runs/:id/stop. The queue's "at a time" stepper sends PUT /api/projects/:id/queues with {base, slots}.
  • A queued run's line names what it waits on: "after #3669", "blocked by SX #3656" in the blocked tone, or "next". A going run's line reads as its task row's flow chip does ("Lone star · Review, attempt 2"). A run done today reads "done 10:02" or "stopped 10:02".
  • The ⋯ menu a Card carries is now MoreMenu, which the queue rows use too. The runner settings' stepper is now Stepper, which the queues use. isBoardMode gives way to viewModeOf (list, board or queue), and every caller is migrated.

Tests

  • web/src/lib/queue.test.ts pins how a move places a run (at: "top" vs after), what a queued run's line names, a queue's counts and how a run done today reads. router.test.ts pins /queue?run=, and board.test.ts pins the view modes.
  • The the queue scenes in web/e2e/work-the-flows.spec.ts:
    • "Queued 2nd" opens the Queue page with that run selected.
    • A drag to the top sends {"at":"top"}, and ArrowDown on the grip sends {"after":…} (Queue page).
    • A drag after the first queued run sends {"after":…} (the project's queue, unfolded).
    • A drag in the Queued lane sends {"after":…} (Queue view).
    • Remove in a card's ⋯ menu sends /stop.
    • The stepper sends {"base":"master","slots":2}, and the run it frees a slot for begins.

Regressions

Each fails on the code before its fix and passes after (npx playwright test e2e/work-the-flows.spec.ts -g "the queue" --ignore-snapshots, with the source of the fix set aside and the web rebuilt):

  • in the project’s folded queue, the third run moved down by its arrow key unfolds the rest, its grip keeping focus. Before: the move was sent with {"after":<format>}, then toBeFocused timed out, since element(s) not found: the run had gone into "2 more" and focus fell to the body.
  • the project’s Queue view reads none of its tasks. Before: GET /api/projects/:id/tasks?page=1&per_page=50 was read twice, once on open and once after one ArrowUp move. The test expected no read.

Goldens

Added in Chromium, light and dark at 1280×800 and 390×844, from a full run of playwright.config.ts: queue-page (S4 V1, its run opened from "Queued 2nd" selected), project-queue (S4 V2) and project-queue-lanes (S4 V3). Each scene holds a run waiting on a task it follows, one blocked by another task, and runs done and stopped today.

Re-recorded, each in a full run of its config, because they show the sidebar (Queue now sits under Needs you) or a project page (Queue now sits beside List and Board, and the project's queue sits above its task list):

  • playwright.config.ts, desktop:
    • all of accounts, add-a-runner, cards, flows, forbidden-words, memories, project-gates, project-repository, roles, runner-dependencies and secrets;
    • from board: unfiltered-project-switch;
    • from surfaces: accounts, all-tasks, flow-editor, flows, memories, needs-you, projects, runners, stream, streams, task-asks, task-blocked, task-diagram and task-run-strip;
    • from work-the-flows: dispatch-dialog, dispatch-roles, dispatch-roles-cut, dispatch-runner, dispatch-tags, dispatch-task-menu, flow-at-step, flow-blocked, flow-done, flow-named, flow-queued-behind, flow-queued-blocked, flow-refused, flow-resumed, flow-stopped, flow-unmet, the needs-you* scenes, question-picks and runners-running.
  • playwright.config.ts, desktop and phone: project-form, surfaces project-board and project-list, and work-the-flows dispatch-row-menu.
  • playwright.navigator.config.ts:
    • desktop: colour sidebar, context, crowded, floors, galaxy, layered, navigator-page, page-zoom, remaining, stream-list streams and task-list task-list;
    • desktop and phone: task-list project-list.
  • playwright.webkit.config.ts, desktop: dispatch-dialog.

The S4 mockups (artifact version 36) could not be reached from the run. The surfaces follow the planspec's words for S4 V1, V2 and V3 and the design system in web/design/README.md: a drag handle in its own segment at the left, Remove in a ⋯ menu, and state colours from the one map.

Gates

  • sak-gate full, gate run 2, at e17584ab: passed. It covers the builds, the web's checks and unit tests with the design check, tests/run.sh, the release, the deploy contract, playwright.config.ts (797 passed, 1 skipped) and playwright.runner.config.ts (10 passed).
  • playwright.navigator.config.ts (168 passed) and playwright.webkit.config.ts (1 passed) ran in full at 825ada4c to re-record their goldens. The gate does not run them. The two later commits change no golden.
Tracker: [#3764](https://sak.swipelab.com/tasks/3764) Step 6 of #3672's planspec: S4 V1, V2 and V3. ## What it delivers - **Queue page (S4 V1).** `/queue` sits in the sidebar under Needs you, with the number of flow runs queued across every queue. It has one section per queue (`GET /api/queues`), named by its project and base. Each section lists the runs going, the runs queued in order and the runs done today. `/queue?run=<id>`, the link behind the Flow card's "Queued 2nd", opens with that run selected and scrolled into view. - **The project's queue (S4 V2).** Above the project's task list sits each of its queues with a run going or queued (`GET /api/projects/:id/queues`). It shows the runs going, the first three queued, and a count ("2 more") that unfolds the rest. - **Queue view (S4 V3).** Queue sits beside List and Board on the project page (`?mode=queue`). Each of the project's queues shows in three lanes: Queued, Going and Done today. The view reads none of the project's tasks. - **What each surface does.** A queued run drags by its handle, which sits at its left in a segment of its own, and its arrow keys move it one place; one moved past the first three of the project's folded queue unfolds the rest, and its grip keeps focus. A move sends `POST /api/flow-runs/:id/move`: `{"at":"top"}` when the run lands first, `{"after":<the run ahead>}` otherwise. Remove in a queued run's ⋯ menu sends `POST /api/flow-runs/:id/stop`. The queue's "at a time" stepper sends `PUT /api/projects/:id/queues` with `{base, slots}`. - A queued run's line names what it waits on: "after #3669", "blocked by SX #3656" in the blocked tone, or "next". A going run's line reads as its task row's flow chip does ("Lone star · Review, attempt 2"). A run done today reads "done 10:02" or "stopped 10:02". - The ⋯ menu a Card carries is now `MoreMenu`, which the queue rows use too. The runner settings' stepper is now `Stepper`, which the queues use. `isBoardMode` gives way to `viewModeOf` (`list`, `board` or `queue`), and every caller is migrated. ## Tests - `web/src/lib/queue.test.ts` pins how a move places a run (`at: "top"` vs `after`), what a queued run's line names, a queue's counts and how a run done today reads. `router.test.ts` pins `/queue?run=`, and `board.test.ts` pins the view modes. - The `the queue` scenes in `web/e2e/work-the-flows.spec.ts`: - "Queued 2nd" opens the Queue page with that run selected. - A drag to the top sends `{"at":"top"}`, and ArrowDown on the grip sends `{"after":…}` (Queue page). - A drag after the first queued run sends `{"after":…}` (the project's queue, unfolded). - A drag in the Queued lane sends `{"after":…}` (Queue view). - Remove in a card's ⋯ menu sends `/stop`. - The stepper sends `{"base":"master","slots":2}`, and the run it frees a slot for begins. ## Regressions Each fails on the code before its fix and passes after (`npx playwright test e2e/work-the-flows.spec.ts -g "the queue" --ignore-snapshots`, with the source of the fix set aside and the web rebuilt): - `in the project’s folded queue, the third run moved down by its arrow key unfolds the rest, its grip keeping focus`. Before: the move was sent with `{"after":<format>}`, then `toBeFocused` timed out, since `element(s) not found`: the run had gone into "2 more" and focus fell to the body. - `the project’s Queue view reads none of its tasks`. Before: `GET /api/projects/:id/tasks?page=1&per_page=50` was read twice, once on open and once after one ArrowUp move. The test expected no read. ## Goldens Added in Chromium, light and dark at 1280×800 and 390×844, from a full run of `playwright.config.ts`: `queue-page` (S4 V1, its run opened from "Queued 2nd" selected), `project-queue` (S4 V2) and `project-queue-lanes` (S4 V3). Each scene holds a run waiting on a task it follows, one blocked by another task, and runs done and stopped today. Re-recorded, each in a full run of its config, because they show the sidebar (Queue now sits under Needs you) or a project page (Queue now sits beside List and Board, and the project's queue sits above its task list): - `playwright.config.ts`, desktop: - all of `accounts`, `add-a-runner`, `cards`, `flows`, `forbidden-words`, `memories`, `project-gates`, `project-repository`, `roles`, `runner-dependencies` and `secrets`; - from `board`: `unfiltered-project-switch`; - from `surfaces`: `accounts`, `all-tasks`, `flow-editor`, `flows`, `memories`, `needs-you`, `projects`, `runners`, `stream`, `streams`, `task-asks`, `task-blocked`, `task-diagram` and `task-run-strip`; - from `work-the-flows`: `dispatch-dialog`, `dispatch-roles`, `dispatch-roles-cut`, `dispatch-runner`, `dispatch-tags`, `dispatch-task-menu`, `flow-at-step`, `flow-blocked`, `flow-done`, `flow-named`, `flow-queued-behind`, `flow-queued-blocked`, `flow-refused`, `flow-resumed`, `flow-stopped`, `flow-unmet`, the `needs-you*` scenes, `question-picks` and `runners-running`. - `playwright.config.ts`, desktop and phone: `project-form`, `surfaces` `project-board` and `project-list`, and `work-the-flows` `dispatch-row-menu`. - `playwright.navigator.config.ts`: - desktop: `colour` `sidebar`, `context`, `crowded`, `floors`, `galaxy`, `layered`, `navigator-page`, `page-zoom`, `remaining`, `stream-list` `streams` and `task-list` `task-list`; - desktop and phone: `task-list` `project-list`. - `playwright.webkit.config.ts`, desktop: `dispatch-dialog`. The S4 mockups (artifact version 36) could not be reached from the run. The surfaces follow the planspec's words for S4 V1, V2 and V3 and the design system in `web/design/README.md`: a drag handle in its own segment at the left, Remove in a ⋯ menu, and state colours from the one map. ## Gates - `sak-gate full`, gate run 2, at e17584ab: passed. It covers the builds, the web's checks and unit tests with the design check, `tests/run.sh`, the release, the deploy contract, `playwright.config.ts` (797 passed, 1 skipped) and `playwright.runner.config.ts` (10 passed). - `playwright.navigator.config.ts` (168 passed) and `playwright.webkit.config.ts` (1 passed) ran in full at 825ada4c to re-record their goldens. The gate does not run them. The two later commits change no golden.
S4 V1: /queue sits in the sidebar under Needs you, with the number of
flow runs queued across every queue. The page holds a section per queue,
named by its project and base, with its runs going, its runs queued in
order and its runs done today. /queue?run=<id>, where the Flow card's
"Queued 2nd" leads, opens with that run selected and in view.

S4 V2: above a project's task list, each of its queues with a run going
or queued shows the runs going, the first three queued and a count that
unfolds the rest.

S4 V3: Queue sits beside List and Board on the project page
(?mode=queue), each of the project's queues in three lanes: Queued,
Going and Done today.

A queued run drags by the handle in its own segment at its left, and
its arrow keys move it a place. A move sends at "top" when the run lands
first, else after the run ahead of it. Remove in a queued run's ⋯ menu
stops it. The "at a time" stepper sets the queue's slots through
PUT /api/projects/:id/queues.

The ⋯ menu a card carries is MoreMenu, which rows take too, and the
runner settings' stepper is Stepper, which the queues take.
The task's link stretches over the row or card, and the grip, the ⋯ menu and the links on its line sit above it.
Added in Chromium, light and dark at 1280x800 and 390x844, from a full
run of playwright.config.ts: queue-page (S4 V1), project-queue (S4 V2)
and project-queue-lanes (S4 V3), each with a run waiting on a task it
follows, one blocked by another task, and runs done and stopped today.

Re-recorded, each in the full run of its config, because they show the
sidebar, which gains Queue under Needs you, or a project page, which
gains Queue beside List and Board and its queue above its task list:

- playwright.config.ts, desktop: the accounts, add-a-runner, cards,
  flows, forbidden-words, memories, project-gates, project-repository,
  roles, runner-dependencies and secrets scenes; board's
  unfiltered-project-switch; surfaces' accounts, all-tasks, flow-editor,
  flows, memories, needs-you, projects, runners, stream, streams,
  task-asks, task-blocked, task-diagram and task-run-strip; and
  work-the-flows' dispatch-dialog, dispatch-roles, dispatch-roles-cut,
  dispatch-runner, dispatch-tags, dispatch-task-menu, flow-at-step,
  flow-blocked, flow-done, flow-named, flow-queued-behind,
  flow-queued-blocked, flow-refused, flow-resumed, flow-stopped,
  flow-unmet, the needs-you scenes, question-picks and runners-running.
- playwright.config.ts, desktop and phone: project-form, surfaces'
  project-board and project-list, and work-the-flows' dispatch-row-menu.
- playwright.navigator.config.ts: colour's sidebar, context, crowded,
  floors, galaxy, layered, navigator-page, page-zoom, remaining,
  stream-list's streams and task-list's task-list, desktop; task-list's
  project-list, desktop and phone.
- playwright.webkit.config.ts: dispatch-dialog, desktop.
In the project's queue, which shows the first three queued runs,
ArrowDown on the third moved it out of the runs shown: its grip left
the page and focus fell to the body. The queue now unfolds when a run's
arrow key moves it past the runs shown, so its grip stays and keeps
focus.
The project page read its task list on opening the Queue view and again
after every write, though the view shows no tasks. The read now runs in
List and Board alone.
agra merged commit 09955d7c43 into master 2026-10-31 07:05:19 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sx/sak!201
No description provided.