## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - Operators send task replies and chat messages from the board UI. > - Browsers can omit `crypto.randomUUID` on a plain HTTP origin. > - The send handler calls that API before it sends the request. Its error handler restores the draft. > - The UI already has a UUID helper with a fallback for this case. > - This pull request uses that helper in the task and chat send paths and image upload state. > - Operators can send messages and retain the existing request receipt behavior on these origins. ## Linked Issues or Issue Description Fixes: #15846 Refs #15495, #16090, #15135, #17081. Related open proposals: #15937, #16522, #16947. They remain unmerged. This change adds independent regression and browser verification. It does not establish a cause for every intermittent send failure in those reports. ## What Changed - Use `createUuid` for both composer attempt IDs, both request ID fallbacks, and image upload state. - Test five successive sends in task and chat modes without `randomUUID`. - Test upload receipts, retry request identity, the next draft, and first-message creation without that API. ## Verification - Base: `d10c6e0e8b3005cb49d0732a670ab1a851833b01`. - Six focused regression cases fail with the original calls. The same cases pass with this change. - The three affected test files pass: 506 tests. - `pnpm --filter @paperclipai/ui typecheck`, `pnpm --filter @paperclipai/ui build`, and `pnpm check:token-gates` pass. - `pnpm verify` ran 460 UI files: 7,895 tests pass and one is skipped. One CLI startup suite failed because this environment supplied empty AI endpoint variables. That suite passes when those variables are unset. The aggregate run also reported changed inputs, so it is not a reusable verification pass. - Chromium, real local UI and API, empty synthetic instance: the original Send action sends no request and retains the draft when `randomUUID` is absent. With the fix, five task replies, a scheduled-task reply, a Classic reply, and five standing-chat messages save. Request IDs are distinct and drafts clear. An image uploads and its receipt is attached to the saved comment. - Browser scope: loopback HTTP with `randomUUID` removed before page code runs. This models the missing browser API. Service workers are blocked for the fixed request-count checks. Telemetry is disabled. No agent runs start. This does not test a remote LAN browser, provider execution, or intermittent failures after real agent exchanges. - Required CI and Greptile review are pending at PR creation. ## Risks - Low risk. The change uses the existing UUID helper and keeps the send and receipt contracts. - Other causes of intermittent send failures may remain. This change only addresses the reproduced missing-UUID failure. ## Model Used - OpenAI GPT-6 (`gpt-6`), with reasoning, tool use, and code execution. The harness does not disclose a more specific revision or context window size. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge Co-authored-by: Paperclip <noreply@paperclip.ing>
@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.
Editor dependency identity
Keep the root and workspace overrides for @codemirror/state,
@codemirror/view, and @lezer/common aligned. CodeMirror requires shared
extension identity, while Lezer parsers and syntax highlighters require shared
NodeProp IDs. Multiple Lezer copies can crash code-block highlighting with
tags is not iterable. src/lib/codemirror-single-instance.test.ts checks the
installed dependency graph and highlights sample code through the editor's real
language dependencies. GitHub Actions owns regeneration of pnpm-lock.yaml.