fix: display instrumented perf tests in observability timeline (#2381)

## Summary
- Published `@codeflash-ai/common@1.0.30` with `dist/` and
`instrumented_perf_test` schema field
- Updated webapp to use the new package so Prisma generates correct
types
- Removed `Record<string, unknown>` type cast workaround in `page.tsx`

The instrumented perf test data was already being stored in the DB but
the webapp's Prisma client didn't have the field in its generated types,
so it was never returned from queries.

## Test plan
- [ ] Search a trace that has perf tests (e.g.
`59a508fb-8d00-4830-992b-fa342e5d6c94`) and verify the `+perf` badge and
"Perf" tab appear in Test Generation
This commit is contained in:
Kevin Turcios 2026-02-08 03:21:57 -05:00 committed by GitHub
parent 223a730dff
commit 2c56875f83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 12 additions and 17 deletions

View file

@ -11,7 +11,7 @@
"dependencies": {
"@auth0/nextjs-auth0": "^3.3.0",
"@azure/msal-node": "^3.7.3",
"@codeflash-ai/common": "^1.0.28",
"@codeflash-ai/common": "^1.0.30",
"@hookform/resolvers": "^3.3.2",
"@monaco-editor/react": "^4.7.0",
"@prisma/client": "^6.7.0",
@ -704,9 +704,9 @@
}
},
"node_modules/@codeflash-ai/common": {
"version": "1.0.28",
"resolved": "https://npm.pkg.github.com/download/@codeflash-ai/common/1.0.28/12bed47e58afcf7237ebba9f6fa301f1f5a5d435",
"integrity": "sha512-EmnUy07dyZOfA03Ewub8C6/Qs/CO0thDLBfYdsW501qT5BpjPyZ2NQvGmWeOSFIQPuYpLpbe+zGEGcP7kS0Sxw==",
"version": "1.0.30",
"resolved": "https://npm.pkg.github.com/download/@codeflash-ai/common/1.0.30/2b9b7399dc24b978b78429cbce77e39e3cec77c4",
"integrity": "sha512-Vk8n8EN/a08VzZJUQtQDYtRodDJO4SyGoxyfjT0YkZcVI/RZQo1yP4e5oYxoe2yZdzkSAi7LtUwTMe9HZ99tPQ==",
"dependencies": {
"@azure/identity": "^4.2.0",
"@azure/keyvault-secrets": "^4.8.0",

View file

@ -21,7 +21,7 @@
"dependencies": {
"@auth0/nextjs-auth0": "^3.3.0",
"@azure/msal-node": "^3.7.3",
"@codeflash-ai/common": "^1.0.28",
"@codeflash-ai/common": "^1.0.30",
"@hookform/resolvers": "^3.3.2",
"@monaco-editor/react": "^4.7.0",
"@prisma/client": "^6.7.0",

View file

@ -168,15 +168,10 @@ function TraceContent({ traceId, traceData }: { traceId: string; traceData: Trac
index: index + 1,
}))
function getInstrumentedPerfTests(): Array<{ code: string; index: number }> {
const features = optimizationFeatures as Record<string, unknown> | null
const tests = features?.instrumented_perf_test as string[] | undefined
return (tests ?? []).map((code, index) => ({
code,
index: index + 1,
}))
}
const instrumentedPerfTests = getInstrumentedPerfTests()
const instrumentedPerfTests = (optimizationFeatures?.instrumented_perf_test ?? []).map((code, index) => ({
code,
index: index + 1,
}))
const llmCalls = rawLlmCalls.sort((a, b) => {
const seqA = (a.context as { call_sequence?: number } | null)?.call_sequence ?? Infinity

View file

@ -1,12 +1,12 @@
{
"name": "@codeflash-ai/common",
"version": "1.0.29",
"version": "1.0.30",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@codeflash-ai/common",
"version": "1.0.29",
"version": "1.0.30",
"dependencies": {
"@azure/identity": "^4.2.0",
"@azure/keyvault-secrets": "^4.8.0",

View file

@ -1,6 +1,6 @@
{
"name": "@codeflash-ai/common",
"version": "1.0.29",
"version": "1.0.30",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"repository": {