Peek

A record's preview beside the list, board or grid it came from, opened with Space.

ENG-142Sign-in link expires before the email arrives
Northwind Freight
3
AL
ENG-144Invoice PDF cuts off long company namesReported by three customers this week
Bluebird Credit Union
2
GH
ENG-139Keyboard shortcuts for triage
5
GH
ENG-137Export drops the last row of a filtered view
Halcyon Health
2
AT
ENG-121Webhook retries with backoff
Halcyon Health
5
AT
ENG-140SAML sign-in for the admin console
Halcyon Health
8
AT
ENG-135Draft release notes for 2.4
1
ENG-131Empty states for saved views
3
AL
ENG-126Bulk move issues between teams
Northwind Freight
8
GH
ENG-133Triage suggestions for new bug reports
3
ENG-128Notifications arrive twice on mobile
Bluebird Credit Union
ENG-118Dark mode contrast on badges
1
AL

Focus a row and press Space, or hover one and press the eye.

JDown arrow
Next record
KUp arrow
Previous record
Shift JShift K
Extend the selection
X
Select or unselect
Space
Peek at the record; Escape closes it
Return
Open the record
S
Change Status on the focused or selected records
P
Change Priority on the focused or selected records
A
Change Assignee on the focused or selected records
Escape
Clear the selection

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/peek

Usage

import type { Item, Property } from "./ui/uicontext/components/domain/Record.ts"import { Peek } from "./ui/uicontext/components/kit/Peek.ts"
const Message = UiSchema.TaggedEnum({	ClosedPeek: {},	SteppedPeek: { by: Schema.Literals([1, -1]) },})export const TaskPeek = (h: Html.H<typeof Message.Type>, tasks: ReadonlyArray<Item>, fields: ReadonlyArray<Property>, peeking: number | null) =>	Peek(h, {		record: peeking === null ? undefined : tasks[peeking],		fields,		position: { index: peeking ?? 0, count: tasks.length },		onClose: Message.ClosedPeek(),		onStep: (by) => Message.SteppedPeek({ by }),	})

Examples

On its own

Peek beside a plain list. The app holds which record is open and steps through them.

  • Sign-in link expires before the email arrives
  • Keyboard shortcuts for triage
  • Export drops the last row of a filtered view
  • Draft release notes for 2.4
  • Bulk move issues between teams

In a board

Focus a card and press Space to peek; j and k move between cards without closing it.

Todo

4
ENG-139GH
Keyboard shortcuts for triage
ENG-131AL
Empty states for saved views
ENG-128
Notifications arrive twice on mobile
ENG-144GH
Invoice PDF cuts off long company namesReported by three customers this week

In Progress

3
ENG-142AL
Sign-in link expires before the email arrives
ENG-135
Draft release notes for 2.4
ENG-140AT
SAML sign-in for the admin console

In Review

3
ENG-137AT
Export drops the last row of a filtered view
ENG-126GH
Bulk move issues between teams
ENG-133
Triage suggestions for new bug reports

Done

2
ENG-121AT
Webhook retries with backoff
ENG-118AL
Dark mode contrast on badges

API reference

Options

Peek options
NameTypeDescription
recordrequiredItemThe record to show; nothing shows while it's undefined
fieldsrequiredProperty[]The fields to show, in order, as labels and values
shown(record: Item, key: string) => ValueValues to show in place of the record's own, such as an edit still waiting on the app
position{ readonly index: number; readonly count: number }"3 of 40", so the person knows where j and k lead
localestringThe locale numbers and dates are formatted in; the browser's by default
onCloserequiredMessageThe message sent when the person closes the preview, with Escape or the close button
onOpenMessageOpen the record's page; absent hides the button
onStep(by: 1 | -1) => MessageMove to the next (1) or previous (-1) record

Accessibility

  • A modal dialog named by the record, opened with Space on a focused row or card; Escape closes it and focus goes back to the row.
  • J and K or Up and Down move to the next or previous record, and the position is announced. Mod+Enter opens the record's page.

Source