feat: full report system with PDF export and BTC balance fix#10
Merged
BitHighlander merged 4 commits intodevelopfrom Mar 6, 2026
Merged
feat: full report system with PDF export and BTC balance fix#10BitHighlander merged 4 commits intodevelopfrom
BitHighlander merged 4 commits intodevelopfrom
Conversation
- Add report generator with 7 sections: device info, portfolio overview, chain balances, cached pubkeys, token details, BTC detailed report (tx history + address flow analysis) - Add PDF export with pie chart dashboard on first page using pdf-lib - Fix BTC balance missing from dashboard: GetPortfolio (charts/portfolio) returns empty for BTC xpubs, now falls back to GetPortfolioBalances (/portfolio) which correctly returns BTC data - Fix BTC balance missing from report pie chart: pre-fetch BTC balance from Pioneer direct API when cached balances show $0 - Add DB fallback for BTC xpubs when BtcAccountManager init fails - Add ReportDialog UI with JSON/CSV/PDF download buttons - BTC report uses /utxo/pubkey-info + /tx/history endpoints (not the broken /reports/bitcoin endpoint) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… mutation - Fix progress bar race condition: capture report ID from first progress message instead of waiting for await to resolve (ReportDialog.tsx) - Prevent CSV formula injection by prefixing dangerous chars in csvCell() - Clone balances array in generateReport to avoid caller mutation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
HIGH: - H1: Scope getReport/deleteReport to current device ID - H2: Sanitize chain in filenames, append report ID for uniqueness MEDIUM: - M1: Generate Pioneer auth key lazily per request (not stale at module load) - M2: Use Number()+Math.round() instead of parseInt for satoshi values - M3: Consolidate per-tx detail sections into single table (was 50 sections) - M4: Optimize pie chart rendering (~4x fewer draw operations) - M5: Add report pruning (max 50 per device) and LIMIT on list queries - M6: Handle JSON parse corruption gracefully instead of returning null - M7: Check reportExists before final save (prevents delete+save race) - M9: Sanitize error messages to strip auth keys and URLs - M10: Strengthen CSV formula injection (handle whitespace + newlines) LOW: - L1: Discriminated union type for ReportSection (compile-time safety) - L2: Remove unused type variants from ReportSection - L3: Wrap Bun.spawn file reveal in try/catch - L4: Move os/path to top-level imports - L5: Add LIMIT 20 to report list DB query - L6: Per-button saving state (not global disable) - L7: Remove unused useTranslation import - L8: Add delete confirmation step Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
/charts/portfolio) returns empty for BTC xpubs — added GetPortfolioBalances (/portfolio) fallback to both dashboard and report generatorFiles Changed
src/shared/types.tssrc/shared/rpc-schema.tssrc/bun/reports.tssrc/bun/index.tssrc/bun/db.tssrc/mainview/components/ReportDialog.tsxsrc/mainview/components/Dashboard.tsxTest plan
make vaultbuilds without errors🤖 Generated with Claude Code