Skip to content
AI Interfaces block

Escalation Queue

What is waiting on a person, ordered by how long it has been waiting rather than when it arrived.

148 linesNo dependenciesAdded 9 Sept 2026Updated 10 Sept 2026
  • escalation
  • queue
  • approval
  • sla
  • human

What's included

  • components/escalation-queue-list.tsx
  • No runtime dependencies

Works with

  • React
  • Next.js
  • Tailwind CSS
  • TypeScript

npx hoverlab add escalation-queue-list

Or over MCP, from your editor's agent — no account needed.

License

Free to read, copy and install, for personal and non-commercial projects. Shipping it in client work or a paid product needs Pro ($79 once). The source lands in your repo and stops being ours — no attribution, nothing to upgrade.

Was this useful?

Start a page with this section — add more, order them, and leave with the page source.

Preview

Waiting on a person

Sorted by age, not arrival. A queue sorted newest-first buries the item that has been stuck longest, which is always the one that turns into the complaint.

Rendered live in your current theme — this is the same component whose source is below, not a screenshot of it.

Source

components/escalation-queue-list.tsx
'use client'

/**
 * <EscalationQueueList> — What is waiting on a person, ordered by how long it has been waiting rather than when it arrived.
 *
 * A queue sorted newest-first buries the item that has been stuck longest,
 * and that item is always the one that becomes the complaint. So the sort is
 * by age, and the badge is the wait rather than the arrival time.
 *
 * That is the layout problem in one line: two orderings are available and
 * the obvious one is wrong. The clock-time alternative — "10:42" — makes the
 * reader compute the age themselves, every row, every time they look.
 *
 * Tone tracks the wait rather than the money. The refund is critical because
 * it has sat for four hours with two people able to sign it, not because it
 * is £840; the schema change is a warning at eighteen minutes because it is
 * a production write. Encoding severity as amount would sort a small urgent
 * thing below a large calm one.
 *
 * The last row carries the detail that makes a queue survivable: it expires
 * on its own. An approval queue where nothing times out is a queue that
 * grows forever, and saying so on the row is what stops someone approving it
 * just to clear the list.
 *
 * Rows are buttons with `aria-pressed` — opening one is the obvious action —
 * and `status` is separate from `tone` so "4h 20m" is readable without
 * colour. The demo selects the first row, which here is genuinely the one to
 * act on, because the sort has already put it there.
 */

import * as React from 'react'

type Tone = 'neutral' | 'positive' | 'warning' | 'critical'

export interface EscalationQueueListRow {
  id: string
  label: string
  detail?: string
  tone?: Tone
  /** What the badge says. Falls back to the tone name when absent. */
  status?: string
}

export interface EscalationQueueListProps {
  heading?: string
  intro?: string
  rows?: EscalationQueueListRow[]
  className?: string
}

/*
  Tones as complete utility classes, never assembled from fragments.
  Tailwind scans source text, so `text-${tone}-foreground` produces no
  class at all — the same failure as an undefined token, and just as
  invisible in review.
*/
const TONE_CLASS: Record<Tone, string> = {
  neutral: 'bg-muted text-muted-foreground',
  positive: 'bg-primary/10 text-primary',
  warning: 'bg-accent text-accent-foreground',
  critical: 'bg-destructive/10 text-destructive',
}

const ROWS: EscalationQueueListRow[] = [
  { id: "row-1", label: "Refund over the auto-approve limit", detail: "£840. Two people can sign this and neither has opened it.", tone: "critical", status: "4h 20m" },
  { id: "row-2", label: "Outbound message to a customer", detail: "Drafted by the agent, held because the recipient is outside the workspace.", tone: "warning", status: "51m" },
  { id: "row-3", label: "Schema change on a production table", detail: "Additive, reversible, and still not something a run should do unattended.", tone: "warning", status: "18m" },
  { id: "row-4", label: "New integration scope request", detail: "Read-only calendar access. Expires on its own in two days if nobody acts.", tone: "neutral", status: "6m" },
]

