Skip to content

Cleaned up public-app dev scripts#28968

Merged
9larsons merged 8 commits into
mainfrom
signup-form-standalone-dev
Jun 29, 2026
Merged

Cleaned up public-app dev scripts#28968
9larsons merged 8 commits into
mainfrom
signup-form-standalone-dev

Conversation

@9larsons

@9larsons 9larsons commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

What changed

signup-form dev collapsed from a 3-process concurrently (standalone HMR + vite preview + vite build --watch) to just vite build --watch --mode development. Matches every other public app.

signup-form dev:standalone added (vite --port 6173) for solo work on the standalone demo page at apps/signup-form/index.html. Opt-in via pnpm --filter @tryghost/signup-form dev:standalone.

preview script removed from portal, comments-ui, signup-form. Nothing invokes pnpm preview from CI, scripts, or playwright configs. portal/comments-ui were bare vite preview aliases; signup-form's was a stale concurrently invocation. Now redundant with Caddy file_server serving the UMDs directly (#28970).

build:watch indirection removed (portal, comments-ui, sodo-search, announcement-bar, admin-toolbar). Was dev: pnpm build:watchbuild:watch: vite build --watch …. Inlined into dev directly. signup-form was already inline.

portal/README.md dropped a stale pnpm preview / localhost:3000 reference and now describes the gateway-served path.

Verified

  • pnpm dev boots cleanly with all 6 watchers running, Ghost backend healthy
  • All 6 UMDs serve via Caddy at correct sizes (portal 4.0 MB, comments-ui 1.7 MB, signup-form 529 KB, sodo-search 1.3 MB, announcement-bar 940 KB, admin-toolbar 49 KB)
  • pnpm --filter @tryghost/signup-form dev:standalone brings up :6173 on demand, demo page serves HTTP 200

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.
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f1553c91-f84c-4a97-a75e-41c4906df1db

📥 Commits

Reviewing files that changed from the base of the PR and between 344744d and a2a7159.

📒 Files selected for processing (2)
  • apps/signup-form/README.md
  • apps/signup-form/preview.html
✅ Files skipped from review due to trivial changes (2)
  • apps/signup-form/preview.html
  • apps/signup-form/README.md

Walkthrough

Several app package.json files update version fields and change dev to run vite build --watch --mode development directly. admin-toolbar also updates lint and test:unit command invocation. signup-form adds dev:standalone for running Vite on port 6173, and its README and preview page update development URLs. apps/portal/README.md adds a development note describing where Portal is served in the Ghost monorepo dev environment.

Possibly related PRs

  • TryGhost/Ghost#28777: Related apps/admin-toolbar/package.json test script changes around vitest run.
  • TryGhost/Ghost#28789: Related apps/admin-toolbar/package.json lint script command changes in the same manifest.
  • TryGhost/Ghost#28834: Related app package.json dev/watch command updates to use Vite with development mode.

Suggested reviewers

  • acburdine
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: cleanup of public-app development scripts.
Description check ✅ Passed The description clearly matches the code changes and explains the script cleanup and related README updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch signup-form-standalone-dev

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Jun 29, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 5e7fbd3

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

@9larsons 9larsons force-pushed the signup-form-standalone-dev branch 2 times, most recently from 6216fb6 to 9714622 Compare June 29, 2026 18:57
9larsons added 2 commits June 29, 2026 13:57
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
@9larsons 9larsons changed the title Simplified signup-form dev script to single watch build Cleaned up public-app dev scripts Jun 29, 2026
@9larsons 9larsons marked this pull request as ready for review June 29, 2026 19:10
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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 546a48a and 374e864.

📒 Files selected for processing (7)
  • apps/admin-toolbar/package.json
  • apps/announcement-bar/package.json
  • apps/comments-ui/package.json
  • apps/portal/README.md
  • apps/portal/package.json
  • apps/signup-form/package.json
  • apps/sodo-search/package.json

Comment thread apps/signup-form/package.json
9larsons added 3 commits June 29, 2026 14:16
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
@9larsons 9larsons enabled auto-merge (squash) June 29, 2026 19:31
@9larsons 9larsons merged commit 58b74a5 into main Jun 29, 2026
42 checks passed
@9larsons 9larsons deleted the signup-form-standalone-dev branch June 29, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants