Skip to content

fix(vscode): show full path tooltip for file mentions - #14783

Merged
marius-kilocode merged 2 commits into
Kilo-Org:mainfrom
sylwester-liljegren:feat/mention-path-tooltip
Oct 6, 2026
Merged

marius-kilocode merged 2 commits into
Kilo-Org:mainfrom
sylwester-liljegren:feat/mention-path-tooltip

Conversation

@sylwester-liljegren

@sylwester-liljegren sylwester-liljegren commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Issue

No linked issue. This is a small fix for something found while using the extension: long file and folder names in the @-mention list get truncated, and nothing shows which file a row is.

Context

Rows in the @-mention dropdown cut off long file names and shorten the directory column (e.g. @ai-sdk%2Fanthropic@3.0.111...., .../pages/ai-providers). Similar names can't be told apart. The rows already had a title tooltip with the full path, but only when the item had a root, and root is only set in multi-root workspaces. In a single-folder workspace there was no tooltip at all.

Implementation

The tooltip is now shown for every file, folder and opened-file row, not only rows with a root. Other rows (terminal, git changes, past chats, models, sessions) still have no tooltip.

The native title attribute is replaced with the kilo-ui Tooltip. Native tooltips did not appear on macOS inside the VS Code webview during review, while the kilo-ui tooltip is drawn by the webview and behaves the same on every OS. This also fixes the existing multi-root tooltip, which used the same title attribute. Two CSS rules keep the row spanning the dropdown inside the tooltip trigger and let long paths wrap within the tooltip's 320px max width.

The tooltip still shows item.value. Rows from the session's own folder show a path relative to that folder. Rows from other workspace folders show the absolute path they are inserted with.

Screenshots / Video

image

How to Test

Manual/local verification

  • Agent: bun run typecheck in packages/kilo-vscode/ passes (host and webview).
  • Agent: prettier --check on the changed files and bun run lint in packages/kilo-vscode/ pass.
  • Human: checked the tooltip in the running extension on Windows.

Reviewer test steps

  1. Open a single-folder workspace in the dev extension (bun run extension).
  2. In the chat input, type @ai (or any query that returns long paths).
  3. Hover a file or folder row and confirm the tooltip shows its full path.
  4. Optional: in a multi-root workspace, confirm the tooltips still appear as before.

Blocked checks and substitute verification

  • Not yet checked on macOS or Linux. The kilo-ui tooltip is rendered by the webview rather than the OS, so behavior should match Windows.

Checklist

  • Issue linked above, or exception explained
  • Tests/verification described
  • Screenshots/video included for visual changes, or marked N/A
  • Changeset considered for user-facing changes
  • I personally reviewed the diff and can explain the changes, including any AI-assisted work.

Get in Touch

🤖 Generated with Claude Code

The tooltip on @-mention file and folder rows only appeared in multi-root
workspaces, so truncated names could not be identified in a single-folder
workspace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kilo-code-bot

kilo-code-bot Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Incremental review of the follow-up commit (rendering the mention-path tooltip in the webview) found no new issues. The Tooltip is imported, the value/placement/contentClass props match the kilo-ui API, rows with no value still render unwrapped, the new CSS selectors match the rendered [data-component="tooltip-trigger"] markup, and keyboard scroll/high-contrast selectors still resolve. No resource leaks introduced (the Tooltip disposes its MutationObserver on cleanup).

Files Reviewed (3 files)
  • .changeset/mention-path-tooltip.md
  • packages/kilo-vscode/webview-ui/src/components/chat/PromptInput.tsx
  • packages/kilo-vscode/webview-ui/src/styles/prompt-dropdowns.css
Previous Review Summary (commit 227a8de)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 227a8de)

Status: No Issues Found | Recommendation: Merge

lgtm

Files Reviewed (2 files)
  • .changeset/mention-path-tooltip.md
  • packages/kilo-vscode/webview-ui/src/components/chat/PromptInput.tsx

Reviewed by deepseek-v4.1-flash · Input: 58.6K · Output: 12.1K · Cached: 722.8K

Review guidance: REVIEW.md from base branch main

@marius-kilocode

Copy link
Copy Markdown
Collaborator

@sylwester-liljegren just tried to reproduce but it does't show up on my end:
image

@sylwester-liljegren

Copy link
Copy Markdown
Contributor Author

@sylwester-liljegren just tried to reproduce but it does't show up on my end:

image

Super weird, let me look it up soon.

The native title tooltip does not reliably appear inside VS Code webviews
on macOS. Use the kilo-ui Tooltip so the full path shows on every OS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sylwester-liljegren

Copy link
Copy Markdown
Contributor Author

@marius-kilocode , could you try again? I switched to using kilo-ui's ToolTip component instead of relying on the native title attribute, which might be potentially problematic for non-Windows OS users. But I'll await your response first.

@marius-kilocode marius-kilocode left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A clean fix. The webview-rendered kilo-ui Tooltip shows the full path regardless of OS, and the flex:1 wrapper rule keeps rows full width while overflow-wrap handles long paths. At the reviewed head de24f53, typecheck, lint, unit tests and the forbidden-strings check pass; the only red checks were hosted-runner acquisition failures, which I re-ran. Thanks for the contribution!

@marius-kilocode
marius-kilocode merged commit f53fff3 into Kilo-Org:main Oct 6, 2026
29 of 33 checks passed
@marius-kilocode

Copy link
Copy Markdown
Collaborator

Thanks @sylwester-liljegren

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Looks good, one point: I was wondering why we shorten each element anyway if there is enough space. The tooltip will help though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants