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
Sarthak Agarwal
7deb16819e
[Fix] Suppress slack for codeflash employees ( #2466 )
...
Co-authored-by: Aseem Saxena <aseem.bits@gmail.com>
Co-authored-by: Kevin Turcios <106575910+KRRT7@users.noreply.github.com>
2026-03-08 02:54:32 +05:30
HeshamHM28
45e22e0f94
Cf-api Refactor ( #2131 )
...
Fixes CF-833
2026-01-19 23:03:57 +05:30
mashraf-222
b85ff4a5c2
adding global exception handler and logger for dev and production ( #1927 )
...
Co-authored-by: HeshamHM28 <HeshamMohamedFathy@outlook.com>
Co-authored-by: Sarthak Agarwal <sarthak.saga@gmail.com>
2025-12-15 21:32:20 +05:30
HeshamHM28
6f5c2d7ad8
Implement Tests for CF-API Flow ( #1634 )
...
Co-authored-by: Sarthak Agarwal <sarthak.saga@gmail.com>
2025-06-25 03:36:26 +05:30
Saurabh Misra
11ce0a3153
secure verify-existing-optimizations end point and remove the try catch logic ( #1617 )
...
Co-authored-by: Saga4 <sarthak.saga@gmail.com>
2025-05-31 04:45:18 +05:30
Sarthak Agarwal
f48531fb14
cf-api fix ( #1512 )
...
### **PR Type**
- Enhancement
- Bug fix
___
### **Description**
- Update ES module import paths with explicit .js extensions.
- Refactor function signatures and type annotations for TypeScript.
- Wrap Express app with @awaitjs/express for async support.
- Upgrade package configurations and tsconfig settings.
___
### **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>6
files</summary><table>
<tr>
<td><strong>diff_utils.test.ts</strong><dd><code>Adjust import paths to
include .js extensions.</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1512/files#diff-c0991313f3fcb63fa2a553856b85d7df03e6d99cf98d19277fe689025f89ede1 ">+2/-2</a>
</td>
</tr>
<tr>
<td><strong>create-pr-from-diffcontents.ts</strong><dd><code>Update
import paths and adjust Octokit typing.</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1512/files#diff-b30d5e0c89beb70c0333a025726867aba5db7614911be3c46664bb59d1ab594a ">+12/-11</a>
</td>
</tr>
<tr>
<td><strong>index.ts</strong><dd><code>Use @awaitjs/express wrap to
create AsyncExpressApp.</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1512/files#diff-c3e60be1461b6e80f9181080342927fd9df095197e8784ae0ff51daaec8d71d5 ">+7/-5</a>
</td>
</tr>
<tr>
<td><strong>setupAction.ts</strong><dd><code>Update workflow setup
action and adjust GitHub API usage.</code></dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1512/files#diff-88c84a935a854855fb103dbf560f6ed5ea2e73e45750c97b5a3b901a5f9399a2 ">+5/-3</a>
</td>
</tr>
<tr>
<td><strong>types.d.ts</strong><dd><code>Add new type definitions for
Octokit and AsyncExpressApp.</code></dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1512/files#diff-370b1e96082f265e191b7aac76caa9feb60d32d56c36a2924725200b3d41f423 ">+45/-0</a>
</td>
</tr>
<tr>
<td><strong>types.ts</strong><dd><code>Remove obsolete types; migrate to
types.d.ts.</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1512/files#diff-8d1257d2e60e56e9c02c59b85078e89ad41af60267b02842daf203da3231902f ">+0/-6</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Bug
fix</strong></td><td><details><summary>4 files</summary><table>
<tr>
<td><strong>is-github-app-installed.ts</strong><dd><code>Add ts-ignore
and adjust GitHub app installation endpoint.</code></dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1512/files#diff-4b97bd2b461108930999b4af7e47d4763ad1b9490f7352130109c39f5abf4561 ">+1/-0</a>
</td>
</tr>
<tr>
<td><strong>suggest-pr-changes.ts</strong><dd><code>Refactor types, cast
Octokit instance, and update parameters.</code></dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1512/files#diff-b4a862986fd70827b8dabcb3157972bd0d5d507cf9c12e5fbf56f24979d073f3 ">+22/-15</a>
</td>
</tr>
<tr>
<td><strong>check-valid-api-key.ts</strong><dd><code>Refine middleware
typing with NextFunction.</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1512/files#diff-c04a6087bbabce916c7547acf14c186caf7af3ec6ff68b7e49102c3fe87e453c ">+9/-3</a>
</td>
</tr>
<tr>
<td><strong>track-usage.ts</strong><dd><code>Change Request type to
AuthorizedUserReq in usage tracker.</code></dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1512/files#diff-9248228a33147544ca9b58ff8b9c737b33763dd3e29717c82c38808bb7e34db3 ">+2/-1</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>2 files</summary><table>
<tr>
<td><strong>package.json</strong><dd><code>Upgrade dependencies and
refine build/deploy scripts.</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1512/files#diff-53ddfb1f8a02f1231d3d15a2e694ffe1407d2cc01d3e685de5653b67fec571c7 ">+8/-3</a>
</td>
</tr>
<tr>
<td><strong>tsconfig.json</strong><dd><code>Modify module, strict, and
lib options for NodeNext.</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1512/files#diff-3532a852c82c88daeed6b57a35cd52c4a2589c909edc756613d67e280ab9b23e ">+6/-5</a>
</td>
</tr>
</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>migration.sql</strong><dd><code>Add placeholder migration
for rolled back changes.</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1512/files#diff-98f5513f409a695839ec0bb0ee8e77d3c858e26c30db2113a83973dc1fa46c25 ">+1/-0</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-12 22:30:10 +00:00
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>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-483bd280b775abd99ae9bbbbcbee9cdcd7407a5c8f09e97591143ea7a460a349 ">+23/-76</a>
</td>
</tr>
<tr>
<td><strong>subscription-functions.ts</strong><dd><code>Add subscription
limits and monthly reset utilities</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-9fc439c25400b7ac049770509373f3e17ec84f0ba471fda2814bd37e4155b01b ">+95/-6</a>
</td>
</tr>
<tr>
<td><strong>subscription-management.ts</strong><dd><code>Integrate
common subscription functions in endpoints</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-a8e2aca1f0313219f56d75c5d57f36d869fada2292457444f50843b304c26c99 ">+15/-24</a>
</td>
</tr>
<tr>
<td><strong>billing-view.tsx</strong><dd><code>Improve billing view UI
and period handling</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-4b7dc7632b66abfc90fcb72aaca8222a6f72b2cd65386f5cdf3d6affec187565 ">+22/-8</a>
</td>
</tr>
<tr>
<td><strong>page.tsx</strong><dd><code>Add error handling and fallback
subscription data</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-86ac324c6a48fe59d742a236c9abad3998b7c571534ba8b4a757a89f5ad3ef83 ">+34/-18</a>
</td>
</tr>
<tr>
<td><strong>page.tsx</strong><dd><code>Enhance login redirect with safe
return URL check</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-51fffa5e02e56eafab1bd3288c83046bb460d6f72cd89aee2f2fb106f19250e1 ">+29/-1</a>
</td>
</tr>
<tr>
<td><strong>page.tsx</strong><dd><code>Improve checkout flow with
logging and Sentry tracking</code> </dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-ab1265c18dc76b25db6970b8b1943cdbd6d9a36092a6091cdf705a3e9fc0b42a ">+22/-7</a>
</td>
</tr>
<tr>
<td><strong>SubmitFirstOnboardingPage.tsx</strong><dd><code>Implement
cookie-based redirect after onboarding</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-f7408066207ec9b618596437140aa986df7b733d84a04897b9fc1b48e9691772 ">+19/-0</a>
</td>
</tr>
<tr>
<td><strong>prisma-client.ts</strong><dd><code>Introduce singleton
Prisma client initialization</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-2961161048a21c0e00e92d799ccbe21870c5638af2aab0670c963c3d5dd929b0 ">+14/-16</a>
</td>
</tr>
<tr>
<td><strong>stripe-client.ts</strong><dd><code>Add browser check for
Stripe client initialization</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-688ec9d856f21b99370442e1c056bcdca697f39f0773d0ed551ad3402d385f2e ">+12/-5</a>
</td>
</tr>
<tr>
<td><strong>is-github-app-installed.ts</strong><dd><code>Update import
paths with explicit file extensions</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-4b97bd2b461108930999b4af7e47d4763ad1b9490f7352130109c39f5abf4561 ">+3/-3</a>
</td>
</tr>
<tr>
<td><strong>package.json</strong><dd><code>Modify build script and
update dependency versions</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-4edec169b0f8d3312edaf35b5cc8521fe1edfa163ce174f60eff51906896601f ">+5/-6</a>
</td>
</tr>
<tr>
<td><strong>package.json</strong><dd><code>Upgrade dependency and dev
tool versions</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-b0d32af9c2caaba1377ec3e924eb553105cdc86e244018ffc6a866c530523599 ">+7/-5</a>
</td>
</tr>
<tr>
<td><strong>package.json</strong><dd><code>Refine lint commands and
dependency configurations</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-53ddfb1f8a02f1231d3d15a2e694ffe1407d2cc01d3e685de5653b67fec571c7 ">+2/-3</a>
</td>
</tr>
<tr>
<td><strong>.eslintrc.mjs</strong><dd><code>Simplify ESLint settings for
cf-api</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-64f33493724c98b62fa6fc15a3e6150006f9e276eec35982f0121c93d4615858 ">+14/-28</a>
</td>
</tr>
<tr>
<td><strong>.eslintrc.mjs</strong><dd><code>Revise ESLint configuration
for webapp</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-3e792fa9bf87a9f417a08617cdcd8f5465c92cca62190490bbeb4a76ed3775fd ">+26/-15</a>
</td>
</tr>
<tr>
<td><strong>.eslintrc.json</strong><dd><code>Adjust ESLint rules and
ignore patterns</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-b44cde4a55654414f4e45c08668a213ddf35250ea82ffef282107956af25efcb ">+24/-2</a>
</td>
</tr>
<tr>
<td><strong>eslint.config.mjs</strong><dd><code>Add new ESLint
configuration for common package</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-24b160f5da434c3e13caaa30e6a33be7a7950af40ec0fcac07cdfd724036dccd ">+29/-0</a>
</td>
</tr>
<tr>
<td><strong>lefthook.yml</strong><dd><code>Comment out js-lint hook in
lefthook configuration</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-ad6a01e589b8b1b214ca310dbb8d2e4314f6c612b921050c73c97455de43884d ">+5/-5</a>
</td>
</tr>
<tr>
<td><strong>tsconfig.json</strong><dd><code>Include express types and
refine TS settings</code>
</dd></td>
<td><a
href="https://github.com/codeflash-ai/codeflash-internal/pull/1511/files#diff-3532a852c82c88daeed6b57a35cd52c4a2589c909edc756613d67e280ab9b23e ">+1/-1</a>
</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>
</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>
</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>
</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>
</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>
</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
afik.cohen
c22fa54b8c
Fix CF-91 - say "none found" if there are no existing tests found, and elide inspired unit tests.
2024-02-20 16:49:59 -08:00
afik.cohen
028d8437a1
Refactor each endpoint and middleware into its own file and correctly handle async endpoint errors using addAsync from awaitjs/express
2024-02-20 16:39:58 -08:00