feat: build ProcessStepper component with 4 real escrow lifecycle steps#208
feat: build ProcessStepper component with 4 real escrow lifecycle steps#208Oluwatos94 wants to merge 6 commits into
Conversation
|
Warning Review limit reached
More reviews will be available in 52 minutes and 53 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesProcessStepper and Error Handling Updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 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 |
|
Hey @sotoJ24, this PR is ready for review. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/frontend/src/lib/trustlesswork-errors.ts`:
- Around line 14-17: The getErrorMessages function returns [fallback] without
validating that the fallback parameter is non-empty, which violates its
non-empty string array contract. When input is falsy (line 14-17), validate that
fallback is not empty or whitespace-only before returning it; if it is empty or
contains only whitespace, return a sensible default error message instead. Apply
the same validation logic to the other location in the function (lines 46-47)
where fallback is returned to ensure consistency and uphold the guaranteed
non-empty invariant throughout.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3d18db27-edd2-4cd0-b150-e6e26ef13be4
📒 Files selected for processing (2)
apps/frontend/src/components/escrow/ProcessStepper.tsxapps/frontend/src/lib/trustlesswork-errors.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/frontend/src/lib/trustlesswork-errors.ts`:
- Around line 22-25: The filter logic for array sources checks only the type of
items as strings but does not validate that they contain actual non-whitespace
content, allowing whitespace-only strings to pass through. Additionally, at
other locations in the function (around lines 33, 37, and 46), validation is
performed using `.trim()` but the original untrimmed value is returned instead
of the trimmed version. Fix both issues by: (1) updating the array filter to
check both that the item is a string AND that it has non-whitespace content
after trimming, and (2) ensuring that wherever `.trim()` is used for validation,
the trimmed value is what gets returned so that blank-looking messages do not
reach downstream code.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 34e75f2c-ae76-42de-885b-b4b8f0ebec86
📒 Files selected for processing (1)
apps/frontend/src/lib/trustlesswork-errors.ts
|
hi @sotoJ24, ready to be merged. Thanks! |
Closes #180
Description
Replaces the placeholder
ProcessStepper(4 identical Lorem Ipsum items) with thereal escrow lifecycle stepper: proper labels, descriptions, lifecycle icons, and
active/completed state driven by the current step.
Change
pending_signaturefunded+activecompletedlucide-react): house, banknote, document-lock, hand-coinsaria-current="step"+prefers-reduced-motionopt-outcurrentStep: 1 | 2 | 3 | 4prop — no consumer changes neededTesting
Verified all four states in the UI:
/hotel/1/escrow/create→ step 1/hotel/1/escrow/:id?status=paid|blocked|released→ steps 2–4Summary by CodeRabbit
Release Notes
New Features
Bug Fixes