Changed: tests/deploy-script-regression.sh
The deploy.sh already had all required guards (livereload guarded branch,
IPv6 URL bracketing, port/host validation). Added the missing smoke-test cases
to tests/deploy-script-regression.sh:
test_missing_port_argument_is_rejected—--portwith no following valuetest_port_flag_as_value_is_rejected—--port --drafts(flag as value)test_missing_host_argument_is_rejected—--hostwith no following valuetest_nonnumeric_port_is_rejected—--port abc
Test result: deploy-script regression tests passed (9 scenarios, all pass)
Changed: scripts/validate-content-rules.sh
- Updated
require_fileerror message to the specified format:"file not found: <path>". - Fixed check ordering in
validate_history_order: year-context presence is now asserted before the month-name validity check, so a heading that appears before any## YYYYheading always gets the "appears before any year heading" diagnostic rather than being swallowed by an "invalid month name" error. - Improved all three history-parsing error messages to include the full offending heading text and surrounding context.
Test result: ✓ Content ordering and research tag rules passed.
Changed: assets/css/command-palette.css, assets/css/teaching.css,
assets/js/command-palette.js
- command-palette.css: Replaced the non-standard
:has(.command-palette-section-title:contains("Search Results"))selector with the class.command-palette-section--search-results. - command-palette.js:
renderSectionsnow sets thecommand-palette-section--search-resultsclass on the section element when the section name is"Search Results". - teaching.css: Replaced four
:contains("Course Schedule")rules with:.course-schedule-heading(for the precedingh2), and- explicit
.schedule-container h3 / h4 / ulrules (the.schedule-containerwrapper already existed in templates).
- teaching.css: Corrected two wrong CSS custom-property fallback values:
var(--color-heading-h2, #ff6b6b)→var(--color-heading-h2, #0156b3)(#ff6b6bwas a red fallback for a blue token)var(--color-heading-h3, #000)→var(--color-heading-h3, #333)(matches the light-mode definition instyles.css)
Changed: .github/workflows/teaching-content-checks.yml, CLAUDE.md
- Added
assets/images/teaching/README.mdto thepathstriggers for bothpull_requestandpushevents so changes to that file fire the workflow. - Extended both
markdownlint-cli2andprettier --checkinvocations to includeassets/images/teaching/README.mdalongside_teaching/**/*.md. - Documented the equivalent local one-liner in the Essential Commands
section of
CLAUDE.md.
Changed: assets/js/command-palette.js,
tests/command-palette-stale-search.test.js (new)
- Added a
_searchTokenmonotonic counter at module scope. Each call torenderCommandResultscaptures the current token value. The asyncSearchManager.searchForCommandPalettecallback checkstoken !== _searchTokenbefore updating the DOM; if a newer search has been issued it returns without rendering, eliminating stale-result overwrites. - Exposed
window._getSearchToken()for test introspection. - Added
tests/command-palette-stale-search.test.jswith three behaviour- focused regression scenarios:- Stale first result is discarded when a second search is still in-flight.
- Single in-flight search resolves and renders normally.
- Stale result resolves after the current result — DOM is unchanged.
| Suite | Result |
|---|---|
jest (all 9 suites, 51 tests) |
PASS |
tests/deploy-script-regression.sh (9 scenarios) |
PASS |
scripts/validate-content-rules.sh |
PASS |