Add snooze feature to mute chats until a wake time#1
Open
nanorepublica wants to merge 1 commit into
Open
Conversation
Snoozing a 🔴 chat from the popup removes it from the queue and badge
until a chosen wake time (presets: 1 hour / tomorrow 9am / 3 days /
1 week, or a custom date-time). While snoozed the title becomes 💤🔴 —
still red, synced to mobile like any label — and the chat sits in a
collapsed "Snoozed" section with its wake time and a wake-now button.
The wake schedule lives in chrome.storage.local ({ uuid: wakeEpochMs },
same pattern as `seen`); the 💤 title is derived from it, so the
idempotent sweep keeps rather than reverts it. A chained one-shot
'snooze-wake' alarm fires a sweep at the earliest wake time, which
strips the stale 💤 (bypassing the `seen` shortcut for titles that
disagree with the schedule), fixes the badge, prunes expired/resolved
entries, and re-arms for the next wake. New replies never cancel a
snooze; resolving (✅) does.
Adds the repo's first unit tests (node --test extension/lib/*.test.js)
covering the snooze date math and titleTransform idempotency across the
new 💤🔴 prefix. Bumps the extension to 0.2.0.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R6p4zmfuELLCTeHnuDxxFr
✅ Deploy Preview for bliptracker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a snooze feature that lets users temporarily mute chats from the popup, removing them from the queue and badge until a specified wake time.
Summary
Users can now snooze individual chats from the popup with preset times (1 hour, tomorrow 9am, 3 days, 1 week) or a custom datetime. Snoozed chats are stored in
chrome.storage.local, decorated with a💤🔴title prefix (synced to mobile), and automatically wake via a one-shot alarm even between sweeps. A collapsed "Snoozed" section in the popup shows muted chats with their wake times.Key Changes
New snooze library (
lib/snooze.js):presetWakeTime(),isSnoozed(),partitionBySnooze(),pruneSnoozes(),formatWake()Popup UI (
popup.js,popup.html):Background worker (
background.js):setSnooze()/clearSnooze()handlers store/remove snooze timesresetWakeAlarm()creates a one-shot'snooze-wake'alarm at the earliest wake time💤prefixes (expired snoozes on quiet chats) and re-applies titleslistWaiting()self-heals expired snoozes and partitions items into waiting/snoozed listsTitle transform (
lib/titleTransform.js):💤🔴compound prefix (longest-first stripping for idempotency)titleTransform()now accepts asnoozedboolean to apply the sleep emoji when activeDocumentation:
Implementation Details
{ [uuid]: wakeEpochMs }in local storage, the source of truth for wake times💤prefix is derived display only — the sweep keeps it while active and removes it on expirynowparameter)https://claude.ai/code/session_01R6p4zmfuELLCTeHnuDxxFr