2023-12-05 01:54:33 +00:00
|
|
|
import type { Config } from "tailwindcss"
|
2026-02-05 19:48:17 +00:00
|
|
|
import { fontFamily } from "tailwindcss/defaultTheme"
|
2023-12-03 23:25:53 +00:00
|
|
|
|
|
|
|
|
const config: Config = {
|
2023-12-05 01:54:33 +00:00
|
|
|
content: [
|
|
|
|
|
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
|
|
|
|
|
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
|
|
|
|
|
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
|
|
|
|
|
],
|
|
|
|
|
theme: {
|
|
|
|
|
extend: {
|
2026-02-05 19:48:17 +00:00
|
|
|
backgroundImage: {
|
|
|
|
|
"gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
|
|
|
|
|
"gradient-conic": "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
|
2023-12-05 01:54:33 +00:00
|
|
|
},
|
|
|
|
|
fontFamily: {
|
2026-02-05 19:48:17 +00:00
|
|
|
sans: ["var(--font-sans)", ...fontFamily.sans],
|
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 20:39:44 +00:00
|
|
|
mono: ["var(--font-jetbrains-mono)", ...fontFamily.mono],
|
2023-12-05 01:54:33 +00:00
|
|
|
},
|
2025-12-22 16:42:42 +00:00
|
|
|
keyframes: {
|
|
|
|
|
shimmer: {
|
|
|
|
|
"100%": { transform: "translateX(100%)" },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
animation: {
|
|
|
|
|
shimmer: "shimmer 2s infinite",
|
|
|
|
|
},
|
2023-12-03 23:25:53 +00:00
|
|
|
},
|
2023-12-05 01:54:33 +00:00
|
|
|
},
|
|
|
|
|
plugins: [],
|
2023-12-03 23:25:53 +00:00
|
|
|
}
|
|
|
|
|
export default config
|