Added static Automations page behind private feature flag#27510
Conversation
ref https://linear.app/tryghost/issue/NY-1239 - introduces the Automations area in the admin sidebar (after Comments) as a static skeleton so backend devs have a visual target to wire dynamic behaviour against - gated entirely behind the existing private `automations` flag so it stays invisible until we are ready to ship - new view lives in apps/posts (alongside Comments and Tags) and is built with Shade primitives (ListHeader) and components (Table, Badge) — no API calls, no data hooks
WalkthroughAdds an Automations feature: a feature‑flagged "Automations" sidebar entry, a new lazy route at 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/posts/src/routes.tsx`:
- Around line 72-75: The automations route is registered unconditionally so the
page is reachable via URL even when the feature flag is off; wrap the
lazy-loaded component returned by lazyComponent for the route with the
withFeatureFlag HOC so feature checks apply at render time. Uncomment the
withFeatureFlag import and change the route's element to lazyComponent(() =>
import('@views/Automations/automations').then(m => withFeatureFlag(m.default)))
(or the equivalent wrapper) so the 'automations' route uses the guard, preserves
the loading/redirect behavior, and prevents URL bypass. Ensure you reference the
existing lazyComponent call for path 'automations' and the withFeatureFlag
helper when making the change.
In `@apps/posts/src/views/Automations/components/automations-list.tsx`:
- Around line 45-54: The TableRow currently wraps an anchor with
href="#/automations/${automation.id}" which navigates to an unregistered detail
route (automations/:id) and causes an error; either remove the anchor and row
click/navigation styling so rows are non-navigable until a detail route exists,
or add a placeholder detail route registration that matches automations/:id in
your router configuration; locate the anchor in automations-list.tsx (the
TableRow/TableCell containing href="#/automations/${automation.id}") and either
remove or replace the <a> link (and any onClick/navigation behavior) or add the
corresponding route entry for the detail page in your route table (matching the
existing "automations" route name).
🪄 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: 88de4f0e-2322-40e8-8444-d94f8b646a1f
📒 Files selected for processing (7)
apps/admin/src/layout/app-sidebar/nav-content.tsxapps/posts/src/routes.tsxapps/posts/src/views/Automations/automations.tsxapps/posts/src/views/Automations/components/automations-content.tsxapps/posts/src/views/Automations/components/automations-header.tsxapps/posts/src/views/Automations/components/automations-layout.tsxapps/posts/src/views/Automations/components/automations-list.tsx
EvanHahn
left a comment
There was a problem hiding this comment.
Made a few small manual tweaks. LGTM!
|



closes https://linear.app/tryghost/issue/NY-1239
automationsflag so it stays invisible until we are ready to ship