Skip to content

feat(ui): filter the hand export by period, room and buy-in - #82

Merged
florentvdry merged 3 commits into
mainfrom
feat/export-filters
Nov 7, 2026
Merged

florentvdry merged 3 commits into
mainfrom
feat/export-filters

Conversation

@florentvdry

Copy link
Copy Markdown
Owner

What changed

  • Settings > Database: the export button opens a dialog to filter by period (whole history, last 12 months, last 30 days, custom), room and buy-in.
  • Files can be grouped per day (previous behavior, default), per month or in a single file.
  • A live summary shows hands, files and approximate size before exporting.
  • New route GET /db/export-summary returns hands grouped by room, buy-in and day, so the dialog sizes any filter without fetching hands.
  • export_data takes a filter; dates are validated in the shell. A filter left on "everything" restricts nothing, so hands without a known room or buy-in are kept.

Why

With years of history, "export everything" was too heavy to be useful.

How it was tested

  • cargo test -p spintracker-core --test api_routes (incl. new export summary test) and the 6 new export::tests in src-tauri
  • npm run frontend:test (new exportFilter.test.ts) and npm run frontend:build
  • cargo check -p spintracker clean
  • Not verified: the dialog rendered in the Tauri app, and the full cargo test -p spintracker-core suite.

🤖 Generated with Claude Code

florentvdry and others added 3 commits November 7, 2026 22:45
Hands with no seated player have no flag row to store, so they stayed
pending and the statistics update ran again on every launch.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Playback stopped before the flop because the step counter excluded deals
while the index counted every action, and blinds were skipped when stepping
forward. Chips put in are now read from the pot change, the current action is
the last one played, and the slider, jump-to-end and log share one counter.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The export used to dump every stored hand, which is unwieldy with years of
history. A dialog now narrows it by period, room and buy-in, shows the
resulting hands, files and size, and can group files per day, month or in one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@florentvdry
florentvdry merged commit 5176dd2 into main Nov 7, 2026
2 checks passed
@florentvdry
florentvdry deleted the feat/export-filters branch November 7, 2026 22:07
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