forked from cline/cline
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix: add tooltips to display full file paths on truncated filenames in chatview #8797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
heyseth
wants to merge
2
commits into
RooCodeInc:main
from
heyseth:fix/add-tooltips-for-truncated-filenames
Closed
fix: add tooltips to display full file paths on truncated filenames in chatview #8797
heyseth
wants to merge
2
commits into
RooCodeInc:main
from
heyseth:fix/add-tooltips-for-truncated-filenames
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tview Add tooltips that show the complete file path when hovering over truncated file names in file editing/reading notices throughout the chat interface. Changes: - Add StandardTooltip components to file path displays in CodeAccordian, ChatRow, and BatchFilePermission components - Override default tooltip styles with `text-wrap` to prevent excessive whitespace from text-balance behavior - Use responsive max-width `max-w-[min(300px,100vw)]` to ensure tooltips adapt to narrow panel widths and prevent content cutoff - Leverage existing `break-words` CSS to allow natural line breaking at path separators The added tooltips: - Display full file paths even when truncated in the UI - Wrap text naturally at path separators without excessive whitespace - Adapt responsively to panel width (max 300px on wide panels, 100vw on narrow) - Maintain consistent behavior with other tooltips in the extension Files modified: - webview-ui/src/components/common/CodeAccordian.tsx - webview-ui/src/components/chat/ChatRow.tsx - webview-ui/src/components/chat/BatchFilePermission.tsx
Issues FoundAll previously identified issues have been resolved:
|
Update StandardTooltip content in BatchFilePermission, ChatRow, and CodeAccordian to use removeLeadingNonAlphanumeric() and include the same formatting as the visible text, ensuring tooltips display consistently with what users see.
daniel-lxs
added a commit
that referenced
this pull request
Nov 4, 2025
- Add PathTooltip component that wraps StandardTooltip with proper styling - Use maxWidth='min(300px,100vw)' via inline style to override defaults - Apply '[text-wrap:wrap]' class to override text-balance behavior - Add formatPathTooltip helper for consistent path content formatting - Update CodeAccordian, ChatRow, and BatchFilePermission to use PathTooltip - Centralizes tooltip behavior and reduces duplication Supersedes PR #8797.
6 tasks
|
This PR has been superseded by PR #9030, which implements the same feature with a centralized PathTooltip component and helper function to reduce code duplication and avoid CSS class conflicts. Thank you for your work on this! |
mrubens
pushed a commit
that referenced
this pull request
Nov 5, 2025
…9030) - Add PathTooltip component that wraps StandardTooltip with proper styling - Use maxWidth='min(300px,100vw)' via inline style to override defaults - Apply '[text-wrap:wrap]' class to override text-balance behavior - Add formatPathTooltip helper for consistent path content formatting - Update CodeAccordian, ChatRow, and BatchFilePermission to use PathTooltip - Centralizes tooltip behavior and reduces duplication Supersedes PR #8797.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
PR - Needs Preliminary Review
size:M
This PR changes 30-99 lines, ignoring generated files.
UI/UX
UI/UX related or focused
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related GitHub Issue
Closes: #8278
Description
This PR fixes the filename truncation issue in file editing/reading notices by adding tooltips that display the full file path on hover.
Implementation details:
StandardTooltipcomponents wrapping file path displays in three locations:CodeAccordian.tsx- General file path headers and custom headersChatRow.tsx- Single file read/edit operationsBatchFilePermission.tsx- Batch file permission requestsclassName="text-wrap max-w-[min(300px,100vw)]"to:text-balanceCSS (which was causing excessive whitespace)break-wordsCSS for natural line breaking at path separatorsKey design choices:
text-wrapinstead oftext-balanceto minimize whitespace while maintaining readabilitymax-w-[min(300px,100vw)]instead of a fixed width to prevent tooltip cutoff in narrow panels while maintaining a reasonable max widthReviewers should note:
TooltipProviderandStandardTooltipcomponents)Test Procedure
Manual testing steps:
Test truncated paths show tooltips:
src/components/chat/file/with/deeply/nested/structure.tsx)Test all tooltip locations:
Testing environment:
Pre-Submission Checklist
Screenshots / Videos
Before: Filename truncated, no tooltip on hover.
After: Tooltip on hover.
Documentation Updates
Get in Touch
Discord:
@ocean.smithImportant
Adds tooltips to display full file paths on truncated filenames in
CodeAccordian.tsx,ChatRow.tsx, andBatchFilePermission.tsx, ensuring responsive and consistent styling.StandardTooltipto display full file paths on hover for truncated filenames inCodeAccordian.tsx,ChatRow.tsx, andBatchFilePermission.tsx.text-wrapandmax-w-[min(300px,100vw)]for responsive width and minimal whitespace.text-wrapinstead oftext-balanceto reduce whitespace.TooltipProviderandStandardTooltip.This description was created by
for 643090c. You can customize this summary. It will automatically update as commits are pushed.