Conversation
ui/js/Archive.js gates the Extract context-menu row and the extract destination-name logic on a hardcoded EXTENSIONS array. .rar was missing, so right-clicking a .rar file never offered Extract even though the Rust backend already handles it: extract_argv() in src/backend/archive.rs routes any non-.7z archive to bsdtar, which reads RAR archives fine via libarchive. Extends tests/js/archive.js to cover .rar in both isArchive and extractDir. Fixes thisisgm#107 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RUEVNrijEoLhAEenXRx5es
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe archive extension list now includes ChangesRAR archive support
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~5 minutes Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change is narrowly scoped and mergeable. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 Biome (2.5.10)tests/js/archive.jsFile contains syntax errors that prevent linting: Line 1: Expected a statement but instead found '.'.; Line 1: Expected a semicolon or an implicit semicolon after a statement, but found none; Line 1: Expected a semicolon or an implicit semicolon after a statement, but found none; Line 2: Expected a semicolon or an implicit semicolon after a statement, but found none ui/js/Archive.jsFile contains syntax errors that prevent linting: Line 1: Expected a statement but instead found '.pragma library'. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
ui/js/Archive.jsgates the "Extract" context-menu row (and the extract destination-name logic) on a hardcodedEXTENSIONSarray..rarwas missing, so right-clicking a.rarfile never offered Extract — even though the Rust backend already handles it fine:extract_argv()insrc/backend/archive.rsroutes any non-.7zarchive tobsdtar, which reads RAR archives via libarchive without any special-casing needed..rartoEXTENSIONS, fixing bothisArchive()(menu gating) andextractDir()(destination naming), since both derive from the same table.tests/js/archive.jsto cover.rarin both functions.Fixes #107
Test plan
./tests/js.sh— full suite passes, 2986 checks, 0 failed./tests/js.sh archive— 21 checks, 0 failed (verified the 2 new assertions actually fail without the fix, by revertingArchive.jstemporarily and re-running)src/backend/archive.rs— extraction already worked viabsdtar; this only fixes the UI-side gateKnown caveat (not addressed by this PR): libarchive's RAR reader is read-only and doesn't cover every RAR variant — plain RAR5 archives and RAR archives using BCJ2/PPMd compression can still fail to extract via
bsdtar, while older RAR4 archives generally work. That's absdtar/libarchive limitation outside this PR's scope; happy to follow up with a friendlier error message pointing atunraras a fallback if that's wanted.🤖 Generated with Claude Code
https://claude.ai/code/session_01RUEVNrijEoLhAEenXRx5es
Summary by CodeRabbit