[web] header Conditions count shows 'undefined' — stale necessary_conditions remap (#26 follow-up) #28
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_planner#28
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?
Symptom
The planner web UI header (visible on every tab) renders the Conditions badge as
undefinedinstead of its count (should be 4 for themainworkspace).Root cause
The web RPC shim's
system.countshandler (crates/hero_planner_web/src/index.html:444) remaps:That comment is stale. It was written when the server's
EntityCountsfield wasconditions. After #26 renamed it tonecessary_conditions, the server no longer returns aconditionsfield — soc.conditionsisundefined, and the spread clobbers the correct value withnecessary_conditions: undefined. The header (index.html:940,counts.necessary_conditions) then renders "undefined". The badge has been broken since #26 landed.Confirmed against the live server:
Fix
Drop the dead remap — the server returns
necessary_conditionsdirectly and the header already reads it:Verification
Browser-verified after the fix: the Conditions badge shows 4 (matching
system_counts.necessary_conditions=4); 0 RPC console errors. (The remaining console 404s are the unrelated optionalhero_voice/hero_orchestratorwidgets, not running in the dev stack.)A 1-line follow-up to the already-closed #26.
Fixed on
development(squash). Dropped the stalenecessary_conditions: c.conditionsremap incrates/hero_planner_web/src/index.html:444— the server returnsnecessary_conditionsdirectly since #26, so the spread was clobbering the real value withundefined. Nowreturn c;.Browser-verified: the header Conditions badge shows 4 (matching
system_counts.necessary_conditions=4); 0 RPC console errors.