chore(nostr-feed): delete legacy ScheduledEventService duplicate #81
No reviewers
Labels
No labels
app:activities
app:chat
app:events
app:forum
app:libra
app:market
app:restaurant
app:tasks
app:wallet
app:webapp
bug
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aiolabs/webapp!81
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/dedup-scheduled-event-service"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
ScheduledEventService(innostr-feed/) was a legacy duplicate ofTaskService(intasks/). Both classes published the same kind 31925 (RSVP/status) and kind 5 (deletion) events — neither published the kind-31922 calendar event itself. The DI tokenSCHEDULED_EVENT_SERVICEwas already marked@deprecated, andFeedServicealready routed runtime events toTASK_SERVICE. Only the publish-side (and theNostrFeed.vueconsumer) hadn't been repointed yet.This finishes the consolidation.
Changes
src/modules/nostr-feed/services/ScheduledEventService.ts(1067 lines) — duplicate ofTaskServicesrc/modules/nostr-feed/composables/useScheduledEvents.ts— duplicate ofuseTasksSCHEDULED_EVENT_SERVICEtoken fromsrc/core/di-container.ts(was@deprecatedalready)NostrFeed.vuetouseTasks({ autoSubscribe: false })from@/modules/tasks/composables/useTasks. TheautoSubscribe: falsepreserves current lifecycle behavior —FeedServicealready owns the consolidated relay subscription for kinds 31922 / 31925 / 5; the composable'sonMountedauto-subscribe would create a redundant subscription. The exported method surface (getEventsForSpecificDate,getCompletion,getTaskStatus,claimTask,startTask,completeEvent,unclaimTask,deleteTask,allCompletions) is identical between the two composables.FeedService.scheduledEventServicefield →taskServicefor honesty. The alias was already pointing atTASK_SERVICE; this just makes the field name match.tryInjectServicelegacy-fallback shim on the task-service inject. Thenostr-feedmodule routing depends on the tasks module being loaded; if it isn't, we want a hard failure at init, not silently-dropped events. Strict-from-the-start per~/dev/CLAUDE.mdpre-public-launch policy.if (this.taskService)/if (this.reactionService)null-guards inFeedService's route methods. After the inject strictness change, those fields are guaranteed non-null at use time; the warn-on-null else branches were unreachable.Why now
Same blocker reasoning as
#78(the sibling ReactionService dedup that just merged): the phase-2 bucket-B migration peraiolabs/lnbits#9touches everyfinalizeEvent(eventTemplate, prvkeyBytes)site in the webapp. Touching both copies ofTaskService-like code would waste effort and risks one branch silently keeping a prvkey-read path alive.Test plan
vue-tsc --noEmitclean post-deletionaio-demoafterdevdeploy: open NostrFeed, confirm scheduled-event cards render for the selected date, claim/start/complete/unclaim a task, delete an event published by self, watch for any console warnings from the dropped null-guard branchesNote for reviewers
One pre-existing line at
NostrFeed.vue:410(toast.error("User private key not available")) triggers the global pre-commit secret-scanner — pure false positive on a user-facing error string. Added inline// pragma: allowlist secretmarker. That whole block is going away in phase-1 PR #5 (whenUser.prvkeyis removed from theUserinterface and every bucket-B site fails TS compile, triggering phase-2 migration). The marker is short-lived.Refs
aiolabs/lnbits#9(signer abstraction / bunker integration)~/dev/coordination/log.mdentries2026-05-28T22:00Z(legacy-duplicate finding),2026-05-28T22:30Z(lnbits authorized opening the chore),2026-05-29T00:30Z(consolidated decisions)~/dev/coordination/webapp-design-questions.md🤖 Generated with Claude Code