@devries-cameron20 / t3code-1 / commits / a4d0151700
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix: match dotted capital I in Find in Thread (#39290)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

Wout Stiens committed Nov 19, 2026 at 20:56 UTC a4d015170024ea4fa9c8e06ddf0a32e04972c9b9
3 files changed +43 -1
packages/shared/src/threadSearch.test.ts
+7
@@ -17,3 +17,10 @@ it("matches straight and curly apostrophes without changing source offsets", ()
17 expect(findThreadSearchOccurrences("don't don’t", "don’t")).toEqual([0, 6]);
18 expect(findThreadSearchOccurrences("İ don‘t", "don't")).toEqual([2]);
19 });
20 +
21 +it("matches dotted capital I without changing source offsets", () => {
22 + expect(findThreadSearchOccurrences("📍 İstanbul ıstanbul i\u0307stanbul", "istanbul")).toEqual([
23 + 3,
24 + ]);
25 + expect(findThreadSearchOccurrences("Istanbul istanbul", "İSTANBUL")).toEqual([0, 9]);
26 +});
packages/shared/src/threadSearch.ts
+2 -1
@@ -7,7 +7,8 @@ function foldThreadSearchCase(text: string): string {
7
8 let folded = "";
9 for (const character of text) {
10 - const loweredCharacter = foldCharacters(character.toLowerCase());
10 + // Lowercasing İ adds a combining dot. Drop that expansion to preserve source offsets.
11 + const loweredCharacter = foldCharacters(character.toLowerCase()).replace("i\u0307", "i");
12 folded += loweredCharacter.length === character.length ? loweredCharacter : character;
13 }
14 return folded;
scripts/scenarios/thread-find-matches-dotted-capital-i.e2e.ts new
+34
@@ -0,0 +1,34 @@
1 +import { expect } from "e2e";
2 +
3 +import { test, WEB } from "./t3.ts";
4 +
5 +test("Find in thread matches İstanbul with istanbul", WEB, async ({ t3, app, screen, browser }) => {
6 + const project = await t3.project("demo");
7 + const thread = await t3.thread({
8 + project,
9 + title: "Travel notes",
10 + messages: ["Travel notes for İstanbul"],
11 + });
12 + await t3.open(thread);
13 + await screen.getByRole("button", /^Agent Travel notes for İstanbul/).tap();
14 + await browser
15 + .locator("[data-user-message-body]")
16 + .getByText("Travel notes for İstanbul", { exact: true })
17 + .waitFor();
18 +
19 + await browser.keyboard.press("Control+f");
20 + await screen.getByRole("searchbox", "Find in thread").fill("istanbul");
21 + try {
22 + await expect
23 + .poll(
24 + () =>
25 + browser.evaluate<string>(
26 + 'document.querySelector("[data-thread-find-bar] span[aria-hidden]")?.textContent ?? ""',
27 + ),
28 + { message: "Find in thread counts İstanbul as a match for istanbul" },
29 + )
30 + .toBe("1/1");
31 + } finally {
32 + await app.screenshot("istanbul-find-result");
33 + }
34 +});