From 550776ed795f1da392ea39a7de5850630f02b16f Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 16 Nov 2026 08:44:16 -0700 Subject: The balance breakdown folds away under the total. "let's hide the breakdown by default but give some way to expand to see it" (Adam, 2026-11-16). On the one balance card, the Ark / On-chain split and the Gifts line now sit behind a small "Breakdown ▾" under the total (only when there is a breakdown to show); "Hide breakdown ▴" folds it again, and the choice is remembered per device. Lines about money on its way (Pending, Moving) still always show. The desktop side panel follows the same choice. signup-quick-test (folded by default, opens to the Gifts line, remembered), unified-balance and features-smoke pass. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VMan6SwkivduFDDkMmnXjZ --- tools/signup-quick-test.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tools') diff --git a/tools/signup-quick-test.js b/tools/signup-quick-test.js index 3e38c5f..5005d6a 100644 --- a/tools/signup-quick-test.js +++ b/tools/signup-quick-test.js @@ -108,6 +108,27 @@ try { await page.reload({ waitUntil: 'domcontentloaded' }); await page.waitForSelector('.balance-face', { timeout: 20000 }); await sleep(1500); await giveBalance(); check('...and never again, not after a reload', !(await page.$('.ways-back-prompt'))); + // the breakdown (Ark / On-chain / Gifts) folds away under the total; a + // gift line stands in for it here (the ark feature made to report one) + { + const protoH = await page.evaluateHandle(() => Object.prototype); + const all = await page.queryObjects(protoH); + await page.evaluate((objs) => { + const f = objs.find((o) => { try { return o && o.id === 'ark' && typeof o.balanceLines === 'function'; } catch { return false; } }); + f.balanceLines = () => [{ label: 'Gifts', sat: 700, side: 'savings', part: true }]; + document.querySelector('.tabs button')?.click(); document.querySelector('.tabs button')?.click(); + }, all); + await all.dispose(); await protoH.dispose(); await sleep(600); + const face = () => page.evaluate(() => ({ t: document.querySelector('.balance-one')?.innerText || '', btn: document.querySelector('.balance-one .breakdown-toggle')?.textContent || '' })); + let f = await face(); + check('breakdown folded by default, with a way to open it', !/GIFTS/i.test(f.t.replace(f.btn, '')) && /breakdown/i.test(f.btn), JSON.stringify(f)); + await page.click('.balance-one .breakdown-toggle'); await sleep(400); + f = await face(); + check('opened, it shows the Gifts line', /Gifts/i.test(f.t.replace(f.btn, '')) && /hide/i.test(f.btn), JSON.stringify(f)); + if (process.env.SHOT3) await page.screenshot({ path: process.env.SHOT3 }); + check('remembered on this device', await page.evaluate(() => localStorage.getItem('btc-wallet-balance-breakdown') === '1')); + await page.evaluate(() => localStorage.removeItem('btc-wallet-balance-breakdown')); + } for (let i = 0; i < 60 && !(await page.$('#recv-amount')); i++) await sleep(250); check('Receive has an Amount button', !!(await page.$('#recv-amount'))); check('no History heading on an empty wallet', !/\bHISTORY\b/.test(await page.evaluate(() => document.body.innerText))); -- cgit v1.2.3