feat: event taxonomy, per-event notifier subscriptions, and per-topic timeline (#93)#95
Open
artyomsv wants to merge 16 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 — Event Spine
Part of #93. This is Phase 1 of 3 (event spine + history + per-event notifier
subscriptions). Phase 2 (server-side download-progress watcher) and Phase 3 (live
SSE transport) are intentionally out of scope and tracked under the same issue.
Design spec:
docs/superpowers/specs/2026-06-25-event-types-and-live-updates-design.mdPlan:
docs/superpowers/plans/2026-06-25-phase1-event-spine.mdWhat this adds
internal/eventspackage — a canonical eventTypetaxonomy and a per-typePolicy(persist / notifiable / sse).Bus.Emitis the single fan-out point, teeingeach event to up to three sinks: the
topic_eventshistory table, the notifierdispatcher, and an SSE seam (the SSE publisher is nil in Phase 1 — wired in Phase 3).
topic_eventshistory — the dormant table (migration0001) is now wired via aTopicEventsrepo (Record/ListForTopic/ListForUserSince).check.started,check.completed,check.failed,release.found,download.submitted,session.expired; the topicsHTTP handler emits
topic.addedonPOST /topics.(new releases, sent-to-client, errors) via a new
EventPickerUI. Existing['updated','error']notifier rows keep working unchanged via dispatcher legacy aliases.GET /api/v1/topics/{id}/events— ownership-checked history endpoint backing a newread-only per-topic event timeline in the UI.
Scope notes
download.completed("download finished") is a defined, notifier-subscribable event butis not emitted until Phase 2 (the progress watcher) — a subscription to it is inert
for now. The CHANGELOG reflects this.
Verification
go build ./... && go vet ./... && go test -race ./...— all packages pass.npm run typecheck && npm test && npm run build— green.ready to merge. Highest-risk invariants (session-expiry delivery across modern +
legacy notifier configs; legacy back-compat; topic-events ownership) are test-locked.
Optional follow-ups (deferred Minor, non-blocking)
session.expirednotification body guidance ("…solve the captcha in Marauder").ALL_NOTIFIABLE_EVENTScontainssession.expired.notifiers.event.updated/notifiers.event.errori18n keys.