Skip to content

Fix break reminder showing malformed 'Next:' output#47

Merged
bearmug merged 1 commit into
mainfrom
fix/break-reminder-display
Jan 29, 2026
Merged

Fix break reminder showing malformed 'Next:' output#47
bearmug merged 1 commit into
mainfrom
fix/break-reminder-display

Conversation

@bearmug
Copy link
Copy Markdown
Contributor

@bearmug bearmug commented Jan 29, 2026

Summary

  • Fix check_focus_break() in refresh-daemon.sh to handle missing/stale calendar data gracefully
  • Check meeting is in future (> now_ms) not just non-zero to avoid past meetings
  • Omit "Next:" suffix entirely when no upcoming meeting exists
  • Fallback title to "meeting" if calendar entry has empty title

Before

☕ Break reminder ☕ 771m focus. Break? Next: in ∞m

After

☕ 771m focus. Break?

Or with a valid meeting:

☕ 771m focus. Break? Next: Standup in 45m

Test plan

  • Existing test-focus.sh passes (19/19 tests)
  • Manual test: Focus active, no calendar data → "Break?" with no "Next:"
  • Manual test: Focus active, meeting in 30m → "Break? Next: <title> in 30m"
  • Manual test: Focus active, meeting in 5m → No break reminder
  • Manual test: Focus active, past meeting in calendar → "Break?" with no "Next:"

- Check meeting is in future (> now_ms) not just non-zero
- Omit "Next:" suffix entirely when no upcoming meeting
- Fallback title to "meeting" if calendar entry has empty title
- Clean output: "☕ 771m focus. Break?" or with meeting: "☕ 771m focus. Break? Next: Standup in 45m"

Fixes issue where stale/past meetings caused "Next: nothing in ∞m"
@bearmug bearmug force-pushed the fix/break-reminder-display branch from af906e3 to f25cfe4 Compare January 29, 2026 19:33
@bearmug bearmug merged commit 49ac4fe into main Jan 29, 2026
1 check passed
@bearmug bearmug deleted the fix/break-reminder-display branch January 29, 2026 19:33
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