Skip to content

fix(web): PR label filter keeps a host label's color after its search changes - #43862

Merged
juliusmarminge merged 5 commits into
pingdotgg:mainfrom
only21mil:fix/web-pr-label-filter-host-dot-color
Nov 27, 2026
Merged

juliusmarminge merged 5 commits into
pingdotgg:mainfrom
only21mil:fix/web-pr-label-filter-host-dot-color

Conversation

@only21mil

Copy link
Copy Markdown
Contributor

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

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

Before (314f59d1) After (e3188a1c)
The selected release-blocker label has a gray dot after the search changes to docs
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
release-blocker keeps its red dot after the search changes to docs

Links: base 314f59d1, head e3188a1c, regression test in apps/web/src/components/pullRequest/pullRequestList.logic.test.ts.

Not shown:

Generated with Claude Opus 5.5 in T3 Code Nightly

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Nov 27, 2026
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

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.

Changes: Hosted label retention

Layer / File(s) Summary
Retain hosted labels
apps/web/src/components/pullRequest/pullRequestList.logic.ts, apps/web/src/components/pullRequest/pullRequestList.logic.test.ts
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.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • 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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e3188a1 and 0f434b9.

Files selected for processing: 1

  • apps/web/src/components/pullRequest/pullRequestList.logic.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 27, 2026
juliusmarminge and others added 4 commits November 27, 2026 00:37
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… changes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

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.

Before After
Before: junk loses its orange dot After: junk retains its orange dot
e18c8fc2e5 f3e9061324
Before recording After recording

Scenario and seed script

scenarios:prove exited 0: failed on base with a gray dot and passed on head with rgb(244, 148, 60).

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 27, 2026
@juliusmarminge
juliusmarminge merged commit 284c8d2 into pingdotgg:main Nov 27, 2026
57 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants