Skip to content

fix(course-page): fix page reload after selecting language on the course page#3799

Draft
VasylMarchuk wants to merge 1 commit intomainfrom
course-reload-debug-new
Draft

fix(course-page): fix page reload after selecting language on the course page#3799
VasylMarchuk wants to merge 1 commit intomainfrom
course-reload-debug-new

Conversation

@VasylMarchuk
Copy link
Copy Markdown
Contributor

Closes #3658

Brief

TBD

Checklist

  • I've thoroughly self-reviewed my changes
  • I've added tests for my changes, unless they affect admin-only areas (or are otherwise not worth testing)
  • I've verified any visual changes using Percy (add a commit with [percy] in the message to trigger)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 22, 2026

Test Results

  1 files  ±0    1 suites  ±0   6m 39s ⏱️ ±0s
707 tests ±0  641 ✅  - 3  63 💤 ±0  0 ❌ ±0  3 🔥 +3 
722 runs  ±0  653 ✅  - 6  63 💤 ±0  3 ❌ +3  3 🔥 +3 

For more details on these errors, see this check.

Results for commit 855b490. ± Comparison against base commit 31c101d.

♻️ This comment has been updated with latest results.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 22, 2026

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
644 3 641 63
View the top 3 failed test(s) by shortest run time
Chrome 143.0::Acceptance | course-page | start-course: can start course
Stack Traces | 0.48s run time
Promise rejected during "can start course": ✔ [1] ............/api/v1/repositories
✔ [2] ............/api/v1/repositories
✗ [3] Expected: .../api/v1/courses | Actual: <none>
   [4] Expected: ............/api/v1/repositories | Actual: <none>
   [5] Expected: ............/api/v1/leaderboard-rank-calculations | Actual: <none>
   [6] Expected: ............/api/v1/repositories | Actual: <none>
   [7] Expected: ............/api/v1/leaderboard-rank-calculations | Actual: <none>
   [8] Expected: ............/api/v1/leaderboard-entries | Actual: <none>
   [9] Expected: ............/api/v1/leaderboard-entries | Actual: <none>
Chrome 143.0::Acceptance | course-page | try-other-language: can try other language
Stack Traces | 0.737s run time
Promise rejected during "can try other language": ✔ [1] ............/api/v1/repositories
✔ [2] ............/api/v1/repositories
✗ [3] Expected: .../api/v1/courses | Actual: <none>
   [4] Expected: ............/api/v1/repositories | Actual: <none>
   [5] Expected: ............/api/v1/leaderboard-rank-calculations | Actual: <none>
   [6] Expected: ............/api/v1/repositories | Actual: <none>
   [7] Expected: ............/api/v1/leaderboard-rank-calculations | Actual: <none>
   [8] Expected: ............/api/v1/leaderboard-entries | Actual: <none>
   [9] Expected: ............/api/v1/leaderboard-entries | Actual: <none>
Chrome 143.0::Acceptance | course-page | leaderboard-progress: can complete first stage
Stack Traces | 0.999s run time
Promise rejected during "can complete first stage": Element not found.

PageObject: 'page.testsPassedModal'
  Selector: '[data-test-tests-passed-modal] [data-test-action-button-title]:contains("Mark stage as complete"):last'

PageObject: 'page.testsPassedModal.clickOnActionButton("Mark stage as complete")'
  Selector: '[data-test-tests-passed-modal] [data-test-action-button-title]'

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 22, 2026

Bundle Report

Changes will increase total bundle size by 2.79kB (0.01%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
client-array-push 39.36MB 2.79kB (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/chunk.*.js 2.79kB 392.05kB 0.72%

Files in assets/chunk.*.js:

  • ./controllers/course.ts → Total Size: 15.05kB

  • ./controllers/course/introduction.ts → Total Size: 1.69kB

  • ./routes/course.ts → Total Size: 6.77kB

  • ./routes/course/stage.ts → Total Size: 2.3kB

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 22, 2026

Bundle Report

Changes will increase total bundle size by 490 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
client-array-push 39.47MB 490 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/chunk.*.js 490 bytes 389.05kB 0.13%

Files in assets/chunk.*.js:

  • ./routes/course.ts → Total Size: 6.98kB

  • ./controllers/course/introduction.ts → Total Size: 1.88kB

  • ./controllers/course.ts → Total Size: 11.95kB

- Added `onLanguageSelected` action to `CreateRepositoryCard` for better handling of language selection.
- Updated `IntroductionController` to manage repository and model refresh logic based on language selection.
- Introduced `shouldSkipNextModelRefresh` flag in `CourseController` to optimize model loading.
- Adjusted template to bind the new action for language selection.

This improves the user experience by ensuring the correct repository is set without unnecessary model refreshes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After choosing a language we should auto-scroll to the next question

1 participant