Skip to content

One timer per session, a reels test for today's Claude Code, and caught background errors - #142

Merged
hamzafer merged 3 commits into
mainfrom
quality/timers-and-catches
Oct 23, 2026
Merged

hamzafer merged 3 commits into
mainfrom
quality/timers-and-catches

Conversation

@hamzafer

@hamzafer hamzafer commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Quick wins from a code-quality audit.

  • reels test: on Claude Code 2.1.309 a process.spawn stub must return { value: … }, so the test failed (CI pins 2.1.288 and stayed green). The stub now returns { value: { code: 0, signal: null } }. It passes on both 2.1.288 and 2.1.309. Test only, so no reels bump.
  • Timers that stacked: glance, prayer-times and switchboard started a repeating timer on every session.start and never stopped it, so a second session.start ran two. Each now cancels the old one first, the way usage-meter does. One test per mod: two starts and one tick give one update (each failed on the old code with 2).
  • Background promises: heatmap and md-preview now .catch their background calls.
  • Bumps glance 0.1.2, prayer-times 0.1.5, switchboard 0.3.3, heatmap 0.1.2 and md-preview 0.1.8, in plugin.json, marketplace.json and the site pages.

mission-control's matching fixes wait for #133, which edits the same file.

Tests: every changed mod passes claude plugin test on 2.1.288 and 2.1.309, and validate passes. node --test test/*.test.mjs 36 pass.

@hamzafer

hamzafer commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner Author

Review outcomes:

  • Codex: no findings.
  • Sonnet: merge. It confirmed each new timer test fails without the fix, and that the reels stub change is needed on 2.1.309.
  • Corrected the description: the timer fix covers a repeated session.start, not a hot reload. A reload re-runs register with a fresh handle, so stopping the old timer there is up to the engine. This matches usage-meter and review-watch.
  • Follow-up, older than this PR: if heatmap's refresh fails, the pane keeps saying "Reading your session history…". A .finally reset would fix that.

@hamzafer
hamzafer merged commit 55a5cf9 into main Oct 23, 2026
2 checks passed
@hamzafer
hamzafer deleted the quality/timers-and-catches branch October 23, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant