Skip to content

feat: Capsule dashboard filtering, sorting & pagination#394

Merged
nottherealalanturing merged 1 commit into
enbliq:devfrom
phertyameen:dev
Mar 30, 2026
Merged

feat: Capsule dashboard filtering, sorting & pagination#394
nottherealalanturing merged 1 commit into
enbliq:devfrom
phertyameen:dev

Conversation

@phertyameen
Copy link
Copy Markdown
Contributor

PR Description

What changed

server/routes/capsules.js - rewrote the capsule list endpoint to accept query parameters: status (repeatable), search (iLike on title + message), unlockAfter/unlockBefore, sortBy, sortDir, page, and limit. All inputs are whitelist-validated before hitting the DB. Response now includes a meta object with total, totalPages, hasNextPage, and hasPrevPage.
app/dashboard/page.jsx - replaced the flat list with a filterable, sortable, paginated table. Search is debounced at 350ms with AbortController cancellation on rapid input. Status toggles, date range pickers, and a sort selector all reset to page 1 automatically. Pagination renders a windowed page list (first, last, ±2 around current) with ellipsis gaps.

Acceptance criteria met

  • Sender can filter by draft, sealed, and unlocked — combinable
  • Search and sort hit real API data; no client-side filtering
  • Pagination handles seeded demo datasets cleanly at default limit of 20

Closes #375
Closes #74
Closes #373
Closes #372

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Mar 30, 2026

@phertyameen Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nottherealalanturing nottherealalanturing merged commit bac4c2e into enbliq:dev Mar 30, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants