perf: speed up assessment authoring and management flows - #32
Merged
Conversation
Address the two slowness complaints from churn feedback (creating tests, managing assessments) at their root: - Add DB indexes on the FK/org columns every assessment query filters and joins on (assessments, assessment_questions, question_library, question_library_test_cases, question_submissions, test_case_results). These were sequential scans before. Applied via `db:push`. - Fix listSubmissions N+1: fetch candidates in one inArray query instead of one round-trip per submission. - Stop the full-assessment refetch on every authoring edit: test-case add/edit/delete now patch the query cache from the mutation response, and question reorder is optimistic. Signature-affecting mutations still invalidate (server cascades test-case deletion). - Batch remaining N+1 loops: inviteCandidate inserts, getSubmissionDetails, getSubmissionByToken, and computeWeightedAggregate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
coderscreen-api | 2cbf217 | Jul 25 2026, 10:46 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
coderscreen-web | 2cbf217 | Jul 25 2026, 10:46 PM |
The Hono RPC client infers the PATCH test-case response as `never`, so reading `.id` off it broke `tsc` in the full build (where the api types resolve). Pin the fields the cache operations read via a CachedTestCase type. Isolated web tsc missed this because it degrades RPC types to any. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Addresses the churn feedback that CoderScreen felt slow when creating tests and managing assessments, fixing the root causes rather than symptoms. Adds the missing DB indexes on the FK/org columns that every assessment query filters and joins on (previously sequential scans), applied via
db:push. Fixes thelistSubmissionsN+1 and batches the remaining per-question loops ininviteCandidate,getSubmissionDetails,getSubmissionByToken, andcomputeWeightedAggregate. On the frontend, test-case add/edit/delete now patch the React Query cache from the mutation response and question reorder is optimistic, so authoring no longer re-pulls the entire assessment on every edit (signature-affecting mutations still invalidate, since the server cascades test-case deletion). API type-checks clean and no new web type errors are introduced.🤖 Generated with Claude Code