markdown · 8748 bytes Raw Blame History

Sniffly Toolbar Feature Targets

Vision

Redesign the Sniffly toolbar to match SpaceSniffer's usability while maintaining clean, intuitive design. Focus on most-used operations with clear iconography.


Phase 1: Core Toolbar Redesign (PRIORITY)

Remove

  • Quit button - Defer to OS window close button (red X on macOS, X on Windows/Linux)

Add/Reorganize

Left Section

  1. Open Directory Button (Filing Cabinet Icon)

    • Opens OS native file picker (GtkFileChooserDialog)
    • Allows user to select directory to scan
    • Keyboard shortcut: Cmd+O / Ctrl+O
  2. Path Display (Read-only text entry or label)

    • Shows current scan root path
    • Click filing cabinet icon next to it to trigger Open Directory
    • Should support text selection for copy/paste
  3. Scan Button (Magnifying Glass Icon)

    • Positioned immediately after path display
    • Triggers rescan of current directory
    • Keyboard shortcut: F5 or Cmd+R
  4. Progress Bar

    • Keep current implementation
    • Expands to fill remaining space
    • Shows scan progress with percentage

Right Section (floated right)

  1. Open in Finder/Explorer Button (File with Arrow Icon)

    • Opens currently selected item in OS file browser
    • macOS: open -R <path> (reveals in Finder)
    • Linux: xdg-open <path> or nautilus <path>
    • Windows: explorer /select,<path>
    • Disabled when no selection
    • Keyboard shortcut: Cmd+Shift+R / Ctrl+Shift+R
  2. Delete Button (Red Trash/X Icon)

    • Deletes currently selected item
    • Priority: System trash → rm command as fallback
    • Shows confirmation dialog
    • Disabled when no selection
    • Keyboard shortcut: d or Delete
    • Right-click context menu also triggers this

Phase 2: Enhanced File Operations

Additional Toolbar Buttons

  1. Copy Path Button (Clipboard Icon)

    • Copies full path of selected item to clipboard
    • Keyboard shortcut: Cmd+Shift+C / Ctrl+Shift+C
  2. Properties/Details Button (Info Icon)

    • Opens side panel or dialog with file/folder details:
      • Full path
      • Size (human-readable + bytes)
      • Item count (for directories)
      • Created/modified dates
      • Permissions
      • File type
    • Keyboard shortcut: i or Cmd+I
  3. Refresh Button (Circular Arrow Icon)

    • Forces rescan without cache
    • Clears directory cache before scanning
    • Keyboard shortcut: Cmd+Shift+R / Ctrl+Shift+R

Phase 3: Search & Filter Features

Filter Toolbar (Second Row, Collapsible)

  1. Search/Filter Entry

    • Filter by filename pattern (wildcards: *.txt, *cache*)
    • Live filtering as you type
    • Keyboard shortcut: Cmd+F / Ctrl+F to focus
  2. File Type Filter Dropdown

    • Quick filters: All, Documents, Images, Videos, Audio, Archives, Code
    • Based on file extensions
    • Multiple selection support
  3. Size Filter Range

    • Min/max size sliders or entry fields
    • Quick presets: "Large files (>100MB)", "Tiny files (<1MB)"
  4. Date Filter

    • Filter by modified date: Last day, week, month, year, custom range
    • "Old files" (not modified in 1+ years) preset
  5. Show Hidden Files Toggle

    • Toggle visibility of hidden files/folders (starting with .)
    • Keyboard shortcut: Cmd+Shift+H

Phase 4: Navigation & History

  1. Back/Forward Buttons (Arrow Icons)

    • Navigate through directory history
    • Like a web browser
    • Keyboard shortcuts: Cmd+[ / Cmd+] or Alt+Left / Alt+Right
  2. Up to Parent Button (Up Arrow Icon)

    • Navigate to parent directory
    • Alternative to Backspace key
    • Shows parent path in tooltip
  3. Breadcrumb Navigation (Already implemented!)

    • Enhance: Make each path segment clickable
    • Click any segment to jump to that level

