Skip to content

Changed public app dev defaults#29105

Merged
9larsons merged 2 commits into
mainfrom
codex/public-dev-opt-ins-main
Jul 4, 2026
Merged

Changed public app dev defaults#29105
9larsons merged 2 commits into
mainfrom
codex/public-dev-opt-ins-main

Conversation

@9larsons

@9larsons 9larsons commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

no ref

pnpm dev was unnecessarily heavy - in most cases, developers do not need to touch our public/frontend apps. It so happens that these apps are quite heavy by virtue of us serving UMD files, rather than a simple vite dev server. In light of that, I've stripped back pnpm dev to run only Ghost + Portal.

Other apps can be run using a convenient pnpm dev:public or by a more traditional pnpm nx run @tryghost/comments-ui:dev or cd apps/comments-ui && pnpm dev while running pnpm dev at the root.

Summary

Updates local dev defaults so pnpm dev starts the common frontend set only:

  • Admin
  • Portal

The less common public UMD app watchers are now explicit opt-in via pnpm dev:public:

  • Comments UI
  • Signup Form
  • Sodo Search
  • Announcement Bar
  • Admin Toolbar

Changes

  • Adds pnpm dev:public, backed by ghost-monorepo:docker:dev:public
  • Adds pnpm dev:full for analytics, storage, Stripe, and public UMD app watchers
  • Keeps optional services explicit with dev:analytics, dev:storage, and dev:stripe
  • Keeps Stripe behind docker/stripe/with-stripe.sh, so dev:stripe, dev:full, and dev:all require STRIPE_SECRET_KEY
  • Keeps existing service-specific scripts (dev:analytics, dev:storage, dev:stripe, etc.) working as before
  • Updates AGENTS.md and docker/ghost-dev/README.md to describe the new default and opt-in commands

Benchmark Notes

Steady-state host-process measurement:

  • pnpm dev: 13 host processes, 2.88 GiB summed RSS
  • pnpm dev:public: 23 host processes, 4.25 GiB summed RSS
  • Default savings: -10 host processes, -1.37 GiB summed RSS

Validation

  • node -e "JSON.parse(require('fs').readFileSync('package.json','utf8'))"
  • pnpm --silent nx show project ghost-monorepo --json
  • git diff --check

@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 4, 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: bb32c279-88cf-4548-b354-010abe836694

📥 Commits

Reviewing files that changed from the base of the PR and between 7f788ce and cdff9cf.

📒 Files selected for processing (1)
  • AGENTS.md
✅ Files skipped from review due to trivial changes (1)
  • AGENTS.md

Walkthrough

This PR adds root pnpm scripts for dev:public and dev:full, and updates the nx docker:dev dependency list so only @tryghost/admin and @tryghost/portal provide dev targets. It also refreshes AGENTS.md and docker/ghost-dev/README.md to document the expanded pnpm dev options, including dev:stripe and dev:all.

Possibly related PRs

  • TryGhost/Ghost#28968: Both PRs touch the public app dev setup and related UMD/dev watcher behavior.
  • TryGhost/Ghost#28969: Both PRs modify the package.json Nx docker:dev fan-out under target: "dev".
  • TryGhost/Ghost#28979: Both PRs update package.json dev-script plumbing around ghost-monorepo:docker:dev.

Suggested reviewers: acburdine, jonatansberg

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately reflects the main change to public app development defaults.
Description check ✅ Passed The description clearly matches the changeset and explains the updated dev defaults and new opt-in commands.
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 codex/public-dev-opt-ins-main

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 Jul 4, 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 cdff9cf

Command Status Duration Result
nx run @tryghost/admin-x-settings:test:acceptance ✅ Succeeded 10m 5s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded <1s View ↗
nx run-many -t test:unit -p @tryghost/admin-x-d... ✅ Succeeded 8m 8s View ↗
nx run ghost:test:ci:integration ✅ Succeeded 2m 46s View ↗
nx run ghost:test:integration ✅ Succeeded 2m 46s View ↗
nx run @tryghost/admin:build ✅ Succeeded 4m 13s View ↗
nx run ghost:test:legacy ✅ Succeeded 2m 57s View ↗
nx run ghost:test:e2e ✅ Succeeded 2m 26s View ↗
Additional runs (7) ✅ Succeeded ... View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-04 21:01:41 UTC

