can;t see health checks in edit for actions #19
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#19
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 that all objects params can be editted
Implementation Spec for Issue #19 — Health Checks Not Editable in Actions Edit Form
Objective
The "Edit Action" panel in the dashboard does not render a Health Checks editor section. When a user opens the edit form for an action that has
health_checksdefined, those entries are silently dropped on save. The fix must add a fully functional add/edit/remove UI forhealth_checks(each with all sub-fields and an optionalhealth_check_policy) and fix a secondary bug whereretry_policy.backoffis serialized as a string enum instead of a boolean.Requirements
showActionFormfunction must render a "Health Checks" section in the edit panel, populated with the existinghealth_checksarray when editing.action,tcp_port,http_url,openrpc_socket,openrpc_http_url.health_check_policyfields:interval_ms,timeout_ms,retries,start_period_ms..kv-removepattern.saveActionfunction must collect all health check rows and include them ashealth_checksin the spec sent toaction.set.retry_policy.backoffmust be serialized as aboolean, not a string.max_delay_msandstability_period_ms.Files to Modify
crates/hero_proc_ui/static/js/dashboard.js— Only file needing changes (all bug is in JS UI layer)Implementation Plan
Step 1 — Fix
retry_policy.backoffserialization + add missing retry fieldsFiles:
crates/hero_proc_ui/static/js/dashboard.js<select>with a checkbox (boolean)max_delay_msandstability_period_msfields to the retry formsaveActionto read.checkedfor backoffDependencies: none
Step 2 — Add
addHealthCheckRow(containerId, hc)helper functionFiles:
crates/hero_proc_ui/static/js/dashboard.jsaddDepRowthat renders a health check entry card<details>for compactness).kv-removepatternDependencies: none
Step 3 — Add
collectHealthChecks(containerId)helper functionFiles:
crates/hero_proc_ui/static/js/dashboard.js.health-check-entryelements and builds the arrayhealth_check_policywhen at least one policy field is setDependencies: Step 2
Step 4 — Add Health Checks section to
showActionFormFiles:
crates/hero_proc_ui/static/js/dashboard.js<div id="af-health-checks">container and "Add health check" button in the form HTMLinnerHTML, iterate(a.health_checks || [])and calladdHealthCheckRowto pre-populateDependencies: Steps 2, 3
Step 5 — Wire
collectHealthChecksintosaveActionFiles:
crates/hero_proc_ui/static/js/dashboard.jshealth_checks: collectHealthChecks('af-health-checks')to the spec objectDependencies: Steps 3, 4
Acceptance Criteria
health_checksarray in the RPC payloadretry_policy.backoffsent as booleantrue/falseretry_policy.max_delay_msandstability_period_msfields visible and persistNotes
action.sethandler already support health checks fully.backofftype mismatch is a silent data-corruption bug — fix bundled here since it's in the same function.<details>/<summary>for health check policy keeps the form compact.hc-prefix, scoped to.health-check-entryto avoid collisions.Test Results
Failure Details
Doctest failure in
crates/hero_proc_integration_test/src/harness.rs(line 14):Root cause: The doctest example in
harness.rsuses.awaitandTestHarnesswithout the requireduseimport and without being marked as anasyncblock. Fix: add# use hero_proc_integration_test::harness::TestHarness;and wrap the example with# tokio_test::block_on(async {/# }), or annotate the example withrust,no_run.Summary
389 of 390 tests passed. All functional tests pass; the single failure is a documentation example (doctest) that is missing an
asyncwrapper and auseimport.Implementation Complete
Changes Made
All changes are in a single file:
crates/hero_proc_ui/static/js/dashboard.jsStep 1 — Fixed
retry_policy.backoffserialization bug + added missing retry fields<select>(string values) with a<input type="checkbox">— backoff is now serialized as a booleantrue/falsematching the Rust modelmax_delay_msandstability_period_msfields to the retry policy formsaveActionto read.checkedfor backoff and collect the two new fieldsStep 2 — Added
addHealthCheckRow(containerId, hc)helperaction,tcp_port,http_url,openrpc_socket,openrpc_http_url) and 4 policy fields (interval_ms,timeout_ms,retries,start_period_ms) in a collapsible<details>section×button consistent with existing.kv-removepatternStep 3 — Added
collectHealthChecks(containerId)helper.health-check-entryelements and builds thehealth_checksarrayhealth_check_policyon a row when at least one policy field is setStep 4 — Added Health Checks section to
showActionForm<div id="af-health-checks">container and "Add health check" button before the Schedule Policy section(a.health_checks || []).forEach(hc => addHealthCheckRow('af-health-checks', hc))after the form rendersStep 5 — Wired
collectHealthChecksintosaveActionhealth_checks: collectHealthChecks('af-health-checks')to the spec object alongsidedepends_onTest Results
harness.rs(unrelated to this change)No Rust changes required
The backend model, OpenRPC spec, and
action.sethandler already supported health checks fully — the bug was entirely in the JavaScript UI layer.Implementation committed:
24de8af8744433e214c80850605a5fd5844790b0Browse:
24de8af874lab build+lab infocheckdriven workflow #105