Skip to content

Match student page titles to the exercise menu - #74

Merged
sonukapoor merged 1 commit into
mainfrom
fix/lesson-page-titles
Nov 30, 2026
Merged

sonukapoor merged 1 commit into
mainfrom
fix/lesson-page-titles

Conversation

@sonukapoor

@sonukapoor sonukapoor commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Linked issue

Closes #73.

Summary

The reading pane now uses the same label as the selected outline step. Exercise overview tabs take their titles from the exercise catalog, which also supplies the main heading and sidebar entry.

Verification

  • Reproduced the stage-heading mismatch in the published site and the tab-title mismatch in the previous production build.
  • Checked all seven steps in Exercises 1, 11 and 12 in Chrome. Opened Exercise 12 using the keyboard at mobile width. Checked rendered main headings and browser titles for the exercise overviews and the shared student resources.
  • Passed all 313 repository tests, the exercise validator, production build, rendered SEO and download checks. Exercise 12 selected step and heading

Checklist

  • Linked issue, reviewed CONTRIBUTING.md and included browser evidence.
  • Verified student pages and ran the existing instructor navigation checks.

Summary by CodeRabbit

  • Bug Fixes
    • Guided lesson outlines and current-step headings now consistently display the configured stage labels.
    • Lesson and resource pages now show titles that match their page headings.
  • Tests
    • Expanded browser checks for guided lesson navigation, including mobile keyboard navigation and selected-step screenshots.

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The guided lesson view now uses selected outline labels as headings. Document preparation derives titles from lesson labels when available, and build checks verify page titles and headings. Browser smoke checks exercise guided outline selection and mobile keyboard navigation.

Changes: Guided lesson and page titles

Layer / File(s) Summary
Guided step headings
website/src/components/GuidedLesson.js, website/scripts/browser-smoke.mjs, website/tests/guided-content.test.mjs
Guided lesson headings and outline entries use the outline label when present, otherwise the stage title. Browser smoke checks select outline steps and verify the selected heading, including “Observe the result” after mobile keyboard navigation. The test name now describes shared labels while retaining source titles.
Generated page titles
website/scripts/prepare.mjs, website/scripts/check-seo-build.mjs
Document preparation uses a lesson label for a generated title when available, otherwise it uses the first Markdown heading or file path. SEO build checks compare rendered page titles and headings with expected lesson or resource titles.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Possibly related issues

  • sonukapoor/cve-lite-classroom#71 — The changes align the reading-pane heading with the selected outline label, but do not change the cross-exercise label wording or ordering described in the issue.

Possibly related PRs

Suggested reviewers: vianmangal

Merge Risk: Minimal · up to 74397 · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "Match student page titles to the exercise menu" matches the main change. The reading pane now uses the selected outline step label, and exercise overview tabs (browser titles) now use the e…
Description check Passed The description follows the template. It links issue #73 with Closes, gives a summary of the reading pane and tab title changes, and lists verification steps: browser checks of Exercises 1, 11 and 12,…
Linked Issues check Passed Issue #73 has two coding requirements. (1) Guided pages use the selected stage label as the visible heading. The GuidedLesson.js change selects stageHeading, or the stage title when no outlineLabel ex…
Out of Scope Changes check Passed All changed files relate to issue #73. GuidedLesson.js implements the stage-heading requirement. prepare.mjs, check-seo-build.mjs, and browser-smoke.mjs cover the catalog-based titles and the browser …
Full details: Title check

Explanation

The title "Match student page titles to the exercise menu" matches the main change. The reading pane now uses the selected outline step label, and exercise overview tabs (browser titles) now use the exercise catalog title, matching the menu and main heading. The title is specific and short, and it names the primary aspect of the change. It does not cover the outline heading change in GuidedLesson, but that is expected.

Full details: Description check

Explanation

The description follows the template. It links issue #73 with Closes, gives a summary of the reading pane and tab title changes, and lists verification steps: browser checks of Exercises 1, 11 and 12, keyboard navigation at mobile width, test and build results, and a screenshot link. The checklist is present but reduced. It omits several template items, such as the CONTRIBUTING and accessibility checks in full form and the catalog consistency check, and it does not explain the instructor materials review. These are minor gaps, so the description is mostly complete.

Resolution

Optional: state whether instructor materials and exported kits were reviewed, and list the accessibility and catalog consistency checks explicitly. The screenshot is an external link to a commit file that the PR does not embed, so consider adding it inline.

Full details: Linked Issues check

Explanation

Issue #73 has two coding requirements. (1) Guided pages use the selected stage label as the visible heading. The GuidedLesson.js change selects stageHeading, or the stage title when no outlineLabel exists, and uses that value for the current-step heading, the outline entries, and the section-title comparison. For Exercise 12, this makes "Observe the result" match its heading. (2) The overview browser tab uses the exercise catalog title. The check-seo-build.mjs change asserts that each exercise page's <title> equals the catalog lesson title plus " | CVE Lite Classroom", and that its <h1> equals that title. prepare.mjs also derives generated document titles from lesson labels. The PR reports rendered title and heading checks for overviews and shared student resources. The issue's browser testing requirement is covered by the browser-smoke.mjs changes, which check outline labels, click each step, verify the heading, and assert the "Observe the result" heading at mobile width. This assessment relies on the whole-PR summary and the PR's reported checks. I did not inspect the source diff directly, so the exact catalog-title wiring is based on the summary.

Full details: Out of Scope Changes check

Explanation

All changed files relate to issue #73. GuidedLesson.js implements the stage-heading requirement. prepare.mjs, check-seo-build.mjs, and browser-smoke.mjs cover the catalog-based titles and the browser checks for exercises 01, 11, and 12 and the shared student resources. The guided-content.test.mjs change is a one-line test name clarification that supports the stage-label change. The excluded assets/scan-report-practice/step-heading.png is screenshot evidence and is not a code change. No unrelated behavior change appears in the summary.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 707ae91 and 7439736.

Files ignored due to path filters: 1

  • assets/scan-report-practice/step-heading.png is excluded by !**/*.png
Files selected for processing: 5

  • website/scripts/browser-smoke.mjs
  • website/scripts/check-seo-build.mjs
  • website/scripts/prepare.mjs
  • website/src/components/GuidedLesson.js
  • website/tests/guided-content.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@sonukapoor
sonukapoor merged commit 80ebae0 into main Nov 30, 2026
7 checks passed
@sonukapoor
sonukapoor deleted the fix/lesson-page-titles branch November 30, 2026 21:02
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.

Match guided page titles to the student navigation

1 participant