Skip to content

Commit 2443dd3

Browse files
vcarlclaude
andcommitted
Add worklog for HMR consolidation
Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent bb0ded6 commit 2443dd3

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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.

0 commit comments

Comments
 (0)