Cleaned up public-app dev scripts#28968
Conversation
no ref The dev script ran three concurrent processes (standalone HMR server, vite preview, and watch build), costing ~330 MB beyond what other public apps use. Two of those are not needed for the common case: - vite preview is redundant once the Caddy gateway serves umd/ directly - the standalone HMR server on :6173 is only useful when working on the form in isolation, not during normal pnpm dev dev now matches portal/comments-ui/etc. The standalone HMR workflow moves to a new dev:standalone script for opt-in solo work.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (2)
WalkthroughSeveral app Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | 1s | View ↗ |
nx run @tryghost/comments-ui:test:acceptance |
✅ Succeeded | 47s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 5s | View ↗ |
nx run-many -t test:unit -p @tryghost/admin-too... |
✅ Succeeded | 1s | View ↗ |
nx run-many -t lint -p @tryghost/admin-toolbar,... |
✅ Succeeded | 4s | View ↗ |
nx run @tryghost/signup-form:test:acceptance |
✅ Succeeded | 11s | View ↗ |
nx run ghost:build:assets |
✅ Succeeded | 2s | View ↗ |
nx run ghost:build:tsc |
✅ Succeeded | 6s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-06-29 19:26:38 UTC
6216fb6 to
9714622
Compare
The dev:standalone script previously ran vite (HMR dev page) + vite build --watch concurrently. The build:watch half is unused — the standalone demo page at apps/signup-form/index.html is a Vite dev-mode HTML file (script type=module pointing at /src/index.tsx) and never reads the umd/ output. When someone wants both the standalone page AND a live UMD build for theme integration, they already run pnpm dev from root (which runs signup-form dev = vite build --watch) and dev:standalone in another terminal. Matches the one-purpose-per-script pattern of every other public app. no ref
Now that Caddy file_server serves the UMDs directly (no more vite preview middle layer), several of the per-app scripts are unused or redundant. Removed preview script (portal, comments-ui, signup-form): nothing invokes pnpm preview from CI, scripts, or playwright configs. portal and comments-ui were bare vite preview aliases; signup-form was a leftover concurrently invocation over vite preview + build:watch. Inlined dev and removed build:watch indirection (portal, comments-ui, sodo-search, announcement-bar, admin-toolbar): the dev script was a one-line indirection through build:watch; collapsed to the inline command. signup-form was already inline. Updated apps/portal/README.md to drop a stale pnpm preview reference (pointed at localhost:3000, which was wrong) and describe the current gateway-served setup. no ref
CI requires a version bump on any monitored public app that has changed files in the PR. Bumped patch versions on all 6 apps touched by this PR: - portal: 2.69.12 -> 2.69.13 - comments-ui: 1.5.19 -> 1.5.20 - sodo-search: 1.8.27 -> 1.8.28 - announcement-bar: 1.1.24 -> 1.1.25 - admin-toolbar: 0.1.8 -> 0.1.9 - signup-form: 0.3.31 -> 0.3.32 no ref
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/signup-form/package.json`:
- Around line 18-19: The standalone signup-form documentation is out of sync
with the new scripts in package.json: contributors are still told to use pnpm
dev for the local server on port 6173, but that workflow now lives in pnpm
dev:standalone. Update the README instructions that describe running the
standalone app so they reference the dev:standalone script and keep the
command/port guidance aligned with the scripts defined in the signup-form
package.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e6636b95-5b99-4705-b614-a483948610c6
📒 Files selected for processing (7)
apps/admin-toolbar/package.jsonapps/announcement-bar/package.jsonapps/comments-ui/package.jsonapps/portal/README.mdapps/portal/package.jsonapps/signup-form/package.jsonapps/sodo-search/package.json
pnpm prepends node_modules/.bin to PATH for script execution, so bare vite/eslint/vitest resolve to the local binaries the same way pnpm exec vite does. Other public apps (portal, comments-ui, etc.) have always used the bare form. Aligned admin-toolbar with the same pattern. no ref
The Running the development version only section described pnpm dev (in package folder) as starting a demo server on :6173 and a separate UMD server on :6174. Both claims are now wrong: - pnpm dev was simplified to vite build --watch --mode development — no HTTP server, no port. - The :6173 demo server lives in pnpm dev:standalone now. - :6174 (the old vite preview port) is no longer bound by anything; Caddy file_server serves the UMD via the gateway at :2368 when pnpm dev runs from the monorepo root. Rewrote the section to point contributors at dev:standalone for the demo page and clarify what pnpm dev does on its own. no ref
preview.html hardcoded six http://localhost:6174/signup-form.min.js script tags referencing the old vite preview port, which no longer binds after the Caddy file_server migration. Repointed all six at http://localhost:2368/ghost/assets/signup-form/signup-form.min.js so the demo loads the UMD via the dev gateway instead. This makes preview.html a hard dependency on pnpm dev running from the monorepo root (Caddy gateway must be up to serve the UMD). README updated to spell out the dual-process requirement. no ref

What changed
signup-form
devcollapsed from a 3-processconcurrently(standalone HMR +vite preview+vite build --watch) to justvite build --watch --mode development. Matches every other public app.signup-form
dev:standaloneadded (vite --port 6173) for solo work on the standalone demo page atapps/signup-form/index.html. Opt-in viapnpm --filter @tryghost/signup-form dev:standalone.previewscript removed from portal, comments-ui, signup-form. Nothing invokespnpm previewfrom CI, scripts, or playwright configs. portal/comments-ui were barevite previewaliases; signup-form's was a staleconcurrentlyinvocation. Now redundant with Caddyfile_serverserving the UMDs directly (#28970).build:watchindirection removed (portal, comments-ui, sodo-search, announcement-bar, admin-toolbar). Wasdev: pnpm build:watch→build:watch: vite build --watch …. Inlined intodevdirectly. signup-form was already inline.portal/README.md dropped a stale
pnpm preview/localhost:3000reference and now describes the gateway-served path.Verified
pnpm devboots cleanly with all 6 watchers running, Ghost backend healthypnpm --filter @tryghost/signup-form dev:standalonebrings up :6173 on demand, demo page serves HTTP 200