Chore/audit fixes - #16
Merged
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.