Repository navigation
Page the Precedent cases and search all of them on the server - #179
Merged
Merged
Conversation
The Precedent tab loaded the whole corpus on every visit, opening one database connection for the rows and another for the count. It now loads 25 cases a page. The search box sends its words to /precedent/staff/cases?q=, which keeps cases containing every word anywhere in the text, rule, ruling, punishment, logger or players, so it covers every case, not just the page on screen. The page and its count share one connection. The case form's player suggestions come from a new /precedent/staff/players route, fetched when the form first opens, since the page no longer holds every case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 55 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Next could count from the old search's page while a new search was loading, and a failed page turn left nothing to click. The pager now waits for the page in flight, a failed load offers Try again, each new search is a fresh request, and the search box stops at the API's 200 characters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
The Precedent tab loaded every case on each visit. On Main that is 219 cases, fetched with two fresh Supabase connections: one for the rows and one for the count, about 0.3 s each.
qtoGET /precedent/staff/cases. A case matches when every word appears somewhere in its text, rule, ruling, punishment, logger or players, ignoring case.%and_are matched as plain characters. It searches the whole corpus, not just the page on screen, and the count line says how many cases match.GET /precedent/staff/playersroute, fetched when the form first opens. The page no longer holds every case to collect them from.limit/offsetuse of/staff/casesis unchanged (limitstill defaults to 500).components/admin/ui.ts, shared with the Players directory.Docs: TF-Minecraft/Docs#133
Testing
xaero 4.8returns 1 case.100%anda_breturn no cases.🤖 Generated with Claude Code