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): PR label filter keeps a host label's color after its search changes - #43862
The web PR label filter searches the host as you type. If you pick a label the host found that no loaded PR carries, its color dot turns gray once the search text changes, though the label stays selected. #43655 restores a selected label's color from loaded rows or the current host answer, and the new answer no longer has that label.
Change
PullRequestLabelChoices now remembers every label the host has returned while the menu is open, through a small rememberPullRequestLabels helper, and looks selected labels up in that list. It keeps one label per name, a newer answer replaces a remembered color, and loaded rows still win. The helper returns the same list when an answer changes nothing, so the render-time state update settles, also when two environments answer the same name. A case in pullRequestList.logic.test.ts covers successive answers, a recolor and a duplicate name.
Verification
An AI agent ran the logic test, vp run check:changed, and before/after captures in the web app. The test fails on 314f59d1 and passes on this branch.
Setup: Linux, web app in a Chromium browser, light theme, 1280×800, fresh isolated server data on each commit. A loopback GitHub Enterprise stub serves three PRs labeled bug and docs; the repository also has release-blocker and other labels.
Steps: Pull requests → Filters → Labels → type release → select release-blocker → change the search to docs
Reviewing files that changed from the base of the PR and between 0f434b9 and f3e9061.
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
The pull request adds logic to retain hosted labels across picker searches. The picker uses remembered labels to resolve selected labels that are absent from the current search results.
rememberPullRequestLabels deduplicates labels by normalized name, places current results before previously seen labels, and preserves the existing array when ordered names and colors are unchanged. The test checks retention after a later search omits a label and reuse of the remembered value when the same result repeats.
Use remembered labels in the picker apps/web/src/components/pullRequest/PullRequestListFilters.tsx
PullRequestLabelChoices updates remembered labels from hosted responses and resolves selected labels against that set.
pingdotgg/t3code#43655: Both changes address selected labels losing display information when a search hides them, and both update the label picker and its logic tests.
pingdotgg/t3code#23924: This PR adds the host search flow whose returned labels this change retains. The available context does not establish whether that PR is in the base branch.
Suggested reviewers:aymankhan9
Merge Risk: Minimal · previous review 0f434
This change keeps a selected host label's color when the label search changes. It is low impact and confined to the pull-request label filter UI. No merge-blocking risk is evident.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: the PR label filter keeps a selected host label's color after the search changes. It follows the conventional commit format used in the repository template and matches…
Description check
The description follows the template well. It has Problem, Change, and Verification sections with concrete reproduction steps, before/after captures, commit links, and a regression test reference. The…
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: the PR label filter keeps a selected host label's color after the search changes. It follows the conventional commit format used in the repository template and matches the PR objectives and the summarized code changes.
Full details: Description check
Explanation
The description follows the template well. It has Problem, Change, and Verification sections with concrete reproduction steps, before/after captures, commit links, and a regression test reference. The Scope section is missing. The description does not link an issue or explain why no issue is needed for this bug fix. It also does not state an explicit reason for the change being a bug fix rather than a feature. The description is otherwise mostly complete, so the check passes.
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; 6 remain after this review.
Main fixed the mobile label filter in pingdotgg#43839; take its version and drop
the duplicate mobile change from this branch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Real web app, Chromium, 1280×800, dark theme, fresh isolated state, real GitHub host responses. Open Pull requests → Filters → Labels; search junk and select it; keep the menu open and replace the search with doc; wait for documentation to appear. The selected host-only junk label turns gray on base and retains orange on head.
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:M30-99 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 web PR label filter searches the host as you type. If you pick a label the host found that no loaded PR carries, its color dot turns gray once the search text changes, though the label stays selected. #43655 restores a selected label's color from loaded rows or the current host answer, and the new answer no longer has that label.
Change
PullRequestLabelChoicesnow remembers every label the host has returned while the menu is open, through a smallrememberPullRequestLabelshelper, and looks selected labels up in that list. It keeps one label per name, a newer answer replaces a remembered color, and loaded rows still win. The helper returns the same list when an answer changes nothing, so the render-time state update settles, also when two environments answer the same name. A case inpullRequestList.logic.test.tscovers successive answers, a recolor and a duplicate name.Verification
An AI agent ran the logic test,
vp run check:changed, and before/after captures in the web app. The test fails on314f59d1and passes on this branch.Setup: Linux, web app in a Chromium browser, light theme, 1280×800, fresh isolated server data on each commit. A loopback GitHub Enterprise stub serves three PRs labeled
buganddocs; the repository also hasrelease-blockerand other labels.Steps: Pull requests → Filters → Labels → type
release→ selectrelease-blocker→ change the search todocs314f59d1)e3188a1c)The selected release-blocker label has a gray dot after the search changes to docs
release-blocker keeps its red dot after the search changes to docs
Links: base
314f59d1, heade3188a1c, regression test inapps/web/src/components/pullRequest/pullRequestList.logic.test.ts.Not shown:
Generated with Claude Opus 5.5 in T3 Code Nightly