Skip to content

fix(web): issue assignee picker search ignores leading and trailing spaces - #43583

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
AymanKhan9:fix/issue-assignee-picker-trim
Nov 26, 2026
Merged

juliusmarminge merged 2 commits into
pingdotgg:mainfrom
AymanKhan9:fix/issue-assignee-picker-trim

Conversation

@AymanKhan9

Copy link
Copy Markdown
Contributor

Fixes #43581

Problem

In the web issue detail panel (apps/web/src/components/issue/IssueDetailPanel.tsx), IssueAssigneePicker matched candidate logins and names against query.toLowerCase() without trimming whitespace, so typing or pasting a handle with leading or trailing spaces (such as " alice ") returned no matches. This is the sibling of #43327, which fixed the same issue in IssueLabelPicker in the same file.

Fix

  • Trim the search query in IssueAssigneePicker (query.trim().toLowerCase()), matching IssueLabelPicker and mobile's IssueAssigneesScreen.tsx.
  • Added a browser test in apps/web/src/components/issue/IssueDetailPanel.browser.test.tsx verifying that searching " alice " matches alice and filters out bob (verified failing on unmodified main before the fix).

Verification

  • vp test run src/components/issue/IssueDetailPanel.browser.test.tsx (5/5 passed; new test failed on unmodified main)
  • vp fmt --check and vp lint on touched files
  • vp run typecheck in apps/web

Implemented by Gemini 4 Neon (Antigravity); reviewed by Claude Opus 5.5 (Claude Code), running in T3 Code.

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

coderabbitai Bot commented Nov 26, 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 a1766f2 and a349d4e.

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 issue assignee picker now trims leading and trailing spaces from search queries before matching candidate logins or names. The browser test covers a query with surrounding spaces.

Changes: Assignee search

Layer / File(s) Summary
Trim queries and test candidate matching
apps/web/src/components/issue/IssueDetailPanel.tsx, apps/web/src/components/issue/IssueDetailPanel.browser.test.tsx
The picker trims search queries before lowercasing them. The test fixture enables assignee editing and provides Alice and Bob as candidates. A test checks that searching for " alice " displays Alice but not Bob.

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

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: juliusmarminge, only21mil

Merge Risk: Minimal · previous review a1766

Searching for assignees now ignores leading and trailing spaces, as the label picker already does. The change is small and low-risk and is ready to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title describes the change: the issue assignee picker search now ignores leading and trailing spaces in the query. It matches the raw summary and the objectives, and it follows the conventional co…
Description check Passed The description follows the template. It has Problem, Change (Fix), Scope (linked issue #43581 and a sibling reference), and Verification sections. It gives the focused test command with results, note…
Linked Issues check Passed Issue #43581 requires leading and trailing whitespace in the IssueAssigneePicker search to be ignored when matching candidate logins and names. The diff between the merge base and head changes `const …
Out of Scope Changes check Passed The source change is a one-line trim applied to the assignee search needle, which is the requested behavior. The test file change adds a fixture with assignee candidates Alice and Bob, marks assignees…
Full details: Title check

Explanation

The title describes the change: the issue assignee picker search now ignores leading and trailing spaces in the query. It matches the raw summary and the objectives, and it follows the conventional commit format the template suggests. The title is specific and concise.

Full details: Description check

Explanation

The description follows the template. It has Problem, Change (Fix), Scope (linked issue #43581 and a sibling reference), and Verification sections. It gives the focused test command with results, notes that the new test failed on unmodified main, and lists lint, format, and typecheck runs. The Scope section does not state why the fix needs no issue, but the issue is linked, so that gap is minor. The Verification section does not list anything the author could not check, which is a minor gap. The description also names the agent and model, as the template asks.

Full details: Linked Issues check

Explanation

Issue #43581 requires leading and trailing whitespace in the IssueAssigneePicker search to be ignored when matching candidate logins and names. The diff between the merge base and head changes const needle = query.toLowerCase() to const needle = query.trim().toLowerCase() in apps/web/src/components/issue/IssueDetailPanel.tsx (line 253). The filter that uses needle is unchanged and still matches case-insensitively. This matches the IssueLabelPicker behavior referenced in the issue. The PR also adds a browser test in IssueDetailPanel.browser.test.tsx that searches " alice " and expects Alice to appear and Bob to be filtered out. The test is an automated coding requirement and is present. The non-coding parts of the PR description (manual verification commands) do not apply to this assessment.

Full details: Out of Scope Changes check

Explanation

The source change is a one-line trim applied to the assignee search needle, which is the requested behavior. The test file change adds a fixture with assignee candidates Alice and Bob, marks assignees editable in capabilities and viewerPermissions, and adds the whitespace search test. These fixture changes support the new test and do not expand the product behavior. No unrelated changes were identified in the reviewed summary or in the inspected source diff.

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 36816d2 and a1766f2.

Files selected for processing: 2

  • apps/web/src/components/issue/IssueDetailPanel.browser.test.tsx
  • apps/web/src/components/issue/IssueDetailPanel.tsx

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

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 26, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

Web, Chromium, 1280×800, light theme; fresh isolated servers, Replay seed thread, synthetic issue and candidate RPC responses: alice/Alice Example and bob/Bob Example.

Open issue details → Change assignees → search alice → search alice. Base loses alice; head retains alice and excludes bob. Head also retains alice for Alice Example.

Proven: scenario fails on base and passes on head; scenarios:prove exited 0.

Capture Before — 5e37e6db56 After — a349d4ec3b
Exact login Before: alice matches After: alice matches
Spaced login Before: nobody matches After: only alice matches
Assertion failure Before: alice remains absent Passed
Spaced name Not reached after failed login assertion After: spaced name matches alice

Before recording · After recording · Scenario source

Not shown:

  • Live tracker authentication and candidate fetching were not exercised; identical synthetic RPC responses isolated the client-side picker behavior.
  • Spaced-name search passed on head; base stopped at the spaced-login assertion, so its name search was not executed.

@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 26, 2026
@juliusmarminge
juliusmarminge merged commit 571d187 into pingdotgg:main Nov 26, 2026
57 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 26, 2026
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
…paces (pingdotgg#43583)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 571d187)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
…paces (pingdotgg#43583)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 571d187)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
…paces (pingdotgg#43583)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 571d187)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
…paces (pingdotgg#43583)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 571d187)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
…paces (pingdotgg#43583)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 571d187)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
…paces (pingdotgg#43583)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 571d187)
github-actions Bot pushed a commit to Ryoku-dev/hyakki that referenced this pull request Nov 26, 2026
…paces (pingdotgg#43583)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
(cherry picked from commit 571d187)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 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.

Issue assignee picker search fails when the query has leading or trailing spaces

2 participants