chore(nostr-feed): delete dead-code ReactionService + useReactions duplicates #80
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!80
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/dedup-reaction-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
The reaction capability is not affected — only an unused duplicate file pair is removed. The live
ReactionService(registered in DI, used by forum + nostr-feed components) stays atsrc/modules/base/nostr/ReactionService.ts.Two files deleted:
src/modules/nostr-feed/services/ReactionService.ts(585 lines) — defined a class with the same name as the base one, but never registered in DI. The class was a strict subset of the base copy (missingtoggleLikeEvent/toggleDislikeEvent) — leftover from before the implementation was promoted tobase/.src/modules/nostr-feed/composables/useReactions.ts(102 lines) — identical tosrc/modules/base/composables/useReactions.tsexcept for the type-import path and a one-word doc-comment delta. Had zero callers; the one consumer (NostrFeed.vue:15) already imports from@/modules/base/composables/useReactions.Diff verification (no unique behavior lost)
I diffed both files against their base counterparts before deletion. The nostr-feed copies' divergences:
toggleLikeEvent/toggleDislikeEventexist only in the base copyNo port-forward needed; the base copy is strictly more capable.
NostrFeed.vue:99already usestoggleLike(the composable wrapper that callstoggleLikeEventon the base service) and has been doing so since before this PR.Why now
Blocker for the phase-2 bucket-B migration per
aiolabs/lnbits#9signer-abstraction adoption. EachfinalizeEvent(eventTemplate, prvkeyBytes)call site in the webapp needs to migrate offcurrentUser.value.prvkey. Touching both copies ofReactionServicewould waste effort and risks one branch silently keeping a prvkey-read path alive.Capability post-merge
Reactions continue to work exactly as today. Forum reactions and nostr-feed reactions both route through the same live
base/nostr/ReactionService.tsvia DI injection ofSERVICE_TOKENS.REACTION_SERVICE. When the nostr-feed module gets reprioritized in the future, any new component just importsuseReactionsfrom@/modules/base/composables/useReactions(same path the existingNostrFeed.vueuses).Test plan
vue-tsc --noEmitclean post-deletion (no broken imports)aio-demoafterdevdeploy: like / unlike / dislike / undislike a forum submission (the live consumer ofREACTION_SERVICE); confirm reactions still publish to relays and count backRefs
aiolabs/lnbits#9(signer abstraction / bunker integration)~/dev/coordination/log.mdentries2026-05-28T19:45Z(lnbits flagged the duplicate) and2026-05-28T22:00Z(audit-pass that confirmed the dead-code finding)🤖 Generated with Claude Code