Commit graph

21 commits

Author SHA1 Message Date
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
Kevin Turcios
3b1398973e
perf: Sentry-driven optimizations across all services (#2593)
## Summary

Comprehensive performance and reliability fixes driven by Sentry trace
data and error monitoring across aiservice, cf-api, and cf-webapp.

### Error Reduction
- **UUID validation (1,459 errors/month)**: Add `normalize_trace_id()`
to handle EXP0/EXP1 experiment suffixes instead of crashing. Add
`validate_trace_id` checks to 4 endpoints that were missing them. Fix
bare `UUID()` call in `log_event.py` (960 errors/month). Return 400
instead of 500 for invalid trace IDs in `log_features`.
- **CodeValidationError (1,068 errors/month)**: Add `repair_preamble()`
to fix broken LLM-generated test preambles that were causing all tests
to be discarded. 9 new tests.

### Speed Improvements
- **create-pr (11.8s → ~6s)**: Parallelize auth lookups and
post-PR-creation work (DB updates + GitHub API calls) with
`Promise.all`.
- **apikeys LCP (5,084ms → ~2s)**: Replace 5 sequential client-side
server actions with a single server-side `getDashboardInitData()` that
runs queries in parallel. Context providers accept initial data props to
skip client fetches.
- **optimization-prs (7.2s → ~3s)**: Replace `LEFT JOIN COUNT` on huge
JSONB table with `EXISTS` semi-join. Add composite indexes on
`optimization_events` for org-scoped and user-scoped queries.

### Web Vitals
- **Dashboard CLS (2.114 → ~0)**: Add matching skeleton for
OptimizationPRsTable, add `min-h-[420px]` to prevent layout shift.
- **Onboarding LCP (11.9s → ~6s)**: Reduce intro animation from 2400ms
to 1200ms, add `optimizePackageImports` for 12 heavy packages.
- **Trace page CLS (0.463 → ~0)**: Add `flex-shrink-0` to Monaco diff
viewer headers.
- Lazy-load Intercom/Crisp scripts, swap font display, reduce font
weights.

### Files Changed (19)
**aiservice (8):** common_utils.py, optimization_review.py,
code_validator.py, log_event.py, log_features.py, repair.py, review.py,
test_validate_code.py
**cf-api (1):** create-pr.ts
**cf-webapp (9):** layout.tsx, init-data-action.ts,
PrivacyModeContext.tsx, ViewModeContext.tsx, sidebar.tsx,
conditional-layout.tsx, action.ts, OptimizationPRsTable.tsx,
OptimizationsTable.tsx
**common (1):** schema.prisma

## Test plan
- [ ] Run aiservice tests: `cd django/aiservice && uv run pytest
tests/testgen_postprocessing/test_validate_code.py -v`
- [ ] Run aiservice type check: `cd django/aiservice && uv run mypy .`
- [ ] Verify cf-webapp builds: `cd js/cf-webapp && npm run build`
- [ ] Verify cf-api builds: `cd js/cf-api && npm run build`
- [ ] Run Prisma migration for new composite indexes
- [ ] Verify dashboard loads without CLS regression
- [ ] Verify create-pr endpoint still works end-to-end
- [ ] Monitor Sentry for UUID and CodeValidationError reduction after
deploy

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
2026-04-10 15:39:44 -05:00
Kevin Turcios
552647b2c3
perf: webapp CWV optimization — layout restructure + render-blocking fixes (#2598)
## Summary
- Remove 6 render-blocking font `@import` URLs from onboarding CSS,
replace with `next/font` CSS variables
- Delete dead `tailwind.css` (not imported anywhere)
- Scope Crisp chat widget to dashboard routes only (was loading on every
page)
- Add `preconnect`/`dns-prefetch` hints for Intercom
- Add `serverExternalPackages` for `@anthropic-ai/sdk` and `sharp`
- **Restructure layout hierarchy**: move `ViewModeProvider`,
`PrivacyModeProvider`, and sidebar shell out of root layout into
`(dashboard)` group — non-dashboard pages (auth, onboarding,
observability, trace) are now pure server-rendered
- Move `/dashboard` route into `(dashboard)` group, remove duplicate
onboarding guard
- Update semver-compatible dependencies (~30 patch/minor bumps)

## Test plan
- [ ] `npm run build` passes (32 routes, 0 errors)
- [ ] Dashboard pages show sidebar, breadcrumb, org switcher, privacy
toggle
- [ ] `/dashboard` still accessible and shows sidebar
- [ ] Auth/onboarding pages render without sidebar
- [ ] Observability pages render with ObservabilityNav (no sidebar)
- [ ] `/` redirects to `/apikeys`
- [ ] Fonts render correctly on onboarding pages
- [ ] Crisp chat loads on dashboard pages only
- [ ] Intercom loads on all pages
2026-04-10 08:40:59 -05:00
Kevin Turcios
e0d76d4338
feat: add observability stack (OTel, Sentry tuning, Prisma logging, bundle-analyzer) (#2547)
## Summary

- Add OpenTelemetry distributed tracing with Sentry bridge
(`instrumentation.ts`) — dynamic imports so OTel is only loaded when
active
- Reduce Sentry `tracesSampleRate` from 100% to 10% in production
(server + client), cutting event volume ~90%
- Add `skipOpenTelemetrySetup` to prevent duplicate OTel SDK
initialization
- Add `browserTracingIntegration` with long animation frame detection
for Web Vitals
- Add Prisma slow query logging (>500ms) and error forwarding to Sentry
- Add `@next/bundle-analyzer` for on-demand CI bundle tracking
(`ANALYZE=true npm run build`)
- Fix Edge-incompatible OTel exports (`SentryContextManager`,
`validateOpenTelemetrySetup`)

## Proof of Correctness

See
[`js/cf-webapp/proof/07-observability-stack.md`](js/cf-webapp/proof/07-observability-stack.md)
for detailed analysis.

## How to Verify

```bash
cd js/cf-webapp
bash proof/reproducers/07-observability-stack.sh
```

The reproducer verifies (24 checks):
1. OTel SDK configured with Sentry bridge (NodeSDK, SentrySpanProcessor,
SentryPropagator, PrismaInstrumentation)
2. Dynamic imports (4 packages only loaded when tracing active)
3. Noisy instrumentations disabled (fs, dns, net)
4. Sentry 10% production sampling (server + client)
5. `skipOpenTelemetrySetup: true` prevents duplicate OTel
6. Prisma slow query logging + Sentry error forwarding
7. `@next/bundle-analyzer` wired into next.config.mjs
8. All 5 required packages in package.json
9. `browserTracingIntegration` with long animation frame detection

## New Dependencies

| Package | Purpose |
|---------|---------|
| `@opentelemetry/sdk-node` | OTel Node.js SDK |
| `@opentelemetry/auto-instrumentations-node` | Auto-instrumentation for
HTTP, Express, etc. |
| `@prisma/instrumentation` | Prisma query spans |
| `@sentry/opentelemetry` | OTel → Sentry bridge |
| `@next/bundle-analyzer` (dev) | Interactive bundle treemap |

## Test Plan

- [ ] Run reproducer: `bash proof/reproducers/07-observability-stack.sh`
(24/24 pass)
- [ ] Verify `npm run build` succeeds
- [ ] Verify `npm run analyze` generates bundle treemap
- [ ] Confirm no Edge runtime build errors
(SentryContextManager/validateOpenTelemetrySetup removed)
2026-04-04 11:27:10 -05:00
Kevin Turcios
5dca735fc8
Upgrade Next.js 14 → 16, React 18 → 19, and dependencies (#2385)
## Summary
- Upgrade Next.js 14.2 → 16.1, React 18 → 19, React DOM 18 → 19
- Upgrade @sentry/nextjs 9 → 10, @auth0/nextjs-auth0 3 → 4, ESLint 8 → 9
- Migrate all async request APIs (cookies, params, searchParams are now
Promises)
- Migrate middleware.ts → proxy.ts (Next.js 16 convention)
- Rewrite ESLint config for flat config format
- New Auth0Client setup with backward-compatible AUTH0_DOMAIN derivation
- Turbopack browser-only resolveAlias for web-tree-sitter Node.js stubs

## Test plan
- [ ] `npm run build` passes
- [ ] `npm run lint` passes (0 errors, warnings only from React Compiler
rules)
- [ ] `npm run type-check` passes
- [ ] `npm run dev` starts successfully with Turbopack
- [ ] Auth login/logout flow works end-to-end
- [ ] Verify `AUTH0_DOMAIN` or `AUTH0_ISSUER_BASE_URL` env var is set in
deployment
2026-04-02 22:38:01 -05:00
Kevin Turcios
47053591f4
observability v2 toggle (#2378) 2026-02-07 15:50:12 -05:00
Sarthak Agarwal
98fb2d1579
Revert "CF-1041 observability v2 " need more changes and testing (#2375)
Reverts codeflash-ai/codeflash-internal#2329
2026-02-06 01:18:17 +05:30
Kevin Turcios
07d33edd9f
CF-1041 observability v2 (#2329)
introducing this due to pain points in V1, not a complete rewrite, based
off v1

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Kevin Turcios <KRRT7@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-02-05 14:08:02 -05:00
Kevin Turcios
1951ef0230 apply a few optimizations 2025-12-26 21:33:47 -05:00
Sarthak Agarwal
af5caaf98e
revert posthog update and webpack changes (#1916) 2025-10-21 22:31:57 -07:00
Aseem Saxena
184bffbd8f
Feat/add optimization review details (#1910)
Co-authored-by: HeshamHM28 <HeshamMohamedFathy@outlook.com>
Co-authored-by: Sarthak Agarwal <sarthak.saga@gmail.com>
2025-10-21 22:06:12 -07:00
Sarthak Agarwal
3231dd11f1
fixes for payment error and payload size error (#1908) 2025-10-18 01:55:12 -07:00
Sarthak Agarwal
378412bd18
auth aftercallback changes and logical restructure (#1668)
Closes
https://linear.app/codeflash-ai/issue/CF-674/fix-login-flow-in-webapp
2025-07-07 05:40:43 +00:00
HeshamHM28
b09b74e02b
Dashboard (#1596)
Co-authored-by: Saga4 <sarthak.saga@gmail.com>
2025-05-27 19:04:13 +05:30
Sarthak Agarwal
b0eccb722b
pricing dedupe and flow improve (#1511)
### **PR Type**
- Enhancement



___

### **Description**
- Update subscription checkout and cancellation logic

- Add subscription limits and usage reset utilities

- Enhance login, onboarding, and billing redirects

- Upgrade dependency versions and lint configurations


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>20
files</summary><table>
<tr>
<td><strong>actions.ts</strong><dd><code>Refactor checkout session and
cancellation functions</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-483bd280b775abd99ae9bbbbcbee9cdcd7407a5c8f09e97591143ea7a460a349">+23/-76</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>subscription-functions.ts</strong><dd><code>Add subscription
limits and monthly reset utilities</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-9fc439c25400b7ac049770509373f3e17ec84f0ba471fda2814bd37e4155b01b">+95/-6</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>subscription-management.ts</strong><dd><code>Integrate
common subscription functions in endpoints</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-a8e2aca1f0313219f56d75c5d57f36d869fada2292457444f50843b304c26c99">+15/-24</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>billing-view.tsx</strong><dd><code>Improve billing view UI
and period handling</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-4b7dc7632b66abfc90fcb72aaca8222a6f72b2cd65386f5cdf3d6affec187565">+22/-8</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>page.tsx</strong><dd><code>Add error handling and fallback
subscription data</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-86ac324c6a48fe59d742a236c9abad3998b7c571534ba8b4a757a89f5ad3ef83">+34/-18</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>page.tsx</strong><dd><code>Enhance login redirect with safe
return URL check</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-51fffa5e02e56eafab1bd3288c83046bb460d6f72cd89aee2f2fb106f19250e1">+29/-1</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>page.tsx</strong><dd><code>Improve checkout flow with
logging and Sentry tracking</code>&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-ab1265c18dc76b25db6970b8b1943cdbd6d9a36092a6091cdf705a3e9fc0b42a">+22/-7</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>SubmitFirstOnboardingPage.tsx</strong><dd><code>Implement
cookie-based redirect after onboarding</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-f7408066207ec9b618596437140aa986df7b733d84a04897b9fc1b48e9691772">+19/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>prisma-client.ts</strong><dd><code>Introduce singleton
Prisma client initialization</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-2961161048a21c0e00e92d799ccbe21870c5638af2aab0670c963c3d5dd929b0">+14/-16</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>stripe-client.ts</strong><dd><code>Add browser check for
Stripe client initialization</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-688ec9d856f21b99370442e1c056bcdca697f39f0773d0ed551ad3402d385f2e">+12/-5</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>is-github-app-installed.ts</strong><dd><code>Update import
paths with explicit file extensions</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-4b97bd2b461108930999b4af7e47d4763ad1b9490f7352130109c39f5abf4561">+3/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>package.json</strong><dd><code>Modify build script and
update dependency versions</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-4edec169b0f8d3312edaf35b5cc8521fe1edfa163ce174f60eff51906896601f">+5/-6</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>package.json</strong><dd><code>Upgrade dependency and dev
tool versions</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-b0d32af9c2caaba1377ec3e924eb553105cdc86e244018ffc6a866c530523599">+7/-5</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>package.json</strong><dd><code>Refine lint commands and
dependency configurations</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-53ddfb1f8a02f1231d3d15a2e694ffe1407d2cc01d3e685de5653b67fec571c7">+2/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>.eslintrc.mjs</strong><dd><code>Simplify ESLint settings for
cf-api</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-64f33493724c98b62fa6fc15a3e6150006f9e276eec35982f0121c93d4615858">+14/-28</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>.eslintrc.mjs</strong><dd><code>Revise ESLint configuration
for webapp</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-3e792fa9bf87a9f417a08617cdcd8f5465c92cca62190490bbeb4a76ed3775fd">+26/-15</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>.eslintrc.json</strong><dd><code>Adjust ESLint rules and
ignore patterns</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-b44cde4a55654414f4e45c08668a213ddf35250ea82ffef282107956af25efcb">+24/-2</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>eslint.config.mjs</strong><dd><code>Add new ESLint
configuration for common package</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-24b160f5da434c3e13caaa30e6a33be7a7950af40ec0fcac07cdfd724036dccd">+29/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>lefthook.yml</strong><dd><code>Comment out js-lint hook in
lefthook configuration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-ad6a01e589b8b1b214ca310dbb8d2e4314f6c612b921050c73c97455de43884d">+5/-5</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>tsconfig.json</strong><dd><code>Include express types and
refine TS settings</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-3532a852c82c88daeed6b57a35cd52c4a2589c909edc756613d67e280ab9b23e">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Additional
files</strong></td><td><details><summary>8 files</summary><table>
<tr>
  <td><strong>.eslintignore</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-285326f37b4ef7a8e43dc3fd17135ad3a3a51a85a9d2ddc5bdd234ffbf3ffada">+9/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>package-lock.json</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-75446c74353509ca0232d6a1350aef075ced8f72bd568e9bafa09cf255683142">+231/-213</a></td>

</tr>

<tr>
  <td><strong>subscription-utils.ts</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-846af69dc1c830de7e6d0c1f73a01e75d60d3e3788b0b60d907d8a161140c679">+0/-122</a>&nbsp;
</td>

</tr>

<tr>
  <td><strong>.eslintignore</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-9c369a46ac4f2c69b2e6ee4bc3d38a9837f0ec0d0ab51002f5b8220c4644fd4d">+12/-1</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>next.config.mjs</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-457975a67fc5d4317fca780879ee23a0e6bae3b3ac41a8d69b8e3dad006d0bb6">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>package-lock.json</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-0214c85d1717ad8b736e0296bb8cbf50db2aed068f31316d3c39904824a14f8e">+797/-1850</a></td>

</tr>

<tr>
  <td><strong>.eslintignore</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-fdc1690e7d0eea11a33263e0c96b5f1c506946809567531f9ed7ce764b37e802">+11/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>package-lock.json</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-54c17cef859f033fc84a59da2e977235ebc494943710c25d132e310ec500c5ef">+2361/-108</a></td>

</tr>
</table></details></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-03-11 23:29:20 +00:00
Sarthak Agarwal
bcf6644656
dedup the prisma.schema file and minor fixes & upgrade on version (#1417)
### **User description**

Closes
https://linear.app/codeflash-ai/issue/CF-511/dedupe-the-js-directory-in-code


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Dependency Updates**
	- Updated `@codeflash-ai/common` package version to 1.0.9
	- Updated `@prisma/client` and `prisma` dependencies to version 6.2.1
	- Added TypeScript dev dependency

- **Package Configuration**
	- Updated import paths for common modules
	- Added build and clean scripts
	- Modified package entry points
	- Added transpilation configuration for Next.js

- **Prisma Schema Changes**
- Removed database models for API keys, users, and optimization features

- **Code Refactoring**
	- Improved type safety in function signatures
	- Updated import statements
	- Standardized code formatting
	- Enhanced error handling with optional chaining

- **Infrastructure**
	- Updated GitHub npm registry authentication token
	- Added TypeScript configuration file
	- Introduced new README documentation for project setup and usage
<!-- end of auto-generated comment: release notes by coderabbit.ai -->


___

### **PR Type**
Enhancement, Bug fix, Dependencies


___

### **Description**
- Updated Prisma dependencies to version 6.2.1 across multiple packages.

- Added new npm scripts for Prisma migrations and generation.

- Refactored and improved code formatting in `pr-changes-utils.ts`.

- Fixed issues with file path handling in `pr-changes-utils.ts`.


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>pr-changes-utils.ts</strong><dd><code>Refactored utility
functions and improved code formatting</code></dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-ac6988771dc3fdb0666757d9bace579f70856f1f383ddd5db264484f1b6016e4">+54/-48</a>&nbsp;
</td>

</tr>

</table></details></td></tr><tr><td><strong>Dependencies</strong></td><td><details><summary>3
files</summary><table>
<tr>
<td><strong>package.json</strong><dd><code>Updated Prisma dependencies
and added migration scripts</code>&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-53ddfb1f8a02f1231d3d15a2e694ffe1407d2cc01d3e685de5653b67fec571c7">+5/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>package.json</strong><dd><code>Updated Prisma dependencies
and added migration scripts</code>&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-4edec169b0f8d3312edaf35b5cc8521fe1edfa163ce174f60eff51906896601f">+5/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>package.json</strong><dd><code>Updated Prisma
dependencies</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-b0d32af9c2caaba1377ec3e924eb553105cdc86e244018ffc6a866c530523599">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Additional
files</strong></td><td><details><summary>25 files</summary><table>
<tr>
  <td><strong>package-lock.json</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-75446c74353509ca0232d6a1350aef075ced8f72bd568e9bafa09cf255683142">+11667/-0</a></td>

</tr>

<tr>
  <td><strong>package-lock.json</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-0214c85d1717ad8b736e0296bb8cbf50db2aed068f31316d3c39904824a14f8e">+15284/-0</a></td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-249a9ce984a8d28465df7c46d14176335a3e3072a09295a2fc6c2a089706ac87">+0/-52</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-b65a93e0149b8757f9758bf4447b09c391e6d7f6753e3b8119aeb634bfa1e58a">+0/-35</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-0e2d258b7bc4efa2728784ff4979d1db99b19ce569add87f907dc0058e1cdf92">+0/-14</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-0297920ff8b9ca5872f0c23b91af90bb3b1f698c4ce1a6e979bcc57253d1fc14">+0/-19</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-10092bc1fc1cb33292d2de51fa103ead3329f89da4e5263ce7156f9fe058a8ac">+0/-13</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-6a150698bbc2c55fffa7c8203a6baa4ae76800a92dab2af3db4455a979e1efc8">+0/-12</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-b861d3b13254809a5d4c2ac173650d832bd5a531070275ed47b0364e7d708002">+0/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-3d975c9205361ffb41d75cbea296f1d5d3c995d7028cb723b84cdbdbaa14d6b6">+0/-10</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-c5e086fcd9e4cb5a31cccf9e021d33a8e5a823b5e9d5cd1f411e69cc954bcf3e">+0/-12</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-29d527d29b192dd7e335033c92797341179428888b151e07fb2a0a25904f900c">+0/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>migration_lock.toml</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-b12ade4703dcaa9647c60141524ec9178f0a8623c93a6792294289720e4f2618">+0/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>package-lock.json</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-54c17cef859f033fc84a59da2e977235ebc494943710c25d132e310ec500c5ef">+1926/-0</a></td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-3ac66eaa7bef6c5be52f465f23c01223d3092570e152a43260261eca73e2cd67">+0/-52</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-13fe21e5b5c119eb53d56a89833335001674d050d1c625ca91261e2aac5ff626">+0/-35</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-8e28adcb61d403ff9e17d0c0fd9189121f3778aea9c8afd0cd33113cbd976aca">+0/-14</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-13b918ec21eabf2dc38d6850ba3ef8fdaf7fc3d76c5a5d62e5131ef5431e6bd2">+0/-19</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-65b00a3a9add469eaeca6a86a4b9b23b4ad1f5bd533c7e4bd65827d6d1e5653a">+0/-13</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-61253604e58cb25b1e7436ccc7a935a58dc91c709e7ca23f7d4ab9001394b49c">+0/-12</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-08f6c4ab5dc1aba11a55931bf07ff68e645185a1c0dce1f71e68704bd823032c">+0/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-40674ec008e93d4ea34a92f20e426bcd958c5b868ccaa4d8ade800ef397fafcc">+0/-10</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-56208f997a8e939f82fad576f18c055589a33811dd7b537632aa0b97935bd3e6">+0/-12</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td><strong>migration.sql</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-58ddb0f84b902f4106e1f6921b6538cea46be9ded33b9766d8cb658b7d76331b">+0/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>migration_lock.toml</strong></td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1417/files#diff-44423d32fecc24a69cc5d2d075987e28b6ab13da9730940621da28c0786b37e0">+0/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information

---------

Co-authored-by: Kevin Turcios <turcioskevinr@gmail.com>
2025-01-24 01:16:41 +00:00
afik.cohen
02396d524f Lint fixes, reenable lint 2024-06-21 16:59:56 -07:00
afik.cohen
21aed03f46 Deploy with common 1.0.8, still skip linting 2024-06-13 12:50:03 -07:00
afik.cohen
063708aac6 Rename webapp project 2024-02-29 18:19:57 -08:00
afik.cohen
4f05cbac48 Add sentry to nextjs 2024-02-29 18:18:29 -08:00
afik.cohen
e55fd66054 First pass at building a dashboard page to show isntallaed repos; need to build webapp-cfapi auth for this to work 2023-12-13 16:42:04 -08:00