Skip to content

Chore/audit fixes - #16

Merged
devtofunmi merged 14 commits into
mainfrom
chore/audit-fixes
Aug 12, 2026
Merged

Chore/audit fixes#16
devtofunmi merged 14 commits into
mainfrom
chore/audit-fixes

Conversation

@devtofunmi

Copy link
Copy Markdown
Owner

No description provided.

The /app/health Agent Health page is a personal operator view, not a public feature. Remove it from the repo, regenerate the route tree without it, and gitignore the path. The server module (agent-health.ts) stays since the dashboard throughput chart uses it. Recoverable from git history if needed.
Move the monthly-reset predicate into the dependency-free plans module so it can be unit-tested without pulling in server-only code; billing imports it back.
Separate from vite.config.ts so Vitest runs unit tests without spinning up the TanStack Start / Nitro stack.
Wraps background work in Vercel's waitUntil so serverless keeps the function alive until reviews/scans finish instead of tearing them down after the response; a try/catch fallback lets it run on a long-lived host or dev server.
Replace the detached void runReview() with runInBackground() so a webhook-triggered review survives on serverless.
Replace void runScan() with runInBackground() so a user-started scan survives on serverless.
Shared ErrorShell renders 404 and error screens consistent with the app's look, with links back home and to the dashboard.
Set errorComponent + notFoundComponent on the root route so bad IDs and loader failures show a branded state instead of the framework default, and only render TanStack Devtools in development.
Lazily loads the drizzle client, schema, and query helpers together so server functions stop repeating the same three dynamic imports; exposes spread orm helpers + schema tables plus db, sqlClient, and the schema namespace.
Mechanical sweep: replace the repeated Promise.all([import('drizzle-orm'), import('../db/client'), import('../db/schema')]) blocks (34 of them) with loadDb(), and drop the duplicate local loadDb helpers in run-review/run-scan. No behavior change; names preserved.
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
jargons-8yyz Ready Ready Preview Aug 12, 2026 6:39pm

@devtofunmi
devtofunmi merged commit 79ad58b into main Aug 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant