tasks: when task-create lands in the webapp, emit ["event-type", "task"] on kind 31922 #56

Open
opened 2026-05-17 17:46:06 +00:00 by padreug · 0 comments
Owner

Context

The webapp tasks module today is read-only — it subscribes to kind 31922 calendar events and kind 31925 RSVPs, publishes its own 31925 completions and kind 5 deletions, but has no publishing path for kind 31922 itself. Tasks shown in the UI come from external publishers (in our setup, the LNbits tasks extension at git.atitlan.io/aiolabs/tasks).

When the webapp grows a "Create Task" flow (i.e. publishes its own 31922), it MUST emit ["event-type", "task"] in the tag list. The lnbits tasks extension already requires this tag on every inbound 31922 to disambiguate tasks from activities on shared relays — without it, lnbits silently drops the event from its local cache (a webapp-authored task would appear in webapp-land but not federate back to the lnbits-extension-backed view).

What needs to happen

When webapp introduces 31922 publishing for tasks (likely in src/modules/tasks/services/TaskService.ts or a new CreateTaskDialog):

  • Add ["event-type", "task"] to the tag list, alongside d, title, start, etc.
  • Symmetrically, when activities publishes 31923 (or 31922 if that ever changes), tag it ["event-type", "activity"] so the convention is two-sided rather than tasks-only — otherwise the activities filter at ActivitiesNostrService.ts:141-143 (which strips event-type: task) remains the only enforcement and we drift back into the #25 problem.

Why now

Filing this as a heads-up rather than a bug because:

  • The bug doesn't exist yet — the webapp has no 31922 publish path to fix.
  • It's easy to forget when the create-task flow eventually lands, and the failure mode is silent (events appear in the webapp but not lnbits, with no error anywhere).

Lnbits ext side reference

  • #25 disambiguate task vs activity NIP-52 events on shared relays — same root cause.
  • #55 cross-cutting teams concept — same family of "we need consistent tag conventions across modules."
  • aiolabs/tasks#1 — concrete tasks-side team scope.
## Context The webapp tasks module today is read-only — it subscribes to kind 31922 calendar events and kind 31925 RSVPs, publishes its own 31925 completions and kind 5 deletions, but has **no publishing path for kind 31922 itself**. Tasks shown in the UI come from external publishers (in our setup, the LNbits `tasks` extension at `git.atitlan.io/aiolabs/tasks`). When the webapp grows a "Create Task" flow (i.e. publishes its own 31922), it MUST emit `["event-type", "task"]` in the tag list. The lnbits tasks extension already requires this tag on every inbound 31922 to disambiguate tasks from activities on shared relays — without it, lnbits silently drops the event from its local cache (a webapp-authored task would appear in webapp-land but not federate back to the lnbits-extension-backed view). ## What needs to happen When `webapp` introduces 31922 publishing for tasks (likely in `src/modules/tasks/services/TaskService.ts` or a new `CreateTaskDialog`): - Add `["event-type", "task"]` to the tag list, alongside `d`, `title`, `start`, etc. - Symmetrically, when **activities** publishes 31923 (or 31922 if that ever changes), tag it `["event-type", "activity"]` so the convention is two-sided rather than tasks-only — otherwise the activities filter at `ActivitiesNostrService.ts:141-143` (which strips `event-type: task`) remains the only enforcement and we drift back into the #25 problem. ## Why now Filing this as a heads-up rather than a bug because: - The bug doesn't exist yet — the webapp has no 31922 publish path to fix. - It's easy to forget when the create-task flow eventually lands, and the failure mode is silent (events appear in the webapp but not lnbits, with no error anywhere). ## Lnbits ext side reference - Publisher: [tasks/nostr_publisher.py#build_task_event](https://git.atitlan.io/aiolabs/tasks/src/branch/main/nostr_publisher.py) — emits `["event-type", "task"]`. - Filter: [tasks/nostr_sync.py#_is_task_event](https://git.atitlan.io/aiolabs/tasks/src/branch/main/nostr_sync.py) — whitelist on the same tag. ## Related - #25 disambiguate task vs activity NIP-52 events on shared relays — same root cause. - #55 cross-cutting teams concept — same family of "we need consistent tag conventions across modules." - aiolabs/tasks#1 — concrete tasks-side team scope.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiolabs/webapp#56
No description provided.