Skip to content

[codex] Filter transactions by chart bucket#175

Merged
tobomobo merged 2 commits into
mainfrom
codex/transactions-chart-bucket-filter
May 28, 2026
Merged

[codex] Filter transactions by chart bucket#175
tobomobo merged 2 commits into
mainfrom
codex/transactions-chart-bucket-filter

Conversation

@tobomobo
Copy link
Copy Markdown
Contributor

What changed

  • Added transparent click targets across each active transaction chart bucket so clicking a month/week slice filters the table to that whole bucket.
  • Kept existing bar-segment clicks intact for segment-specific filters such as Incoming or Swaps.
  • Extended the chart selection model to support an all-flows bucket filter and added regression coverage for its label and matching behavior.

Why

The chart previously only filtered when users clicked an actual bar segment. Sparse months with tiny or no visible bars were hard to target, even though the visible chart bucket suggested the whole slice should be interactive.

Validation

  • pnpm --dir ui-tauri run typecheck
  • pnpm --dir ui-tauri exec eslint src/components/transactions/dashboard/TransactionWorkbench.tsx src/components/transactions/dashboard/model.ts src/components/transactions/dashboard/model.test.ts
  • pnpm --dir ui-tauri exec vitest run src/components/transactions/dashboard/model.test.ts src/components/transactions/model.test.ts
  • Browser smoke on /transactions?period=1year: slice click produced Chart: Mar 26 · All flows · All; bar click still produced Chart: Apr 26 · Incoming · All
  • ./scripts/quality-gate.sh

@tobomobo tobomobo marked this pull request as ready for review May 25, 2026 18:43
@tobomobo
Copy link
Copy Markdown
Contributor Author

@codex

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0c97b26c8c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if (bucket.key !== selection.bucketKey) return false;
}

if (selection.segment === null) return true;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Respect chart mode for bucket-wide selections

When a bucket is selected via the new segment: null path, matchesFlowChartSelection returns true immediately after date matching, so flow filtering is skipped entirely. In external chart mode this means clicking a bucket can include transfer/swap rows that were not part of the visible chart slice, even though the selection carries mode: "external" and the chip label implies that context. This creates a misleading filter result for users who clicked the external-only view.

Useful? React with 👍 / 👎.

@tobomobo tobomobo merged commit 70d628e into main May 28, 2026
3 checks passed
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