Skip to content

[FE-16] Build /documents list page — searchable, filterable, paginated document table #828

Description

@mftee

Overview

Users need a full-page view of all their documents with search, filtering, and pagination. The dashboard only shows a preview — this page is the complete document management interface.

Background

File to create: frontend/app/(protected)/documents/page.tsx

Features:

  • Search bar (debounced, calls GET /api/documents/search?q=)
  • Status filter dropdown (ALL / PENDING / ANALYZING / VERIFIED / FLAGGED / REJECTED)
  • Risk score range slider (0–100)
  • Sort options: Newest first, Oldest first, Highest risk, Lowest risk
  • Paginated table with columns: Name, Status (badge), Risk Score, Uploaded, Actions

Actions per row:

  • View detail (link to /documents/:id)
  • Verify (button, only shown if status is PENDING)
  • Archive (button)
  • Download report (link to /documents/:id/report)

Bulk actions:

  • Select multiple documents → bulk archive, bulk download as ZIP (if implemented)

Acceptance Criteria

  • Search is debounced by 300ms to avoid excessive API calls
  • Filter, sort, and page state are reflected in the URL query params (shareable/bookmarkable)
  • Pagination controls (first, prev, next, last) with current page indicator
  • Table shows empty state when no documents match the filters
  • Status badges use the colour-coded Badge component from FE-05

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions