fix: round calibration deltas for display - #67
Conversation
There was a problem hiding this comment.
The rounding itself is correct — it even fixes a −0 case that balance-card.tsx still gets wrong. Four things before merge:
-
The test doesn't pin the rounding.
toHaveTextContentis a substring match, so−0.5714285714285714satisfies"−0.57". With the rounding stripped out and the titles left in, the suite still passes 3/3. Anchor lines 19–20 (/^Mean delta −0\.57$/) and add one value that rounds up, e.g.-0.999→−1. -
titleon a<p>has no touch or keyboard trigger and is read aloud in full by screen readers. A visible<span className="mono-meta">gets you the same thing, copyable. -
The sign rule diverges from
balance-card.tsx, which issue #65 named as the model — yours decides from the rounded string, it decides fromvalue. Yours is better; just call it out as deliberate. -
d6ded91is missing its trailer. Please amend withCo-Authored-By: GPT-6 Astra <noreply@openai.com>(space, not hyphen).
Also: comment /claim on issue #65 — the assignee is what reserves your credit for this, and nothing is assigned yet.
|
Closing as stale and unmaintained, plus once #55 lands, your PR would be autoclosed under the rules. |
Summary
Calibration deltas such as -4/7 currently display all floating-point digits. Show at most two decimal places using the same en-US number-formatting convention as the balance card, with the original value available in the title attribute.
Related Issues and Pull Requests
Fixes #65
Changes
Testing
Using the requested Node 24.17.0 and pnpm 10.33.0: both calibration test files pass (12 tests); pnpm typecheck passes; ESLint passes on both changed files. git diff --check passes.
Footer
Generated by GPT-6 (implementation, testing, review)