[modularization] Phase 3: Panels — Heatmap, Agent Board, Dual-Brain, LoRA, Sovereignty, Earth #412

Closed
opened 2026-03-24 17:10:19 +00:00 by perplexity · 1 comment
Member

Phase 3 of App.js Modularization (Refs #409)

What

Extract all HUD/panel systems into individual modules:

  1. modules/panels/heatmap.js — Commit heatmap + zone rendering
  2. modules/panels/agent-board.js — Agent status board (reads from state.agentStatus)
  3. modules/panels/dual-brain.js — Dual-brain panel (honest offline state)
  4. modules/panels/lora-panel.js — LoRA adapter panel (honest empty state)
  5. modules/panels/sovereignty.js — Sovereignty meter + score arc
  6. modules/panels/earth.js — Holographic earth (activity-tethered rotation)

Each Panel Module

  • Exports init(scene, state, theme) and update(elapsed, delta)
  • Creates its own canvas textures using theme values (no inline hex codes)
  • Reads data from state (no direct API calls)
  • Subscribes to ticker for animation

Acceptance Criteria

  • 6 panel modules extracted
  • Each uses theme.js for all visual constants
  • Each reads from state.js for data
  • All subscribe to ticker for updates
  • node --check app.js passes
  • No visual regressions

Depends on: Phase 2 (data/)

Refs #409

## Phase 3 of App.js Modularization (Refs #409) ### What Extract all HUD/panel systems into individual modules: 1. `modules/panels/heatmap.js` — Commit heatmap + zone rendering 2. `modules/panels/agent-board.js` — Agent status board (reads from state.agentStatus) 3. `modules/panels/dual-brain.js` — Dual-brain panel (honest offline state) 4. `modules/panels/lora-panel.js` — LoRA adapter panel (honest empty state) 5. `modules/panels/sovereignty.js` — Sovereignty meter + score arc 6. `modules/panels/earth.js` — Holographic earth (activity-tethered rotation) ### Each Panel Module - Exports `init(scene, state, theme)` and `update(elapsed, delta)` - Creates its own canvas textures using `theme` values (no inline hex codes) - Reads data from `state` (no direct API calls) - Subscribes to ticker for animation ### Acceptance Criteria - [ ] 6 panel modules extracted - [ ] Each uses theme.js for all visual constants - [ ] Each reads from state.js for data - [ ] All subscribe to ticker for updates - [ ] `node --check app.js` passes - [ ] No visual regressions ### Depends on: Phase 2 (data/) Refs #409
perplexity added the modularizationp1-important labels 2026-03-24 17:10:19 +00:00
claude was assigned by Timmy 2026-03-24 18:14:03 +00:00
Member

PR created: http://143.198.27.163:3000/Timmy_Foundation/the-nexus/pulls/466

All 6 panel modules are now wired up:

  • core/theme.js exports NEXUS with the full NEXUS.theme.* property set
  • core/ticker.js exports subscribe() so panels self-register in init()
  • Data modules (gitea, loaders, bitcoin, weather) now dual-write to core/state.js
  • app.js imports + inits all 6 panels and calls globalTicker.tick() in the loop

node --check app.js passes. All panel and data modules pass syntax check.

PR created: http://143.198.27.163:3000/Timmy_Foundation/the-nexus/pulls/466 All 6 panel modules are now wired up: - `core/theme.js` exports `NEXUS` with the full `NEXUS.theme.*` property set - `core/ticker.js` exports `subscribe()` so panels self-register in `init()` - Data modules (gitea, loaders, bitcoin, weather) now dual-write to `core/state.js` - `app.js` imports + inits all 6 panels and calls `globalTicker.tick()` in the loop `node --check app.js` passes. All panel and data modules pass syntax check.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-nexus#412