paperclip/ui
Tonio e07d605dfc
test(ui): wait for conditions, not durations, in three flaky tests (#11499)
Three tests yielded a fixed number of macrotasks before asserting - five in one
case, one in another - which is ample on an idle machine and not when the suite
runs many workers in parallel. The container was still empty, or the state had
not landed, and the assertion failed on behaviour that works. `vi.waitFor`
retries against a time budget instead, so a loaded worker gets more turns
rather than a failure.

`DocumentAnnotationPopover` is a different race and is fixed differently. The
popover element is in the DOM as soon as React commits, while the effect that
registers the document-level keydown and pointerdown listeners runs afterwards.
A test dispatching in that gap loses the event outright, and a lost event
cannot be recovered by retrying an assertion - so the render is wrapped in
`act` to flush passive effects, and the waits only cover the smaller race that
remains.

Refs #11484.

Verified stable over six consecutive runs of the three files, and the full ui
suite passes. Other instances of the same class remain: the full suite still
shows an occasional failure in a different unrelated test on each run.
`App.cases-routing.test.tsx:104-108` is the clearest one - the identical
fixed-turn loop this PR replaced in its sibling `App.activity-routing.test.tsx`,
three turns instead of five - and takes the same one-line fix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-17 00:29:42 -07:00
..
public fix(ui): always give respondWith a real Response in the sw fetch fallback (#11292) 2026-08-12 11:23:18 -07:00
src test(ui): wait for conditions, not durations, in three flaky tests (#11499) 2026-08-17 00:29:42 -07:00
storybook Show ordered live blocker work in task chat (#11487) 2026-08-16 15:10:05 -04:00
README.md
components.json
index.html fix(ui): fetch the web app manifest with credentials (#11245) 2026-08-11 19:11:56 -07:00
package.json build(deps): align Lexical packages at 0.49.0 (#10728) 2026-08-13 13:17:29 -07:00
tsconfig.json
vite.config.ts
vite.qa.config.mjs
vitest.config.ts refactor(ui): drop the TZ pin now the fixtures are anchored (#11508) 2026-08-17 00:18:13 -07:00
vitest.setup.ts

README.md

@paperclipai/ui

Published static assets for the Paperclip board UI.

What gets published

The npm package contains the production build under dist/. It does not ship the UI source tree or workspace-only dependencies.

Storybook

Storybook config, stories, and fixtures live under ui/storybook/.

pnpm --filter @paperclipai/ui storybook
pnpm --filter @paperclipai/ui build-storybook

Typical use

Install the package, then serve or copy the built files from node_modules/@paperclipai/ui/dist.