Skip to content

feat(studio): execution analytics view#150

Merged
Pama-Lee merged 1 commit into
mainfrom
feat/studio-analytics
Jul 5, 2026
Merged

feat(studio): execution analytics view#150
Pama-Lee merged 1 commit into
mainfrom
feat/studio-analytics

Conversation

@Pama-Lee

@Pama-Lee Pama-Lee commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

The UI half of the execution-analytics pipeline — this is what makes "Studio shows no data" go away. Adds an Analytics tab to each project that renders live call volume, decision-code distribution, and latency from the platform's /analytics endpoint (#149).

What

  • AnalyticsView.vue — range picker (1h / 24h / 7d), a totals row (total calls / error rate / avg latency / active rulesets), a traffic-over-time line chart (calls + errors), a decision-distribution doughnut, and a per-ruleset table (calls / error rate / avg latency).
  • Charts use echarts, lazy-imported (raw, matching the docs app) so the view + echarts are separate chunks and don't bloat the main bundle.
  • Empty state tells the user what to check ("engine needs NATS connectivity to the platform") — since that's the likely reason for no data on a fresh deploy.
  • analyticsApi + AnalyticsResponse types + useAnalyticsStore; a project-analytics route; an Analytics nav tab (between Instances and Integrate); i18n across all three locales (en / zh-CN / zh-TW).

Note on chart init

The chart <div>s live inside the hasData branch, so charts are initialized after data arrives + a nextTick DOM flush (not in onMounted) — otherwise the refs would be null and nothing would draw.

Verification

vue-tsc --noEmit clean; production build clean; AnalyticsView (6 kB) + echarts are separate lazy chunks. Full live render verifies once #149 is deployed and an engine drives traffic.

Pairs with #149 (backend). Together they close the loop: engine executes → platform stores → Studio shows it.

Adds the Analytics tab to a project — the UI half of the execution-analytics
pipeline. Renders live call volume, decision-code distribution, and latency
from the platform's /analytics endpoint.

- AnalyticsView.vue: range picker (1h/24h/7d), totals tiles (calls / error
  rate / avg latency / active rulesets), a traffic-over-time line chart
  (calls + errors), a decision-distribution pie, and a per-ruleset table.
  Charts use echarts, lazy-imported (raw, matching the docs app) so it
  code-splits out of the main bundle. Empty state hints that the engine needs
  NATS connectivity to the platform.
- analyticsApi + AnalyticsResponse types + useAnalyticsStore.
- Route (project-analytics), an 'Analytics' project nav tab, and i18n across
  all three locales (en / zh-CN / zh-TW).

Typecheck + production build clean; the AnalyticsView + echarts are separate
lazy chunks. Pairs with #149 (backend).
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ordo_docs Ready Ready Preview, Comment Jul 5, 2026 5:32pm
ordo-app Error Error Jul 5, 2026 5:32pm

@Pama-Lee Pama-Lee merged commit 14a0e9a into main Jul 5, 2026
15 of 16 checks passed
@Pama-Lee Pama-Lee deleted the feat/studio-analytics branch July 6, 2026 09:53
Pama-Lee added a commit that referenced this pull request Jul 6, 2026
Adds the Analytics tab to a project — the UI half of the execution-analytics
pipeline. Renders live call volume, decision-code distribution, and latency
from the platform's /analytics endpoint.

- AnalyticsView.vue: range picker (1h/24h/7d), totals tiles (calls / error
  rate / avg latency / active rulesets), a traffic-over-time line chart
  (calls + errors), a decision-distribution pie, and a per-ruleset table.
  Charts use echarts, lazy-imported (raw, matching the docs app) so it
  code-splits out of the main bundle. Empty state hints that the engine needs
  NATS connectivity to the platform.
- analyticsApi + AnalyticsResponse types + useAnalyticsStore.
- Route (project-analytics), an 'Analytics' project nav tab, and i18n across
  all three locales (en / zh-CN / zh-TW).

Typecheck + production build clean; the AnalyticsView + echarts are separate
lazy chunks. Pairs with #149 (backend).
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