export function EscalationQueueList({
  heading = "Waiting on a person",
  intro = "Sorted by age, not arrival. A queue sorted newest-first buries the item that has been stuck longest, which is always the one that turns into the complaint.",
  rows = ROWS,
  className,
}: EscalationQueueListProps) {
  /*
    Per-instance prefix for every id this block emits.

    The literals these replaced were a latent duplicate the moment the
    block appeared twice on one document, and `aria-labelledby` on a
    duplicated id resolves to the first match -- so the second copy was
    labelled by the first copy's heading. Client component, so `useId` is
    the right tool.
  */
  const uid = React.useId()

  const [selected, setSelected] = React.useState<string | null>(rows[0]?.id ?? null)

  return (
    <section
      aria-labelledby={`${uid}-escalation-queue-list-heading`}
      className={`w-full bg-background px-6 py-16 ${className ?? ''}`}
    >
      <div className="mx-auto max-w-3xl">
        <h2
          id={`${uid}-escalation-queue-list-heading`}
          className="text-2xl font-semibold tracking-tight text-foreground"
        >
          {heading}
        </h2>
        <p className="mt-2 text-sm text-muted-foreground">{intro}</p>

        <ul className="mt-8 divide-y divide-border overflow-hidden rounded-xl border border-border bg-card">
          {rows.map((row) => {
            const isSelected = row.id === selected
            return (
              <li key={row.id}>
                {/*
                  A button, not a div with onClick. The row is operable, so
                  it has to be reachable by keyboard and announce its
                  selected state — aria-pressed is what carries that.
                */}
                <button
                  type="button"
                  aria-pressed={isSelected}
                  onClick={() => setSelected(row.id)}
                  className={`flex w-full items-center justify-between gap-4 px-5 py-4 text-start transition-colors hover:bg-muted/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset ${
                    isSelected ? 'bg-muted/40' : ''
                  }`}
                >
                  <span className="min-w-0 flex-1">
                    <span className="block truncate text-sm font-medium text-foreground">
                      {row.label}
                    </span>
                    {row.detail ? (
                      <span className="mt-0.5 block text-sm text-muted-foreground">
                        {row.detail}
                      </span>
                    ) : null}
                  </span>
                  <span
                    className={`shrink-0 rounded-full px-2.5 py-1 text-xs font-medium ${
                      TONE_CLASS[row.tone ?? 'neutral']
                    }`}
                  >
                    {row.status ?? row.tone ?? 'neutral'}
                  </span>
                </button>
              </li>
            )
          })}
        </ul>
      </div>
    </section>
  )
}

Before you paste

  • Styling is Tailwind utility classes on semantic tokens (bg-card, text-muted-foreground) — it inherits your theme instead of overriding it.
  • Nothing to install. No component library, no icon package.
  • Every prop has a default, so it renders standalone before you wire it up.

Where it goes

Drop it at components/escalation-queue-list.tsx and import it where you need the section:

import { EscalationQueueList } from '@/components/escalation-queue-list'

Customize

1 of this block’s props are simple enough to drive from here. Change them and the block below re-renders — it is the same component whose source is above, not a mock of it. Everything else it accepts is in the table underneath.

Props

Read out of the component’s own type and signature, so this cannot drift from the source below. Every prop has a default — the component renders standalone before you pass it anything.

PropTypeDefault
headingstring"Waiting on a person"
introstring—
rowsEscalationQueueListRow[]ROWS
classNamestring—

Not using React?

The same block rendered once to markup, wrapped as a file your framework compiles. Tailwind classes are framework-agnostic, so the design transfers intact — the behaviour does not.

This block is interactive. The markup below is its initial state with the event handlers stripped — you will need to re-wire the behaviour in your framework.

escalation-queue-list.html
<!--
  Escalation Queue — markup from the Hoverlab catalog.

  This is the block rendered once to HTML and wrapped as a component
  file. It is not a port of the React source: the Tailwind classes carry
  the design, which is the part that took the work, and they are the same
  in every framework.

  This block is interactive in React and the handlers are NOT here.
  Buttons, toggles and menus render in their initial state and do
  nothing until you wire them up.
