The dispatch dialog queues a flow run last with Queue or first with Next, on the base picked #199

Merged
agra merged 3 commits from task/3762-s4-dispatch-dialog-s1-v2 into master 2026-10-31 04:30:58 +02:00
Owner

Tracker: #3762

Step 4 of #3672's planspec: the dispatch dialog as S1-V2.

What it delivers

  • The dialog's action is the design system's split button, Queue | Next. Queue sends at: "last" and Next at: "top", each with the base picked. The dialog shows no queue information.
  • A Base row: a Select of the project's queues (GET /api/projects/:id/queues), its base branch first and chosen, then each other base it queues on, with the work branch after it (cut with its whole name as a tooltip). The line under the title names the project and its repository.
  • Runner by is one row: a Tags | Name segmented control, then the tag field or the runner Select.
  • Roles is a section that opens collapsed, its summary the roles and the accounts their runs take ("4 roles · Work, ChatGPT"), cut at the dialog's edge with its whole text as a tooltip; open, each role has its model and effort Selects and its account, and the note on remembered models.
  • Every dropdown is the design system's filtering Select.
  • The web's api.dispatchFlow takes a Dispatch (flow_id, roles, base, tags, runner, at), and api.listProjectQueues reads a project's queues. A width-dispatch-branch token sets where the work branch wraps under the base, at 390 wide.

Tests

  • Next queues the flow run first in the queue of the base picked: with a plan base held at 0 slots and a flow run already queued on it, the Base Select offers master then the plan; Next sends {base: <plan>, at: "top"}, and the queue reads the new flow run ahead of the one there.
  • The tags scene's Queue sends {base: "master", at: "last"}.
  • The collapsed scene checks the where line, the base master, the work branch, Queue | Next and no role rows; the open scene checks each role's model, effort and account.
  • The dialog's other e2e drivers (the refusal, a row's menu, a Wait's blocker, the runner suite's end-to-end flow) use Runner by, Roles and Queue.

Regression

The Roles summary at 390 wide

A collapsed Roles summary longer than its box widened the dialog's body past the dialog's right edge at 390 wide, clipping the tag field, the Roles box and Next, and showed no tooltip. The body's one grid column now has a 0 minimum, so the summary cuts with an ellipsis, and it carries its whole text as its title.

Dispatch’s folded Roles cut the accounts their runs take at the dialog’s edge (golden dispatch-roles-cut): its roles take four accounts, Personal, Work, ChatGPT and Team Pro; the scene checks the summary's title and that the dialog does not scroll sideways at 390 wide.

Fail before, on the source of c17eb6f0 with the scene and its goldens:

  • In a full run of the default config, every other test passed and the scene failed at its 390×844 light shot, 15512 pixels (ratio 0.05) different: the summary uncut, the tag field, the Roles box and Next clipped at the dialog's right edge, the work branch beside the base. Its 1280×800 shots matched.
  • With snapshots ignored, its title check failed (no title), and with the title alone added, the dialog scrolled sideways: scrollWidth - clientWidth was 10.

Pass after, at ead62191: the scene passes in a full run, and every other golden, the @webkit dispatch-dialog included, still matches.

Edit project's memory switch golden

paints Edit project’s memory switch (web/e2e/memories.spec.ts, golden project-memories) opened Edit project, scrolled its Memories section into view and shot the page while the page's task list and the form's Tools rows could still be loading. A load that landed after the scroll moved the page under the shot, so the shot followed the server's timing: the flow's full gate at the branch's head failed it at 390×844 dark, 18639 pixels (ratio 0.06) different, and an earlier full run on this branch rewrote its 1280×800 dark shot. The scene now waits for 1 task, the three Tools checkboxes and the 2 memories link before it scrolls. Its goldens are unchanged.

Fail before, on the spec of ead62191 with the task list and the tool catalog each answered 400 ms late (a page.route probe, not committed), in a full run of the default config: the four looks failed, 21276 (light), 15340 (phone light), 22756 (dark) and 16913 (phone dark) pixels different; the other 776 passed. In a lone run with the task list alone answered late, the phone dark shot caught the list's Loading… rows below the form.

Pass after, at 7779ea8d, with the same probe, in a full run of the default config: 780 passed and 1 skipped, the four looks matching their goldens.

Goldens

Added, in web/e2e/work-the-flows.spec.ts, light and dark at 1280×800 and 390×844:

  • dispatch-roles (the dialog with Roles open).
  • dispatch-roles-cut (Roles collapsed, its summary cut).

Re-recorded, the scenes that show the dialog: dispatch-dialog (Roles collapsed) in Chromium and in WebKit (its @webkit goldens, from a full run of playwright.webkit.config.ts, whose goldens pass on master here), dispatch-tags and dispatch-runner. No other snapshot changes.

Gates

At 7779ea8d:

  • sak-gate full, gate run 2: passed. The web build's tests, its design check among them, 448 passed; the sx suite and the release check passed; deploy contract PASS; Chromium e2e 780 passed and 1 skipped, the four project-memories looks among them; runner e2e 10 passed.
  • The @webkit dispatch-dialog goldens are as at ead62191, where npx playwright test -c playwright.webkit.config.ts passed 1 of 1; this head changes no WebKit scene.
