Skip to content

feat(frontend): add EvidenceLedgerPage with status and category filters - #389

Open
Anshuu2004 wants to merge 1 commit into
VarshithReddy2006:mainfrom
Anshuu2004:feat/issue-336-evidence-ledger-page
Open

Anshuu2004 wants to merge 1 commit into
VarshithReddy2006:mainfrom
Anshuu2004:feat/issue-336-evidence-ledger-page

Conversation

@Anshuu2004

Copy link
Copy Markdown
Contributor

Summary

Adds the Evidence Ledger page at /readiness/evidence. It lists the signed-in user's claims from GET /api/v1/evidence/claims with filters, a search box and a verification badge that always carries a text label.

Closes #336

What changed

  • frontend/src/services/evidenceService.ts: fetchEvidenceClaims(filters), types mirroring the backend model (4 statuses: verified, partial, unverified, flagged; 5 subject types).
  • frontend/src/pages/readiness/EvidenceLedgerPage.tsx: status chips and category chips (sent to the API as verificationStatus / subjectType), client side search over claim text, key, source and category label, loading / error (with retry) / empty / no-match states, semantic <table> with caption and scope headers.
  • VerificationBadge: prints "Verified", "Partially verified", "Unverified" or "Flagged" next to the icon, so colour is not the only signal.
  • EvidenceClaimRow: source link (only http/https urls become anchors, rel="noopener noreferrer"), confidence, last checked date, stale hint when staleAfter has passed, flag reason when present. Legacy claims with no subject type are shown as resume claims, same as the backend does.
  • useEvidenceClaims hook (react-query, filters in the query key).
  • Route /readiness/evidence in router/index.tsx and an "Evidence Ledger" card on the readiness overview.

How I tested

Run from frontend/, one file at a time:

npx vitest run src/services/evidenceService.test.ts                           # 2 passed
npx vitest run src/features/readiness/components/VerificationBadge.test.tsx   # 5 passed
npx vitest run src/features/readiness/utils/evidenceLedger.test.ts            # 6 passed
npx vitest run src/pages/readiness/EvidenceLedgerPage.test.tsx                # 7 passed
npx vitest run src/pages/readiness/EvidenceLedgerPage.route.test.tsx          # 1 passed

The route test fails with the router/index.tsx change stashed (heading not found) and passes with it. tsc -p tsconfig.app.json --noEmit reports no errors in the files touched here (the checkout I tested in has a few unrelated missing-module errors from its node_modules).

Notes

  • Left out on purpose, same as in my claim comment: re-verify button, GapToMilestoneDialog, TopGapsPanel / ReadinessInputsPanel and the SSE refresh, because the endpoints they need (re-verify, POST /job-targets/:id/gaps/:gapId/milestone) do not exist on main.
  • docs/v2/*.md named in the issue are not in the repo, so no docs change.
  • Not tested: a real browser run against the backend; ESLint (config would not load in my environment).

New /readiness/evidence page that lists the claims from GET /api/v1/evidence/claims
in a semantic table: claim text, category, source (http/https links only),
verification badge, confidence and last checked date. Status and category
chips are sent to the API as subjectType/verificationStatus, search runs
client side over claim text, key, source and category label.

VerificationBadge always prints the status as text (Verified, Partially
verified, Unverified, Flagged) so colour is never the only signal. The
readiness overview gets an Evidence Ledger card that links to the page.

Re-verify, GapToMilestoneDialog and TopGapsPanel are left out because the
endpoints they need do not exist yet.

Closes VarshithReddy2006#336

Signed-off-by: Abhishek <abhishekcse2004@gmail.com>
@VarshithReddy2006 VarshithReddy2006 added enhancement New feature or request help wanted Extra attention is needed nsoc26 level2 5 points - UI, frontend components, layouts, styling, and page-level changes. labels Nov 16, 2026
@VarshithReddy2006

Copy link
Copy Markdown
Owner

@Anshuu2004 CI/CD checks are currently failing on Unit Tests and Integration Tests:

  1. Unit Tests:
AssertionError: expected undefined to match object { achievements: [], trust: { underReview: true } }
 ❯ src/__tests__/modules/profile/antiGaming.worker.test.ts:138:18

This failure occurs because public profiles are now private by default with opt-in publication (from PR #381).

  1. Integration Tests:
FAIL src/__tests__/integration/revision-review.test.ts > Revision Radar Integration & Optimistic Concurrency > dsaProblemSolved.consumer > creates exactly one card with SM-2 defaults and is idempotent on repeat events
AssertionError: expected true to be false
 ❯ src/__tests__/integration/revision-review.test.ts:53:28
   53| expect(res2.created).toBe(false);

Please rebase/merge the latest main into your branch and fix these CI failures immediately so the PR can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed level2 5 points - UI, frontend components, layouts, styling, and page-level changes. nsoc26

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(frontend,m6): build EvidenceLedgerPage, verification badge filters, and GapToMilestoneDialog in ReadinessPage

2 participants