when doing demo data it didn't populate actions? #7
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_proc#7
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?
Implementation Spec for Issue #7
Objective
Fix demo data not populating the Actions tab in the UI. After running "populate demo environment", the Actions table remains empty even though actions are successfully created in the database.
Root Cause
The
action.listRPC method returns{ "specs": [...] }(as defined in the OpenRPC spec and implemented in the server). However,dashboard.jsline 441 looks forresult.actionswhich is alwaysundefined, causing it to fall back to an empty array[].Server (
crates/hero_proc_server/src/rpc/action.rsline 49):JavaScript (
crates/hero_proc_ui/static/js/dashboard.jsline 441):Requirements
loadActions()correctly reads the list returned byaction.listFiles to Modify
crates/hero_proc_ui/static/js/dashboard.js— one-line fix on line 441Implementation Plan
Step 1: Fix field name in loadActions()
Files:
crates/hero_proc_ui/static/js/dashboard.jsresult.actionstoresult.specson line 441Dependencies: none
Acceptance Criteria
Notes
populate_demo_environment()inhero_proc_sdk/src/demo.rsTest Results
Status: PASS
All tests passed across the workspace (excluding
hero_proc_examples).Compilation Issue
The
hero_proc_examplescrate failed to compile due to a breaking change:The
basic_usage.rsexample referencesactions.valuebut the field was renamed toactions.specs. Tests were run with--exclude hero_proc_examplesto work around this.Run date: 2026-03-19
Implementation Complete
Root Cause
Field name mismatch between server and UI:
action.listreturns{ "specs": [...] }butdashboard.jswas readingresult.actions(alwaysundefined), causing the Actions tab to always show empty after demo data population.Changes Made
crates/hero_proc_ui/static/js/dashboard.js(line 441)crates/hero_proc_examples/examples/basic_usage.rs(lines 47–48)Test Results
Implementation committed:
bfc7994Browse:
bfc7994