Skip to content

fix file opening: detect binary files, fix archive paths, add context…#6

Merged
i1rr merged 6 commits into
masterfrom
claude/fix-archive-file-opening-kjJjx
Mar 17, 2026
Merged

fix file opening: detect binary files, fix archive paths, add context…#6
i1rr merged 6 commits into
masterfrom
claude/fix-archive-file-opening-kjJjx

Conversation

@i1rr
Copy link
Copy Markdown
Owner

@i1rr i1rr commented Mar 17, 2026

No description provided.

claude added 6 commits March 17, 2026 02:27
… menu

- fix Windows tar --force-local flag to prevent "Cannot connect to \C:"
  error when unpacking archives with drive-letter paths
- add is_text_file() detection so Enter on binary files (png, exe, etc.)
  opens them with the OS default app instead of the text editor
- add Ctrl+Enter context menu with: open with OS default, open as text
  in editor, view in pager, unpack archive (for archives)
- add OpenContextMenu, OpenAsText, OpenWithDefault actions
- update help dialog with new shortcuts
- run cargo fmt for consistent formatting

https://claude.ai/code/session_01132GbGMZ1ubrWgoZipQYy8
- fix context menu closing instantly by passing through Tick/Noop/Resize
  events instead of treating them as menu selections
- fix Windows tar double-backslash issue by converting paths to forward
  slashes in a dedicated tar_quote() helper
- expand find_sevenzip() to search well-known Windows install paths for
  7-Zip, PeaZip, and NanaZip when the binary is not on PATH

https://claude.ai/code/session_01132GbGMZ1ubrWgoZipQYy8
- add UnpackCommand enum (Shell for Unix, Direct for Windows) to bypass
  cmd /C quoting issues with spaces, parentheses, and colons in paths
- add run_task_direct() that spawns programs with explicit args array
  instead of shell string interpolation
- use PowerShell Expand-Archive for zip files on Windows instead of tar
- update all tests to use UnpackCommand::display() for assertions

https://claude.ai/code/session_01132GbGMZ1ubrWgoZipQYy8
- add --debug CLI flag that enables debug-level file logging to cpt.log
- logger writes debug entries to file in real-time when --debug is active
- add debug log statements for archive extraction (paths, commands, pane info)
- add debug log statements for file type detection in explorer
- refresh both panes after task completion so extracted files appear immediately
- the missing refresh was causing archives to seem like they extracted to the
  wrong location or nowhere at all

https://claude.ai/code/session_01132GbGMZ1ubrWgoZipQYy8
…debug logs

- change unpack destination from inactive pane to the archive's parent directory,
  matching behavior of traditional dual-pane file managers
- add debug logging for task output lines and task errors
- update PLAN.md to reflect new extraction destination

https://claude.ai/code/session_01132GbGMZ1ubrWgoZipQYy8
- archive extraction now shows a choice dialog:
  [E] extract here, [F] create folder, [C] custom path
- new InputMode variants: UnpackChoice and UnpackCustomPath
- new files (from copy, move, extract) are highlighted with new_file_fg
  color until the cursor lands on them or the app restarts
- add new_file_fg (LightGreen) to Theme struct (26 fields now)
- theme editor supports the new field under Explorer section
- update help screen with extraction options, highlighting info,
  --debug flag docs, and log file location
- update PLAN.md with new-file highlighting and debug mode sections
- add 16 new tests (8 UnpackChoice key mapping, 8 highlighting/theme)

https://claude.ai/code/session_01132GbGMZ1ubrWgoZipQYy8
@i1rr i1rr merged commit 5516ec3 into master Mar 17, 2026
1 check passed
@i1rr i1rr deleted the claude/fix-archive-file-opening-kjJjx branch March 17, 2026 06:56
i1rr added a commit that referenced this pull request Apr 24, 2026
fix file opening: detect binary files, fix archive paths, add context…
i1rr added a commit that referenced this pull request Apr 24, 2026
fix file opening: detect binary files, fix archive paths, add context…
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.

2 participants