Repository navigation
release 1.41.5: event-display track grouping + counting fixes - #2937
Merged
Merged
Conversation
Two regressions from the initial track-grouping change, both reported live:
1. Per-track bars counted DISTINCT USERS, not completions. computePathBuckets
deduped by (user, track), so 5 completions by one attendee read as 1.
→ count every TUTORIAL completion in a track (no user dedup).
2. The hero "total activity" counter summed bucket counts. Once buckets became
track-scoped, the hero collapsed from all window completions (~62) to only
track-member completions (3) — and double-counted tutorials shared across
tracks. → computePathBuckets now returns { buckets, totalCompletions };
totalCompletions = ALL window TUTORIAL completions, track-independent.
Frontend (event-stream.ts): totalCount is seeded from totalCompletions on fetch
(falls back to bucket sum for older servers) and bumped by a new per-completion
`completionTick` socket event — NOT by summing buckets. Track bars still driven
by `tutorialCompleted` (one per track). A completion outside every track ticks
the hero but adds no bar; a multi-track tutorial ticks the hero once (one tick
per active event) while lighting each of its track bars.
Backend socket emit (developer-service.js) now fires `completionTick` once per
active event for every completion, plus `tutorialCompleted` per matching track.
New `completionTick` event declared on both EventStreamService + DisplayService.
Checkpoints DEFERRED: probe of event 10000002 shows 0 window checkpoint
completions and all 7 checkpoint path items carry null taskLegacyId (no join
key) — counting them would be inert. The two prize-only Joule tracks reading 0
is dead-slot path data (11 null-legacyId tutorial items in the mission), a
content issue tracked separately, not a display bug.
Verified against PROD event 10000002: totalCompletions=62, ABAP=3 (was 2 under
user-dedup), Joule Studio=1.
…skLegacyId buildTrackMap matched completions to tracks using only CompletionPathItems. taskLegacyId. But manually-authored event content (#1866) populates the item's tutorial_ID FK (UUID) and leaves taskLegacyId NULL — the normal shape for the TechEd/DSAG event missions, not a data defect. Those FK-only items fell through entirely, so whole tracks with real tutorials AND real completions ("Joule Studio with N8N", "Keynote Demo", "Agent Extension", "Command Line", "Frontend") counted 0. Resolve FK-first, mirroring path-item-task-resolver.buildTaskMap: - direct TUTORIAL items: prefer tutorial_ID → Tutorials.legacyId, else taskLegacyId - GROUP children (GroupPathItems): resolve tutorial_ID → legacyId too - CHECKPOINT/PETOBERFEST unchanged (no FK column) All collected tutorial_ID UUIDs resolved to legacyId in one batch, then the map is keyed by legacyId (what TaskRecords.taskLegacyId carries). Verified against PROD event 10000002: previously-zero tracks now count — "Joule Studio with N8N"=1, "Joule Studio Keynote Demo"=1 (the two tracks the reporter completed), alongside "Joule Studio"=1, "ABAP"=3; totalCompletions=66. New unit test: Track Gamma fed by an FK-only path item (tutorial_ID set, taskLegacyId NULL) + a completion carrying the resolved legacyId → counts 1.
…kets fix(display): count completions per track + decouple hero total
chore(release): bump MTA version to 1.41.5
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.
Summary
DEV → main promotion for release 1.41.5 (blue-green PROD deploy to follow).
Net change over main is exactly these commits (verified: no divergent main work):
CompletionPathtracks (not the per-attendee histogram)totalCompletionstutorial_ID, Not possible to navigate back up from tutorial to mission #1866) so FK-only event tracks ("Joule Studio with N8N", "Keynote Demo", …) count their real completions.deploy/mta.yamlversion bump1.41.4 → 1.41.5PROD-probed on event 10000002: the two previously-zero Joule tracks now count,
ABAP=3,totalCompletions=66. 42 unit tests pass.Test plan
tutorials-ims_1.41.5.mtar; verify track-named bars with completion counts + correct hero total on the green idle app before swap, then on the live route after swap