Skip to content

fix: show detected column types and ignore header row in detection - #20

Merged
daggerok merged 1 commit into
masterfrom
fix/column-type-detection
Oct 13, 2026
Merged

daggerok merged 1 commit into
masterfrom
fix/column-type-detection

Conversation

@daggerok

Copy link
Copy Markdown
Owner

What changed

  • Column type badge (ABC, 123, %, $, Cap) is always visible at 70% opacity, not only on the sorted column
  • detectColumnType retries without row 0 when the first pass returns string, so the header text no longer outvotes sparse columns when "1st Row = Header" is off

Why

On a Fidelity positions CSV only the sorted column showed a type. Detection itself worked for most columns, but the badge was opacity-0 elsewhere, and SEC yield, Exp ratio, YTD and 1-10 year returns fell back to string because the header was one of two samples

How it was checked

  • Ran the detector (extracted from src/main.tsx) on two real Portfolio_Positions CSVs in both header modes: identical results, SEC yield, Exp ratio and YTD..10 year now percent, the SPAXX-only case still detected with header mode on
  • bun build src/main.tsx --outfile=/dev/null
  • git diff --check

The type badge was hidden for every column except the sorted one, so only one column looked typed. It now stays visible at reduced opacity.

With "1st Row = Header" off, the header text was counted as a sample and pushed sparse columns (one value plus -- elsewhere, e.g. SEC yield, Exp ratio, YTD, 1-10 year) under the 60% threshold. Detection now retries without row 0 when the first pass returns string.
@daggerok
daggerok merged commit 60eb00b into master Oct 13, 2026
3 checks passed
@daggerok
daggerok deleted the fix/column-type-detection branch October 13, 2026 19:04

This branch was successfully deployed

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