codeflash-internal/js/cf-api
Kevin Turcios d7a8b8f227
perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601)
## Summary
- **Fix CI build failure**: Auth0Client crashes during Next.js
prerendering when env vars aren't set. Returns a no-op stub (`getSession
→ null`) when domain is missing — semantically correct for static
generation
- **Lazy-load markdown libs (~260kb)**: ReactMarkdown, remarkGfm, and
react-syntax-highlighter were eagerly imported in monaco-diff-viewer but
only rendered when user expands "Generated Tests". Extracted into a
dynamic component
- **Parallelize repo detail query**: `getRepositoryById` ran the
activity count sequentially after the repo lookup. Since `repoId` is
already available, all three queries now run in parallel

## Test plan
- [ ] CI `build` check passes (was failing since #2598)
- [ ] Trace page still renders generated tests correctly when expanded
- [ ] Repository detail page loads correctly with activity status
2026-04-13 11:03:05 -05:00
..
.idea Webapp Authentication and API Key Token generation (#36) 2023-12-03 15:25:53 -08:00
config Add Optimization Review Rating in Slack Notification (#1936) 2025-10-29 00:20:36 -07:00
constants make healthcheck public in cfapi 2026-03-29 09:09:48 +02:00
cron Cf-api Refactor (#2131) 2026-01-19 23:03:57 +05:30
endpoints perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601) 2026-04-13 11:03:05 -05:00
exceptions fix for cf-api route issue and process exit (#2315) 2026-01-27 17:35:48 +05:30
github perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601) 2026-04-13 11:03:05 -05:00
middlewares perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601) 2026-04-13 11:03:05 -05:00
resend llm call optimization fail error log and small refactoring (#2447) 2026-03-02 12:33:56 +05:30
routes make healthcheck public in cfapi 2026-03-29 09:09:48 +02:00
scripts [feat] sync org and member using cron job (#2006) 2025-11-26 11:46:45 -05:00
staging perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601) 2026-04-13 11:03:05 -05:00
test/webhooks default path prefix fix for middleware (#1616) 2025-05-30 03:30:13 +05:30
utils Restoring the ordering of webhook before parsing json (#2389) 2026-02-10 04:06:35 +05:30
.env.test Implement Tests for CF-API Flow (#1634) 2025-06-25 03:36:26 +05:30
.gitignore cf-api fix (#1512) 2025-05-09 14:53:28 -04:00
.prettierignore prettier keeps modifying the markdown template 2025-05-09 14:53:29 -04:00
.prettierrc consistency in formatting across ide & js projs (#1499) 2025-03-04 23:52:45 +00:00
analytics.ts Cf-api Refactor (#2131) 2026-01-19 23:03:57 +05:30
auth0-mgmt.ts perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601) 2026-04-13 11:03:05 -05:00
auth0-mgmt.unit.test.ts Implement Tests for CF-API Flow (#1634) 2025-06-25 03:36:26 +05:30
diff_utils.test.ts code-suggester package upgrade to npm registry (#1522) 2025-05-09 14:53:28 -04:00
diff_utils.ts perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601) 2026-04-13 11:03:05 -05:00
Dockerfile local setup (#1898) 2025-11-17 12:35:09 -08:00
eslint.config.js perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601) 2026-04-13 11:03:05 -05:00
index.ts Restoring the ordering of webhook before parsing json (#2389) 2026-02-10 04:06:35 +05:30
instrument.ts perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601) 2026-04-13 11:03:05 -05:00
jest.config.cjs change messaging font size for github dependant PR (#1802) 2025-09-11 20:09:12 +05:30
jest.setup.ts perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601) 2026-04-13 11:03:05 -05:00
OptimizationReview.ts [Chore] Add staging link to PR comment (#2001) 2025-11-19 13:39:02 -08:00
package.json perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601) 2026-04-13 11:03:05 -05:00
prisma.config.ts perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601) 2026-04-13 11:03:05 -05:00
set-env.ts perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601) 2026-04-13 11:03:05 -05:00
setupAction.ts perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601) 2026-04-13 11:03:05 -05:00
tsconfig.json perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601) 2026-04-13 11:03:05 -05:00
types.ts perf: fix CI build + lazy-load heavy libs + parallelize DB queries (#2601) 2026-04-13 11:03:05 -05:00