-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
When navigating to a folder that requires permissions (like macOS Trash), the app shows a spinner indefinitely. The error only appears after manually refreshing. The error should display immediately, and clicking "OK" should navigate back to the previous location or home folder.
Current State
- File:
src/store/useAppStore.ts:507-609(navigateTo function) - File:
src/store/useAppStore.ts:711-780(refreshCurrentDirectory function) - Navigation calls
refreshCurrentDirectorywhich catches errors and sets error state - However, errors from permission issues don't trigger immediate UI feedback - just an endless spinner
- After reload, error dialog shows: "Failed to refresh: Failed to read directory: Operation not permitted (os error 1)"
- Clicking "OK" leaves user on the broken path with no way to navigate away easily
Proposed Changes
- Immediate error feedback: When
navigateTofails due to permission errors, show the error dialog immediately instead of leaving the spinner running - Navigate away on dismiss: When user clicks "OK" on the permission error dialog:
- Navigate back to the previous history location if available (
goBack()) - Or navigate to home folder if no history exists
- Navigate back to the previous history location if available (
- Better error messaging: Include actionable guidance in the error message (e.g., "Grant access under System Settings → Privacy & Security → Files and Folders")
Technical Notes
- The
navigateTofunction at line 507 updates path history before directory contents are loaded - The
refreshCurrentDirectoryfunction catches errors at line 758 but only sets error state - Need to either: roll back history on failure, or not commit to history until directory loads successfully
- Consider using
message()dialog (from Tauri) for permission errors instead of just setting error state
Acceptance Criteria
- Permission errors show immediately when navigating (no endless spinner)
- Error dialog displays with clear guidance on how to fix permissions
- Clicking "OK" navigates user back to previous location or home
- Path bar doesn't show the failed path after dismissing error
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working