Skip to content

[Bug]: File link tooltips omit the file size after workspace search #39011

Closed

Description

@StiensWout

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

  1. Open a thread that has a link to a workspace file inside a collapsed message.
  2. Type the file’s name after @ in the composer.
  3. Dismiss the suggestions after the file appears.
  4. Expand the message.
  5. Hover over the file link.

Expected behavior

The tooltip shows the file path and size.

Actual behavior

The tooltip shows the path without the size, and the size can stay missing while the thread is open.

cited file tooltip

failure

Impact

Minor bug or occasional failure. People looking up a file before its chat link first appears can miss its size whenever they hover over that link in the open thread.

Version or commit

main at 94baff19c6. The cause is at packages/client-runtime/src/state/fileMetadata.ts:206.

Environment

Linux x64 boat.dev default machine, a fresh checkout.

Logs or stack traces

2 KB
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/cited-file-tooltip-keeps-size-after-search.e2e.ts b/scripts/scenarios/cited-file-tooltip-keeps-size-after-search.e2e.ts
new file mode 100644
index 0000000000..bff8319ab1
--- /dev/null
+++ b/scripts/scenarios/cited-file-tooltip-keeps-size-after-search.e2e.ts
@@ -0,0 +1,33 @@
+import { expect } from "e2e";
+
+import { test, WEB } from "./t3.ts";
+
+const FILE = "quarterly-figures.md";
+
+test(
+  "The file citation tooltip shows the size even after workspace search finds the file",
+  WEB,
+  async ({ t3, app, browser, screen }) => {
+    const project = await t3.project("demo", { [FILE]: "x".repeat(2048) });
+    const thread = await t3.thread({
+      project,
+      title: "Review figures",
+      messages: [`See :codex-file-citation{path="${FILE}" line_range_start="1"}`],
+    });
+    await t3.open(thread);
+
+    await screen.getByRole("textbox").pressSequentially(`@${FILE}`);
+    await screen.getByRole("option", FILE, { exact: false }).hover();
+    await browser.keyboard.press("Escape");
+    await screen.getByRole("button", /^Agent See/).tap();
+    await screen.getByRole("link", /^quarterly-figures\.md/).hover();
+
+    try {
+      await expect(
+        browser.locator('[data-slot="tooltip-viewport"]:has-text("quarterly-figures.md")'),
+      ).toContainText("2 KB");
+    } finally {
+      await app.screenshot("cited-file-tooltip");
+    }
+  },
+);
pnpm scenarios:prove scripts/scenarios/cited-file-tooltip-keeps-size-after-search.e2e.ts --base main

Workaround

No response

Activity

  1. added
    vouch:trusted
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions