Skip to content
PreviewOpen the folded row to see cases already in progress.

3 wait on you. 41 are with the agent or a clock.

Showing 5 of 41

import { useState } from "react";
import { CaseQueue } from "@arcadia/ui";

function Flood() {
  const [selected, setSelected] = useState<string>("case_901");
  return <CaseQueue rootStyle={page.queue} cases={FLOOD} restTotal={41} now={NOW} selectedId={selected} onSelect={(c) => setSelected(c.id)} />;
}

TSX
import { CaseQueue } from "@arcadia/ui";

<CaseQueue cases={openCases} restTotal={restCount} onSelect={(item) => openCase(item.id)} />

Cases are ordered by the earliest unmet deadline.

Show identifiers, deadlines and owners. Never show case contents.

Examples

Calm day

One case waits on staff; four are already in progress.

Preview

1 waits on you. 4 are with the agent or a clock.

import { useState } from "react";
import { CaseQueue } from "@arcadia/ui";

function Calm() {
  const [selected, setSelected] = useState<string>();
  return <CaseQueue rootStyle={page.queue} cases={CALM} now={NOW} selectedId={selected} onSelect={(c) => setSelected(c.id)} />;
}

Nothing waiting on you

Cases in progress stay folded until you open them.

Preview

Nothing waits on you. 4 are with the agent or a clock.

  • Recovery 4d left Leo Marsh usr_1c04, Waits on a clock
  • Support 6d left Ada Lovelace usr_8f2a, Waits on the other side
  • Team handover 21d left Fieldwork team_9e10, Waits on a clock
  • Rights request 26d left Nora Lind usr_3b0c, With the agent
import { CaseQueue } from "@arcadia/ui";

<CaseQueue rootStyle={page.queue} cases={CALM.filter((c) => c.waitsOn !== "you")} now={NOW} />

Clocks

CaseClock pairs the overdue icon with a text label.

Preview
Overdue 14m
Overdue
35m left
Minutes left
6h 20m left
Hours left
5d left
Days left
import { CaseClock } from "@arcadia/ui";

<Cell caption="Overdue"><CaseClock dueAt={NOW - 14 * MIN} now={NOW} /></Cell>
<Cell caption="Minutes left"><CaseClock dueAt={NOW + 35 * MIN} now={NOW} /></Cell>
<Cell caption="Hours left"><CaseClock dueAt={NOW + 6 * HOUR + 20 * MIN} now={NOW} /></Cell>
<Cell caption="Days left"><CaseClock dueAt={NOW + 5 * DAY} now={NOW} /></Cell>

Narrow column

The case kind wraps without squeezing the deadline.

Preview

3 wait on you. 41 are with the agent or a clock.

Showing 5 of 41

<div {...sx("case-queue-narrow", page.narrow)}><Flood /></div>

No open cases

Preview

No open cases

import { CaseQueue } from "@arcadia/ui";

<CaseQueue cases={[]} now={NOW} />

Two named lists distinguish cases waiting on you from cases in progress. Linked rows are anchors; action rows are buttons. Every row states who it waits on, and overdue clocks include a text label.

Tab
Move between open case rows and the folded row
Enter
Open the focused case or toggle the folded row
Space
Toggle the folded row or activate a button row

CaseQueue

casesrequired
readonly CaseQueueItem[]
Every open case, in any order: the queue puts the earliest clock first and folds those not waiting on you.
now
number
Default: Date.now()
Reference time in milliseconds for clocks.
selectedId
string
Currently open case id, highlighted in the list.
onSelect
(item: CaseQueueItem) => void
Called when a row without href is pressed.
restTotal
number
Total count of folded cases when the server sends only a page of them. Defaults to the folded rows in cases.
restOpen
boolean
Controlled open state of the folded row.
defaultRestOpen
boolean
Default: false
Initial open state of the folded row when uncontrolled.
onRestOpenChange
(open: boolean) => void
Called when the folded row opens or closes.
empty
ReactNode
Default: "No open cases"
Empty-state title when there are no open cases.
rootStyle
RootStyle
Typed StyleX override: layout.

Rest props go to HTMLAttributes<HTMLDivElement>.

dueAtrequired
number
Earliest unmet clock, in milliseconds since epoch.
now
number
Default: Date.now()
Reference time in milliseconds.
rootStyle
RootStyle
Typed StyleX override: layout.

Rest props go to <span> props.