-->
<section aria-labelledby="_R_0_-escalation-queue-list-heading" class="w-full bg-background px-6 py-16 ">
  <div class="mx-auto max-w-3xl">
    <h2 id="_R_0_-escalation-queue-list-heading" class="text-2xl font-semibold tracking-tight text-foreground">Waiting on a person</h2>
    <p class="mt-2 text-sm text-muted-foreground">Sorted by age, not arrival. A queue sorted newest-first buries the item that has been stuck longest, which is always the one that turns into the complaint.</p>
    <ul class="mt-8 divide-y divide-border overflow-hidden rounded-xl border border-border bg-card">
      <li>
        <button type="button" aria-pressed="true" class="flex w-full items-center justify-between gap-4 px-5 py-4 text-start transition-colors hover:bg-muted/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset bg-muted/40">
          <span class="min-w-0 flex-1">
            <span class="block truncate text-sm font-medium text-foreground">Refund over the auto-approve limit</span>
            <span class="mt-0.5 block text-sm text-muted-foreground">£840. Two people can sign this and neither has opened it.</span>
          </span>
          <span class="shrink-0 rounded-full px-2.5 py-1 text-xs font-medium bg-destructive/10 text-destructive">4h 20m</span>
        </button>
      </li>
      <li>
        <button type="button" aria-pressed="false" class="flex w-full items-center justify-between gap-4 px-5 py-4 text-start transition-colors hover:bg-muted/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset ">
          <span class="min-w-0 flex-1">
            <span class="block truncate text-sm font-medium text-foreground">Outbound message to a customer</span>
            <span class="mt-0.5 block text-sm text-muted-foreground">Drafted by the agent, held because the recipient is outside the workspace.</span>
          </span>
          <span class="shrink-0 rounded-full px-2.5 py-1 text-xs font-medium bg-accent text-accent-foreground">51m</span>
        </button>
      </li>
      <li>
        <button type="button" aria-pressed="false" class="flex w-full items-center justify-between gap-4 px-5 py-4 text-start transition-colors hover:bg-muted/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset ">
          <span class="min-w-0 flex-1">
            <span class="block truncate text-sm font-medium text-foreground">Schema change on a production table</span>
            <span class="mt-0.5 block text-sm text-muted-foreground">Additive, reversible, and still not something a run should do unattended.</span>
          </span>
          <span class="shrink-0 rounded-full px-2.5 py-1 text-xs font-medium bg-accent text-accent-foreground">18m</span>
        </button>
      </li>
      <li>
        <button type="button" aria-pressed="false" class="flex w-full items-center justify-between gap-4 px-5 py-4 text-start transition-colors hover:bg-muted/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset ">
          <span class="min-w-0 flex-1">
            <span class="block truncate text-sm font-medium text-foreground">New integration scope request</span>
            <span class="mt-0.5 block text-sm text-muted-foreground">Read-only calendar access. Expires on its own in two days if nobody acts.</span>
          </span>
          <span class="shrink-0 rounded-full px-2.5 py-1 text-xs font-medium bg-muted text-muted-foreground">6m</span>
        </button>
      </li>
    </ul>
  </div>
</section>
  • This is rendered HTML, not a translation of the React source. The Tailwind classes carry the design and work in any framework.
  • It is one frame: the component in its initial state, with no props applied beyond the defaults.
  • This block is interactive in React — toggles, menus or form state. None of that survives here; the markup is the closed/default state and the handlers are gone. Re-wire them in your own framework.
  • Requires Tailwind, and the design tokens the classes reference (bg-card, text-muted-foreground, and so on). The template ZIPs ship a globals.css that defines them.

What each framework gets across the whole catalog — effects convert properly; this rung is markup.

For AI

The component, its props, the design tokens it expects and the command that installs it — as one prompt. Paste it into Claude, Cursor, v0 or ChatGPT and what they build around it will match the rest of the catalog instead of inventing its own system.

See the prompt

Used in these pages

Want the whole screen instead of this one section? Open a page and copy it entire.

7 more blocks in Human in the Loop

All of them free to read, copy and install — no account, no locked tiles, no watermarked preview. The whole catalog is open, and so are the API and the CLI.

Browse Human in the Loop

Shipping one commercially

Copying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.

  • A commercial licence for everything in the catalog
  • Unlimited bundle exports, in Vue, Svelte and Tailwind
  • One payment — no subscription, nothing to renew
Pro — $79 once

More Human in the Loop blocks

View category
Open the full page for this block

Approval Request with Blast Radius

The agent stops and asks: the effect stated before the verb, choices as radios in a fieldset so picking is separate from committing, no pre-focused Approve, and the decision left on screen afterwards.

Human in the Loop247 lines1 dep
Open the full page for this block

Proposed Edits Diff Table

Machine-proposed row edits accepted one at a time, with before and after in real del/ins elements, a tri-state select-all that actually sets indeterminate, and a running count of what will be written.

Human in the Loop269 lines1 dep
Open the full page for this block

Recommendation with Confidence Meter

A suggestion scored with a native meter rather than a styled bar, banded in words as well as numbers, and showing what the model rejected — the fastest way a human catches a bad recommendation.

Human in the Loop258 lines1 dep
Open the full page for this block

Agent Permission Scopes

Read and write scopes separated rather than bundled, writes off by default, a required expiry, and switches that are real checkboxes with role="switch" — so the grant is toggleable by keyboard and announced as on or off.

Human in the Loop297 lines1 dep
Open the full page for this block

Bulk Approval Queue

Forty decisions and an honest way to clear them: bulk approve that cannot reach the high-impact rows, a select-all that says how many it takes, and the auto-approve deadline on every line.

Human in the Loop307 lines1 dep
Open the full page for this block

Approval Policy List

Which agent actions run unattended and which need a signature, stated as a policy the operator can read before anything happens.

Human in the Loop156 linesNo deps
Open the full page for this block

Human Oversight Split

Where a person sits in an automated run, written as four guarantees rather than as a promise that a human is involved.

Human in the Loop156 linesNo deps