File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ # HMR State Consolidation
2+
3+ ## Context
4+ Continuing from 2026-01-17_1_hmr-listener-registry.md - HMR globals were scattered across 3 files making the pattern hard to follow.
5+
6+ ## Changes
7+
8+ Renamed ` listenerRegistry.ts ` → ` hmrRegistry.ts ` and consolidated all HMR state:
9+
10+ ### Before (3 files)
11+ - ` client.server.ts ` : ` __discordClientReady ` , ` __discordScheduledTasks `
12+ - ` gateway.ts ` : ` __discordLoginStarted `
13+ - ` listenerRegistry.ts ` : ` __discordListenerRegistry `
14+
15+ ### After (1 file: hmrRegistry.ts)
16+ All globals + their accessor functions:
17+ - ` isLoginStarted() ` / ` markLoginStarted() `
18+ - ` isClientReady() ` / ` setClientReady() `
19+ - ` registerScheduledTask() ` / ` clearScheduledTasks() `
20+ - ` registerListener() ` / ` removeAllListeners() ` / ` getListenerCount() `
21+
22+ ## client.server.ts
23+ Now only contains:
24+ - Client instantiation (intents, partials)
25+ - Reacord wrapper
26+ - ` login() ` function
27+
28+ ## Files Updated
29+ - 8 files updated to import from ` hmrRegistry ` instead of ` listenerRegistry `
30+ - ` escalationResolver.ts ` now imports ` registerScheduledTask ` from ` hmrRegistry `
31+ - ` gateway.ts ` now uses ` isLoginStarted() ` /` markLoginStarted() ` helpers
32+
33+ ## Log Tags
34+ Changed "ListenerRegistry" → "HMR" for consistency.
You can’t perform that action at this time.
0 commit comments