UI #2
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_code#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
check how in ../hero_proc/... _ui the user interface how we did editor for executing rhai scripts
we want this in this repo as well as part of the UI
test this with browser mcp
support in the IDE (editor) rhai & python
Implementation Spec: Script Editor IDE
Objective
Add a script editor tab to
hero_runner_uithat mirrors the HeroScript editor fromhero_proc_ui. When a user clicks on a job, they can view logs AND open the script in an embedded IDE to edit and re-execute it. Supports Rhai and Python with CodeMirror 5 syntax highlighting.Requirements
job.submitRPC withinline_sourcejob.logs+job.getfor streaming results + status badgeFiles to Modify/Create
static/css/codemirror.min.cssstatic/css/codemirror-theme-dark.min.cssstatic/js/codemirror.min.jsstatic/js/codemirror-simple.min.jsstatic/js/codemirror-rhai.jsstatic/js/ansi_up.min.jsstatic/js/codemirror-python.jsstatic/js/editor.jstemplates/index.htmlstatic/css/dashboard.cssstatic/js/dashboard.jsImplementation Steps
codemirror-python.js(defineSimpleMode for Python)editor.js(editorInit, editorRun, editorPollJob, editorSetContent, editorClearOutput)dashboard.cssindex.html(tab button + pane HTML + asset script/link tags)dashboard.js(switchTab editor case + openInEditor + button in job detail)Acceptance Criteria
Notes
CodeMirror.defineSimpleModesame as rhai mode, or download official codemirror5 python mode from CDNImplementation Complete ✓
Changes Made
New files created:
crates/hero_runner_ui/static/css/codemirror.min.css— CodeMirror 5 core CSS (copied from hero_proc_ui)crates/hero_runner_ui/static/css/codemirror-theme-dark.min.css— Dracula dark theme CSScrates/hero_runner_ui/static/js/codemirror.min.js— CodeMirror 5 core librarycrates/hero_runner_ui/static/js/codemirror-simple.min.js— defineSimpleMode addoncrates/hero_runner_ui/static/js/codemirror-rhai.js— Rhai syntax highlighting modecrates/hero_runner_ui/static/js/codemirror-python.js— Python syntax highlighting mode (new)crates/hero_runner_ui/static/js/ansi_up.min.js— ANSI-to-HTML renderercrates/hero_runner_ui/static/js/editor.js— Editor tab module (editorInit, editorRun, editorPollJob, editorSetContent, editorClearOutput)Modified files:
crates/hero_runner_ui/static/css/dashboard.css— Added.editor-container,.editor-toolbar,.editor-main-split,.editor-wrap,.editor-output-panel,.editor-log-outputCSS rulescrates/hero_runner_ui/templates/index.html— Added Editor tab button in navbar,#tab-editorpane with CodeMirror textarea + output panel, CSS/JS asset includescrates/hero_runner_ui/static/js/dashboard.js— Addededitorcase inswitchTab(),openInEditor()function, "Open in Editor" button in job detail viewBuild Results
cargo build -p hero_runner_ui— ✅ SUCCESS (no errors, no warnings)cargo check(whole workspace) — ✅ SUCCESSFeatures Delivered
job.submitRPC, streams output to side panelImplementation committed:
ea65865Browse:
lhumina_code/hero_runner_v2@ea65865