Skip to content

01a042cc - Golden for the collapsed all-zero portfolio chart - #953

Merged
TaprootFreak merged 9 commits into
RealUnitCH:stagingfrom
TaprootFreakAI:01a042cc-portfolio-zero-chart-bug-golden
Aug 27, 2026
Merged

01a042cc - Golden for the collapsed all-zero portfolio chart#953
TaprootFreak merged 9 commits into
RealUnitCH:stagingfrom
TaprootFreakAI:01a042cc-portfolio-zero-chart-bug-golden

Conversation

@TaprootFreakAI

@TaprootFreakAI TaprootFreakAI commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

EN:
This PR reproduces the customer chart bug as goldens, without a product fix.
MAX shows the old holdings curve, then a drop to zero. 1W, 1M, 3M and 1J show the empty plot.

DE:
Dieser PR bildet den Kunden-Chart-Bug als Goldens ab, ohne Produkt-Fix.
MAX zeigt die alte Bestandskurve, dann den Abfall auf 0. 1W, 1M, 3M und 1J zeigen die leere Fläche.

Details

Fixtures: non-zero points older than one year (MAX curve), then zeros through now (1W–1J collapse with minY == maxY == 0). Same sequence the customer reported. PNGs from the self-hosted visual-regression runner.

When every holding in the window is 0, LineChart currently draws no
curve. The snapshot records that empty chart. A temporary CI step
uploads runner-rendered goldens so the missing PNG can be committed.
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review August 27, 2026 17:06
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft August 27, 2026 17:08
Rendered on the self-hosted visual-regression runner. Reverts the
temporary artifact-upload workflow change used to capture the PNG.
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review August 27, 2026 17:09
Each period is tapped so the empty plot is snapshotted with that
tab selected. Temporary CI step uploads runner-rendered PNGs.
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft August 27, 2026 17:46
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review August 27, 2026 17:46
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft August 27, 2026 17:48
The helper returned the wrong Future shape, so the 1W/1M/3M/1J
snapshots never compiled on the visual-regression runner.
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review August 27, 2026 17:50
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft August 27, 2026 17:52
Rendered on the self-hosted visual-regression runner. Reverts the
temporary artifact-upload workflow change used to capture the PNGs.
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review August 27, 2026 17:52
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft August 27, 2026 17:53
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review August 27, 2026 17:53
Holdings older than one year draw on MAX; zeros in the recent windows
collapse LineChart so 1W/1M/3M/1J match the reported empty plot.
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft August 27, 2026 18:07
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review August 27, 2026 18:07
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft August 27, 2026 18:09
Baselines from the self-hosted visual-regression runner. Reverts the
temporary artifact-upload workflow change used to capture the PNGs.
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review August 27, 2026 18:10
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft August 27, 2026 18:10
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review August 27, 2026 18:10
A 4px splash on 1W failed Visual Regression. Pump 400ms after tap
and re-render baselines on the runner.
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft August 27, 2026 18:12
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review August 27, 2026 18:12
@TaprootFreakAI
TaprootFreakAI marked this pull request as draft August 27, 2026 18:15
MAX keeps the curve; 1W–1J stay empty. Reverts the temporary
artifact-upload workflow change used to capture the PNGs.
@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review August 27, 2026 18:15
@TaprootFreak
TaprootFreak merged commit 19ca0a1 into RealUnitCH:staging Aug 27, 2026
7 checks passed
TaprootFreak pushed a commit that referenced this pull request Aug 27, 2026
EN:
The portfolio development chart disappeared for time windows where every
holding is zero.
The cubit now keeps a Y-range from 0 so the line stays drawn, and holds
the last value before the window so the stroke spans the selected
period.
A dashboard golden records the all-zero MAX view; the customer-report
1W–1J goldens show that full-width zero line on a 0…10 axis.
Unit tests cover an all-zero series, a one-week window of zeros, and
carrying a pre-window sample to minX.

DE:
Die Bestandsentwicklung verschwand in Zeitfenstern, in denen jeder Punkt
0 ist.
Der Cubit hält jetzt eine Y-Spanne ab 0, damit die Linie gezeichnet
bleibt, und übernimmt den letzten Wert vor dem Fenster, damit der Strich
die gewählte Periode ausfüllt.
Ein Dashboard-Golden dokumentiert die Null-MAX-Ansicht; die
Kunden-Goldens 1W–1J zeigen diese volle Null-Linie auf einer Achse 0…10.
Unit-Tests decken eine Null-Serie, ein 1W-Null-Fenster und das
Nachziehen eines Werts vor minX ab.

<details>
<summary>Details</summary>

When every visible point is 0, `average * 0.05` was 0, so `minY == maxY
== 0` and `LineChart` drew no curve. The cubit now falls back to a 5.0
currency-unit floor so the chart has a Y-range. Holdings cannot go
negative: the bottom line is always clamped to 0 (scale 0…10 for an
all-zero series), not centered through negative labels.

A clipped period (1W/1M/3M/1J) previously started the stroke at the
first interior sample. If that sample sat months into the window, the
line began mid-chart. The last sample before `minX` is now held at the
window edge so the stroke spans the selected period. An empty window
(every sample older than the period) stays empty.

`dashboard_portfolio_chart_zero.png` is the all-zero MAX view. After
#953, the mixed-history 1W/1M/3M/1J goldens pin the full-width zero line
on the 0-axis.

</details>

---------

Co-authored-by: TaprootFreakAI <315477232+TaprootFreakAI@users.noreply.github.com>
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.

2 participants