You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): long Pull Requests author and label filters no longer end in a broken character - #42563
The Pull Requests page caps URL search values at 200 UTF-16 units. #42228 updated the search query (q) to stop before an emoji that the limit would split, but author and each entry in labels still truncate with a plain slice(0, 200).
When an author or label has 199 characters followed by an emoji (for example in a long shared or saved link), the 200-unit cut leaves half of a surrogate pair at the end: the Filters menu's Author and Labels items show a trailing broken character (�), and the router rewrites author in the address bar to end in %EF%BF%BD.
Change
Added a sliceSearchText helper in apps/web/src/routes/_chat.pull-requests.tsx that reuses splitsSurrogatePair and cuts at 199 units when unit 200 would split a surrogate pair. q, author, and each label in labels now go through this helper.
Technical caps (selectedUrl, repository, host, selectedHost) are unchanged. The filter menus' host search (PullRequestListFilters.tsx, 100-unit cut of the typed query) is also unchanged because it only bounds the query sent to the host and is never displayed.
Desktop renders the same web route; mobile has its own Pull Requests filters and does not read these URL values.
Scope
Small fix of an obvious bug — the same surrogate-pair split that #42228 fixed for q, left behind on author and labels — so no separate issue is needed.
Verification
Checked in Web on Linux (headless Chromium at 2560x1600), dev build with fresh isolated data and no projects. Opened /pull-requests?author=<199 a>😀&labels=<199 b>🐛, then opened Filters → Author and Filters → Labels. To make the end of each value visible in the screenshots, the capture turns off the menu item's ellipsis truncation.
On b6869fad67e (main), the router rewrote author in the URL to end in %EF%BF%BD (length 200) and both the Author and Labels menu items showed a trailing �. On 00aebc84 (this PR), both stop at 199 whole characters before the emoji.
b6869fad67e (main)
00aebc84 (this PR)
Before: the selected author ends in a broken character (�) where the emoji was cut
After: the selected author ends on whole characters, before the emoji
Before: the selected label ends in a broken character (�)
After: the selected label ends on whole characters
Tests:
pullRequestsRouteSearch.test.ts adds a case for a 199-character author + 😀 and a 199-character label + 🐛: it fails on b6869fad67e (main) with both values ending in a lone surrogate, and passes 3 of 3 runs on 00aebc84 (4/4 tests passing).
Reviewing files that changed from the base of the PR and between 00aebc8 and 4cab2f8.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
Pull request search parsing now uses a shared helper to limit text to 200 UTF-16 code units without splitting surrogate pairs. A test covers long author and label values followed by an emoji.
A shared helper applies the 200-code-unit limit without splitting surrogate pairs. Label, query, and author parsing use the helper. The test checks long author and label values followed by an emoji.
Long author and label filters in the Pull Requests view will no longer end in a broken character. The change is small, covered by a regression test, and easy to revert, so merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: a fix in the web Pull Requests author and label filters so long values no longer end in a broken surrogate-pair character. It matches the changeset, which adds sliceSe…
Description check
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem and Change sections explain the surrogate-pair split and the helper. Scope explains why no i…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: a fix in the web Pull Requests author and label filters so long values no longer end in a broken surrogate-pair character. It matches the changeset, which adds sliceSearchText and applies it to author and labels.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections. The Problem and Change sections explain the surrogate-pair split and the helper. Scope explains why no issue is linked and why this is a small bug fix. Verification gives before and after results, test results, and the agent note. The template's Scope asks for a linked issue. The author gives a reason instead, which the template allows for small obvious fixes. The template's embedded comment asks for screenshots in Verification, and the description includes before and after images.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
Real web app, light theme, 1920×900, fresh synthetic state on each commit. Open the Pull Requests route with author = 199 a characters + 😀 and labels = 199 b characters + 🐛, then inspect Filters → Author and Filters → Labels.
Proven: the scenario fails on base and passes on head. Base renders broken trailing characters and persists U+FFFD for author and a lone U+D83D for the label. Head renders and persists exactly 199 ASCII characters for each filter.
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
size:S10-29 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
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.
Problem
The Pull Requests page caps URL search values at 200 UTF-16 units. #42228 updated the search query (
q) to stop before an emoji that the limit would split, butauthorand each entry inlabelsstill truncate with a plainslice(0, 200).When an author or label has 199 characters followed by an emoji (for example in a long shared or saved link), the 200-unit cut leaves half of a surrogate pair at the end: the Filters menu's Author and Labels items show a trailing broken character (
�), and the router rewritesauthorin the address bar to end in%EF%BF%BD.Change
Added a
sliceSearchTexthelper inapps/web/src/routes/_chat.pull-requests.tsxthat reusessplitsSurrogatePairand cuts at 199 units when unit 200 would split a surrogate pair.q,author, and each label inlabelsnow go through this helper.Technical caps (
selectedUrl,repository,host,selectedHost) are unchanged. The filter menus' host search (PullRequestListFilters.tsx, 100-unit cut of the typed query) is also unchanged because it only bounds the query sent to the host and is never displayed.Desktop renders the same web route; mobile has its own Pull Requests filters and does not read these URL values.
Scope
Small fix of an obvious bug — the same surrogate-pair split that #42228 fixed for
q, left behind onauthorandlabels— so no separate issue is needed.Verification
Checked in Web on Linux (headless Chromium at 2560x1600), dev build with fresh isolated data and no projects. Opened
/pull-requests?author=<199 a>😀&labels=<199 b>🐛, then opened Filters → Author and Filters → Labels. To make the end of each value visible in the screenshots, the capture turns off the menu item's ellipsis truncation.On
b6869fad67e(main), the router rewroteauthorin the URL to end in%EF%BF%BD(length 200) and both the Author and Labels menu items showed a trailing�. On00aebc84(this PR), both stop at 199 whole characters before the emoji.b6869fad67e(main)00aebc84(this PR)Before: the selected author ends in a broken character (�) where the emoji was cut
After: the selected author ends on whole characters, before the emoji
Before: the selected label ends in a broken character (�)
After: the selected label ends on whole characters
Tests:
pullRequestsRouteSearch.test.tsadds a case for a 199-characterauthor+😀and a 199-character label +🐛: it fails onb6869fad67e(main) with both values ending in a lone surrogate, and passes 3 of 3 runs on00aebc84(4/4 tests passing).vp run check:changedpasses.An AI agent ran each check.
Generated with Gemini 4 Neon in T3 Code Nightly