@devries-cameron20 / t3code-1 / commits / 78756043c2
Fork 0

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

fix(web): file chip tooltips show the whole path (#27993)

Co-authored-by: Yash Singh <saiansh2525@gmail.com>

Prince Yadav committed Nov 9, 2026 at 03:23 UTC 78756043c21003262e184b3c166e93505320ac32
2 files changed +21 -3
apps/web/src/components/ChatMarkdown.browser.test.tsx
+20
@@ -433,6 +433,26 @@ describe("ChatMarkdown inline code selection", () => {
433 });
434 });
435
436 +describe("ChatMarkdown file chip tooltips", () => {
437 + it("wraps a long path so its file name stays inside the tooltip", async () => {
438 + setup();
439 + const path =
440 + "/tmp/project/packages/client-runtime/src/state/generated/environment-connection-handshake-retry-policy-fixtures.ts";
441 + await using screen = await renderText(`See [the fixtures](${path}).`);
442 +
443 + await userEvent.hover(screen.container.querySelector(".chat-markdown-file-link")!);
444 + const tooltip = page.getByText(path);
445 + await expect.element(tooltip).toBeVisible();
446 +
447 + const popup = tooltip.element().closest("[data-side]")!;
448 + const pathEnd = document.createRange();
449 + pathEnd.selectNodeContents(tooltip.element());
450 + expect(pathEnd.getBoundingClientRect().right).toBeLessThanOrEqual(
451 + popup.getBoundingClientRect().right,
452 + );
453 + });
454 +});
455 +
456 describe("ChatMarkdown editor deep links", () => {
457 const hrefs = (container: HTMLElement) =>
458 [...container.querySelectorAll("a")].map((link) => link.getAttribute("href"));
apps/web/src/components/chat/MarkdownFileLink.tsx
+1 -3
@@ -379,9 +379,7 @@ export const MarkdownFileLink = memo(function MarkdownFileLink({
379 }
380 />
381 <TooltipPopup side="top" variant="code">
382 - <div className="overflow-x-auto whitespace-nowrap scrollbar-thumb-border/78 scrollbar-track-transparent [scrollbar-width:thin] [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-border/78 [&::-webkit-scrollbar-track]:bg-transparent">
383 - <WorkspaceEntryTooltip path={iconPath} label={targetPath} environmentId={environmentId} />
384 - </div>
382 + <WorkspaceEntryTooltip path={iconPath} label={targetPath} environmentId={environmentId} />
383 </TooltipPopup>
384 </Tooltip>
385 );