Skip to content

Refactor/reduce complexity - #12

Merged
Fyfar merged 2 commits into
mainfrom
refactor/reduce-complexity
Oct 16, 2026
Merged

Fyfar merged 2 commits into
mainfrom
refactor/reduce-complexity

Conversation

@Fyfar

@Fyfar Fyfar commented Oct 16, 2026

Copy link
Copy Markdown
Owner

No description provided.

Fyfar added 2 commits October 16, 2026 09:51
With no visible sample (after a reload, Clear, or a preserve-log mode
change) the 'all' x-axis had no min, so Chart.js fell back to 0..1 and
every tick read as an offset from the Unix epoch ("-1790596532s"). With
exactly one sample min === max, a zero-width axis Chart.js will not widen
because both bounds are user-set.

The axis now starts at the first visible sample, or at now when there is
none, and spans at least 10 s (ALL_MIN_SPAN_MS) so the whole-second tick
labels never repeat. Like a bounded window still filling, the trace grows
rightward until the session is longer than that.

Bump to 2.1.1.
Behaviour-preserving extractions only, measured with fallow health:

- Sidebar: status label/colour from a STATUS_VIEW table (cog 16 -> 10)
- buildLsdHistogram: dominantValue() helper, Math.min/max in the window
  loop (26 -> 13)
- DataLog filtered scan: one matches(r) predicate, same order and
  short-circuiting (20 -> 10)
- readLoop: per-chunk handling in a deliver closure, errorText() shared
  with connect (31 -> 18)
- chart update effect: pure xAxisBounds() and yAxisFloor() helpers
  (39 -> 27)

Functions over the complexity thresholds 12 -> 9; project cognitive total
1034 -> 993.
@Fyfar
Fyfar merged commit edb4aed into main Oct 16, 2026
3 checks passed
@Fyfar
Fyfar deleted the refactor/reduce-complexity branch October 16, 2026 07:10
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