Skip to content

fix(runs): guard pvalue.match against null/empty bindings#646

Merged
mosoriob merged 1 commit intomasterfrom
quick-260501-spinner-null-match
May 3, 2026
Merged

fix(runs): guard pvalue.match against null/empty bindings#646
mosoriob merged 1 commit intomasterfrom
quick-260501-spinner-null-match

Conversation

@mosoriob
Copy link
Copy Markdown
Contributor

@mosoriob mosoriob commented May 2, 2026

Summary

  • Empty-string parameter bindings (`parameter_value: ""`) fell through the truthy ternary in `params.map` to a null default, causing `pvalue.match(/^__region_geojson/)` to throw mid-render.
  • LitElement kept the previous frame in the DOM (the `loading=true` spinner), so users saw an indefinite circular spinner on the Runs page even though `loading=false` had already dispatched.
  • Fix: use `param.id in ensemble.bindings` membership instead of a truthy ternary, guard `.match` with `typeof pvalue === 'string'`, and coalesce null/undefined to `''` in the rendered cell.

Reproducer: a model whose `modelcatalog_parameter` has no default, with an empty-string binding from the user. Captured in `.wolf/buglog.json` as bug-067 (related: bug-063, bug-011).

Test plan

  • Reload `/runs` for a thread with WAITING executions and empty-string parameter bindings — table renders, spinner clears.
  • Confirm region-geojson sentinel still shows as "Region Geojson".
  • No new TS diagnostics on `mint-runs.ts` lines we touched.

Empty-string parameter bindings fell through to null defaults,
making pvalue.match throw inside params.map. Render error left
the loading-frame spinner stuck. Use 'in' check + typeof guard.
@mosoriob mosoriob merged commit 044823a into master May 3, 2026
5 of 6 checks passed
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.

1 participant