Skip to content

fix: use route-level lazy to avoid suspending on soft navigation - #233

Merged
arbrandes merged 1 commit into
openedx:masterfrom
arbrandes:arbrandes/route-level-lazy
Sep 20, 2026
Merged

arbrandes merged 1 commit into
openedx:masterfrom
arbrandes:arbrandes/route-level-lazy

Conversation

@arbrandes

Copy link
Copy Markdown
Contributor

Description

Loads the main route component with react-router's route-level lazy() instead of React.lazy, so the router awaits the chunk during navigation. With React.lazy, client-side navigation into the app (e.g. from the Instructor Dashboard's "View Studio Roles" button, made a soft navigation by openedx/frontend-app-instructor-dashboard#246) suspends synchronously with no Suspense boundary, logging "A component suspended while responding to synchronous input" and flashing the UI. Hard navigation was unaffected, which is why this never surfaced before.

LLM usage notice

Built with assistance from Claude.

Co-Authored-By: Claude <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.53%. Comparing base (1a2252a) to head (125823d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #233   +/-   ##
=======================================
  Coverage   98.53%   98.53%           
=======================================
  Files          73       73           
  Lines        1295     1297    +2     
  Branches      394      394           
=======================================
+ Hits         1276     1278    +2     
  Misses         19       19           

☔ 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.

@arbrandes
arbrandes merged commit 6737a55 into openedx:master Sep 20, 2026
6 checks passed
@arbrandes
arbrandes deleted the arbrandes/route-level-lazy branch September 20, 2026 13:53
@openedx-semantic-release-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 1.0.0-alpha.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants