Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Mobile pull-request searches now trim and cap query text at the existing 200-character wire limit. The change is confined to search request normalization and leaves listing defaults and data unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Review requested
Logged so this PR shows when a maintainer was asked to review it. |
Problem
On iOS, the Pull Requests search uses the native header search bar, and it has no length limit. The contract caps
PullRequestListInput.queryat 200 characters. If you type or paste more than 200 characters of search text, every PR list request fails withSchemaError(Expected a value with a length of at most 200 at ["query"]), so the list shows an error instead of results.The other surfaces already respect the limit. The mobile search field used on Android and iPhone Duo sets
maxLength={200}on the pull requests tab, and web cutsqto 200 characters in the route'svalidateSearch.Change
pullRequestListInputnow cuts the leftover search text to 200 characters and trims it before sending. Qualifiers such asdraft:orlabel:are parsed out before the cut, so they still apply. Both mobile platforms build the request here, so this one change covers the iOS path.Scope and approval
Very small, focused fix for an obvious bug, so no prior issue: a mobile request builder sends a value the shared contract rejects, while its sibling input paths already cap it. It changes one line of behavior and adds one test assertion.
Overlap search: the local PR index plus REST searches for mobile PR search length,
pullRequestListInput, and the iOS search barmaxLength. The closest PR is #28095, which changes qualifier parsing inpullRequestQuery.tsand does not touch this length. #19934 (merged) added typed qualifiers to mobile search without a length cap.Verification
reads a typed draft qualifier as a filter and searches only the text left overinapps/mobile/src/features/pull-requests/pullRequestList.test.tsgets an extra assertion that a long query still produces a validPullRequestListInput. On main it fails withAssertionError: expected false to be true.vp test run src/features/pull-requests/pullRequestList.test.tsinapps/mobilepasses 24 of 24.vp run check:changedpasses format, lint, knip, typecheck (2 packages), tests, and the React Compiler check.Reviewed with sol-loop: 1 round with GPT-6.1 Sol on high. Sol verdict: approved.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code