Repository navigation
fix(orders): filter before cursor pagination and preserve selected order state - #1162
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@greptile review |
[Medium impact] The PR appears safe to merge, with the previous selection-recovery issue fixed and no new actionable findings.
|
…ad more button markup
|
@greptile review |
Intent
Implement the approved issue #1146 Orders release fix: support the optional all, active, and unpaid API views with existing caller defaults, apply server-side view and table/type/status/search filters before stable numeric cursor pagination at 15 matching orders per page, preserve the all-orders visibility invariant, and use positive check-level payable balances for unpaid results. Update the Orders UI to reset page state on filter changes, reject stale requests, refresh live results safely, keep the selected detail visible with truthful list/missing notices, preserve mobile navigation, make the detail panel fill its pane, and place Load more in the master list or card layout. Update canonical API documentation and keep meaningful API/UI regressions. Also fix the reproduced live-pagination race: when Load more reintroduces the selected order after a new match displaced page one, apply the appended snapshot, clear the notice, and invalidate delayed detail responses; an appended page omitting the selection alone must not mark it outside the list. Preserve current-main finance/status and cancellation PIN safeguards, including the !cancelRequiresPin control, and all role/action guards. Keep changes minimal, retain the reviewed local Load More renderer and every pipeline commit, do not add style abstractions, use the same open PR #1162, revalidate fully, and leave it unmerged.
What Changed
viewparameter filtering (all,active, andunpaid) toGET /api/ordersand applied table, type, status, and search filters before cursor-based pagination.Risk Assessment
✅ Low: The changes cleanly implement filtered cursor pagination and master-detail selection preservation with sound race-condition handling and comprehensive regression coverage.
Testing
Exercised backend API filtered pagination and live frontend UI scenarios in Chromium against running servers, validating 15-item pagination, filter reset and race guards, detail pane preservation with notices, pagination race recovery via Load More, and mobile navigation, with 6 reviewer-visible screenshots captured.
Evidence: 01-orders-split-layout-load-more.png
Evidence: 02-orders-search-filter-active.png
Evidence: 03-order-not-in-current-list-notice.png
Evidence: 04-orders-load-more-restored-selection.png
Evidence: 05-orders-mobile-detail-with-back.png
Evidence: 06-orders-mobile-master-list-returned.png
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
npm run test:orders-searchcd frontend && npx playwright test --config=playwright.config.ts --project=chromium e2e/orders-master-detail.spec.tsLive product validation in Chromium with visual evidence generation (6 screenshots) in ~/.no-mistakes/evidence/01M5036NRJ0K8XWPNK9ETCJRJ8✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.