Tracker: [#3762](https://sak.swipelab.com/tasks/3762) Step 4 of [#3672](https://sak.swipelab.com/tasks/3672)'s planspec: the dispatch dialog as S1-V2. ## What it delivers - The dialog's action is the design system's split button, Queue | Next. Queue sends `at: "last"` and Next `at: "top"`, each with the base picked. The dialog shows no queue information. - A Base row: a Select of the project's queues (`GET /api/projects/:id/queues`), its base branch first and chosen, then each other base it queues on, with the work branch after it (cut with its whole name as a tooltip). The line under the title names the project and its repository. - Runner by is one row: a Tags | Name segmented control, then the tag field or the runner Select. - Roles is a section that opens collapsed, its summary the roles and the accounts their runs take ("4 roles · Work, ChatGPT"), cut at the dialog's edge with its whole text as a tooltip; open, each role has its model and effort Selects and its account, and the note on remembered models. - Every dropdown is the design system's filtering Select. - The web's `api.dispatchFlow` takes a `Dispatch` (`flow_id`, `roles`, `base`, `tags`, `runner`, `at`), and `api.listProjectQueues` reads a project's queues. A `width-dispatch-branch` token sets where the work branch wraps under the base, at 390 wide. ## Tests - `Next queues the flow run first in the queue of the base picked`: with a plan base held at 0 slots and a flow run already queued on it, the Base Select offers `master` then the plan; Next sends `{base: <plan>, at: "top"}`, and the queue reads the new flow run ahead of the one there. - The tags scene's Queue sends `{base: "master", at: "last"}`. - The collapsed scene checks the where line, the base `master`, the work branch, Queue | Next and no role rows; the open scene checks each role's model, effort and account. - The dialog's other e2e drivers (the refusal, a row's menu, a Wait's blocker, the runner suite's end-to-end flow) use Runner by, Roles and Queue. ## Regression ### The Roles summary at 390 wide A collapsed Roles summary longer than its box widened the dialog's body past the dialog's right edge at 390 wide, clipping the tag field, the Roles box and Next, and showed no tooltip. The body's one grid column now has a 0 minimum, so the summary cuts with an ellipsis, and it carries its whole text as its title. `Dispatch’s folded Roles cut the accounts their runs take at the dialog’s edge` (golden `dispatch-roles-cut`): its roles take four accounts, Personal, Work, ChatGPT and Team Pro; the scene checks the summary's title and that the dialog does not scroll sideways at 390 wide. Fail before, on the source of c17eb6f0 with the scene and its goldens: - In a full run of the default config, every other test passed and the scene failed at its 390×844 light shot, 15512 pixels (ratio 0.05) different: the summary uncut, the tag field, the Roles box and Next clipped at the dialog's right edge, the work branch beside the base. Its 1280×800 shots matched. - With snapshots ignored, its title check failed (no `title`), and with the title alone added, the dialog scrolled sideways: `scrollWidth - clientWidth` was 10. Pass after, at ead62191: the scene passes in a full run, and every other golden, the `@webkit` `dispatch-dialog` included, still matches. ### Edit project's memory switch golden `paints Edit project’s memory switch` (`web/e2e/memories.spec.ts`, golden `project-memories`) opened Edit project, scrolled its Memories section into view and shot the page while the page's task list and the form's Tools rows could still be loading. A load that landed after the scroll moved the page under the shot, so the shot followed the server's timing: the flow's full gate at the branch's head failed it at 390×844 dark, 18639 pixels (ratio 0.06) different, and an earlier full run on this branch rewrote its 1280×800 dark shot. The scene now waits for `1 task`, the three Tools checkboxes and the `2 memories` link before it scrolls. Its goldens are unchanged. Fail before, on the spec of ead62191 with the task list and the tool catalog each answered 400 ms late (a `page.route` probe, not committed), in a full run of the default config: the four looks failed, 21276 (light), 15340 (phone light), 22756 (dark) and 16913 (phone dark) pixels different; the other 776 passed. In a lone run with the task list alone answered late, the phone dark shot caught the list's `Loading…` rows below the form. Pass after, at 7779ea8d, with the same probe, in a full run of the default config: 780 passed and 1 skipped, the four looks matching their goldens. ## Goldens Added, in `web/e2e/work-the-flows.spec.ts`, light and dark at 1280×800 and 390×844: - `dispatch-roles` (the dialog with Roles open). - `dispatch-roles-cut` (Roles collapsed, its summary cut). Re-recorded, the scenes that show the dialog: `dispatch-dialog` (Roles collapsed) in Chromium and in WebKit (its `@webkit` goldens, from a full run of `playwright.webkit.config.ts`, whose goldens pass on master here), `dispatch-tags` and `dispatch-runner`. No other snapshot changes. ## Gates At 7779ea8d: - `sak-gate full`, gate run 2: passed. The web build's tests, its design check among them, 448 passed; the sx suite and the release check passed; deploy contract PASS; Chromium e2e 780 passed and 1 skipped, the four `project-memories` looks among them; runner e2e 10 passed. - The `@webkit` `dispatch-dialog` goldens are as at ead62191, where `npx playwright test -c playwright.webkit.config.ts` passed 1 of 1; this head changes no WebKit scene.
Base is a Select of the project's queues, its base branch first, with the
work branch after it. Runner by is one row: Tags | Name, then the tag field
or the runner Select. Roles is a section that opens collapsed, summing up
the roles and the accounts their runs take.

The dispatch-dialog goldens are re-recorded in Chromium and WebKit, with
dispatch-tags and dispatch-runner, and dispatch-roles records the dialog
with Roles open.
The dialog's body is one column with a 0 minimum, so a collapsed Roles
summary wider than its box ends in an ellipsis instead of widening the
body past the dialog's right edge at 390 wide. The summary carries its
whole text as its title.

dispatch-roles-cut records the dialog whose roles take four accounts,
light and dark at 1280x800 and 390x844.
agra merged commit 137c7155e2 into master 2026-10-31 04:30:58 +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!199
No description provided.