Feedback

12 components

What the interface says back: how a long operation reports itself, what a surface shows when it has nothing, and the four layers that take over the screen. Every specimen is driven by the flows these components exist for — a deploy run, a filtered service list, a service action list under a thumb.

Regression watch

Two bugs that shipped in the overlay layer. Neither was visible in a class string, and neither had a failing unit test — both were only findable by opening and closing the thing.

NkModal · NkDialog

Exit animation
open, then close and watch the exit
Correct
Open and close each overlay on this page. The scrim cross-fades and the panel scales and slides, on the way out as well as in. The lifecycle is react-aria's data-entering / data-exiting, read through the entering: / exiting: variants registered in motion.css.
Regressed
Those two are custom variants, and under Tailwind v4 an unregistered variant emits nothing at all — not a warning, not a fallback. Seven components wrote exiting:animate-out and every overlay in every app vanished instantly with no transition. The second half of the same bug is an if (!isOpen) return null guard in the component: it pre-empts the exit frame, so the classes are correct and still never render.

NkDrawer

A modal must trap focus
tab through it
Correct
Open the drawer, then press Tab repeatedly. Focus cycles inside the panel and never reaches the page behind it; Escape closes the drawer and returns focus to the button that opened it. The rest of the tree is marked inert while it is open, so neither the pointer nor a screen reader reaches it — measured in Chromium against react-aria-components 1.17.
Regressed
The drawer used to be a raw createPortal that declared role="dialog" aria-modal="true" itself — markup claiming a contract it did not honour. Tab walked straight out into the page, focus was dropped on <body> on close, screen readers read the page underneath, and because react-aria could not see the overlay at all, Escape ordering and scroll-lock nesting broke in both directions against a real RAC overlay. An exit animation was impossible by construction, too: the panel was unmounted the instant isOpen went false.

Long-running work

NkSteps reports a pipeline; it never owns selection or focus, so it is a list with role=list — not a tablist promising arrow-key traversal that does not exist.

NkSteps

live deploy run

Press Run. Each phase carries its own status and activeBusy turns the running one into a spinner, which is the honest indicator for work of indeterminate duration. Run it with a failure and the pipeline halts where it broke — later phases stay pending, because they never ran.

drive the run
  1. Resolve scope
    Pending
    2/9 services — web, api
  2. Open SSH tunnel
    Pending
    root@nk-prod-vps:22
  3. Remote prepare
    Pending
    nx run-many -t build
  4. Sync code
    Pending
    rsync · 41 files
  5. Reconcile services
    Pending
    2 recreate · 1 no-op
  6. DNS sync
    Pending
    --no-dns
  7. Verify health
    Pending
    waitForHealthy

Not started. Every phase carries its own status — no activeKey is passed, which is how a deploy drives this component.

NkSteps

5 statuses · greyscale proof

pending · active · complete · failed · skipped. Each one is a distinct glyph — a number, a spinner, a tick, a cross, a dash — plus an sr-only word. Drop the colour and every status is still readable, which is the requirement; colour is the fast path, not the signal.

colour
  1. Resolve scope
    Completed
    2/9 services
  2. Remote prepare
    In progress
    nx run-many -t build
  3. Reconcile services
    Failed
    api exited 1
  4. DNS sync
    Skipped
    --no-dns
  5. Verify health
    Pending
    waitForHealthy

Announced as Pending · Current step · Completed · Failed · Skipped. aria-current="step" marks exactly one item, even if a caller declares several active steps.

NkSteps

orientation · size · activeKey

horizontal puts the connector between indicators and the label underneath; vertical runs the connector down the gutter. size changes density only — never the type step, because the scale has one title step and inventing a smaller one here is the habit the scale exists to kill.

orientation="horizontal" size="sm"
  1. Resolve scope
    Completed
    2/9 services
  2. Remote prepare
    In progress
    nx run-many -t build
  3. Reconcile services
    Failed
    api exited 1
  4. DNS sync
    Skipped
    --no-dns
orientation="vertical" size="sm"
  1. Resolve scope
    Completed
    2/9 services
  2. Remote prepare
    In progress
    nx run-many -t build
  3. Reconcile services
    Failed
    api exited 1
  4. DNS sync
    Skipped
    --no-dns
activeKey (wizard mode)no step declares a status — everything is derived from the current key
  1. Choose a provider
    Current step
  2. Pick a region
    Pending
  3. Size the host
    Pending
  4. Review
    Pending
nkStepStatusFromProgress()the reconciler's vocabulary, mapped by the library rather than by each view
'start'
'active'
'progress'
'active'
'success'
'complete'
'error'
'failed'

Nothing to show

Three states that ~60 hand-rolled blocks across the Hub, account and admin currently render identically. They are not the same state, and the whole component is the argument that they must not look the same.

NkEmptyState

empty · filtered · error

Same surface, same size, same subject — only the variant differs. empty is an invitation: nothing exists yet, so it is framed, tinted and it expects a call to action. filtered is a dead end: it is deliberately chromeless, because an invitation would be a lie when the only useful action is undoing the filter. error is a failure, not a state of the data — destructive tokens, and role="alert" where the other two use role="status".

variant="empty" · role=status

No services yet

Declare a service in nanokit.yml, or add one from here and Nanokit writes the block for you.

variant="filtered" · role=status

No services match “api-”

Three services are hidden by the current filter.

variant="error" · role=alert

The middle column is the one worth looking at twice: it has no frame and no tint at all. That absence is the design — a dashed box around “your filter matched nothing” reads as an offer, and there is nothing on offer.

NkEmptyState

3 sizes

sm is the in-table block, md the in-card panel, lgthe full-page hero — the three copy-pasted clusters the audit found, not invented steps. Size moves the padding, the icon tile and the title step; it does not change the variant's chrome.

