Skip to content

Calendar: subscribe the mail handler as an events queue - #138

Merged
jelveh merged 1 commit into
HeyPuter:mainfrom
Salazareo:calendar/events-queue
Oct 28, 2026
Merged

jelveh merged 1 commit into
HeyPuter:mainfrom
Salazareo:calendar/events-queue

Conversation

@Salazareo

Copy link
Copy Markdown
Member

Pairs with HeyPuter/puter#4395 and should roll out with it. Old code keeps working against the new server, but this avoids the worker delay and the removed fields.

  • Mail subscription uses queue: true instead of delivery: 'single', targets: ['worker']. The page never registers an in-page handler, so an open tab declines each delivery and the events worker runs it right away.
  • invalid_targets no longer exists, so the mailbox checks puter.appID before subscribing and falls back to foreground scanning without one.
  • Under the new queue rules a thrown error drops the event unless it's temporary. The handler already rethrows only what it classifies as transient (429, 5xx, network/timeout); those are now thrown with retry: true so the classification stays the handler's. Everything else is still swallowed and marked seen.
  • README and tests updated.

The handler source changed, so it needs npm run publish:mail-handler after merge.

Use queue: true instead of delivery/targets, check for an app identity
before subscribing now that invalid_targets is gone, and mark the
handler's temporary failures retry: true so they are still retried.
@jelveh
jelveh merged commit 40ed796 into HeyPuter:main Oct 28, 2026
3 checks 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