Skip to content

sync: adopt prints per-group so multiple people get notified#5

Merged
phieb merged 2 commits into
mainfrom
claude/busy-curie-BqdGl
Jun 7, 2026
Merged

sync: adopt prints per-group so multiple people get notified#5
phieb merged 2 commits into
mainfrom
claude/busy-curie-BqdGl

Conversation

@phieb

@phieb phieb commented Jun 7, 2026

Copy link
Copy Markdown
Owner

!sync skipped any queue item already tracked by any group, so if one
person was already watching a print, anyone else running !sync would not
adopt it and got no start/finish notifications.

Scope the already-tracked check to the syncing group: items another
group tracks are now adopted too, so everyone who runs !sync hears about
a print's start and end (even if that means more than one person is
notified about the same print). Stays idempotent within a single group.

Each tracker already notifies its own group_id in _check_completions, so
multiple trackers per queue item fan out correctly.

claude added 2 commits June 7, 2026 18:32
!sync skipped any queue item already tracked by *any* group, so if one
person was already watching a print, anyone else running !sync would not
adopt it and got no start/finish notifications.

Scope the already-tracked check to the syncing group: items another
group tracks are now adopted too, so everyone who runs !sync hears about
a print's start and end (even if that means more than one person is
notified about the same print). Stays idempotent within a single group.

Each tracker already notifies its own group_id in _check_completions, so
multiple trackers per queue item fan out correctly.
Adds an explicit opt-in subscription command instead of overloading !sync:

  !abo all        subscribe to every open print in the queue
  !abo 2 3        subscribe to specific prints by their !liste position
  !abo            show usage + which prints you're currently subscribed to
  !abo stop [n]   / !deabo  unsubscribe (all, or specific positions)

Each subscription is a per-group completion tracker, so several people can
subscribe to the same print and all get its start/finish notifications —
more than one person can be notified about one print. Subscribing is
idempotent per group; unsubscribing only mutes that group, the print keeps
running.

!sync keeps its original global behavior (adopt untracked external prints
once). Refactors the queue-item name lookup and tracker creation into
shared _item_name/_open_queue/_adopt_item helpers used by !liste, !sync and
!abo. Adds de/en strings, help-text entries and tests.
@phieb phieb merged commit a38a182 into main Jun 7, 2026
1 check passed
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.

2 participants