feat(wasteland): add Claims page tRPC tests + docs#3155
Merged
kilo-code-bot[bot] merged 3 commits intoconvoy/wasteland-claims-page/93e6710c/headfrom May 9, 2026
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Previously Flagged — All Resolved ✓
Files Reviewed (3 files)
Reviewed by claude-4.6-sonnet-20260217 · 248,588 tokens |
…s in test - Replace pending_pr! with optional chaining (?.) after not.toBeNull() guards - Replace fragile try/catch with .then() pattern that fails if unexpected resolve - Remove 'as TRPCError' cast, use instanceof narrowing instead
fe48450
into
convoy/wasteland-claims-page/93e6710c/head
2 checks passed
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.
Summary
Add tRPC procedure tests and documentation for the Claims page.
Tests (
services/wasteland/src/trpc/router.test.ts):listClaimswith rigHandle filterlistClaimsreturns only claimed itemslistClaimsreturns pending_pr with correct kind (claim/done) when DoltHub has matching open PRslistClaimsreturns empty array when DoltHub enrichment fails (PRECONDITION_FAILED)listClaimssets pending_pr to null when credential loading failsforceUnclaimWantedItemrejects empty/whitespace-only reason (Zod validation)forceUnclaimWantedItemrejects itemId with invalid characters (Zod regex)forceUnclaimWantedItemrequires upstream admin (FORBIDDEN when isUpstreamAdmin=false)Component tests: Skipped — no
*.test.tsxpattern exists in the wasteland app area (project doesn't do RTL component tests there).Playwright e2e: Skipped — existing e2e tests require a running app with full auth; can't meaningfully test claims page without full wasteland infrastructure.
Docs (
services/wasteland/docs/admin-mode.md):Infra (
services/wasteland/src/trpc/init.ts):createCallerFactoryfrom the tRPC instance for test use.Verification
pnpm --filter cloudflare-wasteland testpasses (22/22 tests)Visual Changes
N/A
Reviewer Notes
The test file uses
vi.mockto stub DO stubs, DoltHub API, and crypto helpers — necessary because the router procedures depend on Cloudflare Durable Object bindings and external DoltHub API calls that can't run in a Node test environment.