Skip to content

feat(open): implement interactive TUI file browser - #19

Merged
jmgilman merged 1 commit into
masterfrom
feat/open-tui
Jan 23, 2026
Merged

jmgilman merged 1 commit into
masterfrom
feat/open-tui

Conversation

@jmgilman

Copy link
Copy Markdown
Contributor

Summary

  • Add blob open command for interactively exploring blob archives
  • Split-view TUI with file tree navigation and content preview
  • Lazy loading via HTTP range requests for fast navigation
  • File size guard prevents loading files >512KB into memory
  • Status bar displays selected file metadata (size, modification time)

Features

  • File tree navigation: Browse archive contents with keyboard (arrows, Enter, Tab)
  • Content preview: Syntax highlighting for text, hex dump for binary files
  • File metadata: Status bar shows file size and modification time (relative for recent, absolute for older)
  • Copy to local: Press 'c' to copy selected file to local filesystem

Components

Package Description
internal/tui/open Main Bubble Tea model and update logic
internal/tui/components/filetree File tree navigation component
internal/tui/components/preview Content preview (text/binary)
internal/tui/components/statusbar Status bar with file metadata
internal/tui/components/copydialog File copy dialog
internal/tui/detect Binary file detection

Test plan

  • Run blob open docker.io/meigma/blob-test:v1 and verify TUI loads
  • Navigate with arrow keys, verify file tree updates
  • Select files and verify preview loads with syntax highlighting
  • Select binary file and verify hex dump displays
  • Verify status bar shows file size and modification time
  • Press 'c' on a file and verify copy dialog appears
  • Complete copy and verify file is written locally
  • Select a large file (>512KB) and verify "Too Large" message appears

🤖 Generated with Claude Code

Add the `blob open` command for interactively exploring blob archives.

Features:
- Split-view layout with file tree (left) and content preview (right)
- Lazy loading via HTTP range requests for fast navigation
- Syntax highlighting for source code files
- Hex dump display for binary files
- File size guard to prevent loading files >512KB into memory
- Status bar showing selected file metadata (size, modification time)
- Copy files from archive to local filesystem
- Keyboard navigation (arrows, Tab, Enter, c for copy, q to quit)

Components:
- internal/tui/open: Main TUI model with Bubble Tea
- internal/tui/components/filetree: File tree navigation
- internal/tui/components/preview: Content preview with hex/text modes
- internal/tui/components/statusbar: Status bar with file metadata
- internal/tui/components/copydialog: File copy dialog
- internal/tui/detect: Binary file detection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jmgilman
jmgilman merged commit 734e835 into master Jan 23, 2026
6 checks passed
@jmgilman
jmgilman deleted the feat/open-tui branch January 23, 2026 23:37
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.

1 participant