Files
PaperClipAI/ui
DottaandClaude Opus 4.8 8a0affd74e fix(ui): stop markdown file viewer from re-rendering and remounting
The file viewer flashed, lost code-block scroll position, and cleared text
selection on markdown files (PAP-10767). Two compounding causes:

- FileViewerSheet ran a 75ms `elapsedMs` ticker that only drives the loading
  skeleton, but it never stopped after the file loaded — re-rendering the whole
  sheet ~13x/second. Now the ticker runs only while a preview is still loading.
- MarkdownBody rebuilt its react-markdown `remarkPlugins` array and `components`
  map on every render. Because react-markdown uses the `components` values as
  component *types*, new function identities each render made React unmount and
  remount the entire rendered tree (discarding scroll/selection, causing the
  flash). Both are now memoized.

Adds a regression test asserting markdown DOM nodes survive a parent re-render.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 10:02:03 +00:00
..
2026-06-11 14:02:09 -05:00

@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.