Redesign the report, and print money in each currency's own decimals - #3
Merged
Merged
Conversation
KRW and JPY have no minor unit, so "KRW 38,524,590.16" printed cents the won does not have. jeval/currency.py formats amounts from the ISO 4217 minor-unit table: none for KRW and JPY, three for BHD, KWD and the rest of the three-decimal currencies, two otherwise. An average smaller than one minor unit keeps two significant figures instead of rounding to zero, a free-form unit such as "credits" is printed as written, and halves round away from zero, which is what a browser's toFixed does, so a table and the live readout under it agree on every tie. Compact figures carry three significant figures and move up a suffix rather than reading "1000k". The module is presentation only: it never converts between currencies and never guesses one from a locale. `--currency krw` is normalised to KRW. Signed-off-by: rlaope <[email protected]>
Cases run automatically when confidence >= threshold (jeval/costs.py), but the verdict labelled the threshold in use "auto below it". Signed-off-by: rlaope <[email protected]>
The report reads as a technical document: a masthead with provenance as a definition list, a numbered section index, a serif for headings over a sans for reading, tabular lining figures instead of monospace digits, a warm paper palette and a separately chosen dark one. No web font is loaded; each stack names the best face a reader is likely to have. Colour carries two meanings only: blue for the recommended threshold and vermilion for the line in use, a pair validated for colour-vision deficiency. Data is drawn in greys. - The verdict draws both lines on one 0-1 ruler with the recommendation's 95% interval, and a phone gets its own narrow drawing. - The reliability chart has ECE with its interval, MCE, Brier, n and the widest gap beside it. - The cost curve names both lines in a lane above the plot and places point labels where the curve leaves room, checked against segments rather than vertices. - Charts render at their drawn size instead of stretching labels with the column. - Tables align text left and numbers right, wrap long reasons, and mark each change with a direction and, backed by a title, whether it helps. - The slider formats money through the same rules as jeval.currency, and a node-run test compares the two on the same inputs. - The phone layout is scoped to screen so it cannot leak into print, and the dark palette remaps ink polygons too. Signed-off-by: rlaope <[email protected]>
…nguage Same palette, type and currency formatting as the report; the committed artifacts are rebuilt from the scripts, and examples/report-example.html is regenerated with the documented command. Signed-off-by: rlaope <[email protected]>
Theme-aware screenshots, a section on how money is written, the quoted KRW figures without the minor unit the won does not have, the shared design language in examples/README.md, and jeval/currency.py in the CLAUDE.md architecture map. Signed-off-by: rlaope <[email protected]>
rlaope
force-pushed
the
design/report-v3
branch
from
September 25, 2026 11:18
1fac003 to
340a320
Compare
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.
Summary
jeval/currency.pyformats money in each currency's ISO 4217 decimals.KRW 38,524,590.16becomesKRW 38,524,590. The report slider follows the same rules, and a node-run parity test checks that the JS and Python output match.Test plan
uv run pytest(all pass, none skipped; includes the new currency, parity, wiring and regression tests)uv run ruff format --check .,uv run ruff check .,uv run mypy jeval