Skip to content

Admin: chart projects by connection method (App URL vs GitHub Repo) — fixes bug #1092#43

Merged
bhackett1024 merged 1 commit into
mainfrom
fix/bug-1092-project-method-chart
Jul 5, 2026
Merged

Admin: chart projects by connection method (App URL vs GitHub Repo) — fixes bug #1092#43
bhackett1024 merged 1 commit into
mainfrom
fix/bug-1092-project-method-chart

Conversation

@bhackett1024

Copy link
Copy Markdown
Contributor

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-only GET /api/admin-project-methods. Classifies every project as GitHub-connected (has a github settings blob, or a github.com/owner/repo target_url, mirroring isGithubRepoUrl()) vs App-URL. Returns current totals plus a 12-month trend of new projects per method (gap-filled, UTC buckets aligned with date_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 existing SubscriptionChart / ConversionCohorts patterns.
  • 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 in scripts/lib/replay-node-preload.cjs).
  • npm run build — production build succeeds.
  • Classification regex and 12-month bucketing logic verified against sample inputs.

🤖 Generated with Claude Code

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

replay-qa Bot commented Jul 5, 2026

Copy link
Copy Markdown

Replay QA

🚫 Cancelled — the pull request was closed.

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

⚠️ Loop QA preview deploy failed — see the run logs.

@bhackett1024 bhackett1024 merged commit 44f78b8 into main Jul 5, 2026
3 of 5 checks passed
@bhackett1024 bhackett1024 deleted the fix/bug-1092-project-method-chart branch July 5, 2026 22:11
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