Skip to content

Fix site-breaking import bugs, untrack knowledge node_modules, add org-wide OpenRouter key - #27

Merged
crewcricle merged 1 commit into
mainfrom
fix/admin-console-and-openrouter-key
Jul 26, 2026
Merged

Fix site-breaking import bugs, untrack knowledge node_modules, add org-wide OpenRouter key#27
crewcricle merged 1 commit into
mainfrom
fix/admin-console-and-openrouter-key

Conversation

@rprabhat

Copy link
Copy Markdown
Collaborator

Summary

  • Fixed several missing-import/missing-constant bugs (Logo, Mail, Phone, useState, FOUNDER_IMPACT, FREE_TOOLS_BLURB, PRICING_SECTIONS, Users/Calculator icons) left behind by an earlier "split constants" refactor. These were 500-ing every page on the site, including /admin, since the root layout renders <Footer/> on every route.
  • Consolidated a duplicate src/lib/config/social.ts / social.tsx pair that had diverging data (missing GitHub link, different Instagram URL) and caused non-deterministic import resolution depending on which file the bundler picked.
  • Untracked packages/knowledge/node_modules/ (365 files, including a compiled esbuild binary) that got committed in the last merged PR because that package was missing the .gitignore every sibling package has. Added the missing .gitignore.
  • Wired a shared OPENROUTER_API_KEY through the existing org secrets pipeline (Doppler crewcircle-master/prod → Pulumi ESC crewcircle/master → GitHub org secret), matching exactly how GITHUB_TOKEN/SENTRY_TOKEN/etc. are already distributed to every project. Also added an admin cost-tracking provider module mirroring the existing Anthropic one.
  • Fixed a missing afterEach import in packages/knowledge/test/internal/index.test.ts.

Why

Verifying the admin console surfaced that the whole site was actually broken (500s), traced to leftover dead references from a prior refactor commit. Fixed those, then implemented the org-wide OpenRouter key request using the same secrets-distribution pattern already established for other shared credentials.

Reviewer notes

  • The actual OPENROUTER_API_KEY secret value still needs to be set in Doppler (doppler secrets set OPENROUTER_API_KEY=<key> --project crewcircle-master --config prod) by someone with access — this PR only wires the plumbing, it can't set the live secret.
  • Known pre-existing tech debt not touched here (left as-is rather than guessing at business data): AppDef type is missing beta/featured fields referenced by AppsGrid/AppCard, a few admin API routes return typed Response instead of NextResponse, and projects/[id]/page.tsx imports a Github icon that no longer exists in the installed lucide-react version.

Test plan

  • npx tsc --noEmit — no errors (aside from the pre-existing items noted above)
  • npx eslint src --quiet — clean
  • Verified locally: homepage and /admin, /admin/costs, /admin/observability, /api/admin/* all return 200 with real content
  • CI

🤖 Generated with Claude Code

…rg-wide OpenRouter key

A "split constants" refactor had stripped several imports/constants while
leaving the JSX that used them (Logo, Mail, Phone, useState, FOUNDER_IMPACT,
FREE_TOOLS_BLURB, PRICING_SECTIONS, Users/Calculator icons), which 500'd
every page on the site including /admin, since the root layout renders
<Footer/> on every route. Also consolidated a duplicate src/lib/config/social.ts
/ .ts+.tsx pair that had diverging data and caused non-deterministic import
resolution.

Also untracks packages/knowledge/node_modules (365 files, including a
compiled esbuild binary) that got committed in the last PR because that
package was missing the .gitignore every sibling package has.

Wires a shared OPENROUTER_API_KEY through the existing org secrets
pipeline (Doppler crewcircle-master/prod -> Pulumi ESC crewcircle/master
-> GitHub org secret), matching how GITHUB_TOKEN/SENTRY_TOKEN/etc. are
already distributed, plus an admin cost-tracking provider mirroring the
existing Anthropic one. The actual secret value still needs to be set in
Doppler by someone with access before it takes effect anywhere.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
crewcircle-website Error Error Jul 26, 2026 6:59am

@crewcricle
crewcricle merged commit 9cf8964 into main Jul 26, 2026
5 of 6 checks passed
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.

2 participants