feat: wire effects/ modules into app.js via globalTicker (Refs #413)
Some checks failed
CI / validate (pull_request) Failing after 14s
CI / auto-merge (pull_request) Has been skipped

- init all 6 effects modules in app.js (matrix-rain, lightning, energy-beam, rune-ring, gravity-zones, shockwave)
- subscribe each to globalTicker; tick() called in the RAF loop
- add subscribe() named export to core/ticker.js for panels compatibility
- bridge data to core/state.js: zoneIntensity from heatmap.js, activeAgentCount + commitHashes from data/gitea.js, portals from portals.js
- update portals.js and weather.js to use new effects/rune-ring and effects/gravity-zones instead of legacy effects.js

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexander Whitestone
2026-03-24 18:17:37 -04:00
parent c0a673038b
commit aa65e39bfe
6 changed files with 37 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
// modules/data/gitea.js — All Gitea API calls
// Writes to S: _activeAgentCount, _matrixCommitHashes, agentStatus
import { S } from '../state.js';
import { state } from '../core/state.js';
const GITEA_BASE = 'http://143.198.27.163:3000/api/v1';
const GITEA_TOKEN = 'dc0517a965226b7a0c5ffdd961b1ba26521ac592';
@@ -122,6 +123,7 @@ export async function refreshCommitData() {
S._matrixCommitHashes = commits.slice(0, 20)
.map(c => (c.sha || '').slice(0, 7))
.filter(h => h.length > 0);
state.commitHashes = S._matrixCommitHashes;
return commits;
}
@@ -129,12 +131,14 @@ export async function refreshAgentData() {
try {
const data = await fetchAgentStatus();
S._activeAgentCount = data.agents.filter(a => a.status === 'working').length;
state.activeAgentCount = S._activeAgentCount;
return data;
} catch {
const fallback = { agents: AGENT_NAMES.map(n => ({
name: n.toLowerCase(), status: 'unreachable', issue: null, prs_today: 0, local: false,
})) };
S._activeAgentCount = 0;
state.activeAgentCount = 0;
return fallback;
}
}