mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-26 02:00:52 +01:00
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>
@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.