fix: cleanup pass — HUD crash, fresh-install tests, cross-platform dev scripts - #27
Merged
Conversation
…v scripts - Guard Run HUD against scenarios without progression phases (crashed on minimal/imported scenarios) - Stop the ECG requestAnimationFrame loop when leaving the HUD view - Add missing .badge-danger CSS class (ASPiH "Not Met" badge was unstyled) - Make test-qa.js work on fresh installs by completing the forced provisional-password rotation via the API before exercising endpoints - Replace Windows-only Chrome discovery in puppeteer scripts with cross-platform lookup (macOS/Linux/Windows) plus CHROME_PATH override; shared helpers extracted to dev-helpers.js (dockerignored) - Preflight the same password rotation in test-ui-save.js and capture-screenshots.js; drop dead native-confirm dialog handler - Allow overriding the test target port via PORT env var - Bump engines to Node >=18 (fetch usage, puppeteer-core 25, Node 16 EOL) Verified: 37/37 QA tests pass against existing data and a seeded fresh install; headless Chrome UI save test passes on macOS. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Full review-and-cleanup pass across the codebase. Fixes two runtime bugs, a missing style, and makes the test/dev scripts work on fresh installs and non-Windows machines.
Runtime fixes
Cannot read properties of undefined (reading 'map'). The HUD now defaults to an empty timeline.requestAnimationFrameloop kept redrawing the ECG strip after navigating away, burning CPU behind other views. It now halts when the user leaves the HUD (re-entry always re-renders, so nothing is lost)..badge-dangerCSS class: used by the scenario detail view for the ASPiH "Not Met" badge, but never defined — unmet standards rendered as unstyled text.Test & dev-script fixes
npm testfailed on fresh installs: seeded accounts start on a provisional password and the server blocks all other endpoints until it is rotated, so every test after login failed with 403 on a new deployment. The suite now completes the rotation via the API, ending back on the documented password.test-ui-save.jsandcapture-screenshots.jssearched onlyC:\Program Files\...for Chrome (including a hardcodedC:\Users\thompath). Discovery now covers macOS/Linux/Windows with aCHROME_PATHoverride, and both scripts run the same password-rotation preflight. Shared logic extracted todev-helpers.js(dockerignored, never shipped in the image).PORTenv var; dead native-confirmdialog handler removed from the screenshot script.Housekeeping
enginesbumped to Node >=18 (fetchusage, puppeteer-core 25 requires it, Node 16 is EOL).Test plan
node --checkclean on all JS filestest-ui-save.jsheadless Chrome UI test passes on macOS (previously could not locate Chrome)🤖 Generated with Claude Code