fix(ui): real server-side pagination for transactions (rant 2026-08-24T10:51:57) - #135
Merged
Conversation
…4T10:51:57) Fake pagination bug: loadTransactions hardcoded page=1&page_size=100 and the pager used the loaded data.length (=100) as the total, so with 7320 real records only the first 100 were ever visible. - loadTransactions now sends txTable.page / txTable.pageSize and records loadedPage/loadedPageSize after each fetch - renderTransactions refetches the requested page when local page/pageSize differs from the loaded one (page buttons, sort, filters, page-size all flow through this guard) - buildDataTable gains optional serverPaging.total: pager shows the backend total and page count from it; rows are the already-paginated page (no local slice); other tables unaffected - compact pager with ellipsis window (1 … p-1 p p+1 … N) when pages > 9 - scroll list into view after paging to a page > 1 - cache-bust 20260824-3
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 24, 2026
argszero added a commit
that referenced
this pull request
Aug 25, 2026
…5T10:33:26) (#146) Column filters (type/user/model/key/pts/status) on the transactions page previously only filtered the currently loaded page locally, making results untrustworthy across thousands of rows (regression of PR #135 pagination). - backend: TxColFilters (model/user_name/key_name LIKE, status exact, pts_min/pts_max range) flattened into TxQuery/TxTrendQuery; tx_where() applies them joined to users/api_keys/keys; summary/total/trend all use the same filtered SQL; type whitelist now also accepts withdraw (the UI column filter offers it) - frontend: loadTransactions() sends filter params on list + trend requests; txFilterSig() guard reloads when filters change; renderTxSummary always uses the now filter-aware backend summary - test: transactions_column_filters (LIKE/exact/range/combined/trend) - cache-bust 20260824-14 Co-authored-by: argszero <argszero@argszerodeMac-mini.local>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the fake-pagination bug on the transactions page (host rant
2026-08-24T10:51:57): the frontend hardcodedpage=1&page_size=100and the pager used the loadeddata.length(=100) as the total, so with 7320 real records in 24h the page showed "共 100 条" and only the first 100 were ever reachable.Changes (all frontend):
loadTransactions()now sends the actualtxTable.page/txTable.pageSizeto/api/transactions?page=N&page_size=Mand recordsloadedPage/loadedPageSizeafter each fetchrenderTransactions()refetches the requested page when local page/pageSize differs from the loaded one — page buttons, column sort, column filters and the page-size selector all flow through this guardbuildDataTable()gains an optionalserverPaging: { total }: the pager shows the backend realtotal(COUNT(*) from wallet.rs) and computes page count from it; rows are the already-paginated page (no local slice). Other tables (api-keys, members, etc.) are unaffected — they don't passserverPaging1 … p-1 p p+1 … N) when pages > 9 (7320/10 → 732 pages; rendering 732 buttons was unusable)Preserved (per rant requirements):
Related Issue
Host rant
2026-08-24T10:51:57.822556+08:00(transactions page fake pagination → server-side paging). No GitHub issue.Tests
cargo testall pass (146/146)cargo fmt --checkpasscargo clippy --all-targets -- -D warningspassnode --checkon modified JSChecklist
fix/tx-server-pagination)