V0.1: Automated versioning with Reaper-native save - #21
Conversation
Co-authored-by: jlahtela <13746676+jlahtela@users.noreply.github.com>
…older browser Co-authored-by: jlahtela <13746676+jlahtela@users.noreply.github.com>
…g logic and add confirmation dialogs for archiving and existing versions
Replace manual robocopy/cp approach with reaper.Main_SaveProjectEx(0, path, 2) which saves the .rpp, copies all media, and rewrites internal references atomically — identical to Save As with "Copy all media" ticked. Remove file_operations helpers that existed only for the old manual copy approach: copy_file, count_files_in_dir, get_project_media_files, get_all_project_files, copy_project_files. Also add .claude/ and CLAUDE.md to .gitignore (not for public repo). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use info.project from EnumProjects(-1) instead of 0 to be explicit about which project is being saved. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates RASP to v0.2 by expanding project versioning options (native vs automated “safe” saving) and introducing initial local archiving support via a new module and GUI section.
Changes:
- Add dual versioning modes (Native Save As dialog vs Auto safe versioning via
Main_SaveProjectEx) with conflict handling. - Introduce archiving workflow (UI + module) to move older version folders to an archive destination.
- Update README and repo hygiene (.gitignore) for the new feature set.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents v0.2 features, adds versioning guide and updates roadmap. |
| RASP.lua | Wires GUI actions to new versioning mode + archiving operations. |
| modules/versioning.lua | Implements auto safe versioning, console logging, and version-folder conflict handling. |
| modules/gui.lua | Adds versioning mode toggle and new archiving UI controls/flags. |
| modules/file_operations.lua | Refactors directory copy/delete to use exit-code capture and adds verification logic. |
| modules/config.lua | Adds defaults for versioning mode + archiving settings; increases window height. |
| modules/archiving.lua | New module to select versions to archive, confirm, copy to destination, and delete source. |
| .gitignore | Ignores Claude-related local files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This PR contains both v0.1 and v0.2 features mixed together (see issue #29). The intended path forward: merge this PR as-is to bring v0.1 features into master (issues #22, #23, #24). Since v0.2 code is already present and partially implemented, merging establishes a working baseline from which a dedicated |
…p Windows - file_operations: remove execute_with_exitcode and all Windows-specific shell commands (robocopy, rmdir). Archiving now uses cp/rm directly via os.execute — Linux/macOS only. Remove broken count_files_in_dir reference from copy_directory. - versioning: replace alongside (_a/_b) conflict option with "increment version number" (finds next available version). Fix success message to report actual created folder name instead of bare version suffix. - archiving: remove unused escaped_prefix variable. Fix create_directory check to use dir_exists() after creation instead of trusting return value. - README: update console output examples to match actual log messages, update conflict handling table, note Windows not supported. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Addressed Copilot review comments (commit
|
Windows is explicitly not planned due to shell command dependencies. macOS was never tested and shouldn't be listed as supported. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Keep .claude/ personal directory gitignored. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Main_SaveProjectEx flag 2 did not copy media files on Linux. New approach: 1. cp -r copies all project files (media, peaks, etc.) to new folder 2. Main_SaveProjectEx flag 0 saves .rpp with new name, Reaper rewrites internal references 3. Old .rpp removed from destination folder Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Flag 2 alone did not copy media on Linux. Trying flag 3 = flag 1 (create subdirectory) + flag 2 (copy all media), which may require Reaper to create the directory itself. Removed manual cp-r and directory creation. If flag 3 also fails, fallback is cp-r + flag 0 + .rpp path patching. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Public repo — all comments, commits, issues, and docs must be in English. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates RASP toward the v0.2 roadmap by adding a safer automated versioning path (with conflict handling) and introducing local archiving (UI + logic), plus documentation and configuration updates.
Changes:
- Add dual versioning modes (Native Save As vs Auto “safe” save/copy via
Main_SaveProjectEx) with console logging and folder-conflict handling. - Add local archiving workflow: GUI controls for archive destination / “versions to keep”, and an archiving module that copies then deletes old version folders.
- Update config defaults/UI sizing and expand repository docs (
README.md,CLAUDE.md,.gitignore).
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates feature list and adds a detailed versioning guide + roadmap adjustments. |
| RASP.lua | Wires GUI events to new versioning mode selection and archiving actions. |
| modules/versioning.lua | Implements “auto safe” version creation with conflict dialog and console logging; adds mode parameter. |
| modules/gui.lua | Adds versioning mode switch and archiving section (destination + versions-to-keep + actions). |
| modules/file_operations.lua | Refactors file ops toward shell-based dir copy/delete; updates module docs. |
| modules/config.lua | Adds persisted settings for versioning mode + archiving; increases default window height. |
| modules/archiving.lua | New module to locate version folders and archive (copy + delete) old versions. |
| CLAUDE.md | New contributor guidance for repo structure and feature behavior. |
| .gitignore | Ignores Claude Code local directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- archiving.lua: fix cutoff comparison (< -> <=) so versions_to_keep=3 correctly keeps exactly 3 versions instead of 4 - versioning.lua: return true (not false) when user cancels conflict dialog, so cancellation is not shown as a red error in the UI Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- README: remove _v002_a alongside example (feature was removed) - README: remove duplicate Auto Mode bullet point - README: move local archiving to v0.2 (already shipped), update v0.3 to Backblaze B2 cloud archiving - CLAUDE.md: update file_operations.lua description (Linux-only, no robocopy) - CLAUDE.md: fix Main_SaveProjectEx flag reference (2 -> 3) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Main_SaveProjectEx(0, path, 2), which copies all media and rewrites internal.rppreferences atomically — identical to Save As with "Copy all media into project directory" tickedKey technical decision
Previous approach used
robocopy/cpto copy media manually, then saved the.rppwith flag0. This left internal.rpppath references pointing to the original locations, producing a broken version. The fix isMain_SaveProjectExflag2which lets Reaper's engine handle everything atomically.Test plan
.rppopens correctly.rppreferences point to the new folder, not the original🤖 Generated with Claude Code