Phase 5: Advanced Features (SpaceSniffer Parity)

View Options

  1. Toggle File Extensions

    • Show/hide file extensions in labels
    • Keyboard shortcut: e
  2. Age-based Coloring

    • Color files by modification date:
      • Blue = Recent (< 1 month)
      • Yellow = Medium (1-12 months)
      • Red = Old (> 1 year)
    • Toggle on/off
  3. Size Display Mode

    • Toggle between actual size vs. allocated size (disk usage)
    • Useful for showing real disk space usage

Export & Reporting

  1. Export to CSV/JSON

    • Export directory tree with sizes
    • Useful for archiving or analysis
  2. Copy File List

    • Copy list of all files matching current filter
    • Plain text format, one path per line

Multi-Selection

  1. Multiple Selection Support

    • Cmd+Click / Ctrl+Click to select multiple items
    • Shift+Click to select range
    • Show total size of selection in status bar
    • Bulk delete support
  2. Select All Matching Pattern

    • Select all items matching a wildcard pattern
    • Example: "Select all *.log files"

Comparison Mode

  1. Compare Two Scans
    • Scan directory, then scan again later
    • Highlight differences (new, deleted, grown, shrunk files)
    • Useful for tracking disk usage changes over time

Implementation Notes

Icon Sources

  • Use GTK stock icons where possible (gtk_image_new_from_icon_name)
  • Common icon names:
    • folder-open - Open directory
    • view-refresh - Rescan/refresh
    • edit-find - Search
    • edit-delete - Delete
    • edit-copy - Copy path
    • document-properties - Properties/info
    • go-up - Navigate up
    • go-previous / go-next - Back/forward
    • document-open - Open in Finder

GTK Components Needed

  • GtkFileChooserDialog - For directory picker
  • GtkPopover or GtkDialog - For properties panel
  • GtkEntry - For search/filter input
  • GtkComboBox - For filter dropdowns
  • GtkSwitch - For toggles (hidden files, etc.)
  • GtkClipboard - For copy path functionality

Platform-Specific Code

  • Open in Finder/Explorer: Use system commands via iso_c_binding
  • Delete to Trash:
    • macOS: osascript -e 'tell app "Finder" to delete POSIX file "..."'
    • Linux: gio trash <path> or trash-put <path>
    • Fallback: rm -rf with confirmation
  • Copy to Clipboard: Use GTK clipboard API

Keyboard Shortcuts Summary

Shortcut Action
Cmd+O / Ctrl+O Open directory picker
F5 / Cmd+R Rescan current directory
Cmd+Shift+R Open in Finder/Explorer
d / Delete Delete selected item
Cmd+Shift+C Copy path to clipboard
i / Cmd+I Show properties
Cmd+F Focus search/filter
Cmd+Shift+H Toggle hidden files
Cmd+[ / Cmd+] Back/forward in history
Backspace Navigate to parent
q Quit (already implemented)
Space Select item (already implemented)
Enter Navigate into item (already implemented)
Arrow keys Navigate treemap (already implemented)

Current Status (Updated 2025-11-05)

  • ✅ Basic toolbar with Scan button
  • ✅ Progress bar (moved to toolbar)
  • ✅ Breadcrumb display (path only, not clickable yet)
  • ✅ Keyboard navigation (arrows, enter, backspace, space)
  • ✅ Mouse hover and selection
  • ✅ Directory caching for fast re-scans
  • Phase 1 Complete: Open Directory, Path Display, Scan, Open in Finder, Copy Path, Delete buttons
  • Tooltips: Hover shows filename, size, item count
  • Status Bar Stats: Shows "N items (M files) - X.XX GB"
  • Color by File Type: Images, videos, audio, documents, code, archives colored
  • Size Labels: Shows formatted sizes on rectangles (when space permits)
  • Copy Path to Clipboard: Toolbar button + Cmd+Shift+C shortcut
  • Cushioned Treemap: Van Wijk algorithm for 3D shading effect