size="sm"

No deploy rules

Rules map a branch to an environment.

size="md" (default)

No deploy rules

Rules map a branch to an environment.

size="lg"

No deploy rules

Rules map a branch to an environment.

NkEmptyState

bare · children

bare drops the panel chrome for a host that already draws a frame — above all NkDataTable's emptyMessage cell, whose <td> is italic, which is why the component resets not-italic on itself. children slots arbitrary content between the description and the actions; titleAs promotes the title to a real heading when the empty state is the whole view.

bare, inside a host framethe host draws the border, not the empty state
Volumes

No volumes declared

Named volumes survive a container recreate.

children + secondaryAction + titleAs

No environment selected

Pick one to see its services, or provision a new host.

no icon, no actiontitle and description only

No matching log lines

Edge surfaces

The side/bottom pair, shown together because the contrast is the point. NkBottomSheet is deliberately not NkDrawer with a placement prop: the right drawer is a long config form where a stray swipe is a data hazard, and a bottom sheet is a transient surface you are meant to throw away with your thumb. So one has a drag gesture and one refuses to have one.

NkBottomSheet

drag to dismiss

react-aria owns everything a dialog owes — focus trap, focus restore, Escape, scroll lock, overlay stacking, the exit lifecycle. This component owns exactly two things RAC has no opinion about: the pointer gesture and the mobile viewport details (env(safe-area-inset-bottom), overscroll-contain, and the non-passive touchmove listener that lets a pull at scrollTop 0 take the gesture from the scroller).

scenarios
width — className on the sheettailwind-merge replaces the default max-w-xl rather than stacking on it

Rendering at max-w-[390px] — iPhone 15 · Pixel 8, portrait. The sheet is still pinned to the real bottom edge and capped at 85dvh of the real viewport, which is why this bench draws no phone bezel: a sheet inside a fake 780px device would still measure the browser, and a frame that lies about the one dimension the gesture is scaled to is worse than no frame at all.

No sheet opengrab the handle to measure

Nothing released yet. Open a scenario, press the handle with the mouse and pull down: past the tick it dismisses, short of it the sheet springs back, and a fast enough flick dismisses from anywhere.

What a real device adds

Measuring the viewport…

Flick to dismiss
0.5 px/ms downward, after at least 6px of travel
Flick back up cancels
0.35 px/ms upward, whatever the distance
Slow drag dismisses at
30% of the sheet, clamped to 72–160px — the gauge above resolves it for whichever sheet is on screen
Velocity window
the last 100ms of the gesture, not the whole of it
Interrupted gesture
pointercancel always springs back — an incoming call is not a dismissal
onClose fired
0 times

NkDrawer

isOpen · onClose · ariaLabel · className

The other half of the pair: a right-side panel for work you stay in — the Hub's service, infrastructure and GitOps config surfaces. It is the placement with no drag gesture, on purpose, and it is the one that has to survive being left open. The flex column lives on the dialog, so children written as header + flex-1 overflow-y-auto + footer size against the full-height panel instead of against their own content.

Five props, no more: isOpen and onClose (controlled — a backdrop click and Escape both route through onClose), ariaLabel (required, because the drawer renders no title of its own — the header is yours), className, and the children.

THE WIDTH IS THE CALLER'Sthere is no width prop — className is the whole mechanism

className lands on the RAC Modal — the sized, painted box — so the panel is whatever width the call site says. The default is w-[480px] max-w-full; the three buttons below are the default and the two widths the Hub actually ships. Note the second one: w-screen max-w-2xl is the mobile-safe spelling — full-bleed under 672px, capped above it.

Open: closed — the panel echoes back the className it was handed.

Overlays

Three surfaces that take the centre of the screen, in decreasing order of how much they insist. All three are react-aria Modal + Dialog underneath, so the focus trap, the scroll lock and the stacking order are one implementation, not three. NkDrawer shares those primitives but arrives from an edge, so it is filed with NkBottomSheet above.

NkModal

prop-driven

The compact form: title, description and footer are props, so a simple modal is one element. Backdrop click and Escape dismiss it. Reach for NkDialog instead when the body needs its own structure.

with a footer

NkDialog

compound

The most-used overlay in the product (24 files across hub, admin and account). You own open / onOpenChange and compose the body from NkDialogContent, NkDialogHeader, NkDialogTitle, NkDialogDescription and NkDialogFooter; the title and description are aria-wired through react-aria slots internally.

open

NkAlertDialog

role="alertdialog"

The one overlay a backdrop click does not dismiss. It is for destructive confirmations, where dismissing by accident and confirming by accident must both be impossible — so the only ways out are the two buttons.

confirm or cancel

Transient surfaces

Neither of these traps focus or dims the page — they are attached to a trigger and they go away on their own.

NkDropdownMenu

react-aria Menu

Arrow-key navigation, typeahead, disabled items, and it closes on select. It sits on the z-popover rung — above z-drawer on purpose, so a menu opened inside a dialog paints over that dialog.

open with the keyboard too

Last action: (none)

NkTooltip

hover and focus

Appears on hover and on keyboard focus, and dismisses on blur — a tooltip only reachable with a pointer is not a tooltip. It sits on z-tooltip, the top rung, because a tooltip that can be occluded is useless and it never traps focus.

tab to it, do not hover it

NkLoadingSpinner

3 sizes

For work with no reportable phases. The visible message is wired as the accessible name through aria-labelledby, so what is read and what is drawn cannot drift; with no message it falls back to an aria-label. If the work has phases, use NkSteps instead — a spinner tells the operator nothing about how far a deploy got.

size="sm"never renders a message
size="md" + message

Reconciling services…

size="lg" + message

Opening the SSH tunnel

size="md", no message