fix: correctness quick-wins (batch A) — prod WASM opt, error surfacin…#67
Draft
diegokingston wants to merge 1 commit into
Draft
fix: correctness quick-wins (batch A) — prod WASM opt, error surfacin…#67diegokingston wants to merge 1 commit into
diegokingston wants to merge 1 commit into
Conversation
…g, a11y, type/report bugs
Six independent fixes, all present on current main:
- deploy-gh-pages.yml: drop --no-opt so the PRODUCTION WASM solver runs wasm-opt
(binaryen) — the shipped binary was unoptimized (~15-40% slower/larger). CI
keeps --no-opt for build speed.
- Toolbar.svelte (2D + 3D): solveCombinations{,3D} returning a string error
(e.g. a load case is a mechanism) was silently dropped while the success toast
fired anyway. Now surface the error.
- WhatIfPanel.svelte: four catch {/*ignore*/} blocks + silent string-error
returns hid every singular/instability during what-if exploration, leaving
stale results with no feedback. Capture and show it inline (a toast per 60ms
re-solve tick would spam); clear on close.
- App.svelte: toast container had no live-region semantics. Each toast now
announces to screen readers — errors assertive (role=alert), rest polite
(role=status), aria-atomic.
- auto-verify.ts / verification-service.ts: AutoVerifyModelData declared its
section/material maps too narrowly (no a/iz/iy/j/e), so the steel path read
material.e / section.a etc. as TS2339 (runtime was fine — callers pass full
objects). Widen the type to the optional fields actually read, add a presence
guard in the steel path (narrows the types + skips malformed input), and drop
three `as any` casts (fu/tw/tf).
- calc-report.ts: the element table read e.hingeStart/hingeEnd (removed in the
typed-Release migration) → the hinge column was always "—". Use
releaseI/releaseJ.mz.
Verified: vite build passes; auto-verify + calc-report suites green; the #2
TS2339s are resolved with no new errors. (Pre-existing, left as-is: harmless
d.uy/d.rz legacy-field fallbacks in the calc-report 2D table, and some unused
imports.)
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.
…g, a11y, type/report bugs
Six independent fixes, all present on current main:
as anycasts (fu/tw/tf).Verified: vite build passes; auto-verify + calc-report suites green; the #2 TS2339s are resolved with no new errors. (Pre-existing, left as-is: harmless d.uy/d.rz legacy-field fallbacks in the calc-report 2D table, and some unused imports.)