paperclip/scripts
Dotta c1a02497b0
[codex] fix worktree dev dependency ergonomics (#3743)
## Thinking Path

> - Paperclip orchestrates AI agents for zero-human companies
> - Local development needs to work cleanly across linked git worktrees
because Paperclip itself leans on worktree-based engineering workflows
> - Dev-mode asset routing, Vite watch behavior, and workspace package
links are part of that day-to-day control-plane ergonomics
> - The current branch had a small but coherent set of
worktree/dev-tooling fixes that are independent from both the issue UI
changes and the heartbeat runtime changes
> - This pull request isolates those environment fixes into a standalone
branch that can merge without carrying unrelated product work
> - The benefit is a smoother multi-worktree developer loop with fewer
stale links and less noisy dev watching

## What Changed

- Serve dev public assets before the HTML shell and add a routing test
that locks that behavior in.
- Ignore UI test files in the Vite dev watch helper so the dev server
does less unnecessary work.
- Update `ensure-workspace-package-links.ts` to relink stale workspace
dependencies whenever a workspace `node_modules` directory exists,
instead of only inside linked-worktree detection paths.

## Verification

- `pnpm vitest run server/src/__tests__/app-vite-dev-routing.test.ts
ui/src/lib/vite-watch.test.ts`
- `node cli/node_modules/tsx/dist/cli.mjs
scripts/ensure-workspace-package-links.ts`

## Risks

- The asset routing change is low risk but sits near app shell behavior,
so a regression would show up as broken static assets in dev mode.
- The workspace-link repair now runs in more cases, so the main risk is
doing unexpected relinks when a checkout has intentionally unusual
workspace symlink state.

## Model Used

- OpenAI Codex, GPT-5-based coding agent in the Codex CLI environment.
Exact backend model deployment ID was not exposed in-session.
Tool-assisted editing and shell execution were used.

## 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 run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge
2026-04-15 09:47:29 -05:00
..
smoke Remove legacy OpenClaw adapter and keep gateway-only flow 2026-03-07 18:50:25 -06:00
backup-db.sh Add paperclipai db:backup CLI command 2026-03-05 06:02:12 -06:00
build-npm.sh fix: validate canary release path in CI 2026-03-17 15:35:59 -05:00
check-forbidden-tokens.mjs Redact current user in comments and token checks 2026-03-11 22:17:21 -05:00
clean-onboard-git.sh http clone 2026-03-09 10:03:45 -05:00
clean-onboard-npm.sh scripts 2026-03-03 14:00:10 -06:00
clean-onboard-ref.sh feat: add committed-ref onboarding smoke script 2026-03-09 09:59:43 -05:00
create-github-release.sh fix: use origin for github release creation in actions 2026-03-18 09:10:00 -05:00
dev-runner-output.mjs Guard dev health JSON parsing 2026-04-06 21:23:33 -05:00
dev-runner-output.ts fix(runtime): handle empty dev runner responses 2026-04-06 21:56:13 -05:00
dev-runner-paths.mjs Ignore .paperclip paths in restart tracking 2026-03-23 16:57:33 -05:00
dev-runner.mjs Guard dev health JSON parsing 2026-04-06 21:23:33 -05:00
dev-runner.ts fix(dev-runner): tighten worktree env bootstrap 2026-04-11 08:35:53 -05:00
dev-service-profile.ts Introduce bind presets for deployment setup 2026-04-11 07:09:07 -05:00
dev-service.ts Add idempotent local dev service management 2026-03-29 10:55:26 -05:00
docker-build-test.sh chore(docker): improve base image and organize docker files 2026-04-01 11:36:27 +00:00
docker-entrypoint.sh chore(docker): improve base image and organize docker files 2026-04-01 11:36:27 +00:00
docker-onboard-smoke.sh chore(docker): improve base image and organize docker files 2026-04-01 11:36:27 +00:00
ensure-plugin-build-deps.mjs Add plugin framework and settings UI 2026-03-13 16:22:34 -05:00
ensure-workspace-package-links.ts [codex] fix worktree dev dependency ergonomics (#3743) 2026-04-15 09:47:29 -05:00
generate-company-assets.ts Address Greptile review on portability PR 2026-03-23 17:23:59 -05:00
generate-npm-package-json.mjs fix: add npm provenance package metadata 2026-03-17 16:01:48 -05:00
generate-org-chart-images.ts Add standalone Playwright-based org chart image generator 2026-03-20 05:55:33 -05:00
generate-org-chart-satori-comparison.ts feat: multi-style pure SVG org chart renderer (no Playwright needed) 2026-03-20 06:33:29 -05:00
generate-ui-package-json.mjs Publish @paperclipai/ui from release automation 2026-03-26 11:13:11 -05:00
kill-agent-browsers.sh chore(dev): preflight workspace links and simplify worktree helpers 2026-04-09 06:14:12 -05:00
kill-dev.sh kill chrome test servers too 2026-04-09 06:14:12 -05:00
migrate-inline-env-secrets.ts refactor: rename packages to @paperclipai and CLI binary to paperclipai 2026-03-03 08:45:26 -06:00
paperclip-commit-metrics.ts Handle commit metrics search edge cases 2026-03-30 06:44:46 -05:00
paperclip-issue-update.sh chore: improve worktree tooling and security docs 2026-04-10 22:26:30 -05:00
prepare-server-ui-dist.sh fix(publish): always bundle ui-dist into server package 2026-03-09 07:21:33 -05:00
provision-worktree.sh [codex] Improve workspace runtime and navigation ergonomics (#3680) 2026-04-14 12:57:11 -05:00
release-lib.sh chore: switch release calver to mdd patch 2026-03-18 07:57:36 -05:00
release-package-map.mjs merge master into pap-1078-qol-fixes 2026-04-02 13:14:20 -05:00
release.sh chore: switch release calver to mdd patch 2026-03-18 07:57:36 -05:00
rollback-latest.sh chore: switch release calver to mdd patch 2026-03-18 07:57:36 -05:00
screenshot.cjs feat: add authenticated screenshot utility (#2622) 2026-04-03 10:51:26 -07:00