Skip to content

fix(overview): show recent transactions for selected year#77

Merged
nocoo merged 1 commit into
mainfrom
agent/sde-01/95d93f7d
Jun 12, 2026
Merged

fix(overview): show recent transactions for selected year#77
nocoo merged 1 commit into
mainfrom
agent/sde-01/95d93f7d

Conversation

@nocoo

@nocoo nocoo commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

The overview page's "最近交易记录" table showed 暂无交易记录,请导入数据 even when the stat cards and trend chart above were rendering non-zero data for the same year. Root cause: src/app/overview-client.tsx re-filtered the server-fetched recent transactions to only those within the last 30 days of today's wall-clock date — so any non-current year (or a current year with no activity in the last 30 days) was wiped out client-side.

The server already returns the 10 most recent transactions for selectedYear, sorted date DESC, created_at DESC. Drop the client-side date filter and render what the server returns. Regression came from commit 3d26006 feat(overview): show last month's transactions instead of top 10.

Linked issue: STU-523 — 财务概览页面不加载交易数据问题.

Test plan

  • bun run lint
  • bun run typecheck
  • bun run test — 945 / 945 passed
  • Manual: visit / for a year with prior-year-only data and confirm the table renders recent transactions instead of the empty-state message.

The overview table re-filtered server-fetched recent transactions to only
those within the last 30 days of today's wall-clock date. When the user
viewed a non-current year — or when the current year had no transactions
in the last 30 days — the table showed "暂无交易记录,请导入数据" even
though the stat cards and chart above rendered non-zero data for the
same year.

The server already returns the 10 most recent transactions for the
selected year, sorted by date desc. Drop the client-side date filter
and just render what the server returns.
@nocoo nocoo force-pushed the agent/sde-01/95d93f7d branch from 42638df to 0940a59 Compare June 12, 2026 22:52
@nocoo nocoo merged commit 6d74966 into main Jun 12, 2026
4 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