Skip to content

fix(csv): keep the fidelity header, signed numbers and safe settings - #19

Merged
daggerok merged 1 commit into
masterfrom
fix/parser-and-filters
Oct 13, 2026
Merged

daggerok merged 1 commit into
masterfrom
fix/parser-and-filters

Conversation

@daggerok

Copy link
Copy Markdown
Owner

What changed

Fixes from a bug review of the viewer:

  • Fidelity exports: the header row was dropped (data rows end with a comma, so the header has one field less) and an empty Col 40 appeared; now the header is kept and the empty trailing column dropped
  • Parser: a bare " inside an unquoted value swallowed the rest of the file; two-column files lost their rows when a wider preamble line existed; CR-only line endings; an over-wide row no longer loses its last field
  • Types: signed percent and money (+1.33%, +$89.08) were text, so they sorted alphabetically and >0 found nothing; $-2.49 was positive
  • Filters: >1,000 was split into >1 OR =0; >$100 and 5% now work numerically; a lone ! hid every row; a filter on a column index the file does not have hid every row of that file
  • Settings from localStorage or an imported JSON are validated field by field (null maps crashed the page at boot)
  • Reset no longer wipes the remembered data; a skipped save (too large, quota) clears the old copy and alerts instead of silently restoring stale data; clearing a renamed column restores the header name
  • Export All CSV Files spaces out the downloads and revokes URLs later; importing more files keeps the open file selected

Checks run

  • bun run build: ok
  • Functions extracted from src/main.tsx run with bun on a real Fidelity export and small inputs: 14 passed, 0 failed
  • Headless Chrome on the built site (damaged settings boot, Fidelity import shows the header, no Col 40, no disclaimer rows, data survives Reset + reload): 5 passed, 0 failed; console errors: none

- table extraction keeps a header one field shorter than the data rows
  (trailing comma), two-column files, CR line endings, over-wide rows, and
  drops a trailing column that is empty everywhere; a bare quote inside a
  value is text
- +1.33%, +$89.08 and $-2.49 are numbers
- numeric filters read 1,000, $ and %; a lone ! no longer hides every row;
  a filter on a column the file does not have is ignored
- settings from storage or an imported file are checked field by field
- Reset re-saves the remembered data; a failed save clears the stale copy
  and says so; an emptied column name goes back to the header
- export all spaces out the downloads; import keeps the open file
@daggerok
daggerok merged commit 6aca00b into master Oct 13, 2026
3 checks passed
@daggerok
daggerok deleted the fix/parser-and-filters branch October 13, 2026 07:00

This branch was successfully deployed

2 active deployments
ci — 145a9b3e Deployed Oct 13, 2026 by daggerok via npm-check-updates #59
github-pages — 145a9b3e Deployed Oct 13, 2026 by daggerok via deploy #55
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