Skip to content

feat: implement script versioning and rollback capability#233

Open
Yash-Marathe91 wants to merge 1 commit into
siddu-k:mainfrom
Yash-Marathe91:feature/script-versioning
Open

feat: implement script versioning and rollback capability#233
Yash-Marathe91 wants to merge 1 commit into
siddu-k:mainfrom
Yash-Marathe91:feature/script-versioning

Conversation

@Yash-Marathe91

Copy link
Copy Markdown

Description

Fixes #230 by implementing a robust script versioning and rollback capability.

Changes Made

  • Backend: Added utils/versioning.py to transparently maintain snapshots of scripts using a manifest file (history.json).
  • Backend API: Registered three new endpoints in app.py: /api/scripts/versions, /api/scripts/version, and /api/scripts/rollback.
  • Backend Save Event: Hooked the version tracking directly into the existing /api/scripts/save endpoint to automatically capture changes.
  • Frontend UI: Added a "Versions" button to the script detail view in ui/index.html and implemented a version history modal.
  • Frontend Logic: Built openVersionHistory and rollbackScript in ui/app.js to render history and interact with the rollback endpoints.

Testing/Verification

  • Modified an existing script and confirmed that an automatic snapshot is saved to logs/versions/<category>/<script_name>.
  • Opened the "Versions" modal to list historical commits.
  • Triggered a rollback to a previous version and verified the backend reloads the historical snapshot and creates a new rollback history log.

- Add utils/versioning.py to manage saving versions and fetching history
- Add API endpoints /api/scripts/versions, /api/scripts/version, and /api/scripts/rollback in app.py
- Automatically save a version when script is saved
- Add 'Versions' button to UI in index.html and app.js
- Add modal to view version history and perform rollback
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.

Enhancement: Add script versioning and rollback capability

1 participant