feat: migrate duration / participants / issues / gum charts to summary endpoints (Phase 2 + 3 of #20)#28
Open
Boanerges1996 wants to merge 2 commits intopeermetrics:masterfrom
Conversation
…oints Phases 2 + 3 of peermetrics#20 — migrates the remaining charts that aggregated data client-side to self-fetch pre-computed summaries. Companion to api PR. Changes: - conferenceDurationChart.vue — fetches /conferences/duration-summary Click-to-detail paginates through matching conferences via the new duration_gte / duration_lt filters on /v1/conferences. - noParticipantsChart.vue — fetches /conferences/participant-count-summary. - mostCommongIssuesChart.vue — fetches /issues/summary. Click-to-detail uses the new issue_code filter on /v1/conferences. - gumChart.vue — fetches /issues/gum-summary. - graphsTab.vue — drops prop dependencies for the migrated charts so they can mount and render immediately without waiting for the parent's (now-stale for these charts) conferences/issues arrays. - peermetrics.js — new URL entries for the four summary endpoints. After this PR, the only charts that still depend on the parent's big conferences/sessions/connections arrays are: call setup time, relayed connections, browsers, OS, map — those come in Phase 4+5.
4 tasks
…sChart peermetrics.get() auto-unwraps `response.data` to the array, so `res.data || []` evaluates to `[]` and the chart renders empty. Match the pattern used in gumChart/conferenceDurationChart: `Array.isArray(res) ? res : (res.data || [])` handles both shapes. Found while testing against a prod-cloned local DB — the issues summary endpoint returned 10 rows but the chart silently rendered empty because of this unwrap. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Depends on peermetrics/api#26.
Rewrites four charts to self-fetch from the new server-side summary endpoints instead of receiving a big conferences/issues array as a prop:
Each chart now owns its own loading state, so none of them block on the big `/conferences` fetch in app.vue anymore. `graphsTab.vue` stops passing `:conferences` / `:issues` props for these four charts.
Test plan
🤖 Generated with Claude Code