Repository navigation
fix(server): whole-word search finds non-ASCII words past 100 partial lines - #45582
Conversation
… lines Only ASCII words were searched as whole words natively. For any other word, fff and git returned every line holding it inside a longer word, those lines used up the 100 matches a file gets, and the JS word check then dropped them, so a later whole-word line in the file was missed. A bare word of letters, marks, numbers and underscores now reaches fff as a regex with its edges spelled out: the line's edge, a character that is not a word character, or bytes that are not UTF-8, which decode to U+FFFD and so count as a boundary for the JS check. The word folds ASCII case only, as plain search does. While the content index builds, git drops the same lines with `-w`. Co-authored-by: Victor <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Extends whole-word search prefiltering to non-ASCII words so partial matches do not consume the per-file limit. The change remains confined to bounded, read-only search with existing final boundary filtering. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 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.
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
Merge Risk:
|
**v0.1.14-nightly.20261129.5452** · 48 changes from 11 contributors - **Smaller macOS updates.** macOS updates download faster by reusing unchanged fonts and models. - **Markdown table copying.** Copying a selection across Markdown table rows now preserves every selected cell. ### Plus 46 more bug fixes and performance improvements. <details> <summary>Full changelog</summary> ## What's Changed * fix(server): browser preview tab titles no longer end in half an emoji by @saphid in pingdotgg/t3code#45485 * fix(server): content search includes folders re-included by .ignore before the index is ready by @iamshadmantaqi in pingdotgg/t3code#45482 * fix(web): stop PR checks popover clicks and keys from selecting the row by @only21mil in pingdotgg/t3code#45478 * fix(server): partitioned Codex models_cache files no longer break shadow homes by @DOISolutions in pingdotgg/t3code#45450 * fix(shared): preserve the selected digit when uppercasing project monograms by @saphid in pingdotgg/t3code#45497 * fix(server): keep starting terminals available for reattachment by @StiensWout in pingdotgg/t3code#45492 * fix(web): keep every selected cell when copying part of a Markdown table by @saphid in pingdotgg/t3code#45500 * fix(server): thread search skips link addresses written in angle brackets by @AymanKhan9 in pingdotgg/t3code#45499 * fix(mobile): the merge button tells screen readers "1 stack layer", not "1 stack layers" by @saphid in pingdotgg/t3code#45496 * fix(server): opening the browser falls back on Linux when PATH ends in a file by @iamshadmantaqi in pingdotgg/t3code#45501 * fix(mobile): a failed Issues next page waits for Try again instead of retrying on scroll by @tiliakoos in pingdotgg/t3code#42298 * fix(shared): accept GitHub repository links with README queries or fragments by @saphid in pingdotgg/t3code#45508 * fix(server): t3_thread_read no longer splits a surrogate pair at textOffset by @only21mil in pingdotgg/t3code#45509 * fix(web): editing Theme JSON clears stale import errors by @only21mil in pingdotgg/t3code#45517 * fix(desktop): reuse unchanged fonts and models in macOS updates by @renningg in pingdotgg/t3code#45460 * fix(mobile): iOS Quote sheet scrolls the comment field above the keyboard by @juliusmarminge in pingdotgg/t3code#45524 * fix(server): remove evicted terminals from connected clients by @StiensWout in pingdotgg/t3code#45506 * fix(web): font family fields trim whitespace before saving by @only21mil in pingdotgg/t3code#45521 * fix(web): mark invalid provider environment variable names by @only21mil in pingdotgg/t3code#45526 * fix(client-runtime): handle combined -o/-O options with -c in shell command labels by @saphid in pingdotgg/t3code#45342 * fix(web): stop listing TAR files replaced by unsupported members by @saphid in pingdotgg/t3code#45525 * perf(server): avoid enumerating active threads' checkpoint refs during cleanup by @jamesx0416 in pingdotgg/t3code#45516 * fix(web): Enter in custom model editor text inputs saves the edit by @only21mil in pingdotgg/t3code#45539 * fix(web): apply the TSV record size limit to the final unterminated record by @saphid in pingdotgg/t3code#45537 * fix(shared): count words separated by an unspaced em dash in text direction by @saphid in pingdotgg/t3code#45534 * fix(web): use the numbered fallback for blank OpenDocument preview names by @saphid in pingdotgg/t3code#45536 * fix(web): Enter advances or submits the Add provider identity step by @only21mil in pingdotgg/t3code#45541 * fix(web): copy inline PNGs whose MIME parameter contains the word base64 by @saphid in pingdotgg/t3code#45546 * fix(server): scheduled worktree tasks in non-Git projects run at the root when they fire by @juliusmarminge in pingdotgg/t3code#45560 * fix(mobile,web): preserve comma-containing environment IDs in limits refresh by @saphid in pingdotgg/t3code#45512 * fix(shared): keep Devanagari conjuncts intact in automatic project monograms by @saphid in pingdotgg/t3code#45554 * fix: a machine overloaded on both CPU and I/O no longer reads "Machine overloaded · Machine overloaded" by @saphid in pingdotgg/t3code#45531 * fix: keep RTF footnotes and text boxes after blank source lines by @saphid in pingdotgg/t3code#45559 * fix(shared): preserve inner quote punctuation when highlighting message results by @saphid in pingdotgg/t3code#45568 * fix(server): repeated thread actions no longer stay pending in clients by @saphid in pingdotgg/t3code#45565 * fix(web): closing Usage with its shortcut returns focus to the opener by @only21mil in pingdotgg/t3code#45577 * fix(shared): thread titles no longer cut a flag emoji in half by @saphid in pingdotgg/t3code#45574 * fix(web): stop linking GitHub bot comment authors to missing profiles by @only21mil in pingdotgg/t3code#45573 * fix(server): whole-word search finds non-ASCII words past 100 partial lines by @juliusmarminge in pingdotgg/t3code#45582 * fix(client-runtime): keep durable environment streams alive across in-place catalog updates by @saphid in pingdotgg/t3code#45584 * fix(web): invalid When expression blocks visual keybinding edits by @DaDerekkk in pingdotgg/t3code#45553 * fix(web): focus the merged cell when spreadsheet navigation skips a hidden column by @saphid in pingdotgg/t3code#45583 * fix(shared): count words separated by zero-width spaces when choosing text direction by @saphid in pingdotgg/t3code#45566 * fix(web): saving another keybinding keeps an unfinished new keybinding row by @iamshadmantaqi in pingdotgg/t3code#45593 * fix(codex): stopped partial plans no longer remain streaming by @saphid in pingdotgg/t3code#45590 * fix(server): selected-file commits keep refusing a merge when the project folder is a symlink by @iamshadmantaqi in pingdotgg/t3code#45592 * fix(forgejo): single-page issue lists and pickers no longer claim more items by @only21mil in pingdotgg/t3code#45591 * fix(cli): t3 doctor no longer prints "1 superseded events removed." by @only21mil in pingdotgg/t3code#45598 ## New Contributors * @DOISolutions made their first contribution in pingdotgg/t3code#45450 * @renningg made their first contribution in pingdotgg/t3code#45460 * @DaDerekkk made their first contribution in pingdotgg/t3code#45553 **Full Changelog**: pingdotgg/t3code@v0.1.14-nightly.20261129.5438...v0.1.14-nightly.20261129.5452 </details> Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.14-nightly.20261129.5452
…and pingdotgg#44794 Web icon stack) Ports 51 selected high-value upstream PRs from ba05524..d7e01c3 plus the Web-only overlapped provider icon stack visual delta from pingdotgg#44794 while preserving all 15 locked T4 customizations, T4 branding, zero-telemetry stance, and self-hosted infrastructure (skipping Jira-only pingdotgg#45030): - Features & perf (9 + pingdotgg#44794 Web): pingdotgg#45373, pingdotgg#45460, pingdotgg#45286, pingdotgg#45560, pingdotgg#45533, pingdotgg#45637, pingdotgg#45835 (Lock pingdotgg#13 orthogonal), pingdotgg#45828 (Lock pingdotgg#5 orthogonal), pingdotgg#45832 (swipe-actions-only partial), pingdotgg#44794 (Web SidebarThreadRow overlapped icon stack) - Mobile iPhone/iPad & remote (7): pingdotgg#45324, pingdotgg#45524, pingdotgg#45403, pingdotgg#42298, pingdotgg#45285, pingdotgg#45315, pingdotgg#45397 - Multi-machine, Desktop SSH & Linux (12): pingdotgg#45584, pingdotgg#45443, pingdotgg#45414, pingdotgg#45297, pingdotgg#45454, pingdotgg#45407, pingdotgg#45432, pingdotgg#45501, pingdotgg#45471, pingdotgg#45420, pingdotgg#45482, pingdotgg#45582 - ACP, Codex, Git & terminal stability (14): pingdotgg#45410, pingdotgg#45450, pingdotgg#45590, pingdotgg#42115, pingdotgg#45371, pingdotgg#42260, pingdotgg#45618, pingdotgg#45592, pingdotgg#45298, pingdotgg#45492, pingdotgg#45506, pingdotgg#45827, pingdotgg#45565, pingdotgg#45516 - Web/Desktop composer & Git UX (9): pingdotgg#45369, pingdotgg#45391, pingdotgg#45418, pingdotgg#45390, pingdotgg#45406, pingdotgg#45302, pingdotgg#45343, pingdotgg#45441, pingdotgg#45604 Includes independent gpt-6.2-astra blind-review hardening for pingdotgg#45391 (preserving remote tab pendingImageCount across storage events and clearing stale in-memory stash entries on storage clear).
Merges `pingdotgg/t3code` `c16ad0ce17` (186 commits, base `72d700a78c`) into the fork. Branched from `main`; no open merge PR to stack on. - **Landed:** 633 files vs 630 in the upstream range. The 3 extra are fork docs. Fork delta: 794 files. - **Conflicts:** 8, all `converged`, resolved by their verdicts. Details are in `docs/fork/upstream-merge-log.md` (2026-11-30). Two of them were restructures: - `ThreadDetailsPanel.tsx`: upstream moved the sections into user-ordered blocks. The fork's sandbox row, scheduled-tasks gate and artifacts section now ride inside the existing `environment`, `automations` and `relationships` blocks, with no new block id. - `SidebarThreadRow.tsx`: upstream made the row a token layout. The fork's owner name, parent link and child-task badge now render with the `agents` (provider) item. - **Contracts:** added `UnsupportedMethodError` to `threadHandoff.options`/`start`/`cancel`/`adopt` and `tools.list`. The derivation reports no ADD or DROP now. - **Inventory:** - New `web-translations` path policy. - `useThreadActionMenu.test.ts` added to the thread-visibility entry. - Replaced the stale duplicate-add exception with the `Sidebar.logic.test.ts` `new Set(),` one. - Updated anchors for the two restructured deltas. - **Gaps:** - Extended "Methods the backend does not dispatch" with handoff and `tools.list`. - Added the c16ad0c range to "Runtime fixes upstream made to its own server". - Added ServerBrowser's `Uint8Array.fromBase64` to the Node 24 entry. ## Verification `verify.mjs` full run. Duplicate-adds, tripwires, resolution-check, unsupported-methods, lockfile, fmt, lint, typecheck and build are all green. - `@t3tools/web`: 3 files failed in the full run. On the rerun alone all 750 passed. - `t3`: 9 files failed. All are registered sandbox gaps: - Node 24 lacks `StatementSync.stat`, `setTypeOfService` and `Uint8Array.fromBase64`. - The sandbox `/tmp` has no sticky bit (Codex token broker). - The global git `insteadOf` rewrites the test remotes. - Every other package passed. - The commit used `--no-verify` for the known knip failure (the same 27 fork exports). ## Usable as-is - Customizable sidebar thread rows and a reorderable Thread Details card (pingdotgg#42576). These read the `sidebarRowLayout` and `threadDetailsOrder` client settings. Not checked: whether Moatless stores them. - Provider icon stack on thread rows (pingdotgg#44794). - The machine-overload warning is now a smaller pill you can dismiss (pingdotgg#45775, pingdotgg#45273). Without `severeSince` a dismissal does not reset when a new overload episode starts. - About 60 web UI fixes: keybinding editor, branch and diff pickers, find bar, file previews (spreadsheet, TSV, TAR, RTF, ODT, Markdown tables), pull request views, the composer and queued messages. - Text fixes: text direction, monograms, work-log command labels, Markdown recovery. - Mobile-only fixes: inbox scroll and swipe, Android split screen, iPad keyboard. ## Unsupported in Moatless / needs implementation - **Continue a thread on another machine** (pingdotgg#44775, pingdotgg#44774, pingdotgg#44773). Methods: `threadHandoff.options`, `start`, `cancel`, `adopt`. UI: `HandoffRequestCard`, `ThreadHandoffDialog`, and a thread-menu item. - Hidden against Moatless, because `canMoveThreadsAtom` requires `offersLinkedEnvironments`. - To implement: linked environments plus a thread import. Alternatively, keep the capability absent. - **`tools.list`** (`packages/contracts/src/agentTools.ts`). Lists the MCP servers and skills a thread's agent gets. No web surface reads it yet. - To implement: return Moatless's tool list in the `AgentToolsList` shape. - **MCP servers and disabled skills per thread and per project** (pingdotgg#45175, pingdotgg#45306, pingdotgg#45362, pingdotgg#45320). These are `mcpServers` and `disabledSkills` in settings and in `projectSettingsOverrides`, saved through `server.updateSettings`. - To implement: Moatless would have to persist them, redact secrets on read, and pass them into provider sessions. Until then the setting probably appears to save and does nothing. This was not checked against the Moatless settings handler. - **`severeSince` on host pressure** (`resourceTelemetry.ts`). Optional, low priority. ## Backend behavior to consider reproducing in Moatless - **Agent tools:** `pull_request_create` adds labels (pingdotgg#45533). Per-project MCP servers keep their secrets out of `settings.json` (pingdotgg#45362, pingdotgg#45306). `t3_thread_read` no longer splits a surrogate pair at `textOffset`, and a `t3_thread_launch` replay keeps the launched thread's model selection (pingdotgg#45509, pingdotgg#42115). - **VCS:** - Forgejo auto-merges once checks pass (pingdotgg#38773), and its single-page issue lists stop claiming more items (pingdotgg#45591). - GitLab reads and retries CI jobs (pingdotgg#45027). - A new worktree's index swap no longer locks out Git (pingdotgg#42260). - A task folder that loses a branch race leaves the winner's checkout alone (pingdotgg#45618). - A worktree thread in a plain folder runs in the folder (pingdotgg#44799, pingdotgg#45560). - Selected-file commits still refuse a merge when the project folder is a symlink (pingdotgg#45592). - **Thread search:** - Lists every older settled thread that matches (pingdotgg#44741). - Skips link addresses (pingdotgg#45499, pingdotgg#45271, pingdotgg#45354). - Finds non-ASCII whole words (pingdotgg#45582). - Includes folders re-included by `.ignore` before the index is ready (pingdotgg#45482). - Stops listing nested worktree files as `.worktrees/x/./path` (pingdotgg#45481). - **Runtime:** - Repeated thread actions no longer stay pending (pingdotgg#45565). - Cancelling a queued follow-up cancels only its own run (pingdotgg#45414). - Evicted terminals are removed from connected clients (pingdotgg#45506). - Switching providers no longer waits on the old one's background work (pingdotgg#45373). - Checkpoint cleanup no longer enumerates active threads' refs (pingdotgg#45516). - Remote delegated subagents no longer trigger completion notifications (pingdotgg#45297). - **Providers:** - Codex: a stopped partial plan no longer stays streaming (pingdotgg#45590), and a partitioned `models_cache` no longer breaks shadow homes (pingdotgg#45450). - ACP: the `/` menu lists commands advertised late (pingdotgg#45286), and a failed history read no longer reports the session as imported (pingdotgg#45410). - **Workflows:** daily interval and weekday fixes, and no duplicate runs for equivalent label filters (pingdotgg#45371, pingdotgg#45312, pingdotgg#45281, pingdotgg#45264, pingdotgg#45276). - **Machine-load warnings:** stop while the CPUs sit idle, and ignore jobs outside T3 stalling at their own memory limit (pingdotgg#45531). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- Moatless task: https://moatless.soaplabstest.com/tasks/350bcaee-9e40-4d3b-83f5-1ea4e9e745e6
Project content search with "Match whole word" missed a non-ASCII word such as
wörldin any file where more than 100 earlier lines contained it inside a longer word. Those lines used up the file's 100-match limit before the whole-word check discarded them; the word is now filtered natively, as ASCII words already were.buildWholeWordPrefiltersends a bare word of letters, marks, numbers and underscores to fff as a regex whose edges are the line's edge, a non-word character, or bytes that are not valid UTF-8. The word class is the oneisWholeWordRangeuses, so the two agree on characters like².wörldstill does not matchWÖRLD.git grepnow gets-wfor any bare word, not only ASCII ones, which drops lines where the word runs on into ASCII word characters.Supersedes #45545. The change is @only21mil's; their commits are kept.
Reproduction on main
Reproduced on main at cf1f69c:
words-projectwithsrc/words.txt(lines 1-150wörlds, line 151wörld) andsrc/ascii.txt(150 linesconst needleSuffixN = 1;, line 151needle();), and committed both.wörld. Result: "0 results in 0 files / No results found." The standalone word on src/words.txt:151 is missing. This is the reported defect.needle: "1 results in 1 files", src/ascii.txt:151needle();. The ASCII prefilter works as described.src/short.txt(wörlds, thenwörld), then searchedwörldwith whole word again. Result: "1 results in 1 files", only short.txt:2. src/words.txt:151 is still left out. Whole-word Unicode matching works when few partial lines come before the match. It fails only when more than 100 earlier substring lines fill the per-file cap, which is what the PR describes.Not exercised: the git-grep warmup fallback. The tiny project indexed before a search could land in warmup, so only the warm fff path was seen.
Evidence
Created a committed words-project repository with src/words.txt containing 150 lines of wörlds followed by wörld on line 151, and src/ascii.txt containing 150 needleSuffix declarations followed by needle(); on line 151. Seeded a project and Replay thread through the app API, opened the thread, pressed Ctrl+Shift+F, enabled Match whole word with case and regex off, searched needle (line 151 found on both), then wörld. Base showed 0 results; head showed words.txt line 151.
Environment on both sides: real web client and server, automated Chromium at 1280×800, light theme, fresh isolated databases and identical synthetic committed fixtures.
Scenario: Whole-word Unicode search finds line 151 after 150 partial lines
Proven: the scenario fails on base 7c4f88239e and passes on head f82ab693dd.
ASSERTION_FAILED: expect.toBeVisible failed
locator: getByText("words.txt")
expected: visible
observed: no node (match count 0)
Before recording · After recording
Scenario and fixture script
Not shown:
Tests
vp test run src/workspace/WorkspaceSearchIndex.test.ts(inapps/server): 24 passedWorkspaceSearchIndex.ts: 3 failed (thewörldwarmup row and the real-workspace rowswörldandWÖRLD), 21 passed, so the new rows catch the bugvp run check:changed: pass (format, lint, knip, graphql, typecheck of 3 packages, tests in 2 files with 26 passed)Not in this change
wörldé) can still fill git's per-file limit, because git's-wknows only ASCII word bytes; fixing it needs PCRE2 lookarounds, which bring a Unicode case-folding mismatch with native search and a PCRE2-availability fallback.Who did the work
Run by the t3code factory in T3 Code.