▣ wi

#174 · evolutiva

Vercel + Supabase optimization — reduce Fluid Active CPU bill creep, eliminate dashboard misconfig, lower latency

Ref
#174 (#174)
Project
evolutiva
Status
backlog
Priority
normal
Type
task
Assigned
Created by
Created
2026-05-03T01:48:11.946Z
Updated
2026-05-03T01:48:11.946Z

Sub-items (17/17 done · 100%)

reftitlestatuspriorityassignee
#176 Speed Insights removal — drop @vercel/speed-insights import from src/app/layout.tsx + uninstall package (Pluto-driven 11K/10K event overage) done high
#173 build CPU: gitpush-pre.sh doc-skip — when only .md/CLAUDE.md/MEMORY.md changed, skip lint/typegen/typecheck/build to save ~30 build CPU min per push done normal coderhelp-mars-cc-w
#175 Mars: remaining Vercel + Supabase optimization todos (timeout 300→90s, disable Web Analytics + Speed Insights toggles, set spend cap, 7 A-pattern Promise.all([list,count]) sites) done normal coder-mars-cc
#177 Chromium → @react-pdf/renderer swap — replace src/lib/export-actions.ts renderPdfFromHtml (puppeteer-core + @sparticuz/chromium) on /informes export; CPU 5-15s → 50-200ms per render done normal
#178 resolveDataAccessScope → fn_resolveDataAccessScope SQL fn + React cache() — collapse 3-4 round trips per protected render to 1; src/lib/access-scope.ts done normal
#182 [shipped v1.57.1 / 62819ab] /practicas perf bundle: vPracticasHierarchyRollup view (237→24 rows, ~27× wire), pendienteHaceDias view col (BA-cal-day, drops Date.now hack), getAuditLog LIMIT 100, lookup unstable_cache + revalidateTag, /practicas/[id] Promise.all parallelize done normal
#183 v1.60.5 (3d8a5b1) perf(lookups): React cache() wrap on getLookupOptions + getMultipleLookupCategories — per-render dedup across 16 call sites done normal
#184 v1.60.6 (067ceb5) perf: parallelize /practicas/nueva teacher pools + /mi-cursada/[id] (getUserProgramas + getPracticaDetail) + drop dead @vercel/analytics dep done normal
#185 v1.60.7 (b007fb9) perf(mi-cursada): /mi-cursada query rewrite — fold KPI counts via COUNT(*) FILTER OVER() + LATERAL for adjuntoName/teeth/imageCount + React cache() on getStudentPracticas done normal
#186 A-pattern Promise.all([rows, count]) sweep — collapse to COUNT(*) OVER() window col, drop second query. Sites: personas-actions:124, admin-actions:411/1137/1200/1266/1458 (6+). Mirror of Mars audit pattern done normal
#188 vUserActiveRoles view: consolidate userRoles+vLookupOptions JOIN repeated at users-actions.ts:164/169/230 + data-health-actions.ts:58 + self-service-assignment.ts:51 — return userId, roleValues[], roleLabels[] (filtered deletedAt IS NULL) done normal
#189 pendienteHaceDias view col on vPracticas: lift practicas-table.tsx:19-21 JS Date.now() math to DB ((now() AT TZ 'America/Buenos_Aires')::date - createdAt::date) — TZ-correct, sortable/filterable SQL-side done normal
#179 vPracticasAuditEntries view — consolidate getStudentPracticasAuditLog + getJtpPracticasAuditLog + getPeriodoPracticasAuditLog (queries.ts:1626/1754/1870) into one view; per-call WHERE only done low
#180 vStudentPracticaStats fact view — getStudentsForPracticaForm CTE+candidateStats per-form-open aggregation → reusable fact view (queries.ts:165-235) done low
#181 vUserRolesActive view — auth-actions.ts:29-115 repeats userRoles+lookupOptions JOIN across getCurrentUser/getUserById; fold into view returning roleName + caps[] done low
#187 gitpush-pre.sh doc-skip investigation — Pluto has no per-project pre-script (only PATH gitpush.sh guard). Determine whether doc-skip lands in PATH gitpush.sh (llmmsg-srv-ca scope) or a new pluto-local pre-script done low
#194 Pool tuning post-Fluid: src/db/pool.ts max 6→2, idleTimeoutMillis 20s→5s. Rationale: traditional serverless = 1 active req/container, no intra-instance concurrency; Fluid-sized values cause connection storms on burst done low
+ Add sub-item

Questions

No questions.

Event log