Skip to content

Added static Automations page behind private feature flag#27510

Merged
EvanHahn merged 5 commits into
mainfrom
NY-1239/static-automations-page
Apr 22, 2026
Merged

Added static Automations page behind private feature flag#27510
EvanHahn merged 5 commits into
mainfrom
NY-1239/static-automations-page

Conversation

@peterzimon
Copy link
Copy Markdown
Contributor

@peterzimon peterzimon commented Apr 22, 2026

closes 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

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
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

Walkthrough

Adds an Automations feature: a feature‑flagged "Automations" sidebar entry, a new lazy route at /automations, and a new view composed of four components — AutomationsLayout (wraps content), AutomationsHeader (page title), AutomationsContent (styled section), and AutomationsList (table of automations showing name, step count, status badge, and last run). Table rows link to #/automations/<id>.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a static Automations page protected by a feature flag.
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.
Description check ✅ Passed The PR description clearly explains the purpose of adding a static Automations page behind a feature flag, references the issue, and describes the implementation approach.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch NY-1239/static-automations-page

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 and usage tips.

@peterzimon peterzimon requested a review from EvanHahn April 22, 2026 13:26
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between d0e813c and 7dba0b5.

📒 Files selected for processing (7)
  • apps/admin/src/layout/app-sidebar/nav-content.tsx
  • apps/posts/src/routes.tsx
  • apps/posts/src/views/Automations/automations.tsx
  • apps/posts/src/views/Automations/components/automations-content.tsx
  • apps/posts/src/views/Automations/components/automations-header.tsx
  • apps/posts/src/views/Automations/components/automations-layout.tsx
  • apps/posts/src/views/Automations/components/automations-list.tsx

Comment thread apps/posts/src/routes.tsx
Comment thread apps/posts/src/views/Automations/components/automations-list.tsx
Copy link
Copy Markdown
Contributor

@EvanHahn EvanHahn left a comment

Choose a reason for hiding this comment

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

Made a few small manual tweaks. LGTM!

@EvanHahn EvanHahn enabled auto-merge (squash) April 22, 2026 14:56
@sonarqubecloud
Copy link
Copy Markdown

@EvanHahn EvanHahn merged commit 545ccca into main Apr 22, 2026
41 checks passed
@EvanHahn EvanHahn deleted the NY-1239/static-automations-page branch April 22, 2026 15:19
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