Repository navigation
Closed
Closed
Copy link
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
Not sure
Steps to reproduce
- Add a project containing notes/HANDOFF.txt and a second project containing current/Handoff.txt and archive/HANDOFF.txt on the same environment.
- Open a thread in a third project that has no handoff.txt.
- Click a chat citation for handoff.txt with no folder in its path.
Expected behavior
The preview leaves the citation unresolved because more than one file matches.
Actual behavior
The preview opens notes/HANDOFF.txt from the first project and silently ignores both matches in the second.
Impact
Minor bug or occasional failure. This can send someone reading a chat citation to the wrong file whenever one other project has a single case-insensitive match and another has several.
Version or commit
main at 6972026121. The cause is at packages/client-runtime/src/workspaceBasenameLookup.ts:153.
Environment
Linux x64 boat.dev default machine, a fresh checkout.
Logs or stack traces
The file could not be accessed or read. It may be missing or inaccessible.Automated repro
Fails in 2 of 2 runs on main: apply the patch with git apply, then run the command.
diff --git a/scripts/scenarios/citation-skips-ambiguous-project-files.e2e.ts b/scripts/scenarios/citation-skips-ambiguous-project-files.e2e.ts
new file mode 100644
index 0000000000..6cfbafc6c4
--- /dev/null
+++ b/scripts/scenarios/citation-skips-ambiguous-project-files.e2e.ts
@@ -0,0 +1,37 @@
+import { expect } from "e2e";
+
+import { test, WEB } from "./t3.ts";
+
+const FILE = "handoff.txt";
+
+test(
+ "A bare citation leaves the file unresolved when other projects contain several matches",
+ WEB,
+ async ({ t3, app, browser, screen }) => {
+ const project = await t3.project("planning");
+ await t3.project("reports", { "notes/HANDOFF.txt": "Report handoff" });
+ await t3.project("support", {
+ "current/Handoff.txt": "Current support handoff",
+ "archive/HANDOFF.txt": "Archived support handoff",
+ });
+ const thread = await t3.thread({
+ project,
+ title: "Find the handoff",
+ messages: [`See :codex-file-citation{path="${FILE}" line_range_start="1"}`],
+ });
+
+ await t3.open(thread);
+ await screen.getByRole("button", /^Agent See/).tap();
+ await screen.getByRole("link", /^handoff\.txt/).tap();
+
+ try {
+ await expect(
+ browser
+ .locator("[data-right-panel-surface-content]")
+ .getByText("The file could not be accessed or read. It may be missing or inaccessible."),
+ ).toBeVisible();
+ } finally {
+ await app.screenshot("ambiguous-handoff-citation");
+ }
+ },
+);pnpm scenarios:prove scripts/scenarios/citation-skips-ambiguous-project-files.e2e.ts --base mainWorkaround
No response
Metadata
Metadata
Assignees
Labels
vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.


Activity