• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

HSF / phoenix / 34966602850
50%
master: 38%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 15 Sep 2026 12:06PM UTC
Jobs 1
Files 59
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Sep 2026 12:02PM UTC coverage: 48.9% (+0.1%) from 48.798%
34966602850

push

github

web-flow
fix(event-display): keep a cut's default range over clone and save/load (#1037)

A Cut captures the bounds it is constructed with as the values `reset()`
restores. Both `clone()` and `fromJSON()` rebuild a Cut through that same
constructor using its *current* bounds, so any narrowing the user has applied
silently becomes the new default.

For `fromJSON` this sits on the state-restore path: `restoreCutsFromJSON`
rebuilds every cut that way and hands the result to the menu, which is what the
"Reset cuts" button operates on. So after saving a state with pT narrowed to
40-60 and loading it back, "Reset cuts" returns to 40-60 rather than the
collection's configured 0-100, and the full range cannot be recovered without
reloading the event. Widening back out after narrowing in is the point of the
button, and since the value shown is the one the user saved, it reads as the
button being dead rather than the range having been lost.

`CutJSON` had nowhere to carry the defaults, so add an optional `defaults`
block and populate it in `toJSON`. `fromJSON` constructs from those defaults
and then applies the saved active values on top. The field is optional and
falls back to the active values, so state files written before this change
still load with exactly today's behaviour.

`clone()` gets the same treatment, building from the source's defaults rather
than its current values. It is called once per collection at load time from
pristine cuts, so it does not misbehave today, but it is the same defect.

Added tests for reset-after-clone, reset-after-round-trip, and the legacy
no-defaults fallback. The first three fail before this change. Updated the
existing exact-shape toJSON assertion for the new field; the neighbouring test
asserting no private `defaultMinValue` / `defaultMaxValue` keys leak still
holds, since the defaults are nested under their own key.

Fixes #1036

885 of 2131 branches covered (41.53%)

Branch coverage included in aggregate %.

13 of 13 new or added lines in 1 file covered. (100.0%)

3337 of 6503 relevant lines covered (51.31%)

203.87 hits per line

Jobs
ID Job ID Ran Files Coverage
1 34966602850.1 15 Sep 2026 12:06PM UTC 59
48.9
GitHub Action Run
Source Files on build 34966602850
  • Tree
  • List 59
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #34966602850
  • 9ae14307 on github
  • Prev Build on main (#34711053576)
  • Next Build on main (#34966708756)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc