Skip to content

Patterns

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.

By Bohuslav PoláčekChecked

packages/kit/src/components/screen.tsx
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;
};
The work queue's slots in the kit, where the type is called worklist, read from the repository when the site was built.

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, 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

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

Example apps with a work queue

Which example apps render a work queue, and the record flows each one uses.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

apps/demo/src/modules/documents/pages/inbox.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). */}
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.

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.

Two ways

Build it yourself, or have it built

  • Build it yourself

    Build your app on the framework

    Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.

    One payment, lifetime updates

    Get the framework
  • Have it built

    Have us build your app

    Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.

    After launch, Care keeps it improving, from €99 a month.

    from €1,990

    Describe your app