Next Steps

  1. Implement Phase 1 core toolbar redesign DONE
  2. Add GtkFileChooserDialog for directory picker DONE
  3. Implement "Open in Finder" functionality DONE
  4. Add delete functionality with system trash support DONE
  5. Enhance breadcrumb bar to be clickable (navigate to parent levels)
  6. Add keyboard shortcut handler for Copy Path (Cmd+Shift+C)
  7. Implement context menu (right-click)
  8. Add Properties/Info dialog
  9. Implement Back/Forward navigation history

Design Decisions (CONFIRMED)

  • Drag-and-drop: YES - Drag directory onto app window to initiate scan
  • Filter toolbar: Always visible (we have plenty of header space)
  • Context menu: YES - Right-click context menu on selections
  • Undo for delete: YES - Implement Cmd/Ctrl+Z undo for delete operations
  • Settings dialog: Defer to later phases

Priority: ALL FEATURES - Full SpaceSniffer parity!

View source
1 # Sniffly Toolbar Feature Targets
2
3 ## Vision
4 Redesign the Sniffly toolbar to match SpaceSniffer's usability while maintaining clean, intuitive design. Focus on most-used operations with clear iconography.
5
6 ---
7
8 ## Phase 1: Core Toolbar Redesign (PRIORITY)
9
10 ### Remove
11 - **Quit button** - Defer to OS window close button (red X on macOS, X on Windows/Linux)
12
13 ### Add/Reorganize
14
15 #### Left Section
16 1. **Open Directory Button** (Filing Cabinet Icon)
17 - Opens OS native file picker (GtkFileChooserDialog)
18 - Allows user to select directory to scan
19 - Keyboard shortcut: `Cmd+O` / `Ctrl+O`
20
21 2. **Path Display** (Read-only text entry or label)
22 - Shows current scan root path
23 - Click filing cabinet icon next to it to trigger Open Directory
24 - Should support text selection for copy/paste
25
26 3. **Scan Button** (Magnifying Glass Icon)
27 - Positioned immediately after path display
28 - Triggers rescan of current directory
29 - Keyboard shortcut: `F5` or `Cmd+R`
30
31 4. **Progress Bar**
32 - Keep current implementation
33 - Expands to fill remaining space
34 - Shows scan progress with percentage
35
36 #### Right Section (floated right)
37 5. **Open in Finder/Explorer Button** (File with Arrow Icon)
38 - Opens currently selected item in OS file browser
39 - macOS: `open -R <path>` (reveals in Finder)
40 - Linux: `xdg-open <path>` or `nautilus <path>`
41 - Windows: `explorer /select,<path>`
42 - Disabled when no selection
43 - Keyboard shortcut: `Cmd+Shift+R` / `Ctrl+Shift+R`
44
45 6. **Delete Button** (Red Trash/X Icon)
46 - Deletes currently selected item
47 - Priority: System trash → `rm` command as fallback
48 - Shows confirmation dialog
49 - Disabled when no selection
50 - Keyboard shortcut: `d` or `Delete`
51 - Right-click context menu also triggers this
52
53 ---
54
55 ## Phase 2: Enhanced File Operations
56
57 ### Additional Toolbar Buttons
58 7. **Copy Path Button** (Clipboard Icon)
59 - Copies full path of selected item to clipboard
60 - Keyboard shortcut: `Cmd+Shift+C` / `Ctrl+Shift+C`
61
62 8. **Properties/Details Button** (Info Icon)
63 - Opens side panel or dialog with file/folder details:
64 - Full path
65 - Size (human-readable + bytes)
66 - Item count (for directories)
67 - Created/modified dates
68 - Permissions
69 - File type
70 - Keyboard shortcut: `i` or `Cmd+I`
71
72 9. **Refresh Button** (Circular Arrow Icon)
73 - Forces rescan without cache
74 - Clears directory cache before scanning
75 - Keyboard shortcut: `Cmd+Shift+R` / `Ctrl+Shift+R`
76
77 ---
78
79 ## Phase 3: Search & Filter Features
80
81 ### Filter Toolbar (Second Row, Collapsible)
82 10. **Search/Filter Entry**
83 - Filter by filename pattern (wildcards: `*.txt`, `*cache*`)
84 - Live filtering as you type
85 - Keyboard shortcut: `Cmd+F` / `Ctrl+F` to focus
86
87 11. **File Type Filter Dropdown**
88 - Quick filters: All, Documents, Images, Videos, Audio, Archives, Code
89 - Based on file extensions
90 - Multiple selection support
91
92 12. **Size Filter Range**
93 - Min/max size sliders or entry fields
94 - Quick presets: "Large files (>100MB)", "Tiny files (<1MB)"
95
96 13. **Date Filter**
97 - Filter by modified date: Last day, week, month, year, custom range
98 - "Old files" (not modified in 1+ years) preset
99
100 14. **Show Hidden Files Toggle**
101 - Toggle visibility of hidden files/folders (starting with `.`)
102 - Keyboard shortcut: `Cmd+Shift+H`
103
104 ---
105
106 ## Phase 4: Navigation & History
107
108 15. **Back/Forward Buttons** (Arrow Icons)
109 - Navigate through directory history
110 - Like a web browser
111 - Keyboard shortcuts: `Cmd+[` / `Cmd+]` or `Alt+Left` / `Alt+Right`
112
113 16. **Up to Parent Button** (Up Arrow Icon)
114 - Navigate to parent directory
115 - Alternative to Backspace key
116 - Shows parent path in tooltip
117
118 17. **Breadcrumb Navigation** (Already implemented!)
119 - Enhance: Make each path segment clickable
120 - Click any segment to jump to that level
121
122 ---
123
124 ## Phase 5: Advanced Features (SpaceSniffer Parity)
125
126 ### View Options
127 18. **Toggle File Extensions**
128 - Show/hide file extensions in labels
129 - Keyboard shortcut: `e`
130
131 19. **Age-based Coloring**
132 - Color files by modification date:
133 - Blue = Recent (< 1 month)
134 - Yellow = Medium (1-12 months)
135 - Red = Old (> 1 year)
136 - Toggle on/off
137
138 20. **Size Display Mode**
139 - Toggle between actual size vs. allocated size (disk usage)
140 - Useful for showing real disk space usage
141
142 ### Export & Reporting
143 21. **Export to CSV/JSON**
144 - Export directory tree with sizes
145 - Useful for archiving or analysis
146
147 22. **Copy File List**
148 - Copy list of all files matching current filter
149 - Plain text format, one path per line
150
151 ### Multi-Selection
152 23. **Multiple Selection Support**
153 - `Cmd+Click` / `Ctrl+Click` to select multiple items
154 - `Shift+Click` to select range
155 - Show total size of selection in status bar
156 - Bulk delete support
157
158 24. **Select All Matching Pattern**
159 - Select all items matching a wildcard pattern
160 - Example: "Select all *.log files"
161
162 ### Comparison Mode
163 25. **Compare Two Scans**
164 - Scan directory, then scan again later
165 - Highlight differences (new, deleted, grown, shrunk files)
166 - Useful for tracking disk usage changes over time
167
168 ---
169
170 ## Implementation Notes
171
172 ### Icon Sources
173 - Use GTK stock icons where possible (`gtk_image_new_from_icon_name`)
174 - Common icon names:
175 - `folder-open` - Open directory
176 - `view-refresh` - Rescan/refresh
177 - `edit-find` - Search
178 - `edit-delete` - Delete
179 - `edit-copy` - Copy path
180 - `document-properties` - Properties/info
181 - `go-up` - Navigate up
182 - `go-previous` / `go-next` - Back/forward
183 - `document-open` - Open in Finder
184
185 ### GTK Components Needed
186 - `GtkFileChooserDialog` - For directory picker
187 - `GtkPopover` or `GtkDialog` - For properties panel
188 - `GtkEntry` - For search/filter input
189 - `GtkComboBox` - For filter dropdowns
190 - `GtkSwitch` - For toggles (hidden files, etc.)
191 - `GtkClipboard` - For copy path functionality
192
193 ### Platform-Specific Code
194 - **Open in Finder/Explorer**: Use system commands via `iso_c_binding`
195 - **Delete to Trash**:
196 - macOS: `osascript -e 'tell app "Finder" to delete POSIX file "..."'`
197 - Linux: `gio trash <path>` or `trash-put <path>`
198 - Fallback: `rm -rf` with confirmation
199 - **Copy to Clipboard**: Use GTK clipboard API
200
201 ### Keyboard Shortcuts Summary
202 | Shortcut | Action |
203 |----------|--------|
204 | `Cmd+O` / `Ctrl+O` | Open directory picker |
205 | `F5` / `Cmd+R` | Rescan current directory |
206 | `Cmd+Shift+R` | Open in Finder/Explorer |
207 | `d` / `Delete` | Delete selected item |
208 | `Cmd+Shift+C` | Copy path to clipboard |
209 | `i` / `Cmd+I` | Show properties |
210 | `Cmd+F` | Focus search/filter |
211 | `Cmd+Shift+H` | Toggle hidden files |
212 | `Cmd+[` / `Cmd+]` | Back/forward in history |
213 | `Backspace` | Navigate to parent |
214 | `q` | Quit (already implemented) |
215 | `Space` | Select item (already implemented) |
216 | `Enter` | Navigate into item (already implemented) |
217 | `Arrow keys` | Navigate treemap (already implemented) |
218
219 ---
220
221 ## Current Status (Updated 2025-11-05)
222 - ✅ Basic toolbar with Scan button
223 - ✅ Progress bar (moved to toolbar)
224 - ✅ Breadcrumb display (path only, not clickable yet)
225 - ✅ Keyboard navigation (arrows, enter, backspace, space)
226 - ✅ Mouse hover and selection
227 - ✅ Directory caching for fast re-scans
228 -**Phase 1 Complete**: Open Directory, Path Display, Scan, Open in Finder, Copy Path, Delete buttons
229 -**Tooltips**: Hover shows filename, size, item count
230 -**Status Bar Stats**: Shows "N items (M files) - X.XX GB"
231 -**Color by File Type**: Images, videos, audio, documents, code, archives colored
232 -**Size Labels**: Shows formatted sizes on rectangles (when space permits)
233 -**Copy Path to Clipboard**: Toolbar button + Cmd+Shift+C shortcut
234 -**Cushioned Treemap**: Van Wijk algorithm for 3D shading effect
235
236 ## Next Steps
237 1.~~Implement Phase 1 core toolbar redesign~~ **DONE**
238 2.~~Add GtkFileChooserDialog for directory picker~~ **DONE**
239 3.~~Implement "Open in Finder" functionality~~ **DONE**
240 4.~~Add delete functionality with system trash support~~ **DONE**
241 5. Enhance breadcrumb bar to be clickable (navigate to parent levels)
242 6. Add keyboard shortcut handler for Copy Path (Cmd+Shift+C)
243 7. Implement context menu (right-click)
244 8. Add Properties/Info dialog
245 9. Implement Back/Forward navigation history
246
247 ---
248
249 ## Design Decisions (CONFIRMED)
250 -**Drag-and-drop**: YES - Drag directory onto app window to initiate scan
251 -**Filter toolbar**: Always visible (we have plenty of header space)
252 -**Context menu**: YES - Right-click context menu on selections
253 -**Undo for delete**: YES - Implement Cmd/Ctrl+Z undo for delete operations
254 -**Settings dialog**: Defer to later phases
255
256 ## Priority: ALL FEATURES - Full SpaceSniffer parity!
257