Skip to content

bitwindow: show no old balance after a failed read - #3052

Merged
octobocto merged 4 commits into
masterfrom
qa/w2-balance-errors
Nov 28, 2026
Merged

octobocto merged 4 commits into
masterfrom
qa/w2-balance-errors

Conversation

@octobocto

Copy link
Copy Markdown
Collaborator

The wallet overview showed old or wrong numbers when a read failed. The balance stream now sends the error, and the bar and fee tile show the real state.

Bugs:

  • The bottom bar kept the last balance as current while Bitcoin Core was down, with no error (caused by baeeff1, the stream waits with no frame). Repro: open Wallet > Overview, run bitcoin-cli stop, look at the bar.
  • A failed balance poll told no listener, so the history showed its error only after the next idle poll, up to 60 s later (caused by 56b438f).
  • The fees tile counted every transaction: "0 BTC across 101 transactions" for a wallet with only incoming coins (caused by e56bab0). Repro: open Wallet > Overview on a wallet that got coins and sent none.

Figma: figma://file/Uvj2xZiMJsOt3nDaSxDGLQ?node-id=1747-16428

figma

Before After
before after
before after
before after

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T20:22:02.720797Z c3a3930 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@octobocto
octobocto force-pushed the qa/w2-balance-errors branch 2 times, most recently from 64042ad to 4d96c7b Compare November 28, 2026 19:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4d96c7b624

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +231 to +235
amount: formatter.formatSats(balanceSats),
sats: '${formatWithThousandSpacers(balanceSats)} sats',
),
stats: [
SailStat(label: 'Unconfirmed', value: walletAmountText(btcToSatoshi(balance.pendingBalance))),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Hide the overview balance when its latest read fails

After a successful balance read, stopping Bitcoin Core leaves the new desktop overview strip displaying the cached confirmed and unconfirmed balances as current. BalanceProvider retains those numbers when recording a failure in error, but this widget never checks that error and formats both balances unconditionally. The statsError handling only masks the other statistics, so the overview still shows stale amounts even while the bottom bar correctly displays -. Gate both balance values on the balance provider's read-error state.

Useful? React with 👍 / 👎.

@octobocto
octobocto force-pushed the qa/w2-balance-errors branch 2 times, most recently from b22c976 to 08715ca Compare November 28, 2026 20:17
The tile said "across 101 transactions" for a wallet with only
incoming coins. It now counts the transactions with a fee.
The balance stream stayed open with no frame while Core was down, so
the app showed the last balance as current. The stream now sends one
frame with the error, then waits for Core.
A failed balance read kept the last numbers in the bottom bar, and a
failed poll told no listener. The bar now shows "-" with the error in
its tooltip until the next good read.
@octobocto
octobocto force-pushed the qa/w2-balance-errors branch from 08715ca to c3a3930 Compare November 28, 2026 20:20
@octobocto
octobocto merged commit 8fdb1c5 into master Nov 28, 2026
34 checks passed
@octobocto
octobocto deleted the qa/w2-balance-errors branch November 28, 2026 20:21
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