Skip to content

fix: don't render "null" under the total with a single currency - #5

Merged
lestolo merged 1 commit into
mainfrom
claude/brave-ride-ephvtr
Oct 4, 2026
Merged

lestolo merged 1 commit into
mainfrom
claude/brave-ride-ephvtr

Conversation

@lestolo

@lestolo lestolo commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Description

When every subscription uses the same currency, the spending summary showed the text "null" under the total. The bug was reported from a real device.

The note under the total only appears when there are several currencies ("Totali per valuta") or when exchange rates are set ("Totale approssimato…"). Otherwise it is null. renderSummary() in js/app.js passed that value to the native Element.replaceChildren(), which turns null into the text "null" instead of skipping it. Earlier tests always included a USD subscription, so the note was never null and the single-currency case went unnoticed.

The summary is now built with ui.append(), the same null-skipping helper that h() uses, after clearing the container. No other replaceChildren() call in the codebase receives an optional child.

It also bumps ST.VERSION to 1.0.2 so installed apps refresh the offline cache, and updates the CHANGELOG.

Type of change

  • Bug fix
  • New feature
  • Catalogue / translations
  • Documentation
  • Refactoring / tooling

Checklist

  • npm test passes
  • Tested on a phone-sized viewport (iPhone 14 emulation, dark mode, two EUR-only subscriptions as in the report):
    • before the fix, the summary text contained null;
    • after the fix, it doesn't;
    • with a USD subscription added, the "Totali per valuta" note and the yearly view still render correctly, with no console errors.
  • New UI strings are translated in every language in js/core/i18n.js (none added)
  • ST.VERSION bumped if cached assets changed (sw.js → ASSETS)
  • No secrets, API keys or personal data added
  • No new runtime dependencies or third-party requests

🤖 Generated with Claude Code

https://claude.ai/code/session_0127iNTyhnYEypEm4cd97XPA


Generated by Claude Code

renderSummary() passed the optional note straight to the native
replaceChildren(), which stringifies null instead of skipping it, so
single-currency users saw "null" under the total. Build the summary
with ui.append(), which skips null children like h() does.

Bumps the version to 1.0.2 so installed apps refresh the offline cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0127iNTyhnYEypEm4cd97XPA
@vercel

vercel Bot commented Oct 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sub-track Ready Ready Preview Oct 4, 2026 3:22pm UTC

Request Review

@lestolo
lestolo merged commit 7a9e597 into main Oct 4, 2026
3 checks passed
@lestolo
lestolo deleted the claude/brave-ride-ephvtr branch October 4, 2026 15:23

This branch was successfully deployed

1 active deployment
Preview — 3a2a512b Deployed Oct 4, 2026 by vercel[bot]
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