feat(events): wire tag filter into Events query (VS-8) #24

Merged
David merged 2 commits from feat/event-store-vs-8 into main 2026-05-17 14:33:42 +02:00
Owner

Summary

event_log::record + event_log::list were already a real backing store (persistent docs + visibility-filtered fan-out); the ControlIn::Events handler ignored its tag argument and the doc comment on the enum variant still said the action returned an empty stub. Fixes both.

Changes

  • event_log::list grows an optional tag filter that matches either event.tag (string) or any entry in event.tags (array).
  • user_session::list_events threads the new arg through; the ControlIn::Events dispatch arm extracts the string form of the tag Value before forwarding.
  • Refreshed serde doc on ControlIn::Events.
  • Existing 7 event_log tests updated to the new signature.

Test plan

  • cargo test -p meshcentral-web --lib event_log (7/7 passing).
  • cargo check -p meshcentral-web clean.
  • Reviewer: tag an event via dispatch_event from a wasm plugin (VS-14 path) and confirm the SPA filters on it.

Closes VS-8.

## Summary `event_log::record` + `event_log::list` were already a real backing store (persistent docs + visibility-filtered fan-out); the `ControlIn::Events` handler ignored its `tag` argument and the doc comment on the enum variant still said the action returned an empty stub. Fixes both. ## Changes - `event_log::list` grows an optional `tag` filter that matches either `event.tag` (string) or any entry in `event.tags` (array). - `user_session::list_events` threads the new arg through; the `ControlIn::Events` dispatch arm extracts the string form of the `tag` Value before forwarding. - Refreshed serde doc on `ControlIn::Events`. - Existing 7 event_log tests updated to the new signature. ## Test plan - [x] `cargo test -p meshcentral-web --lib event_log` (7/7 passing). - [x] `cargo check -p meshcentral-web` clean. - [ ] Reviewer: tag an event via `dispatch_event` from a wasm plugin (VS-14 path) and confirm the SPA filters on it. Closes VS-8.
feat(events): wire tag filter into Events query + refresh stale doc (VS-8)
Some checks failed
Check / fmt + clippy + build + tests (pull_request) Failing after 43s
6f86ce9e0e
The event store (record + visibility-filtered list + per-recipient broadcast) was already wired in `crates/meshcentral-web/src/event_log.rs`; the gap was that the `Events` control action ignored its `tag` argument and the serde doc still called the handler a stub.

Adds a tag filter pass on `event_log::list`: matches either the singular `tag` field or any entry in a `tags` array. `list_events` in `user_session.rs` now threads the tag through, and `ControlIn::Events` dispatch extracts the string form of the (Value) tag field before forwarding. Existing tests updated to the new signature.

#VS-8 State Done
Merge branch 'main' into feat/event-store-vs-8
Some checks failed
Create release / Create release from merged PR (pull_request) Has been skipped
Check / fmt + clippy + build + tests (pull_request) Failing after 10s
097efa6703
David merged commit 9157dbdb4a into main 2026-05-17 14:33:42 +02:00
David deleted branch feat/event-store-vs-8 2026-05-17 14:33:42 +02:00
Sign in to join this conversation.
No reviewers
No labels
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
psa-systems/vervain-server!24
No description provided.