Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Nov 4, 2025

Related GitHub Issue

Closes: #8278

Description

This PR adds tooltips to display full file paths on truncated filenames in file editing/reading notices throughout the chat interface.

Implementation details:

  • Added PathTooltip component that wraps StandardTooltip with appropriate styling
  • Used maxWidth="min(300px,100vw)" via inline style to reliably override defaults
  • Applied [text-wrap:wrap] class to override text-balance behavior
  • Added formatPathTooltip helper for consistent path content formatting
  • Updated CodeAccordian.tsx, ChatRow.tsx, and BatchFilePermission.tsx to use PathTooltip
  • Centralizes tooltip behavior and reduces code duplication

Key design choices:

  • Uses inline style for max-width to deterministically override the default max-w-[300px] in TooltipContent
  • Uses [text-wrap:wrap] arbitrary property to reliably override the default text-balance CSS
  • Centralizes all path tooltip logic in reusable components

Testing:

  • All existing tests pass
  • Tooltip styling is consistent with other tooltips in the extension
  • Responsive width adapts to panel size while preventing tooltip cutoff

Test Procedure

Manual testing steps:

  1. Test truncated paths show tooltips:

    • Open Roo Code and start a chat session
    • Ask Roo to read or edit a file with a long path (e.g., src/components/chat/file/with/deeply/nested/structure.tsx)
    • Narrow the chat panel until the filename truncates (shows ellipsis)
    • Hover over the truncated filename in the notice
    • ✅ Verify: Tooltip appears showing the full file path
    • ✅ Verify: Tooltip wraps text to multiple lines without being cut off
  2. Test all tooltip locations:

    • Test tooltips on:
      • Single file read operations
      • Single file edit operations
      • Batch file read operations
      • Batch file edit operations
      • Directory listing operations
      • Search operations
      • ✅ Verify: All locations show tooltips with consistent behavior

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: All existing tests pass and functionality works as expected.
  • Documentation Impact: No documentation updates required.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshot

2025-11-04_12-50-19

Supersedes PR #8797.


Important

Introduces PathTooltip component to centralize and standardize file path tooltips across the application, reducing code duplication and ensuring consistent behavior.

  • Components:
    • Introduces PathTooltip in PathTooltip.tsx for displaying full file paths.
    • Replaces inline path tooltip logic with PathTooltip in BatchFilePermission.tsx, ChatRow.tsx, and CodeAccordian.tsx.
  • Utilities:
    • Adds formatPathTooltip in formatPathTooltip.ts for consistent path formatting.
  • Behavior:
    • Centralizes tooltip logic, ensuring consistent display and behavior across components.
    • Tooltips adapt to panel size, preventing cutoff and ensuring readability.

This description was created by Ellipsis for fcb9dbe. You can customize this summary. It will automatically update as commits are pushed.

- 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.
@daniel-lxs daniel-lxs requested review from cte, jr and mrubens as code owners November 4, 2025 17:54
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused labels Nov 4, 2025
@roomote
Copy link

roomote bot commented Nov 4, 2025

See this task on Roo Code Cloud

Review complete. No issues found - the implementation is clean, type-safe, and correctly adds tooltip functionality to truncated file paths.

Mention @roomote in a comment to trigger your PR Fixer agent and make changes to this pull request.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 4, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Nov 4, 2025
@hannesrudolph hannesrudolph added PR - Needs Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Nov 4, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 5, 2025
@mrubens mrubens merged commit f1caf3f into main Nov 5, 2025
26 checks passed
@mrubens mrubens deleted the feat/improved-path-tooltips branch November 5, 2025 02:59
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Nov 5, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer PR - Needs Review size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[BUG] Filename truncated in notice when chat is narrow

4 participants