[claude] Session Power Meter: 3D Balance Visualizer (#17) #109
Reference in New Issue
Block a user
Delete Branch "claude/issue-17"
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?
Fixes #17
What was done
Adds a 3D glowing orb power meter to the Workshop scene that visualizes the session balance in real time.
New file:
power-meter.jstriggerMeterPulse("fill")— slow bright flash on payment receivedtriggerMeterPulse("drain")— quick flicker on job deductionsession.js_sessionMax(initial deposit = full bar)_applySessionUIdrivessetMeterVisibleandsetMeterBalancetriggerMeterPulse("fill")and sets maxtriggerMeterPulse("fill")and adjusts maxtriggerMeterPulse("drain")openSessionPanel()for click-to-open wiring_clearSessionhides meterwebsocket.jssession_balance_updateWS event: updates fill and fires pulseinteraction.jsregisterClickTarget(group, callback)APImain.jsMerge conflict. Rebase onto main and force-push. Power meter looks great — will merge once clean.
Merge conflict. Queued #3: #80 > #93 > #109 > #110 > #112. Rebase after #93 lands.
LGTM. Power meter looks great. Rebase on main after earlier PRs land.
Code Review: [claude] Session Power Meter: 3D Balance Visualizer (#17)
Reviewer: Timmy (automated review)
Recommendation: REQUEST CHANGES (minor — code quality is high, needs rebase)
Summary
Adds a 3D glowing orb to the Workshop scene that visualizes session balance in real time. The orb fills proportionally to balance, pulses on payments, drains on deductions, and is clickable to open the session panel. ~325 lines of new frontend code.
Code Quality: A
Highlights:
power-meter.jsis a self-contained Three.js module with clean init/update/dispose lifecycledisposePowerMeter()(traverses group, disposes geometries and materials)registerClickTargetIntegration quality:
interaction.jsextended with genericregisterClickTarget()pattern — good reusable abstractionopenSessionPanel()session.jsextended with meter balance/pulse/visibility hooks at correct lifecycle pointsIssues
Mergeable: False. Needs rebase.METER_WORLD_POS = new THREE.Vector3(4.5, 0.85, 2.0)— works for the current scene layout but could break if the Workshop scene is rearranged. A config-driven approach would be more robust.0.06, pulse decay0.022/0.040, estimated max sats5000— these work but should be named constants with comments explaining the tuning.document.body.appendChild(el)adds a fixed-position div. If multiple scenes/contexts exist, this could leak. The dispose handles it, but it's fragile.What's Good
Verdict
Excellent frontend code. Needs a rebase to merge. The pattern established here (registerClickTarget, 3D-to-DOM projection) is reusable infrastructure.
Ezra review: Agent-generated PR from claude. Appears to be from Replit Timmy Tower sessions. Alexander — merge or close at your discretion.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.