Repository navigation
Closed
Labels
vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
packages/contracts or packages/shared
Steps to reproduce
- In a project with src/notes.ts, ask the agent to reply with the Markdown link
[src/notes.ts](src/notes.ts#L42-L64). - Open Find in Thread.
- Search for
L42–64as shown on the file link.
Expected behavior
Find in Thread finds and highlights the line range on the link.
Actual behavior
The counter shows zero matches even though the link displays L42–64.
Impact
Minor bug or occasional failure. Anyone looking up a displayed file-link range by its full label encounters this.
Version or commit
main at 9246c3235e. The cause is at packages/shared/src/threadFindText.ts:183.
Environment
Linux x64 boat.dev default machine, a fresh checkout.
Logs or stack traces
Find in thread counts the displayed line range as a matchAutomated repro
Fails in 2 of 2 runs on main: apply the patch with git apply, then run the command.
diff --git a/scripts/scenarios/thread-find-matches-file-line-range.e2e.ts b/scripts/scenarios/thread-find-matches-file-line-range.e2e.ts
new file mode 100644
index 0000000000..abc5eeb6d4
--- /dev/null
+++ b/scripts/scenarios/thread-find-matches-file-line-range.e2e.ts
@@ -0,0 +1,38 @@
+import { expect } from "e2e";
+
+import { test, WEB } from "./t3.ts";
+
+test(
+ "Find in thread matches the displayed line range of a file link",
+ WEB,
+ async ({ t3, app, screen, browser }) => {
+ const project = await t3.project("demo", { "src/notes.ts": "// Notes\n".repeat(64) });
+ const thread = await t3.thread({
+ project,
+ title: "File review",
+ messages: ["See [src/notes.ts](src/notes.ts#L42-L64)"],
+ });
+ await t3.open(thread);
+ await screen.getByRole("button", /^Agent See/).tap();
+ await browser
+ .locator("[data-user-message-body]")
+ .getByText("notes.ts · L42–64", { exact: true })
+ .waitFor();
+
+ await browser.keyboard.press("Control+f");
+ await screen.getByRole("searchbox", "Find in thread").fill("L42–64");
+ try {
+ await expect
+ .poll(
+ () =>
+ browser.evaluate<string>(
+ 'document.querySelector("[data-thread-find-bar] span[aria-hidden]")?.textContent ?? ""',
+ ),
+ { message: "Find in thread counts the displayed line range as a match" },
+ )
+ .toBe("1/1");
+ } finally {
+ await app.screenshot("file-range-find-result");
+ }
+ },
+);pnpm scenarios:prove scripts/scenarios/thread-find-matches-file-line-range.e2e.ts --base mainWorkaround
No response
Metadata
Metadata
Assignees
Labels
vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.


Activity