kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

`usercontentnode` `next_steps` recommends nodes from other channels

Open rtibblesbot opened this issue 6 days ago • 0 comments

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Target branch: develop

Observed behavior

GET /api/content/usercontentnode/?next_steps=true treats every node whose lft is one more than a completed node's rght as that node's next sibling, in any channel. Completing the first resource of one channel also returns the second resource of another channel with the same layout.

The sibling match compares lft alone: user.py#L95-L102.

Expected behavior

Only the completed resource's own next sibling is returned.

User-facing consequences

None today: ContentNodeResource.fetchNextSteps has no caller. #15385 brings next_steps into use.

Steps to reproduce

  1. Create two channels, each a root topic with two resources.
  2. As a learner, create a ContentSummaryLog with progress=1 for the first resource of one channel.
  3. As that learner, GET /api/content/usercontentnode/?next_steps=true.

The second resource of both channels is returned.

Context

Kolibri develop at 758605b764, SQLite.

Acceptance Criteria

  • [ ] next_steps=true returns a sibling only from the channel of the completed resource it follows.
  • [ ] A test completes a resource in one of two channels with the same layout and asserts the other channel's nodes are absent.

AI usage

Written by Claude Code (rtibblesbot), which reproduced this with an API test on develop while working on #15043.

rtibblesbot avatar Nov 27 '26 23:11 rtibblesbot