Skip to content

feat: scaffold /dashboard/escrow-dashboard route placeholder#74

Open
jerrymusaga wants to merge 1 commit intosafetrustcr:mainfrom
jerrymusaga:feat/escrow-dashboard-route
Open

feat: scaffold /dashboard/escrow-dashboard route placeholder#74
jerrymusaga wants to merge 1 commit intosafetrustcr:mainfrom
jerrymusaga:feat/escrow-dashboard-route

Conversation

@jerrymusaga
Copy link
Copy Markdown

@jerrymusaga jerrymusaga commented Mar 28, 2026

Summary

  • Adds apps/web/src/app/dashboard/escrow-dashboard/page.tsx as a stub route placeholder for the Escrow Dashboard
  • Stub renders 4 skeleton stat cards (Total Escrows, As Approver, As Marker, As Releaser) and 3 skeleton role cards (As Guest/Approver, As Hotel/Marker, Platform Managed)
  • Adds apps/web/package.json with package name @safetrust/web and pre-installs @trustless-work/escrow and @tanstack/react-query so pnpm install is ready when the real component is wired

Related Issue

Closes #68
Depends on #66 (dashboard layout- already merged)

What this does NOT include

The real <EscrowDashboard /> component is intentionally deferred. All TODO comments point to the source:
frontend-SafeTrust/src/components/escrow/EscrowDashboard.tsx

Test plan

  • pnpm build --filter @safetrust/web passes
  • GET /dashboard/escrow-dashboard renders stub without errors
  • 4 skeleton stat cards visible
  • 3 skeleton role cards visible
  • @trustless-work/escrow and @tanstack/react-query present in apps/web/package.json
  • All TODO comments reference the correct source file

Summary by CodeRabbit

  • New Features
    • Introduced a new Escrow Dashboard providing comprehensive visibility into escrow activities and user involvement. The dashboard displays key metrics showing total escrow count and user status across three important roles: Approver, Marker, and Releaser. Role-based dashboard sections help users effectively organize and view all escrow information relevant to their specific positions.

Closes safetrustcr#68

- Add apps/web/src/app/dashboard/escrow-dashboard/page.tsx with stub UI:
  4 skeleton stat cards (Total Escrows, As Approver, As Marker, As Releaser)
  and 3 skeleton role cards (As Guest/Approver, As Hotel/Marker, Platform Managed)
- Add apps/web/package.json with @safetrust/web package name and
  pre-install @trustless-work/escrow and @tanstack/react-query dependencies
  ready for wiring the real EscrowDashboard component

TODO comments reference frontend-SafeTrust/src/components/escrow/EscrowDashboard.tsx
as the source for the final implementation.
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 28, 2026

@jerrymusaga 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

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

📝 Walkthrough

Walkthrough

This PR adds the foundational package configuration and a placeholder route for the escrow dashboard feature. It introduces the web app's package.json manifest with Next.js and required dependencies, plus scaffolds the /dashboard/escrow-dashboard route as a static placeholder awaiting real component integration.

Changes

Cohort / File(s) Summary
Package Configuration
apps/web/package.json
New package manifest for @safetrust/web (v0.1.0) with Next.js 15, React 19, TanStack Query 5, and TrustlessWork SDK dependencies, plus npm scripts for development (dev, build, start, lint).
Dashboard Route Scaffold
apps/web/src/app/dashboard/escrow-dashboard/page.tsx
Placeholder page component rendering header, four stat card skeletons (Total Escrows, As Approver, As Marker, As Releaser), and three role-grouped card placeholders with loading text. Includes TODO marker for real component integration post-merge.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related issues

  • Issue #259: The new escrow dashboard page route directly corresponds to the requested page registration for /dashboard/escrow-dashboard mentioned in this issue.
  • Issue #264: The added /dashboard/escrow-dashboard page establishes the navigational entry point required for quick-link functionality described in this issue.

Poem

🐰 A scaffold grows where dashboards dream,
With queries flowing like a stream,
Four cards await their data true,
While TODO marks the work to do!
The route is set, the path is clear,
The escrow portal's drawing near. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: scaffolding a placeholder route for the escrow dashboard at /dashboard/escrow-dashboard.
Linked Issues check ✅ Passed The PR meets all coding requirements from issue #68: creates the page.tsx stub with proper structure and TODO comments, adds required dependencies (@trustless-work/escrow and @tanstack/react-query) to package.json, and includes expected UI elements.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #68 objectives: the new page.tsx file, package.json dependencies, and static placeholder content with TODOs are all specified in the linked issue requirements.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
apps/web/src/app/dashboard/escrow-dashboard/page.tsx (1)

32-37: Expose loading state to assistive technologies.

Consider adding loading semantics so placeholders are announced properly by screen readers (aria-busy, role="status", aria-live).

Suggested accessibility tweak
-      <div className="grid grid-cols-1 md:grid-cols-3 gap-6">
+      <div className="grid grid-cols-1 md:grid-cols-3 gap-6" aria-busy="true">
         {['As Guest (Approver)', 'As Hotel (Marker)', 'Platform Managed'].map((title) => (
           <div key={title} className="rounded-lg border p-6 bg-card">
             <p className="font-semibold mb-2">{title}</p>
-            <p className="text-sm text-muted-foreground">Loading escrows...</p>
+            <p className="text-sm text-muted-foreground" role="status" aria-live="polite">
+              Loading escrows...
+            </p>
           </div>
         ))}
       </div>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/app/dashboard/escrow-dashboard/page.tsx` around lines 32 - 37,
The placeholder cards rendered in the map (the div with className "grid..." and
each card div with className "rounded-lg border p-6 bg-card") lack loading
semantics for AT; update the card container to include aria-busy="true" and an
appropriate aria-label (e.g., "{title} loading"), and mark the loading paragraph
with role="status" and aria-live="polite" (or aria-live="assertive" if urgent)
so screen readers announce "Loading escrows..." for each card; apply these
attributes to the mapped JSX elements (the card div and the <p> that currently
shows "Loading escrows...") to expose the loading state to assistive
technologies.
apps/web/package.json (1)

12-15: Avoid floating dependency specifiers for reproducible builds.

The package.json uses three floating specifiers: @trustless-work/escrow: latest (line 13) and wildcard ranges for @tanstack/react-query: ^5.x.x (line 12) and next: 15.x.x (line 14). These will resolve to different versions on each install, making builds non-deterministic. Use specific semver ranges (e.g., ^5.38.0) or exact versions for app dependencies, and pin critical dependencies.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/package.json` around lines 12 - 15, Replace the floating dependency
specifiers in package.json by pinning exact or well-scoped semver ranges: change
"@tanstack/react-query": "^5.x.x", "next": "15.x.x", and
"@trustless-work/escrow": "latest" to concrete versions or caret/tilde ranges
(e.g., "@tanstack/react-query": "^5.38.0", "next": "15.2.1",
"@trustless-work/escrow": "1.4.3") so installs are deterministic; update the
dependency entries for these package names in package.json, run a fresh install
to verify lockfile updates, and commit the updated package.json and lockfile.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/web/package.json`:
- Around line 12-15: Replace the floating dependency specifiers in package.json
by pinning exact or well-scoped semver ranges: change "@tanstack/react-query":
"^5.x.x", "next": "15.x.x", and "@trustless-work/escrow": "latest" to concrete
versions or caret/tilde ranges (e.g., "@tanstack/react-query": "^5.38.0",
"next": "15.2.1", "@trustless-work/escrow": "1.4.3") so installs are
deterministic; update the dependency entries for these package names in
package.json, run a fresh install to verify lockfile updates, and commit the
updated package.json and lockfile.

In `@apps/web/src/app/dashboard/escrow-dashboard/page.tsx`:
- Around line 32-37: The placeholder cards rendered in the map (the div with
className "grid..." and each card div with className "rounded-lg border p-6
bg-card") lack loading semantics for AT; update the card container to include
aria-busy="true" and an appropriate aria-label (e.g., "{title} loading"), and
mark the loading paragraph with role="status" and aria-live="polite" (or
aria-live="assertive" if urgent) so screen readers announce "Loading escrows..."
for each card; apply these attributes to the mapped JSX elements (the card div
and the <p> that currently shows "Loading escrows...") to expose the loading
state to assistive technologies.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 91f5ccd7-9da5-4e38-b731-5f1ee8c5ad0d

📥 Commits

Reviewing files that changed from the base of the PR and between decc85f and 492f65b.

📒 Files selected for processing (2)
  • apps/web/package.json
  • apps/web/src/app/dashboard/escrow-dashboard/page.tsx

@jerrymusaga
Copy link
Copy Markdown
Author

@sotoJ24 Please check in my submission

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.

📌feat: scaffold apps/web/src/app/dashboard/escrow-dashboard/ route placeholder

1 participant