Skip to content

feat: allow volume browsing#4

Merged
glefer merged 1 commit into
mainfrom
feat/browse-files
May 30, 2025
Merged

feat: allow volume browsing#4
glefer merged 1 commit into
mainfrom
feat/browse-files

Conversation

@glefer

@glefer glefer commented May 30, 2025

Copy link
Copy Markdown
Owner

Now, users can examine the structure of their Docker volumes, view files, and navigate through directories.

Screen Capture_select-area_20250530173756

Key changes

To browse the volume contents, a new VolumeBrowserScreen was added to the TUI.
Navigation functionality was implemented:

  • Enter: Open the directory you have chosen.
  • Backspace: Open the parent directory.

Icons to differentiate between directories and files.
The current path is displayed in a status bar.

How to Use:

Select a volume in the main table.
Press b to browse the selected volume.
Use Enter and Backspace to navigate.

@github-actions

github-actions Bot commented May 30, 2025

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/docker_volume_analyzer
   __init__.py00100% 
   docker_client.py360100% 
   errors.py30100% 
   filesystem.py510100% 
   main.py90100% 
   tui.py1630100% 
   volume_manager.py300100% 
TOTAL2920100% 

@glefer glefer requested a review from Copilot May 30, 2025 15:45

This comment was marked as outdated.

@glefer glefer force-pushed the feat/browse-files branch from aaab745 to 4860af0 Compare May 30, 2025 15:59
@glefer glefer requested a review from Copilot May 30, 2025 15:59
@glefer glefer added the enhancement New feature or request label May 30, 2025

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a volume-browsing feature to the TUI, including backend support for retrieving filesystem trees and tests covering the new screens and client methods.

  • Introduce get_volume_tree in VolumeManager and get_directory_informations_with_find in DockerClient
  • Add VolumeBrowserScreen UI component, CSS rules, and key bindings for browsing
  • Expand test suite to cover filesystem parsing, volume manager tree retrieval, Docker client find calls, and TUI navigation

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/docker_volume_analyzer/docker_client.py Implemented get_directory_informations_with_find to run find in a container
src/docker_volume_analyzer/filesystem.py Added FileSystem and parse_find_output to build file trees
src/docker_volume_analyzer/volume_manager.py Added get_volume_tree and imported parse_find_output
src/docker_volume_analyzer/tui.py Added VolumeBrowserScreen, action_browse, and key handling
src/docker_volume_analyzer/tui.tcss Extended stylesheet to style file tree and shortcuts
tests/test_volume_manager.py Tests for get_volume_tree success and empty cases
tests/test_tui.py Tests for browsing action, screen behavior, and key events
tests/test_filesystem.py New tests for FileSystem, FileNode, and parse_find_output
tests/test_docker_client.py Tests for get_directory_informations_with_find cases
.flake8 Added flake8 config
Comments suppressed due to low confidence (5)

src/docker_volume_analyzer/filesystem.py:35

  • [nitpick] The attribute name childrens is nonstandard English; consider renaming to children for clarity and consistency.
childrens: Dict[str, "FileNode"] = field(default_factory=dict)

src/docker_volume_analyzer/tui.py:155

  • In DockerTUI.action_browse, self.app.push_screen is used but app is not an attribute on the App instance. Replace self.app.push_screen with self.push_screen to correctly push the new screen.
self.app.push_screen(

src/docker_volume_analyzer/volume_manager.py:36

  • There's a missing space in the docstring before parse_find_output. It reads andparse_find_output—insert a space for clarity.
dict: Dictionary with volume names as keys andparse_find_output

src/docker_volume_analyzer/tui.tcss:82

  • Missing semicolon after the CSS property value. It should be color: $footer-key-foreground; to avoid syntax errors.
color: $footer-key-foreground

src/docker_volume_analyzer/docker_client.py:98

  • The return type uses Union[str, None], but Union is not imported. Add from typing import Union at the top of the file.
def get_directory_informations_with_find(

@glefer glefer force-pushed the feat/browse-files branch from 4860af0 to 70e412c Compare May 30, 2025 16:05
@glefer glefer marked this pull request as ready for review May 30, 2025 16:11
@glefer glefer merged commit f2e4bb2 into main May 30, 2025
2 checks passed
@glefer glefer deleted the feat/browse-files branch May 30, 2025 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants