Skip to content

fix(dashboard): fix dashboard usability issues and add gas scaling be… - #1169

Merged
vjuliaife merged 1 commit into
vjuliaife:mainfrom
blessychoco:feature/dashboard-benchmarks
Aug 27, 2026
Merged

fix(dashboard): fix dashboard usability issues and add gas scaling be…#1169
vjuliaife merged 1 commit into
vjuliaife:mainfrom
blessychoco:feature/dashboard-benchmarks

Conversation

@blessychoco

Copy link
Copy Markdown
Contributor

Closes #1083

Health Score Clarity: Tied the Coverage and Reserve percentages directly to the 0.7/0.3 formula weights used to compute the score. We added text annotations showing the weights next to the ratios, and a visual contribution breakdown containing mini-bars and precise points.

Closes #1085
Withdrawable Excess Context: Enhanced the fallback view when an importer has zero withdrawable excess. The new UI explains that zero excess is normal and expected when active collateral is at or below the required threshold, and directs the user to deposit additional collateral exceeding the required balance to enable withdrawals.

Closes #1086
Surety Admin Usability: Dynamic URL construction for the /signup page using window.location.origin (safely handled client-side inside useEffect to avoid Next.js hydration issues) is now displayed in the empty state of the surety portfolio dashboard, together with a functional copy button.

Closes #1088
Contract Gas Cost Verification: Created a scaling benchmark test in test.rs to evaluate the resource footprint of the register_importer contract call under different pre-registered importer counts. The analysis shows that while host-side maps grow linear costs, the on-chain execution cost (footprint reads/writes and VM instructions) remains completely flat $O(1)$ due to the decentralized persistent storage layout.

These fixes resolve user confusion surrounding their health grade components and zero-excess statuses, provide surety admins with the tools they need to onboard new importers, and confirm that the smart contract scales efficiently under high volumes.

Changed

  • HealthScore.tsx: Added explicit weights to ratio labels and visual component contribution progress bars mapping to the 70/30 formula.
  • apps/web/app/app/page.tsx: Expanded the "No excess to withdraw" warning to describe the expected state of the bond and guide the user on deposit actions.
  • apps/web/app/surety/page.tsx: Rendered dynamic absolute /signup links in the empty state view along with a copy-to-clipboard button.
  • contracts/tariff-shield/src/test.rs: Appended benchmark_register_importer_scaling scaling benchmark tracking CPU and memory at 100, 1000, and 10000 pre-populated importers.

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

Deployment failed for project tariff-shield-web with the following error:

The `vercel.json` schema validation failed with the following message: should NOT have additional property `rootDirectory`

Learn More: https://vercel.com/docs/concepts/projects/project-configuration

@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

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

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tariff-shield-web Error Error Aug 27, 2026 9:48pm

@vjuliaife
vjuliaife merged commit d144aa4 into vjuliaife:main Aug 27, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment