# The work queue screen

A work queue screen is for a list people work through item by item: the queue sits in a 26rem column on the left and the open item with its decision fills the rest, a permanent split view where each side scrolls on its own. Nobody goes back and forth between a list and a page, because the decision works from the keyboard and the next item is one step away.

Checked 2 December 2026. By Bohuslav Poláček. https://meadowstack.com/patterns/work-queue/

*The work queue's slots in the kit, where the type is called worklist, read from the repository when the site was built.*

From `packages/kit/src/components/screen.tsx` in the Meadowstack repository:

```ts
export type WorklistScreenProps = Base & {
  archetype: "worklist";
  /** The queues ("To approve", "Mine", "Done"). */
  queues: ReactNode;
  /** The rows of the open queue. */
  children: ReactNode;
  /** The permanent split view: the open item with its decision (approve, reject, from the keyboard). */
  decision: ReactNode;
  /** A phone shows the item instead of the list while one is open. */
  itemOpen?: boolean;
};
```

## Anatomy

- **Header** (`header`): the queue's name as the title, a fact beside it in `meta` (Kestrel shows the next VAT deadline), one primary action for what arrives outside the queue ("Record a document") and at most two secondary ones; Kestrel's one, the CSV export, hides on a phone.
- **Queues** (`queues`, required): the one row, inside the list column. Kestrel's is a `FilterBar` with the search and three named buttons: the state ("To check", each state's count in its menu), "Findings" and "Client". A chosen filter shows on its button ("Findings: Suspicious").
- **Rows** (`children`): the items of the open queue, quiet unless something needs a person; at Kestrel colour goes to the findings column only. Ticked rows bring `BulkBar`.
- **Decision** (`decision`, required): the open item with what decides it. Kestrel's is the document with accept and return; with nothing open the pane says "No document open".
- **itemOpen**: true while an item is open, so a phone shows the item instead of the list.

## Width, scroll and how a record opens

The screen runs full width from the left gutter. Under the header sit two panes 8px apart, each with its own scroll, and the page never scrolls: the list column is 26rem (416px) from 1024px, and the decision pane takes the rest inside a hairline frame with a 16px radius. There is no side panel to open and close: the item is always open beside the queue, the permanent split view of decision 0001. Kestrel's corner button grows the pane into the document's full page and back.

Under 1024px the panes take turns: `itemOpen` hides the list and shows the item, and closing it brings the list back. On a screen with room Kestrel's queue arrives with the most urgent document already open (`shared/preselect.tsx`: the supplier whose bank account changed); a phone keeps the list first.

## When a list is a work queue

The same records could be either type. A list is a work queue when:

- people take the items in turn and decide on each, so the next item matters more than the overview;
- the decision is short enough to make from the keyboard;
- an empty queue is the goal of the day.

A list people search, sort and open now and then is a [list screen](https://meadowstack.com/patterns/list/), where a record opens in `RecordPeek`; the manifest marks that panel "not" for "a queue that is worked through". Kestrel's documents are the demo's queue: an accountant checks every document the clients sent for the month, possible frauds first, then other findings, then the clean ones. Juniper's time-off requests wait for decisions too, yet they are a list screen: grouped by state with the waiting ones first, under six weeks of approved time off per branch, a page people read as much as decide on.

The keys at Kestrel: Cmd/Ctrl+Enter accepts, Cmd/Ctrl+Shift+Enter returns, Alt+↑ and Alt+↓ step through the queue, Esc closes. Where Alt with an arrow or Esc means something else (a caret, an open menu, a dialog), the split view leaves it alone. Clean documents can be accepted together; the bar then reads "Accept N of M", and when none of the ticked rows qualifies it says why: "Only documents with nothing found can be accepted together. Open the ones with findings one by one."

## The rules and where they are enforced

| Rule | Where it is enforced |
| --- | --- |
| A queue has a row of queues and a decision, and no side panel | the type: `queues` and `decision` are required, and there is no `peek` slot |
| One row under the header, 48px at most | `control-rows` on every demo route at 1440 |
| On a phone the queue's list starts in the upper half while no item covers it | `control-rows` at 390 × 844 |
| Two panes scroll on their own, the page never, no scroll inside a scroll | `page-scroll` and `nested-scroll`; Kestrel's inbox is the type's sample in `e2e/screens.spec.ts`, at 1440 and 390, light and dark |
| Bulk actions say how many rows they apply to | `BulkBar` takes the count |
| No single-character shortcuts | the root `AGENTS.md` (WCAG 2.1.4): every key in the queue takes a modifier |

## What AI coding tools build instead

- **A list and a detail page.** Each item is a round trip: open, decide, go back, find the place again. The split view keeps both on screen.
- **An empty right pane on arrival.** "Select an item" is a wasted first screen; the queue arrives with an item open.
- **Pills and a search in a narrow column.** At 26rem they wrap into a second row and push the queue down. Kestrel's code says why it has named buttons: "the state pills and the search never shared one line".
- **Approve all.** A bulk action that also passes the items with findings. Here only the clean ones go together, and the bar says how many of the ticked rows that is.
- **Mouse only, or single letters.** A queue worked through all day needs keys, and single-letter keys break WCAG 2.1.4.

## Screens of this type

- [Document inbox](https://meadowstack.com/screens/document-inbox/): Kestrel's queue of the documents clients sent for the month, the reference sample of this type, in the [Kestrel example app](https://meadowstack.com/examples/accounting-office-documents/).
- The decision itself, approve and reject with a reason: [approval flow](https://meadowstack.com/patterns/approval-flow/). For a list that is not a queue: the [record side panel](https://meadowstack.com/patterns/record-side-panel/).

## Example apps with a work queue

*Which example apps render a work queue, and the record flows each one uses.*

| Example app | Modules | Side panel first | Decision card | History |
| --- | --- | --- | --- | --- |
| [An app for an accounting office](https://meadowstack.com/examples/accounting-office-documents/) | 4 | Yes | Yes | Yes |

Read from the demo's source when the site was built: 1 of 9 example apps render a <Screen archetype="worklist">. Side panel first means RecordPeek, the decision card ApprovalPanel, the history AuditTimeline.

## How Kestrel's document inbox fills the slots

*Kestrel's document inbox: the next VAT deadline beside the title, the export as the one secondary action, itemOpen while a document is open, and the queues as one filter bar.*

From `apps/demo/src/modules/documents/pages/inbox.tsx` in the Meadowstack repository:

```tsx
  title: tx("Doručené", "Inbox"),
  meta: loaded ? <Deadline data={loaded} /> : undefined,
  actions: {
    primary: recordButton,
    secondary:
      loaded && rows.length > 0
        ? [
            <Button key="export" onClick={() => exportCsv(rows)} className="max-md:hidden">
              <IconDownload aria-hidden="true" />
              {tx("Export CSV", "Export CSV")}
            </Button>,
          ]
        : undefined,
  },
}}
itemOpen={Boolean(peekId)}
queues={
  <FilterBar
    search={search}
    onSearchChange={setSearch}
    searchLabel={tx("Hledat dodavatele, klienta, číslo", "Search supplier, client, number")}
  >
    {/* Three named buttons, not a strip of pills: the queue's column is 26rem, where the state pills and the
        search never shared one line (decision 0009, one row under the header). */}
```

## Questions

### When is a list a work queue?

When people work through it item by item and decide on each, so the next item matters more than the overview and an empty queue is the goal. A list people search, sort and open now and then is a list screen, where a record opens in a side panel that closes again.

### Why not open each item in a side panel over the list?

In a queue an item is always open, so the split view is permanent and the next item is one key away. A side panel suits records opened now and then; under 1024px the open item takes the whole screen.

### Can people approve several items at once?

Yes, through the bulk bar, which says how many of the ticked rows it applies to. Kestrel accepts only documents with nothing found in one go and leaves the ones with findings for a person.

### What goes in the row above the queue?

One filter bar inside the 26rem list column: the search and named buttons for the state, the findings and the client. Pills and the search never shared one line at that width, and a second row would push the queue down.

### Which keys does a work queue need?

At Kestrel, Cmd or Ctrl with Enter accepts, with Shift as well it returns, Alt with an arrow steps through the queue and Esc closes. None is a single character, which WCAG 2.1.4 rules out.

## Related

- [A print shop's jobs on one board, from enquiry to dispatch](https://meadowstack.com/screens/print-job-pipeline/) (Screens)
- [A change order that shows its price before anyone approves it](https://meadowstack.com/screens/change-order-form/) (Screens)
- [A content calendar for a creator's posts and brand deals](https://meadowstack.com/screens/content-calendar/) (Screens)
- [A dispatch plan that checks driving hours on every drag](https://meadowstack.com/screens/dispatch-plan/) (Screens)
- [A document inbox that catches a changed bank account](https://meadowstack.com/screens/document-inbox/) (Screens)
- [A packaging quote that works out its price as you type](https://meadowstack.com/screens/quote-form/) (Screens)
