Skip to content

feat(desktop): Filesタブにファイル名ツールチップ#22

Merged
MocA-Love merged 2 commits intomainfrom
feat/files-tab-tooltip
Mar 29, 2026
Merged

feat(desktop): Filesタブにファイル名ツールチップ#22
MocA-Love merged 2 commits intomainfrom
feat/files-tab-tooltip

Conversation

@MocA-Love
Copy link
Copy Markdown
Owner

@MocA-Love MocA-Love commented Mar 29, 2026

Summary

  • Filesタブのファイル/フォルダ名にホバーで相対パスのツールチップを表示する機能を追加
  • ツールバー右端にトグルボタンを配置し、ON/OFF切り替え可能
  • 設定はZustand persistで永続化

Changes

  • file-explorer.ts: showFileTooltips 設定と toggleFileTooltips アクション追加
  • FileTreeToolbar.tsx: ツールチップ表示トグルボタン追加
  • FileTreeItem.tsx: showFileTooltips ON時にファイル名を Tooltip でラップ

Closes #21

Test plan

  • Filesタブのツールバー右端にトグルボタンが表示されることを確認
  • ボタンクリックでON/OFFが切り替わり、ONの時はボタンがハイライトされることを確認
  • ON時にファイル/フォルダ名にホバーすると相対パスがツールチップで表示されることを確認
  • OFF時にはツールチップが表示されないことを確認
  • アプリ再起動後も設定が保持されることを確認

Summary by CodeRabbit

  • New Features
    • File and folder names now display relative path tooltips when you hover over truncated names, making it easier to locate files in deeply nested directories
    • New toolbar button provides quick toggling of file tooltips on or off
    • Your tooltip preference is automatically saved and restored between sessions

ツールバーにトグルボタンを追加し、ONにするとファイル/フォルダ名に
相対パスのツールチップを表示。設定はZustandで永続化。
Closes #21
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 29, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 42a24703-862f-4680-9d25-4e29c7234952

📥 Commits

Reviewing files that changed from the base of the PR and between e710aed and f2bed29.

📒 Files selected for processing (4)
  • README.md
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/FilesView/components/FileTreeItem/FileTreeItem.tsx
  • apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/FilesView/components/FileTreeToolbar/FileTreeToolbar.tsx
  • apps/desktop/src/renderer/stores/file-explorer.ts

📝 Walkthrough

Walkthrough

This PR adds a tooltip feature to the file explorer that displays relative file paths on hover. Users can toggle the feature on/off via a toolbar button, with the preference persisted across sessions. The feature integrates tooltip UI components with Zustand store state management.

Changes

Cohort / File(s) Summary
Documentation
README.md
Added entry to feature table documenting the new file tooltip feature with PR reference.
File Explorer Store
apps/desktop/src/renderer/stores/file-explorer.ts
Added showFileTooltips boolean state (initialized to false), toggleFileTooltips() action method, and persistence configuration to retain the setting.
Toolbar Toggle
apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/FilesView/components/FileTreeToolbar/FileTreeToolbar.tsx
Added message-icon button to toggle tooltips with conditional styling (bg-accent when enabled) and dynamic label text.
File Item Display
apps/desktop/src/renderer/screens/main/components/WorkspaceView/RightSidebar/FilesView/components/FileTreeItem/FileTreeItem.tsx
Conditionally wrapped file/folder name with Tooltip component; displays relative path in tooltip content when feature is enabled.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant FileTreeToolbar
    participant FileExplorerStore as File Explorer<br/>Store
    participant FileTreeItem

    User->>FileTreeToolbar: Click toggle button
    FileTreeToolbar->>FileExplorerStore: toggleFileTooltips()
    FileExplorerStore->>FileExplorerStore: Set showFileTooltips = !showFileTooltips
    FileExplorerStore-->>FileTreeItem: State updated (showFileTooltips)
    
    alt Tooltips enabled
        User->>FileTreeItem: Hover over file/folder name
        FileTreeItem->>FileTreeItem: Render with Tooltip wrapper
        FileTreeItem-->>User: Display relative path in tooltip
    else Tooltips disabled
        User->>FileTreeItem: Hover over file/folder name
        FileTreeItem-->>User: No tooltip shown
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A whisker-width of code so neat,
With tooltips now, the view's complete!
Hover, see the paths unfold,
A feature crafted bright as gold.
Files dressed up, toggled with care—
Relative paths floating in air! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/files-tab-tooltip

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@MocA-Love MocA-Love self-assigned this Mar 29, 2026
@MocA-Love MocA-Love marked this pull request as ready for review March 29, 2026 10:22
@MocA-Love MocA-Love merged commit ba7ce3d into main Mar 29, 2026
1 check passed
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.

[feat] ファイル一覧でも画像のようにTOoltipが欲しい

1 participant