Script Runner version history#3411
Conversation
Carve Version History routes and actions out of ScriptsController so the real implementation can ship in the openc3-enterprise gem. Adds a stub ScriptVersionController that requires the gem version (notebooks pattern), guards body/create/destroy hooks behind defined?, gates the ScriptRunner menu item on the /openc3-api/info enterprise flag, and threads responseType through the Api wrapper for the git bundle download. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Version History dialog now uses monaco.editor.createDiffEditor with markRaw to escape Vue 3 proxy traversal that previously froze the page, an inlined editor.worker (?worker&inline) to dodge microfrontend path resolution failures, and unique inmemory URIs on both models so diff decorations actually render. Monaco is loaded via defineAsyncComponent so the ~3 MB chunk only downloads when the Enterprise menu item is opened. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
No new volumes. I still need to review, but do whatever under /gems/scripts or something. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## sr-updates #3411 +/- ##
============================================
Coverage 79.33% 79.34%
============================================
Files 691 692 +1
Lines 57712 57820 +108
Branches 728 728
============================================
+ Hits 45788 45877 +89
- Misses 11846 11865 +19
Partials 78 78
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
That volume is read-only. Making it read / write comes with some trade-offs:
|
|
Ok. I guess it is only needed by ScriptRunner. Will talk architecture tomorrow. |
…IONS_DIR Make the Enterprise Version History feature opt-in via the OPENC3_SCRIPT_VERSIONS_DIR env var. ScriptRunner now shows the Version History menu only when /openc3-api/info reports script_versions enabled, so no git calls or volume are needed when the dir is unset. Includes the supporting plugin version label work that annotates version commits. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
Now also used by cmd-tlm-server so it can handle upgrades |
Move script Version History export/import from per-file (ScriptVersionHistoryDialog)
to per-plugin actions on the admin Plugins tab. Repos are keyed by version-stripped
plugin base name so history survives version upgrades and is dropped only on uninstall.
- routes: add /scripts/plugin/:plugin/history-{import,export}; drop per-file export
- TargetModel: add plugin_name_version, plugin_base_name, destroy_script_versions
- openc3cli: destroy plugin Version History repo on uninstall (no-op in Core)
- admin Plugins tab: gate Export/Import History on /openc3-api/info script_versions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
15 Open source vulnerabilities detected - medium severity
Aikido detected 15 vulnerabilities across 1 package, it includes 14 medium and 1 low vulnerabilities.
Details
Remediation Aikido suggests bumping the vulnerable packages to a safe version.
Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info
|
Seems like I had to do Ctrl-S a twice to get saves to complete in quick testing on this. Also was confused by the PR name as this is only an Enterprise feature. |
ryanmelt
left a comment
There was a problem hiding this comment.
ScriptVersionHistory, etc, should just be versionHistory to also cover other files.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
clayandgen
left a comment
There was a problem hiding this comment.
Minor SonarQube findings, but that can be addressed in the final PR (sr-updates -> main), if necessary.





This implementation utilizes git in a new script-runner-api volume to do the history tracking
Differs from #3382 which uses bucket history
closes #2389