Admin: chart projects by connection method (App URL vs GitHub Repo) — fixes bug #1092#43
Merged
Merged
Conversation
Bug report #1092 (help-widget feature request): admins want to see projects grouped by "Method" — whether they connect via an App URL or a GitHub repo — and track whether GitHub-repo adoption is growing over time. Adds a new admin-only endpoint (/api/admin-project-methods) that classifies every project as GitHub-connected (has a `github` settings blob or a github.com/owner/repo target_url) or App-URL, returning current totals plus a 12-month trend of new projects per method. A new ProjectMethodChart component renders the totals and a stacked monthly bar chart on the Admin page. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replay QA🚫 Cancelled — the pull request was closed. |
|
|
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.
Bug report #1092
A help-widget feature request: admins want a chart/breakdown on the Admin page showing projects grouped by "Method" — whether a project connects via an App URL or a GitHub Repo — so they can track whether GitHub-repo adoption is growing over time.
Changes
netlify/functions/admin-project-methods.ts— new admin-onlyGET /api/admin-project-methods. Classifies every project as GitHub-connected (has agithubsettings blob, or agithub.com/owner/repotarget_url, mirroringisGithubRepoUrl()) vs App-URL. Returns current totals plus a 12-month trend of new projects per method (gap-filled, UTC buckets aligned withdate_trunc).src/components/ProjectMethodChart.tsx— new "Connection method" section: App URL / GitHub Repo totals with percentages, and a stacked monthly bar chart of new projects by method. Follows the existingSubscriptionChart/ConversionCohortspatterns.src/pages/Admin.tsx— renders<ProjectMethodChart />alongside the other admin insight charts.Verification
npm run check— TypeScript + emulatable-runtime checks pass; my files are lint-clean (the remaining lint failure is pre-existing inscripts/lib/replay-node-preload.cjs).npm run build— production build succeeds.🤖 Generated with Claude Code