Skip to content

fix(desktop): restore styled tooltips on right sidebar file tree buttons and rows - #56520

Open
wnuuee1 wants to merge 2 commits into
NousResearch:mainfrom
wnuuee1:fix/restore-tooltips-file-tree-buttons
Open

fix(desktop): restore styled tooltips on right sidebar file tree buttons and rows#56520
wnuuee1 wants to merge 2 commits into
NousResearch:mainfrom
wnuuee1:fix/restore-tooltips-file-tree-buttons

Conversation

@wnuuee1

@wnuuee1 wnuuee1 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes the Refresh and Collapse All buttons in the right sidebar's file tree header, and each file/folder row in the file tree itself, showing plain browser-native tooltips instead of the app's styled dark tooltip.

This restores work from #51315 ("replace native title tooltips with styled Tip component"), which wrapped these buttons in <Tip>. #49037 rewrote FilesystemTab as part of the Projects feature, and its merge reintroduced the native title= attributes, reverting the tooltip fix from #51315. #49037 also removed the Open Folder button from that same file — its PR description states the freeform folder picker was retired in favor of project/worktree-based workspace switching, so that change is intentional and out of scope here. Only the two remaining buttons need the tooltip restored.

Additionally, ProjectTree (./files/tree.tsx) rendered each file/folder row with a native title={node.data.id} showing the full path, which had the same plain-tooltip regression. This wasn't touched by #51315 originally, so it's addressed here with the same fix.

Related Issue

Fixes #

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • apps/desktop/src/app/right-sidebar/index.tsx — replaced native title= with <Tip label={...} side="left"> on the Refresh and Collapse All buttons in FilesystemTab (regressed by feat(desktop): first-class projects — sidebar, coding rail, review pane, and agent project tools #49037; Open Folder was intentionally removed by that PR and is not restored here)
  • apps/desktop/src/app/right-sidebar/files/tree.tsx — replaced native title={node.data.id} with <Tip label={node.data.id} side="left"> on each file tree row in ProjectTreeRow

How to Test

  1. Launch the desktop app with a workspace/project open (so the file tree renders)
  2. Open the right sidebar and hover over the Refresh button — verify a styled dark tooltip appears
  3. Hover over the Collapse All button — verify a styled dark tooltip appears
  4. Hover over any file or folder row in the tree — verify a styled dark tooltip with the full path appears (instead of the native browser tooltip), positioned to the left so it doesn't overflow the sidebar
  5. Verify drag-and-drop of a file row still works (e.g. dragging a file into the chat attach zone)
  6. Verify the tree still scrolls/renders correctly with the tooltip wrapper (no row height/layout regressions from virtualization)

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: Windows 11

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

For New Skills

N/A

Screenshots / Logs

right_sidebar right_sidebar 2

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for identifying the regression. Current main still uses native title attributes on the file-tree Refresh and Collapse All buttons (apps/desktop/src/app/right-sidebar/index.tsx:160,171) and rows (apps/desktop/src/app/right-sidebar/files/tree.tsx:330). The proposed Tip direction fits the component's documented drop-in title replacement (apps/desktop/src/components/ui/tooltip.tsx:74-90).

Problems

  • The PR has no tooltip regression test. Current sidebar coverage clicks Refresh but does not hover/assert tooltip content (apps/desktop/src/app/right-sidebar/index.test.tsx:34-47).
  • The branch is substantially stale: GitHub reports it is 1,488 commits behind main. Preserve the current ProjectTreeRow markup, including its newer row-hover class at apps/desktop/src/app/right-sidebar/files/tree.tsx:278, when salvaging the narrow wrapper change.

Suggested changes

  • Add focused hover assertions for a header action and a populated file row, following the existing tooltip portal test pattern in apps/desktop/src/app/right-sidebar/terminal/rail.test.tsx:22-28.

Automated hermes-sweeper review.

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

Labels

comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants