Skip to content

FUSE: Implement Unmount feature #14

Description

@efimsky

Parent Issue

Part of #118 (FUSE-based Archive & Remote Browsing Feature)

Summary

Add ability to unmount the current mounted filesystem from the menu.

Dependencies

Requires #123 (rclone integration) - menu structure already in place

Tasks

Action Enum

  • Add UNMOUNT = auto() to Action enum

Menu Integration

  • Add 'unmount': Action.UNMOUNT to MENU_ACTION_MAP
  • "Unmount current" menu item should already exist from Phase 5

Dynamic Menu State

  • Disable "Unmount current" when active panel is NOT inside a mount
  • Enable when active panel path is inside an active mount

App Method

  • Handle Action.UNMOUNT in run loop
  • Implement App._unmount_current():
    • Get current path from active panel
    • Find mount using mount_manager.get_mount_for_path()
    • If not in mount, show error
    • Navigate panel to parent directory (outside mount)
    • Call mount_manager.unmount(mount_point)
    • Show success/failure message

Edge Cases

  • Handle unmounting when panel is deep inside mount (navigate to mount's parent)
  • Handle unmount failure gracefully (show error, don't crash)

Testing

  • Test UNMOUNT action triggers unmount
  • Test unmount navigates panel outside mount before unmounting
  • Test unmount fails gracefully when not in mount
  • Test "Unmount current" menu item enabled/disabled based on path

Files

  • Modify: tnc/app.py
  • Modify: tnc/menu.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions