## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - The task dialog sends project and workspace choices to the control plane. > - Hidden workspace controls must leave automatic source choices to the server. > - The dialog still sent its computed source pointer while those controls were hidden. > - This bypassed the implicit default branch added in #16095 and saved an untyped source choice. > - This pull request omits that automatic pointer and preserves explicit launch context. > - The benefit is that fresh tasks can use the server's safe isolated default source path. ## Linked Issues or Issue Description Refs #16095. A search found no open duplicate for the hidden-selector payload bug. **What happened?** A fresh task created through the board with a project and hidden isolation controls failed setup with “Task workspace access is no longer available.” The dialog sent `projectWorkspaceId` even though the user had not selected a source. The saved task had no workspace-selection provenance. No provider turn started. **Expected behavior** Omit automatic or restored draft source pointers when the selector is hidden. Let the server select and record the project default. Preserve explicit source and execution-workspace context supplied by a launch action. **Steps to reproduce** Hide `workspaces.isolation` through the existing operator setting. Use a project with a default Git source and isolated workspace policy. Create a fresh task from the board. Inspect the creation payload: the hidden automatic source must be omitted. The server must then apply its existing default source contract. A restricted shared source must remain protected. **Paperclip version or commit** Observed on Core `c7f4b74111d16f0b57112fa6d0b6a59c2d63bfe8`, which includes #16095. **Deployment mode** Authenticated staging Cloud instance with a configured remote runner provider and operator-hidden workspace controls. ## What Changed - Omit the automatic `projectWorkspaceId` while isolation controls are hidden. - Keep explicit same-project launch source context, including reused workspaces and subtasks. - Add a fresh-default payload regression and strengthen stale-draft and explicit-context controls. - Keep server authorization, trust checks, source fallback rules, visible selectors, and stored old tasks unchanged. ## Verification - Before the repair, the hidden fresh/default and restored-source regressions failed: 2 failed, 3 passed, 79 other cases filtered. - Final rebased source: `pnpm exec vitest run --project @paperclipai/ui ui/src/components/NewIssueDialog.test.tsx ui/src/lib/project-workspace-defaults.test.ts` passed all 87 cases. - `pnpm --filter @paperclipai/ui typecheck` passed. - `pnpm --filter @paperclipai/ui build` passed. - `pnpm check:token-gates` passed. - Initial UI typecheck failed because this new checkout had not built the plugin SDK. Building that dependency and repeating the unchanged check passed. The failed attempt remains separate from the source regression. - Full repository typecheck, full repository tests, and full repository build have not been run locally for this two-file UI patch. Complete latest-head CI passed with 55 successful checks and two intentional skips. This includes the full repository typecheck, build, general/serialized tests and all eight browser shards. Fresh Apex is 5/5 on `f992823480311691469c6797d5cdff26d76899a2`, with no unresolved findings or recommendations. - No live recovery pass is claimed. The deployed baseline failed before provider startup. A fresh same-project task must pass after this patch is deployed. Existing tasks with untyped source pointers need a separate authorized recovery path. - The old Storybook maps were reviewed at the baseline, then master removed them. The rebase preserves that removal. The final Storybook structural check covers 262 files and 2,485 story IDs. No new Storybook browser, play, render, or visual proof is claimed. ## Risks - Hidden restored draft source choices are intentionally ignored. Explicit same-project launch defaults remain in the request and have controls for normal tasks and subtasks. - Visible workspace choices retain their existing behavior. - This patch fixes one creation path. It does not recover old tasks, relax private source restrictions, or establish a performance fix for slow historical runs. - No data model, endpoint, permission, runner, or Observability changes. ## Model Used OpenAI GPT-6 through Codex, with code and browser tools. The exact served model identifier and context-window size are not exposed in this session. ## 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 - [x] All Paperclip CI gates are green - [x] 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.