Skip to content

feat: add content suggestions#243

Merged
felipemontoya merged 4 commits into
openedx:mainfrom
eduNEXT:hpg/content-suggestions
Jul 8, 2026
Merged

feat: add content suggestions#243
felipemontoya merged 4 commits into
openedx:mainfrom
eduNEXT:hpg/content-suggestions

Conversation

@Henrrypg

@Henrrypg Henrrypg commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add ContentSuggestionsOrchestrator: reviews a course's full outline via OpenEdXProcessor and asks an LLM to propose per-unit content improvement suggestions (wording/structure/pedagogy/accessibility), each carrying full section/subsection/unit ancestry and an optional proposed_change (display_name/content_html/summary diff).
  • Add CrossSlotSessionOrchestrator (new ScopedSessionOrchestratorchestrator.py): lets one session be shared across every UI slot (AIWorkflowScope) pointing at the same profile/course, so an author sees the same in-progress suggestions whether they open the tool from the course outline sidebar or a unit-level widget. Left ScopedSessionOrchestrator/FlashCardsOrchestrator untouched since flashcards intentionally keep separate sessions per widget.
  • Suggestions are always generated and stored course-wide, then filtered per request by location_id: no location (or a location outside the course tree, e.g. the course outline) returns everything; a specific section/subsection/unit returns only its own suggestions — including correctly returning an empty list for a real unit with zero suggestions (previously fell back to showing everything).
  • clear_session keeps the session row and its extra_instructions guidelines alive, clearing only the generated suggestions/known_location_ids, so re-opening the tool prefills the last-used guidelines instead of starting blank.
  • Suggestions are returned course-ordered (course_suggestions) to support cross-unit "next/previous" navigation on the frontend.

The frontend for this new workflow isn't ready yet but we have a draft version here.

How it should look like:

Screencast.from.03-07-26.11.55.09.webm

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Jul 3, 2026
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @Henrrypg!

This repository is currently maintained by @felipemontoya.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.42%. Comparing base (4c8a373) to head (d14cc27).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #243      +/-   ##
==========================================
+ Coverage   95.36%   95.42%   +0.05%     
==========================================
  Files          69       71       +2     
  Lines        8088     8516     +428     
  Branches      430      451      +21     
==========================================
+ Hits         7713     8126     +413     
- Misses        281      292      +11     
- Partials       94       98       +4     
Flag Coverage Δ
unittests 95.42% <ø> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Henrrypg Henrrypg requested a review from felipemontoya July 3, 2026 21:12
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Ready for Review in Contributions Jul 6, 2026

@felipemontoya felipemontoya left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the corrections. Now this is properly working.

While the UI at eduNEXT#7 is moderatly usable I would suggest we keep it as a PR in WIP mode.
Image

We still need to create the ability to apply the fixes and a whole set of UI tools for it.

@felipemontoya felipemontoya merged commit 384b9f2 into openedx:main Jul 8, 2026
14 of 15 checks passed
@github-project-automation github-project-automation Bot moved this from Ready for Review to Done in Contributions Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants