Skip to content

Let a staged file be ignored - #43

Merged
ShichengRao merged 1 commit into
mainfrom
claude/dismiss-staged-files
Aug 14, 2026
Merged

ShichengRao merged 1 commit into
mainfrom
claude/dismiss-staged-files

Conversation

@ShichengRao

Copy link
Copy Markdown
Owner

Summary

Staged files can be ignored from the Import page, and un-ignored.

A fetch leaves files behind that will never be wanted: a connection since set to balance-only, a window widened once for a backfill, a balances file superseded by the next run. Nothing ever cleared them, so they sat at "ready" forever. A list where most rows are noise is a list nobody reads, which is how the rows that do matter get missed.

Type of Change

  • Importer support
  • Bug fix
  • Tests
  • Documentation
  • Frontend
  • Backend
  • Refactor / cleanup

Details

POST /api/imports/staged/dismiss takes a list of hashes and a boolean, so the same endpoint puts a file back — a dismissal that cannot be undone is one people hesitate to use, and hesitation is what leaves the list full.

Ignored files report status dismissed and drop out of "import all new", which is the sweep a dismissal most needs to stay out of. They stay on disk and in the manifest; a later fetch that rewrites the file gives it a new hash and therefore a fresh row, so ignoring today cannot silently suppress tomorrow's data.

The Import page grows an Ignore action beside Import, and Un-ignore on an already-ignored row.

One deliberate asymmetry worth flagging in review: this is the only thing the staged listing reads from the state file. Everything else about a file's status is derived from the database on purpose — that comment is right above the function — so it stays true across profiles and across a backup restore. But "I am never importing this" is a decision about the file, and there is nowhere in the database to learn it from.

Privacy Checklist

  • I used only synthetic test/sample data.
  • I did not include real account numbers, balances, merchants, names, addresses, or other personal details.
  • This change does not add or expand outbound network access.

Testing

make test (144 passed), make lint, make api-contract-check, make typecheck.

A new test walks the whole shape: two ready files, one dismissed, the listing reporting new and dismissed; then a sweep that picks up only the survivor — the assertion that actually matters, since a dismissal that still gets swept is worse than none; then un-dismissing and seeing it return to new.

Screenshots

The staged table gains an "Ignore" action per ready row; ignored rows read "ignored" with an "Un-ignore" action.

Related Issue

n/a

A fetch leaves files behind that will never be wanted: a connection since
set to balance-only, a window widened once for a backfill, a balances
file superseded by the next run. Nothing ever clears them, so they sit at
"ready" forever — and a list where most rows are noise is a list nobody
reads, which is how the rows that do matter get missed.

Staged files can now be ignored from the Import page, and un-ignored,
since a dismissal that cannot be undone is one people are reluctant to
use. Ignored files drop out of "import all new", which is the sweep a
dismissal most needs to stay out of; they stay on disk, and a later fetch
that rewrites the file gives it a new hash and a fresh row.

This is the one thing the staged listing reads from the state file. The
rest of a file's status is derived from the database on purpose, so it
stays true across profiles and restores — but "I am never importing this"
is a decision about the file, and there is nowhere in the database to
learn it from.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ShichengRao
ShichengRao merged commit 9fb6df2 into main Aug 14, 2026
6 checks passed
@ShichengRao
ShichengRao deleted the claude/dismiss-staged-files branch August 14, 2026 01:53
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