@9larsons
9larsons enabled auto-merge (squash) July 4, 2026 20:31

@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

🧹 Nitpick comments (2)
docker/ghost-dev/README.md (1)

35-36: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Same missing Stripe-key note as AGENTS.md.

dev:services/dev:full require STRIPE_SECRET_KEY to be set (via with-stripe.sh) or the command exits immediately; consider documenting this alongside the other prerequisites.

🤖 Prompt for 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.

In `@docker/ghost-dev/README.md` around lines 35 - 36, The dev service commands in
the README are missing the Stripe prerequisite note. Update the documentation
near the dev:services and dev:full entries to mention that STRIPE_SECRET_KEY
must be set via with-stripe.sh or those commands will exit immediately, and keep
the note alongside the other setup requirements for easy discovery.
AGENTS.md (1)

132-137: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the STRIPE_SECRET_KEY requirement for dev:services/dev:full.

These commands invoke with-stripe.sh, which hard-fails without a Stripe key configured (see package.json comment). Worth a one-line note here so users aren't surprised by the failure.

🤖 Prompt for 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.

In `@AGENTS.md` around lines 132 - 137, The optional services command list in
AGENTS.md is missing the Stripe prerequisite for the `dev:services` and
`dev:full` flows, which call `with-stripe.sh` and fail if no secret is set.
Update the documentation near the `pnpm dev:services` / `pnpm dev:full` entries
to note that `STRIPE_SECRET_KEY` must be configured beforehand, using the
existing optional-services section as the place to add the one-line warning.
🤖 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 `@package.json`:
- Around line 39-41: The dev:services and dev:full package scripts still invoke
the Stripe wrapper, so they fail early unless STRIPE_SECRET_KEY is set. Update
these scripts to either remove ./docker/stripe/with-stripe.sh so they can start
the analytics/storage bundle independently, or explicitly document the Stripe
secret requirement in the script naming/help text; keep the change localized to
the package.json script entries for dev:services and dev:full.

---

Nitpick comments:
In `@AGENTS.md`:
- Around line 132-137: The optional services command list in AGENTS.md is
missing the Stripe prerequisite for the `dev:services` and `dev:full` flows,
which call `with-stripe.sh` and fail if no secret is set. Update the
documentation near the `pnpm dev:services` / `pnpm dev:full` entries to note
that `STRIPE_SECRET_KEY` must be configured beforehand, using the existing
optional-services section as the place to add the one-line warning.

In `@docker/ghost-dev/README.md`:
- Around line 35-36: The dev service commands in the README are missing the
Stripe prerequisite note. Update the documentation near the dev:services and
dev:full entries to mention that STRIPE_SECRET_KEY must be set via
with-stripe.sh or those commands will exit immediately, and keep the note
alongside the other setup requirements for easy discovery.
🪄 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: ffcb2f95-7295-4c5c-b186-81e115b5ab07

📥 Commits

Reviewing files that changed from the base of the PR and between 99b1411 and 14d2e3e.

📒 Files selected for processing (3)
  • AGENTS.md
  • docker/ghost-dev/README.md
  • package.json

Comment thread package.json
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@9larsons
9larsons disabled auto-merge July 4, 2026 20:39
@9larsons
9larsons force-pushed the codex/public-dev-opt-ins-main branch from 2b1e877 to 84a1525 Compare July 4, 2026 20:41
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

no ref

Default local dev should stay lightweight while keeping orchestration in Nx. This adds an explicit public-app dev target for the expensive UMD watchers and keeps optional service startup on explicit scripts.
@9larsons
9larsons force-pushed the codex/public-dev-opt-ins-main branch from 84a1525 to 7f788ce Compare July 4, 2026 20:43
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

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

♻️ Duplicate comments (1)
package.json (1)

39-40: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

dev:full still hard-requires STRIPE_SECRET_KEY — same issue flagged previously.

