fix(azure-devops): Issues search finds a work item by its ID #48221
Searching Issues on an Azure DevOps project only matched work item titles. Typing a work item's number (for example 46 or #46) showed "Nothing matches that." unless the number was in the title. Now a search that is a number also matches that work item's ID ([System.Id]), and the title match still applies as before.
Fixes pingdotgg/t3code#48209
Reproduction on main#
Commit dc11614464 (origin/main). Created Azure DevOps Task #46 titled 'Factory 48209 search repro widget' (title does not contain 46) in the test organisation with az. Made a local git repo whose origin is that project's Azure Repos URL. Started T3CODE_DEV_SEED=0 vp run dev (fresh database) with the Azure DevOps token in its environment, paired the web client, added the repo as a project, and opened Issues. The Azure DevOps section listed #46. Searching 46 showed 'Nothing matches that.' under Azure DevOps with no error. Searching #46 gave the same. Searching repro widget returned #46. Afterwards I deleted work item #46. Failing test: 'finds a work item by its numeric ID, not only by its title' in packages/source-control-azure-devops/src/server/AzureDevOpsIssueTracker.test.ts. On main the WIQL sent for '46' is ... AND [System.Title] CONTAINS '46' ORDER BY ..., with no [System.Id] clause.
Evidence#
Being captured: before and after in the real app. This section is filled in before the pull request can merge.
Tests#
vp test run src/server/AzureDevOpsIssueTracker.test.tswith the fix stashed: 1 failed (the repro test), 11 passedvp test run src/server/AzureDevOpsIssueTracker.test.tswith the fix: 12 passedvp run typecheckin packages/source-control-azure-devops: no errors, after adding the missingsortto the repro test callvp run check:changed: format, lint, knip, typecheck (11 packages) and tests (2 files) all pass- Live WIQL check with
az boards queryagainst the test organisation: the new clause returned the created work item for47,#47and a title search
Not in this change#
- An ID search still honours the selected state filter, so a closed work item's number finds nothing on the Open view; this is the same as every other search.
- The title search does not cover the description, unlike GitLab's
searchparameter.
Who did the work#
- Written by Claude Opus 5.5, in Claude Code
- Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
- Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5
Run by the t3code factory in T3 Code.
- 1
tanstack-source added labelsbug
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
Approvability#
Verdict: Approved at
f9c7aacMacroscope's review found this PR approvable — Azure DevOps issue searches now recognize numeric work-item IDs while preserving title matching and existing project and filter constraints. The change is limited to read-only search behavior, with no material operational or data risk identified.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Provider Metric Main baseline This PR Impact PR ceiling Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅ Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅ Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅ Codex Live turn WebSocket decoded 21.5 KiB 21.5 KiB 0 B (0.0%) 24.4 KiB ✅ Codex Live turn messages 1 1 0 (0.0%) 8 ✅ Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅ Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅ Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅ Claude Live turn WebSocket decoded 21.9 KiB 21.9 KiB 0 B (0.0%) 24.4 KiB ✅ Claude Live turn messages 1 1 0 (0.0%) 8 ✅ Other scenarios#
All 64 scenario measurements match
main.All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling Codex short turn resumeWebSocket decoded10.5 KiB 10.5 KiB 0 B (0.0%) 12.7 KiB ✅ Codex short turn resumeWebSocket messages2 2 0 (0.0%) 2 ✅ Codex long turn running, cold openHTTP decoded281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅ Codex long turn running, cold openrows75 75 0 (0.0%) 75 ✅ Codex long turn running, history pageHTTP decoded92.5 KiB 92.5 KiB 0 B (0.0%) 107.4 KiB ✅ Codex long turn running, history pagerows75 75 0 (0.0%) 75 ✅ Codex long turn finished, cold openHTTP decoded381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅ Codex long turn finished, cold openrows151 151 0 (0.0%) 151 ✅ Codex long turn finished, socket cold openWebSocket decoded381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅ Codex long turn finished, socket cold openWebSocket messages2 2 0 (0.0%) 2 ✅ Codex long turn finished, socket cold openrows151 151 0 (0.0%) 151 ✅ Codex long turn finished, work pageHTTP decoded78.3 KiB 78.3 KiB 0 B (0.0%) 200.2 KiB ✅ Codex long turn finished, work pagerows75 75 0 (0.0%) 150 ✅ Codex idle thread resumeWebSocket decoded65 B 65 B 0 B (0.0%) 200 B ✅ Codex idle thread resumeWebSocket messages1 1 0 (0.0%) 1 ✅ Codex fleet shell snapshotHTTP decoded42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅ Codex fleet shell snapshotrows27 27 0 (0.0%) 27 ✅ Codex fleet shell subscribeWebSocket decoded65 B 65 B 0 B (0.0%) 200 B ✅ Codex fleet shell subscribeWebSocket messages1 1 0 (0.0%) 1 ✅ Codex fleet shell resume checkHTTP decoded18 B 18 B 0 B (0.0%) 100 B ✅ Codex fleet shell resume checkrows0 0 0 0 ✅ Codex stale shell reloadHTTP decoded42.4 KiB 42.4 KiB 0 B (0.0%) 53.7 KiB ✅ Codex stale shell reloadrows27 27 0 (0.0%) 27 ✅ Codex stale shell resumeWebSocket decoded140 B 140 B 0 B (0.0%) 400 B ✅ Codex stale shell resumeWebSocket messages2 2 0 (0.0%) 2 ✅ Codex stale todo list cold openHTTP decoded72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅ Codex stale todo list cold openrows75 75 0 (0.0%) 75 ✅ Codex stale todo list cold opennodes2 2 0 (0.0%) 4 ✅ Codex stale todo list cold opensubagents2 2 0 (0.0%) 4 ✅ Codex stale todo list cold openplans1 1 0 (0.0%) 2 ✅ Codex stale todo list cold openproviderTurns1 1 0 (0.0%) 2 ✅ Codex stale todo list cold opencheckpoints1 1 0 (0.0%) 2 ✅ Claude short turn resumeWebSocket decoded10.6 KiB 10.6 KiB 0 B (0.0%) 12.7 KiB ✅ Claude short turn resumeWebSocket messages2 2 0 (0.0%) 2 ✅ Claude long turn running, cold openHTTP decoded283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅ Claude long turn running, cold openrows75 75 0 (0.0%) 75 ✅ Claude long turn running, history pageHTTP decoded93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅ Claude long turn running, history pagerows75 75 0 (0.0%) 75 ✅ Claude long turn finished, cold openHTTP decoded384.2 KiB 384.2 KiB 0 B (0.0%) 410.2 KiB ✅ Claude long turn finished, cold openrows151 151 0 (0.0%) 151 ✅ Claude long turn finished, socket cold openWebSocket decoded384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅ Claude long turn finished, socket cold openWebSocket messages2 2 0 (0.0%) 2 ✅ Claude long turn finished, socket cold openrows151 151 0 (0.0%) 151 ✅ Claude long turn finished, work pageHTTP decoded79.2 KiB 79.2 KiB 0 B (0.0%) 200.2 KiB ✅ Claude long turn finished, work pagerows75 75 0 (0.0%) 150 ✅ Claude idle thread resumeWebSocket decoded66 B 66 B 0 B (0.0%) 200 B ✅ Claude idle thread resumeWebSocket messages1 1 0 (0.0%) 1 ✅ Claude fleet shell snapshotHTTP decoded43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅ Claude fleet shell snapshotrows27 27 0 (0.0%) 27 ✅ Claude fleet shell subscribeWebSocket decoded66 B 66 B 0 B (0.0%) 200 B ✅ Claude fleet shell subscribeWebSocket messages1 1 0 (0.0%) 1 ✅ Claude fleet shell resume checkHTTP decoded18 B 18 B 0 B (0.0%) 100 B ✅ Claude fleet shell resume checkrows0 0 0 0 ✅ Claude stale shell reloadHTTP decoded43.0 KiB 43.0 KiB 0 B (0.0%) 53.7 KiB ✅ Claude stale shell reloadrows27 27 0 (0.0%) 27 ✅ Claude stale shell resumeWebSocket decoded140 B 140 B 0 B (0.0%) 400 B ✅ Claude stale shell resumeWebSocket messages2 2 0 (0.0%) 2 ✅ Claude stale todo list cold openHTTP decoded73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅ Claude stale todo list cold openrows75 75 0 (0.0%) 75 ✅ Claude stale todo list cold opennodes2 2 0 (0.0%) 4 ✅ Claude stale todo list cold opensubagents2 2 0 (0.0%) 4 ✅ Claude stale todo list cold openplans1 1 0 (0.0%) 2 ✅ Claude stale todo list cold openproviderTurns1 1 0 (0.0%) 2 ✅ Claude stale todo list cold opencheckpoints1 1 0 (0.0%) 2 ✅ Baseline:
7eba80e· PR result:f9c7aac· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
- Codex decoded thread snapshot: 108.5 KiB
- Claude decoded thread snapshot: 108.8 KiB
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.
No actionable comments were generated in the recent review.
Walkthrough
-
Azure DevOps issue search now matches numeric queries against work-item IDs as well as titles. Tests verify that both
46and#46generate an exact ID filter.Changes: Azure DevOps ID search
Layer / File(s) Summary Build and validate the search clause
packages/source-control-azure-devops/src/server/AzureDevOpsIssueTracker.ts,packages/source-control-azure-devops/src/server/AzureDevOpsIssueTracker.test.tsNumeric queries with an optional leading #add an exact work-item ID condition alongside title matching. WIQL uses the new search clause. Tests check both numeric query formats.Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Merge Risk:
Minimal · up tof9c7a-
Numeric searches in Azure DevOps issues now find work items by ID as well as by title, and tests cover both the plain and the
#-prefixedform. The change is small and safe to merge. Only extremely large ten-digit IDs still fall back to title-only matching.
Pre-merge checks:
4-
Check name Status Explanation Title check The title "fix(azure-devops): Issues search finds a work item by its ID" matches the main change. The raw summary and objectives show the adapter now matches a numeric search to [System.Id] as well as… Description check The description covers the problem, the change, the scope link, and verification, so it is mostly complete. The Problem section describes the bug and reproduction steps on main. The Change section exp… Linked Issues check [ #48209] requires that a search for a work item's displayed numeric ID finds that item, as a title-phrase search does. The reviewed diff for AzureDevOpsIssueTracker.ts adds searchClause(text). For tex…Out of Scope Changes check The reviewed change set is limited to the Azure DevOps issue-search path. It adds one helper (searchClause) and replaces the inline title clause in the issue-list WIQL builder with a call to it. The c… Full details: Title check
-
Explanation
The title "fix(azure-devops): Issues search finds a work item by its ID" matches the main change. The raw summary and objectives show the adapter now matches a numeric search to [System.Id] as well as the title. The title is short, specific, and follows the conventional commit style used in the template. It names the affected area (azure-devops) and the behavior fixed.
Full details: Description check
-
Explanation
The description covers the problem, the change, the scope link, and verification, so it is mostly complete. The Problem section describes the bug and reproduction steps on main. The Change section explains the numeric ID match and that title matching still applies. The Scope section links issue
#48209as the bug report. The Verification section lists focused test runs, a typecheck, a check:changed run, and a live WIQL check. It also states which behavior was not checked. The Evidence section is a placeholder that says the before and after capture is still in progress. The description does not mark the evidence as optional, and the template asks for before and after screenshots for UI changes. This change touches no UI, so the placeholder is a minor gap, not a blocker. The author should remove the placeholder or fill it in before merge.
Full details: Linked Issues check
-
Explanation
[
#48209] requires that a search for a work item's displayed numeric ID finds that item, as a title-phrase search does. The reviewed diff for AzureDevOpsIssueTracker.ts adds searchClause(text). For text matching /^#?(\d{1,9})$/, the WIQL becomesAND ([System.Title] CONTAINS '<text>' OR [System.Id] = <number>). Non-numeric text keeps the title-only clause, and empty text adds no clause. Both46and#46produce the ID match. The PR summary reports that the regression test 'finds a work item by its numeric ID, not only by its title' failed before the fix and passed after it, with 12 tests passing in AzureDevOpsIssueTracker.test.ts. I did not re-run the tests. The PR description's live in-app before/after evidence section is marked as still being captured. That evidence is not a coding requirement, so it does not affect this verdict. Limitation: numbers of ten or more digits fall back to title-only search. The issue does not require those cases.
Full details: Out of Scope Changes check
-
Explanation
The reviewed change set is limited to the Azure DevOps issue-search path. It adds one helper (searchClause) and replaces the inline title clause in the issue-list WIQL builder with a call to it. The change alters no exported declarations. The test file adds coverage for the numeric-ID WIQL clause. Both files relate directly to
#48209. The PR description's notes on state-filter behavior and description search describe existing limits. They do not add unrelated behavior.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info-
Run configuration-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: factory/issue-48209
- File: .coderabbit.config.ts
- Commit: f9c7aac
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Team
- Run ID:
93f068b5-fd72-4d1b-a366-f13b2599f174
Commits-
Reviewing files that changed from the base of the PR and between 7eba80e43120c8533738e7b5149f5b08b7ab0b14 and f9c7aacacd736be316f80afd489abf19666b1f05.
Files selected for processing: 2-
packages/source-control-azure-devops/src/server/AzureDevOpsIssueTracker.test.tspackages/source-control-azure-devops/src/server/AzureDevOpsIssueTracker.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
-
-
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes