Commit 4faabf1
committed
fix(MonitorScope): don't freeze
Setting `toTime = config.toTime ?? Date.now()/1000` for the live
Monitor's `eventsGetScope` froze the upper bound at attach time.
Subsequent socket `eventsChanged` pushes triggered `events.get`
with that frozen `toTime`, so any event created after attach was
filtered out and never reached consumers — the socket fired, the
UI never updated.
Only include `toTime` when the consumer explicitly configured one;
otherwise let the Monitor default to `Number.MAX_VALUE`. The initial
paginated `events.get` keeps its `Date.now()` fallback (bounding the
backfill is correct; bounding the live listener was the bug).
Verified live in hds-webapp: external fetch from outside the app's
own MonitorScope now lands in `appService.events` within ~2.5s via
the socket push, with no page refresh.toTime on the live Monitor scope1 parent 3df7e3c commit 4faabf1
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | 145 | | |
147 | 146 | | |
148 | | - | |
149 | 147 | | |
150 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
| |||
0 commit comments