Align timers to shared KaiTimeSource context#67
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const next = snapshot(source); | ||
| setValue(next); | ||
|
|
||
| const delay = Math.max(8, Math.min(PULSE_MS, next.msToNextPulse)); | ||
| timeout = window.setTimeout(schedule, delay); |
There was a problem hiding this comment.
Keep msToNextPulse countdown updating continuously
KaiTimeProvider only refreshes its context on a timeout scheduled for next.msToNextPulse, so msToNextPulse stays frozen for the entire 5.2s pulse and then jumps back to ~5236ms at the boundary instead of counting down. Hooks like useKaiTicker now expose a static value, so UIs that render the next-pulse countdown (e.g., SigilPage’s nextPulseSeconds) no longer tick down and appear stuck for most of each pulse. The provider needs to emit more frequent updates (short interval/RAF) rather than once per pulse to preserve the live countdown.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task