Why
Multiple PRs repeatedly surfaced duplicate script includes and dependency-order regressions across layouts.
Evidence
Scope
- Audit
_layouts/*.html for duplicated script tags.
- Ensure dependency order:
utils.js and search-manager.js load before scripts that consume them.
- Remove redundant includes in affected layouts (
teaching, teaching-course, team, research, history as needed).
- Add a small CI guard script/check to catch duplicate includes and order violations.
Acceptance Criteria
- No layout has duplicate includes for
main.js or command-palette.js.
- Pages depending on
window.Utils and window.SearchManager always load those first.
- CI fails when duplicate includes or invalid ordering is introduced.
Why
Multiple PRs repeatedly surfaced duplicate script includes and dependency-order regressions across layouts.
Evidence
main.js,command-palette.js) and missingutils.js/search-manager.jsin some layouts.command-palette.jsinclude noted in teaching layout.Scope
_layouts/*.htmlfor duplicated script tags.utils.jsandsearch-manager.jsload before scripts that consume them.teaching,teaching-course,team,research,historyas needed).Acceptance Criteria
main.jsorcommand-palette.js.window.Utilsandwindow.SearchManageralways load those first.