Skip to content

feat: add refund UI, spend simulator, SLA nudges, and error boundaries - #673

Merged
ScriptedBro merged 1 commit into
DelegoLabs:mainfrom
Osuochasam:fix/spend-sim
Sep 2, 2026
Merged

feat: add refund UI, spend simulator, SLA nudges, and error boundaries#673
ScriptedBro merged 1 commit into
DelegoLabs:mainfrom
Osuochasam:fix/spend-sim

Conversation

@Osuochasam

Copy link
Copy Markdown
Contributor

Overview
This release introduces core user-facing features for escrow refunds and spend simulation, alongside proactive SLA notifications and resilient UI error handling to prevent page-wide crashes.

Key Changes:

Refund Request UI: Built a complete refund surface for eligible escrows. Includes a RefundCTA form (with eligibility gating, reason code selection, and a double-submission guard) and a RefundTimeline component to track the status progression of requests. Data structures and read-only fetching logic are isolated in refund.ts and useRefundEligibility.ts.

Spend Simulator Panel: Added a read-only simulation tool to the delegation detail page. Users can test hypothetical spends, and the SpendSimulatorPanel returns whether the transaction would be allowed or denied. If denied, it displays the specific bounding constraint and provides a direct, actionable remediation link (e.g., to raise a cap or renew a limit).

Proactive SLA Nudges: Implemented a notification system to warn users before pending approvals breach their SLA threshold. The useSLANudge hook polls pending requests and issues both in-app and OS notifications. It features robust deduplication, a snooze function backed by localStorage, and focus-suppression to avoid nagging active users.

Granular Error Boundaries: Shipped a reusable class component with a Tailwind-styled fallback card (supporting dark mode). Instead of an entire page crashing due to one failing widget, the boundary catches the error locally, preserves the state of interactive sibling components, provides a localized "retry" button, and exports a hook point for future Sentry ingestion.

Closes #569
Closes #572
Closes #575
Closes #586

@drips-wave

drips-wave Bot commented Sep 2, 2026

Copy link
Copy Markdown

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

coderabbitai Bot commented Sep 2, 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: Organization UI

Review profile: CHILL

Plan: Team

Run ID: fbf2d105-bf93-4014-9c58-0b3a4721c983


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.

@ScriptedBro
ScriptedBro merged commit c6db5e7 into DelegoLabs:main Sep 2, 2026
13 of 15 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

2 participants