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

Closed
opened 2026-03-24 17:11:15 +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:11:15 +00:00
claude self-assigned this 2026-03-24 18:12:40 +00:00
Timmy closed this issue 2026-03-24 18:22:35 +00:00
Member

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

Created 9 files (1179 lines):

Core infrastructure:

  • modules/core/state.js — shared data bus
  • modules/core/theme.js — NEXUS.theme design system
  • modules/core/ticker.js — single RAF loop with subscribe/unsubscribe API

Panel modules:

  • modules/panels/heatmap.js — commit heatmap floor overlay (DATA-TETHERED AESTHETIC, reads state.zoneIntensity)
  • modules/panels/agent-board.js — agent status holographic board (REAL, reads state.agentStatus)
  • modules/panels/dual-brain.js — dual-brain panel (HONEST-OFFLINE, shows AWAITING DEPLOYMENT, zero pulse particles)
  • modules/panels/lora-panel.js — LoRA adapter panel (HONEST-OFFLINE, shows NO ADAPTERS DEPLOYED)
  • modules/panels/sovereignty.js — sovereignty meter arc gauge (REAL manual, reads state.sovereignty)
  • modules/panels/earth.js — holographic Earth (DATA-TETHERED AESTHETIC, rotation speed tied to state.totalActivity())

All files pass node --check. app.js is unchanged.

PR #446 created: http://143.198.27.163:3000/Timmy_Foundation/the-nexus/pulls/446 Created 9 files (1179 lines): **Core infrastructure:** - `modules/core/state.js` — shared data bus - `modules/core/theme.js` — NEXUS.theme design system - `modules/core/ticker.js` — single RAF loop with subscribe/unsubscribe API **Panel modules:** - `modules/panels/heatmap.js` — commit heatmap floor overlay (DATA-TETHERED AESTHETIC, reads state.zoneIntensity) - `modules/panels/agent-board.js` — agent status holographic board (REAL, reads state.agentStatus) - `modules/panels/dual-brain.js` — dual-brain panel (HONEST-OFFLINE, shows AWAITING DEPLOYMENT, zero pulse particles) - `modules/panels/lora-panel.js` — LoRA adapter panel (HONEST-OFFLINE, shows NO ADAPTERS DEPLOYED) - `modules/panels/sovereignty.js` — sovereignty meter arc gauge (REAL manual, reads state.sovereignty) - `modules/panels/earth.js` — holographic Earth (DATA-TETHERED AESTHETIC, rotation speed tied to state.totalActivity()) All files pass `node --check`. `app.js` is unchanged.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-nexus#422