Moved post-analytics into apps/admin and removed the posts package - #29217
Conversation
ref https://linear.app/ghost/issue/PLA-222/posts-admin-move-post-analytics-srcpostsanalytics-last - last domain to leave the posts package: post-analytics moves to apps/admin/src/posts/analytics, PostsAppContext dissolves, and with tags/comments/automations/members already migrated the @tryghost/posts package is now empty and removed entirely - the seven useAppContext consumers read appSettings from the framework AppContext directly; the header's fromAnalytics breadcrumb is always "Analytics" in admin, so it is hardcoded and the PostsAppContext wrapper is deleted - buildMembersUrl reunifies onto the members domain (now in admin); the post-analytics routes fold into the shell's route table with their own PostAnalyticsProvider; the gift-link modal host points at the moved modal; MainLayout becomes shade Box + Container - teardown: deletes apps/posts, drops the @tryghost/posts admin dependency, the index.css @source and tsconfig project reference, the asset-delivery entry, the ghost/admin nx dependency, and neutralises the now-obsolete Ember posts mock - migrated hook/util tests colocate beside their source with their MSW helpers under apps/admin/test-utils/posts-analytics
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin-x-settings:test:acceptance |
✅ Succeeded | 10m 40s | View ↗ |
nx run ghost:test:ci:integration |
✅ Succeeded | 2m 39s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | <1s | View ↗ |
nx run ghost:test:integration |
✅ Succeeded | 2m 55s | View ↗ |
nx run-many -t test:unit -p @tryghost/admin,@tr... |
✅ Succeeded | 5m 13s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 3m 5s | View ↗ |
nx run ghost:test:e2e |
✅ Succeeded | 2m 44s | View ↗ |
nx run @tryghost/koenig-lexical:test:acceptance |
✅ Succeeded | 2m 34s | View ↗ |
Additional runs (10) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-07-09 19:28:50 UTC
|
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 ignored due to path filters (3)
📒 Files selected for processing (97)
💤 Files with no reviewable changes (25)
WalkthroughThis change removes the standalone apps/posts application entirely (package, configs, routes, providers, tests, styles) and relocates its post-analytics functionality into apps/admin under new Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29217 +/- ##
==========================================
- Coverage 74.07% 74.04% -0.04%
==========================================
Files 1570 1570
Lines 136624 136624
Branches 16531 16516 -15
==========================================
- Hits 101203 101160 -43
- Misses 34385 34460 +75
+ Partials 1036 1004 -32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|

ref https://linear.app/ghost/issue/PLA-222/posts-admin-move-post-analytics-srcpostsanalytics-last
The finale of the posts→admin dissolution (PLA-222): post-analytics — the last domain — moves into
apps/admin,PostsAppContextdissolves, and the now-empty@tryghost/postspackage is removed entirely.What changed
PostAnalytics+ its post-analytics-only utils/hooks/providers →apps/admin/src/posts/analytics. Hook/util tests colocate; MSW helpers land inapps/admin/test-utils/posts-analytics.PostsAppContextdissolved. The 7useAppContextconsumers now readappSettingsfrom the frameworkAppContext(admin'sAppProvidersupplies it).fromAnalyticswas always true in admin, so the header breadcrumb is hardcoded to "Analytics"; the provider + wrapper are deleted. The data provider file was split (context/hook.ts, component.tsx) for react-refresh.buildMembersUrlreunified onto the members domain (now in admin), deleting the temporary copy.PostAnalyticsProvider;gift-link-modal-hostpoints at the moved modal;MainLayout→ shadeBox+Container.Package teardown
With every domain migrated,
apps/postsis empty and removed:apps/posts; dropped the@tryghost/postsdependency fromapps/admin, the@sourcescan inindex.css, and the tsconfig project referencepostsfromasset-delivery'sadminXApps, the@tryghost/postsghost/adminnx dependency, and neutralised the obsolete Ember posts mockVerification
tsc -b,eslint .(admin) — exit 0vitest run(admin) — 758 tests passnx build @tryghost/admin— exit 0, now 14 dependency tasks (was 15 — posts left the graph); post-analytics code-splits into its own lazy chunkspnpm install --frozen-lockfile— clean