Skip to content

fix(app-space): expand GROUP path items + use per-path description - #2860

Merged
jung-thomas merged 1 commit into
DEVfrom
fix/app-space-group-expansion-path-desc
Oct 20, 2026
Merged

jung-thomas merged 1 commit into
DEVfrom
fix/app-space-group-expansion-path-desc

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

Problem

Two rendering bugs on the App-Space event page (e.g. /app-space/?eventId=10000015), reported against the "SAP TechEd Berlin 2026 Test" event:

  1. A track whose path item is a GROUP renders "0 tutorials". The "Joule Studio (web)" track contains a single GROUP path item (its tutorials live in the group), but the card shows 0 tutorials.
  2. Every track shows the same description — the mission's "Ready to get your hands dirty?…" text — instead of each Completion Path's own description.

Root cause

Both live in getAppSpaceProgress (and its twin getEventProgress) in srv/developer-service.js:

  1. The handler emitted one output item per CompletionPathItems row, passing type: i.taskType through verbatim. A GROUP row became a single type:'GROUP' card, which the frontend island (AppSpace.vue, counts type === 'TUTORIAL') filters out → 0 tutorials. The group's child tutorials live in GroupPathItems and were never read. (build-catalog.js already expands nested groups — this ports that behavior.)
  2. description: mission.description was hard-coded for every path, ignoring the CompletionPaths.description column that was already fetched.

Fix

  • GROUP expansion: new expandGroupTutorials() in srv/lib/path-item-task-resolver.js batch-reads GroupPathItems (ordered by itemOrder) → child tutorials; buildPathItems() flattens each GROUP into one TUTORIAL output item per child. Child TaskRecord lookups are batched via groupChildLegacyIds() so progress/status still render. No frontend change needed — children arrive as TUTORIAL items.
  • Per-path description: description: p.description || mission.description || ''.
  • Shared paths-building extracted so both twin handlers stay in sync.

Tests

  • New regression tests in test/app-space-fk-resolution.test.js: (a) GROUP path item expands into its ordered child tutorials with no leftover GROUP card; (b) each path shows its own description, distinct from the mission text. Both verified to fail against the old code and pass with the fix.
  • npm test CAP backend suite green (developer-service 25/25, app-space 4/4). Pre-existing fresh-worktree artifact failures (*.bundle.mjs, @mediapipe/tasks-vision) are unrelated to this change.

🤖 Generated with Claude Code

getAppSpaceProgress / getEventProgress emitted one output item per
CompletionPathItems row and hard-coded each path's description to the
mission's. Two visible bugs on the App-Space event page:

1. A path whose item is a GROUP rendered "0 tutorials" — the GROUP row
   was emitted verbatim as type:'GROUP', which the frontend island
   (filters type==='TUTORIAL') dropped. Now expand GROUP items into their
   child tutorials via GroupPathItems (mirrors build-catalog.js), batching
   the child TaskRecord lookups so progress still renders.

2. Every path card showed the same mission description. Now use the
   path's own CompletionPaths.description (fallback to mission).

Shared paths-building extracted to buildPathItems/expandGroupTutorials/
groupChildLegacyIds in path-item-task-resolver.js so both twin handlers
stay in sync. Adds regression tests (GROUP expansion + per-path
description) to test/app-space-fk-resolution.test.js.
@jung-thomas
jung-thomas merged commit b4218df into DEV Oct 20, 2026
5 checks passed
@jung-thomas
jung-thomas deleted the fix/app-space-group-expansion-path-desc branch October 20, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant