feat: scaffold /dashboard/escrow-dashboard route placeholder#74
feat: scaffold /dashboard/escrow-dashboard route placeholder#74jerrymusaga wants to merge 1 commit intosafetrustcr:mainfrom
Conversation
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.
|
@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! 🚀 |
📝 WalkthroughWalkthroughThis PR adds the foundational package configuration and a placeholder route for the escrow dashboard feature. It introduces the web app's Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 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) andnext: 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
📒 Files selected for processing (2)
apps/web/package.jsonapps/web/src/app/dashboard/escrow-dashboard/page.tsx
|
@sotoJ24 Please check in my submission |
Summary
apps/web/src/app/dashboard/escrow-dashboard/page.tsxas a stub route placeholder for the Escrow Dashboardapps/web/package.jsonwith package name@safetrust/weband pre-installs@trustless-work/escrowand@tanstack/react-querysopnpm installis ready when the real component is wiredRelated 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.tsxTest plan
pnpm build --filter @safetrust/webpassesGET /dashboard/escrow-dashboardrenders stub without errors@trustless-work/escrowand@tanstack/react-querypresent inapps/web/package.jsonSummary by CodeRabbit