Skip to content

feat: add public dispute register and detail routes - #702

Merged
dDevAhmed merged 2 commits into
DigiNodes:mainfrom
sampapiz:security/issue-591-ui-fe-021-build-public-dispute-register-and
Oct 18, 2026
Merged

dDevAhmed merged 2 commits into
DigiNodes:mainfrom
sampapiz:security/issue-591-ui-fe-021-build-public-dispute-register-and

Conversation

@sampapiz

Copy link
Copy Markdown
Contributor

Overview

This PR implements the public dispute discovery surface for the Truthbounty protocol: a /disputes register and a /disputes/:disputeId detail view. It surfaces claim links, challenger evidence, bonds, timelines, appealability, and resolution state, keeping provisional outcomes clearly distinct from final ones and gating all actions behind capability checks. API data is treated as freshness-labelled projection data only — contracts remain the sole authority for mutations.

Related Issue

Changes

🗂️ Dispute Types and API Projection

  • [ADD] src/app/types/dispute.ts

    • Defines dispute domain types covering resolution state (provisional vs final), bond, deadlines, timeline entries, appealability, and evidence references.
    • Models freshness metadata so projection data can be labelled as stale/unavailable in the UI.
  • [ADD] src/app/api/disputes.api.ts

    • Read-only projection fetchers for the dispute register and a single dispute by ID.
    • Handles unknown IDs, unavailable responses, and sanitized evidence failures without leaking raw payloads.
  • [ADD] src/app/queries/disputes.queries.ts

    • Query hooks wrapping the dispute API with freshness labelling, so components can render provisional/stale states explicitly.

🖥️ Register and Detail Routes

  • [ADD] src/app/(dashboard)/disputes/page.tsx

    • Public dispute register listing disputes with claim link, bond, deadline, and resolution state.
    • Covers empty, stale, and unavailable states; actions render unavailable when unpinned or capability-gated.
  • [MODIFY] src/app/(dashboard)/page.tsx

    • Entry point linking into the dispute register from the dashboard.
  • [MODIFY] messages/en.json

    • Copy for register/detail states, provisional vs final outcome labels, evidence failure messaging, and action-gating text.

Verification Results

npm run lint
npm run typecheck
npm run test
npm run build
Acceptance Criteria Status
Provisional outcomes never read as established truth ✅ Provisional state labelled distinctly from final resolution in register and detail copy
Actions remain capability-gated ✅ Unpinned / non-callable actions render unavailable
Public projection never substitutes for callable contract authority ✅ API data is freshness-labelled projection only; no mutation paths added

Notes

  • Scope limited to the changed files listed above; no contract or API behavior was invented.
  • Fixtures are not introduced into production paths.
  • Stellar Wave label not applied, per non-goals.

Closes #591

@sampapiz
sampapiz requested a review from dDevAhmed as a code owner October 16, 2026 15:25
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: DigiNodes/truthbounty-frontend/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 5e1e5bbc-4a74-42c8-943e-cf69375e578a
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dDevAhmed

Copy link
Copy Markdown
Contributor

resolve conflicts @sampapiz

@dDevAhmed
dDevAhmed merged commit 174e7ee into DigiNodes:main Oct 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI-FE-021 — Build Public Dispute Register and Detail

2 participants