chore: consolidate duplicate ReactionService (base/ vs nostr-feed/) #78
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#78
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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
Two
ReactionServiceclasses exist with ~24% line-level drift:src/modules/base/nostr/ReactionService.ts(581 lines) — registered in DI viasrc/modules/base/index.ts:35,79asSERVICE_TOKENS.REACTION_SERVICE. This is the live service.src/modules/nostr-feed/services/ReactionService.ts(584 lines) — not registered in DI anywhere. The class exists in the source tree but is never instantiated. Dead code.Both expose the same API surface (
likeEvent,unlikeEvent,dislikeEvent,undislikeEvent,handleReactionEvent,handleDeletionEvent) and both containfinalizeEvent(eventTemplate, prvkeyBytes)sign-sites that need migration in the lnbits-#9 signer-abstraction phase 2. Without consolidation, the migration would have to touch both copies and risk drifting them further.src/modules/nostr-feed/index.ts:46already notes:// NOTE: ProfileService and ReactionService are now provided by the base module.Concrete proposal
src/modules/nostr-feed/services/ReactionService.ts.src/modules/nostr-feed/composables/useReactions.ts(mirrorssrc/modules/base/composables/useReactions.ts).src/modules/nostr-feed/composables/useReactions.ts:3—import type { ReactionService, EventReactions } from '../services/ReactionService'→ repoint to@/modules/base/nostr/ReactionService(or delete the composable per item 2 and update consumers).Why this matters now
This is a blocker for cleanly migrating the bucket B (user-as-self) sign-sites off
currentUser.value.prvkeyperaiolabs/lnbits#9. The migration touches everyfinalizeEventcall in the webapp; if we leave both ReactionService files in place, we'll either migrate both (waste) or migrate one and silently leave dead-code paths that still try to read prvkey (regression risk on hot-reload or accidental re-registration).Acceptance
nostr-feed/services/ReactionService.tsremoved.nostr-feed/composables/useReactions.tsremoved (or its imports repointed).npm run buildclean.Refs
~/dev/coordination/log.mdentry2026-05-28T19:45Z · lnbits → webapp,all(flagged the duplicate) and2026-05-28T19:00Z · webapp → lnbits,all(audit).aiolabs/lnbits#9(signer abstraction / bunker integration).