Skip to content

Prototype: Automations run analytics - #29862

Draft
cmraible wants to merge 8 commits into
mainfrom
codex/run-analytics-prototype
Draft

Prototype: Automations run analytics#29862
cmraible wants to merge 8 commits into
mainfrom
codex/run-analytics-prototype

Conversation

@cmraible

Copy link
Copy Markdown
Collaborator

refs https://linear.app/ghost/issue/NY-1518/create-initial-prototype-branch-of-run-analytics

Note: this is a prototype branch that will remain in a draft state; I don't intend to merge this full branch at once — just creating a PR so it's easier to view the diff and collaborate on the prototype together before we start building it for real for production.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2ce824fd-41c2-40ff-b3e8-da7d8554036c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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 Aug 10, 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 37e3d33

Command Status Duration Result
nx run @tryghost/admin:test:acceptance ❌ Failed 8m 8s View ↗
nx run-many -t test:unit -p @tryghost/admin-x-f... ❌ Failed 27s View ↗
nx run ghost:test:integration ❌ Failed 3m 2s View ↗
nx run ghost:test:legacy ✅ Succeeded 3m 1s View ↗
nx run ghost:test:e2e ✅ Succeeded 2m 40s View ↗
nx run ghost-admin:test ✅ Succeeded 2m 35s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 16s View ↗
nx run @tryghost/admin:build ✅ Succeeded 1m 58s View ↗
Additional runs (3) ✅ Succeeded ... View ↗

💡 Dealing with memory or CPU issues? See memory and CPU details with the resource usage add-on ↗.


☁️ Nx Cloud last updated this comment at 2026-08-10 19:46:25 UTC

no ref

Surfaced run activity at list and workflow levels while keeping the prototype scoped to core progress and completion signals.
Automation tables and performance charts now reflect persisted run data instead of prototype fixtures.
@cmraible cmraible added the preview Deploy a PR preview environment label Aug 10, 2026

// ## Automations
router.get('/automations', mw.authAdminApi, http(api.automations.browse));
router.get('/automations/run-analytics', mw.authAdminApi, http(api.automationRunAnalytics.browse));
@Ghost-Slimer
Ghost-Slimer temporarily deployed to pr-preview-29862 August 10, 2026 19:30 Destroyed
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.45%. Comparing base (8f6a78d) to head (57de451).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #29862   +/-   ##
=======================================
  Coverage   75.45%   75.45%           
=======================================
  Files        1605     1605           
  Lines      140484   140470   -14     
  Branches    17430    17427    -3     
=======================================
- Hits       106005   105995   -10     
+ Misses      33402    33398    -4     
  Partials     1077     1077           
Flag Coverage Δ
admin-tests 55.97% <ø> (ø)

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.

no ref

The run analytics interface is still under development, so keeping the list columns and editor sidebar behind automationRunAnalytics allows the API to remain available while controlling exposure in Admin.
@cmraible
cmraible force-pushed the codex/run-analytics-prototype branch from 37e3d33 to 57de451 Compare August 10, 2026 19:35
@cmraible cmraible removed the preview Deploy a PR preview environment label Aug 10, 2026
ref https://linear.app/ghost/issue/NY-1498

- removed the redundant border between the page header and the table
- centered the column header labels to match the header rhythm used on Tags and Members; the grid-based table loses the native table's vertical-align, so the labels were sitting top-aligned
- relabeled "Last run" to "Last entry" to make clear it reflects the last entry into the automation rather than the last action taken, and updated the column-header test assertions to match
ref https://linear.app/ghost/issue/NY-1498

- the canvas and side-panel row uses Shade's Inline, which defaults to align="center", so the React Flow canvas collapsed to zero height and never rendered its nodes, and the run analytics side panel did not fill the row height
- set align="stretch" so both children fill the available height
ref https://linear.app/ghost/issue/NY-1498

- narrowed the panel to 400px
- replaced the hand-rolled card boxes with Shade Card/CardContent
- set the panel to bg-surface-elevated and made the cards fill-less (bg-transparent) so they no longer read darker than the panel in dark mode
- matched the metric card padding to the analytics KPI cards (px-6 py-5)
- matched the timeframe dropdown to the analytics date-range select: leading calendar icon, snug width, and grouped "Period" options
ref https://linear.app/ghost/issue/NY-1498

- replaced the non-meaningful status dots with icons: a custom progress ring for Running and a check for Done
- relabelled the two cards from In progress/Completed to Running/Done to match the run status vocabulary
- increased the panel's general section spacing to gap-lg
ref https://linear.app/ghost/issue/NY-1498

- the automations list and editor imported useFeatureFlag from the settings-app-scoped hook, whose useGlobalData() is undefined outside the settings route, so the pages threw "Loading interrupted" on render
- switched to the app-wide, null-safe useFeatureFlag from @tryghost/admin-x-framework/hooks (reads config via useBrowseConfig, no provider dependency)
- repointed the two test mocks to the framework hook so they exercise the real import path
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.

4 participants