[codex] Publish app admin social updates#112
Conversation
- Admin social account profile + dashboard load-time instrumentation - New media-mirror drain/recover, comments repair-auth, social-growth, and completion-summary API routes; media-queue snapshots - shadcn-style UI primitives (alert/badge/card/input/separator), trr-app flags - Vercel analytics + speed-insights in root layout; allowedDevOrigins - postgres pool connection-string resolver; portless/api-default updates; tests
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (95)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codex Exhaustive Code ReviewFindings
Validation Reviewed the requested diff boundary and surrounding code. Ran |
There was a problem hiding this comment.
Pull request overview
This PR expands the admin social surfaces and supporting infrastructure (routes, polling, e2e fixtures, and local workspace tooling), while also aligning “clean” Portless admin URLs and adding Vercel safety/diagnostics helpers.
Changes:
- Adds new admin social APIs and UI wiring for catalog runs, SocialBlade growth/cookie health, media queue snapshots, and ingest recovery/drain actions (with significant test coverage + e2e harness updates).
- Introduces workspace readiness + Vercel cleanup/preview-readiness diagnostics in the admin dev dashboard, plus a perf script for admin API benchmarking.
- Standardizes local admin URLs around
https://admin.trr.localhost(root) and updates middleware/proxy behavior and docs accordingly.
Reviewed changes
Copilot reviewed 94 out of 97 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/test-vercel-guard.sh | Expands Vercel guard test coverage with a fake guard + nested stale link setup/cleanup. |
| scripts/portless-banner.mjs | Updates printed admin URL to the clean Portless admin root (no /admin suffix). |
| pnpm-workspace.yaml | Adds dependency override and minimum release age exclusions for select packages. |
| package.json | Bumps Firebase-related deps and firebase-tools. |
| docs/ai/local-status/typography-runtime-fallback-hardening.md | Updates validation curl examples to clean Portless HTTPS admin host. |
| docs/ai/local-status/social-account-profile-wwhl-alias-canonicalization.md | Updates curl validation to clean Portless HTTPS admin host. |
| docs/ai/local-status/person-gallery-short-admin-route-rewrite.md | Updates validation URL to clean Portless HTTPS admin host. |
| docs/ai/local-status/brand-font-matches-and-artifacts.md | Updates admin URL examples to clean Portless HTTPS admin host. |
| docs/ai/HANDOFF.md | Adds a workspace readiness snapshot section. |
| apps/web/tests/trr-app-flags.test.ts | Adds unit tests for new TRR app flag parsing/defaulting. |
| apps/web/tests/social-media-queue-snapshots-route.test.ts | Adds tests for media queue snapshot listing + filename safety. |
| apps/web/tests/social-ingest-media-mirror-recover-route.test.ts | Adds tests for media mirror stale recovery proxy route validation/forwarding. |
| apps/web/tests/social-ingest-media-mirror-drain-account-route.test.ts | Adds tests for media mirror drain-account proxy route validation/forwarding. |
| apps/web/tests/social-growth-cookie-health-route.test.ts | Adds tests for SocialBlade cookie health proxy route behavior and error mapping. |
| apps/web/tests/social-account-profile-snapshot-route.test.ts | Updates proxy timeout behavior + caching expectations for profile snapshot flows. |
| apps/web/tests/social-account-profile-page.hashtag-preview.test.ts | Updates hashtag preview logic tests for assignment status inputs. |
| apps/web/tests/social-account-profile-completion-summary-route.test.ts | Adds tests for completion-summary SQL-backed admin route. |
| apps/web/tests/social-account-profile-catalog-diagnostics.test.ts | Adds tests for catalog progress diagnostic row generation. |
| apps/web/tests/social-account-profile-backfill-command.test.ts | Updates default catalog task selection expectations to include media. |
| apps/web/tests/social-account-live-profile-total-route.test.ts | Adds tests for fast degraded fallback behavior on live profile totals. |
| apps/web/tests/social-account-catalog-run-progress-route.test.ts | Aligns fast polling timeout expectations with progress timeout constant. |
| apps/web/tests/social-account-catalog-recent-runs-route.test.ts | Adds tests for new recent catalog runs route. |
| apps/web/tests/social-account-catalog-alt-page.test.ts | Adds tests for the new “Alt 1” catalog page routing behavior. |
| apps/web/tests/show-refresh-health-center-wiring.test.ts | Asserts the new auto full-refresh behavior on show view. |
| apps/web/tests/shared-live-resource-polling.test.tsx | Adds concurrency coverage around refetch while in-flight. |
| apps/web/tests/postgres-connection-string-resolution.test.ts | Adds coverage for stripping pg SSL query params from pool connection strings. |
| apps/web/tests/instagram-catalog-backfill-mockup-page.test.tsx | Adds UI tests for the Instagram catalog backfill mockup page behavior. |
| apps/web/tests/finish.flow.test.tsx | Adds coverage for API-provided show list fallback behavior. |
| apps/web/tests/e2e/admin-fixtures.ts | Extends mocked admin API to support social growth + season social flows and adds navigation helper. |
| apps/web/tests/e2e/admin-cast-tabs-smoke.spec.ts | Adds e2e coverage for SocialBlade refresh queueing call-ids + retry flow. |
| apps/web/tests/dev-dashboard-vercel-preview-readiness-service.test.ts | Adds tests for new dev dashboard Vercel artifact parsing + cleanup doctor. |
| apps/web/tests/covered-shows-page-no-fanout-wiring.test.ts | Adds assertions for auto-refresh target fanout behavior. |
| apps/web/tests/cast-socialblade-snapshot-wiring.test.ts | Adds wiring assertions for pending refresh state + e2e harness alignment. |
| apps/web/tests/brand-font-matching-scoring.test.ts | Adds score maxima exposure + metadata-only candidate coverage + null artifact health behavior. |
| apps/web/tests/admin-social-page-auth-bypass.test.tsx | Extends admin social auth bypass test to cover media queue + recovery/drain flows. |
| apps/web/tests/admin-portless-status.test.ts | Adds parsing coverage for Portless service status + route expectations. |
| apps/web/tests/admin-host-middleware.test.ts | Updates expectations around root handling, API non-rewrite, and additional routes. |
| apps/web/tests/admin-api-references-generator.test.ts | Adds coverage for query template normalization/stripping in API reference generator. |
| apps/web/src/proxy.ts | Adds variant-aware social profile parsing and safer internal rewrite URL building; avoids proxying /api paths. |
| apps/web/src/lib/trr-app-flags.ts | Introduces a centralized, typed flag-definition + parsing module for NEXT_PUBLIC flag toggles. |
| apps/web/src/lib/server/postgres.ts | Strips SSL query keys from pool connection string to avoid overriding explicit SSL config. |
| apps/web/src/lib/server/admin/portless-status.ts | Adds Portless service status parsing + integrates shared route definitions. |
| apps/web/src/lib/server/admin/dev-dashboard-service.ts | Adds Portless + Vercel readiness/cleanup diagnostics to the dev dashboard data payload. |
| apps/web/src/lib/fonts/brand-fonts/scoring.ts | Refactors scoring constants/profiles out and improves glyph artifact lookup handling. |
| apps/web/src/lib/fonts/brand-fonts/scoring-profiles.ts | New shared scoring profile constants + maxima helper for admin UI breakdown. |
| apps/web/src/lib/data/shows.ts | Adds a few shows to the local show list. |
| apps/web/src/lib/admin/shared-live-resource.ts | Coalesces poll refresh requests and prevents duplicate polls during in-flight requests. |
| apps/web/src/lib/admin/api-references/generator.ts | Strips query templates and query/hash portions from normalized API path patterns. |
| apps/web/src/lib/admin/admin-url-defaults.ts | Centralizes Portless route definitions/links/status routes and adjusts admin dashboard URL. |
| apps/web/src/components/ui/separator.tsx | Adds a Separator UI primitive. |
| apps/web/src/components/ui/input.tsx | Adds an Input UI primitive. |
| apps/web/src/components/ui/card.tsx | Adds Card UI primitives. |
| apps/web/src/components/ui/badge.tsx | Adds a Badge UI primitive. |
| apps/web/src/components/ui/alert.tsx | Adds Alert UI primitives. |
| apps/web/src/components/admin/social-week/WeekDetailPageView.tsx | Tweaks live snapshot polling gating logic. |
| apps/web/src/components/admin/design-system/BrandFontMatchesPanel.tsx | Uses shared score maxima helper for breakdown bars and removes duplicated maxima logic. |
| apps/web/src/components/admin/cast-content-section.tsx | Enables dev admin bypass option for the cast-role-members fetch. |
| apps/web/src/components/admin/AdminGlobalHeader.tsx | Updates Portful fallback warning to reference clean Portless admin root. |
| apps/web/src/app/social/[platform]/[handle]/catalog/alt-1/page.tsx | Adds “Alt 1” catalog view route that canonicalizes params. |
| apps/web/src/app/layout.tsx | Adds Vercel Analytics + Speed Insights components to the root layout. |
| apps/web/src/app/auth/finish/page.tsx | Fetches show list from API when available and falls back to local list. |
| apps/web/src/app/api/admin/trr-api/social/profiles/[platform]/[handle]/snapshot/route.ts | Uses progress timeout constant and removes forced refresh on cached hit. |
| apps/web/src/app/api/admin/trr-api/social/profiles/[platform]/[handle]/live-profile-total/route.ts | Adds fast degraded fallback and reduces backend timeout for live totals. |
| apps/web/src/app/api/admin/trr-api/social/profiles/[platform]/[handle]/comments/runs/[runId]/repair-auth/route.ts | Adds admin proxy endpoint for comments-run auth repair. |
| apps/web/src/app/api/admin/trr-api/social/profiles/[platform]/[handle]/comments/runs/[runId]/public-recovery/route.ts | Adds admin proxy endpoint for comments-run public recovery. |
| apps/web/src/app/api/admin/trr-api/social/profiles/[platform]/[handle]/comments/runs/[runId]/authenticated-followup/route.ts | Adds admin proxy endpoint for comments-run authenticated follow-up. |
| apps/web/src/app/api/admin/trr-api/social/profiles/[platform]/[handle]/catalog/runs/recent/route.ts | Adds SQL-backed recent catalog runs endpoint with caching and normalization. |
| apps/web/src/app/api/admin/trr-api/social/profiles/[platform]/[handle]/catalog/runs/[runId]/progress/route.ts | Simplifies progress timeout usage and related logging metadata. |
| apps/web/src/app/api/admin/trr-api/social/ingest/media-mirror/recover-stale/route.ts | Adds validated admin proxy to recover stale media mirror jobs. |
| apps/web/src/app/api/admin/trr-api/social/ingest/media-mirror/drain-account/route.ts | Adds validated admin proxy to drain account media mirror work. |
| apps/web/src/app/api/admin/trr-api/social-growth/history/route.ts | Adds internal-admin-auth SocialBlade history proxy route. |
| apps/web/src/app/api/admin/trr-api/social-growth/cookies/health/route.ts | Adds internal-admin-auth SocialBlade cookie health proxy route. |
| apps/web/src/app/api/admin/trr-api/social-growth/calls/[callId]/route.ts | Adds internal-admin-auth SocialBlade call-status proxy route. |
| apps/web/src/app/api/admin/social/media-queue/snapshots/route.ts | Adds FS-backed admin route to list/read media queue snapshot artifacts. |
| apps/web/src/app/admin/trr-shows/page.tsx | Auto-starts broader show refresh targets during add/navigation and updates URL params. |
| apps/web/src/app/admin/trr-shows/[showId]/page.tsx | Adds one-time-per-show full auto refresh behavior gated by pause state + query params. |
| apps/web/src/app/admin/page.tsx | Updates Portless URL card links/diagnostics to use centralized route definitions. |
| apps/web/src/app/admin/dev-dashboard/instagram-catalog-backfill-mockup/page.tsx | Adds a dev-dashboard page for the catalog backfill mockup view. |
| apps/web/src/app/admin/dev-dashboard/_components/DevDashboardShell.tsx | Adds nav entry for the catalog backfill mockup page. |
| apps/web/scripts/perf-admin-api.mjs | Adds autocannon-based perf harness script for admin API endpoints. |
| apps/web/README.md | Updates Portless admin URL docs to use the clean root. |
| apps/web/playwright.config.ts | Switches default base URL and webServer command to use localhost over 127.0.0.1. |
| apps/web/package.json | Adds new perf script and bumps multiple dependencies (Sentry, Supabase, Vercel analytics, etc.). |
| apps/web/next.config.ts | Adds allowedDevOrigins in dev builds for local hostnames. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import * as React from "react" | ||
| import { cva, type VariantProps } from "class-variance-authority" | ||
| import { Slot } from "radix-ui" | ||
|
|
||
| import { cn } from "@/lib/utils" |
| }: React.ComponentProps<"span"> & | ||
| VariantProps<typeof badgeVariants> & { asChild?: boolean }) { | ||
| const Comp = asChild ? Slot.Root : "span" | ||
|
|
| if (requestedFile) { | ||
| const filePath = path.join(snapshotDir, requestedFile); | ||
| const content = await fs.readFile(filePath, "utf8"); | ||
| return new NextResponse(content, { | ||
| headers: { | ||
| "content-type": "application/json; charset=utf-8", | ||
| "cache-control": "no-store", | ||
| }, | ||
| }); | ||
| } |
| }); | ||
|
|
||
| it("redirects the clean Portless admin host root to the admin dashboard", () => { | ||
| it("serves the clean Portless admin host root as the admin dashboard", () => { |
|
Superseded by cleaned replacement PR #113 after subagent review cleanup. |
Summary
.impeccablecache files from the commit.Validation
git diff --check origin/main...HEADpnpm run web:validate:quickNotes