dev:full unconditionally wraps the command with ./docker/stripe/with-stripe.sh, which exits with an error if STRIPE_SECRET_KEY isn't set. Per the upstream contract in docker/stripe/with-stripe.sh, the script validates STRIPE_SECRET_KEY, sets COMPOSE_PROFILES to include "stripe", and then execs the command. This means dev:full can't start analytics/storage + public watchers at all without a Stripe key configured, even though the PR objective describes dev:full as enabling "the optional services plus the public UMD app watchers" (analytics/storage should be independently useful without Stripe).

A prior review flagged this exact concern on these lines and it was marked "Addressed," but the current code still shows the same unconditional wrapping — the fix does not appear to have landed, or was reverted.

♻️ Possible fix: make Stripe optional in dev:full
-    "dev:full": "DEV_COMPOSE_FILES='-f compose.dev.analytics.yaml -f compose.dev.storage.yaml' ./docker/stripe/with-stripe.sh pnpm nx run ghost-monorepo:docker:dev:public",
+    "dev:full": "DEV_COMPOSE_FILES='-f compose.dev.analytics.yaml -f compose.dev.storage.yaml' pnpm nx run ghost-monorepo:docker:dev:public",

(If Stripe is intended to be mandatory for dev:full, document that requirement clearly in AGENTS.md/README instead.)

🤖 Prompt for 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.

In `@package.json` around lines 39 - 40, The dev:full script in package.json still
hard-requires STRIPE_SECRET_KEY because it always runs through with-stripe.sh.
Update dev:full so it can start the analytics/storage compose files and public
watchers without invoking docker/stripe/with-stripe.sh unless Stripe is truly
required, or alternatively make the Stripe dependency explicit in the project
docs. Keep the dev:public and dev:full command separation clear, and adjust the
dev:full entry to avoid the unconditional Stripe validation performed by
with-stripe.sh.
🤖 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.

Duplicate comments:
In `@package.json`:
- Around line 39-40: The dev:full script in package.json still hard-requires
STRIPE_SECRET_KEY because it always runs through with-stripe.sh. Update dev:full
so it can start the analytics/storage compose files and public watchers without
invoking docker/stripe/with-stripe.sh unless Stripe is truly required, or
alternatively make the Stripe dependency explicit in the project docs. Keep the
dev:public and dev:full command separation clear, and adjust the dev:full entry
to avoid the unconditional Stripe validation performed by with-stripe.sh.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8e899c4c-7a08-4dbf-9318-d7c3b93c17ee

📥 Commits

Reviewing files that changed from the base of the PR and between 84a1525 and 7f788ce.

📒 Files selected for processing (3)
  • AGENTS.md
  • docker/ghost-dev/README.md
  • package.json
✅ Files skipped from review due to trivial changes (2)
  • docker/ghost-dev/README.md
  • AGENTS.md

@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@9larsons
9larsons enabled auto-merge (squash) July 4, 2026 20:52
@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.27%. Comparing base (99b1411) to head (cdff9cf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #29105   +/-   ##
=======================================
  Coverage   74.27%   74.27%           
=======================================
  Files        1565     1565           
  Lines      135716   135716           
  Branches    16454    16459    +5     
=======================================
+ Hits       100800   100807    +7     
+ Misses      33917    33910    -7     
  Partials      999      999           
Flag Coverage Δ
e2e-tests 76.42% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@9larsons
9larsons merged commit 2776308 into main Jul 4, 2026
48 checks passed
@9larsons
9larsons deleted the codex/public-dev-opt-ins-main branch July 4, 2026 21:05
9larsons added a commit that referenced this pull request Jul 4, 2026
no ref

pnpm dev's default frontend fan-out was narrowed to Admin + Portal only
(#29104/#29105), since most sessions never touch the public UMD apps and
those watchers are the heaviest processes in the stack. The devcontainer's
start-dev-stack.sh hardcoded the old full project list independently of
root pnpm dev, so it needed the same trim to actually get the memory
savings inside Codespaces/devcontainers. Public apps remain available
via an explicit nx run-many invocation, called out in the script's output.
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.

1 participant