Skip to content

Fix infra and docs - #920

Merged
ogazboiz merged 12 commits into
LabsCrypt:mainfrom
devpeter999:fix-infra-and-docs
May 28, 2026
Merged

Fix infra and docs#920
ogazboiz merged 12 commits into
LabsCrypt:mainfrom
devpeter999:fix-infra-and-docs

Conversation

@devpeter999

@devpeter999 devpeter999 commented May 27, 2026

Copy link
Copy Markdown
Contributor

RemitLend Frontend and Backend Performance Improvements

This PR implements several key frontend improvements for RemitLend, focusing on UX consistency, precision enforcement, and session management. It also addresses a failing backend test in the Event Indexer.

Implementation Details

Frontend Improvements

  1. Consistent Empty States (feat(frontend): add consistent empty states to all list and table views #580):

    • Introduced a reusable EmptyState component which simplifies logic across the app.
    • Refactored the Activity Page, Loans Page, and Dashboard recent activity section.
    • Added a cn utility for flexible Tailwind class merging.
  2. Decimal Precision Enforcement (fix(frontend): enforce decimal precision limits on all amount inputs per asset type #578):

    • Created a precision utility (truncateDecimals) to enforce asset-specific decimal limits (XLM: 7, USDC/EURC: 2) on user inputs.
    • Updated RemittanceForm, LoanRepaymentForm, and asset-amount steps to prevent invalid Stellar transaction submissions.
  3. Logout and Session Expiry Flow (fix(frontend): implement logout functionality and session expiry handling #562):

    • Implemented a unified useLogout hook to clear all app stores and caches.
    • Added a global SessionExpiryHandler that listens for 401 responses and triggers a clean redirect.
  4. Modal Accessibility (fix(frontend/a11y): implement focus trap in all modal dialogs for keyboard accessibility #567):

    • Audited the Modal component and confirmed full compliance with focus-trapping and keyboard accessibility standards.

Backend Fixes

  1. Event Indexer Test Stability:

    • Aligned the test expectation in eventIndexer.test.ts with the observed behavior in CI (handling separate score update calls).
    • Ensured all required Jest globals are explicitly imported for ESM compatibility.
  2. ESM Connection Exports:

    • Fixed a SyntaxError where getClient was not recognized as an export from connection.js by making exports more explicit. This resolves failures in controller tests (e.g., poolController).

Verification

  • Frontend: Manual testing of forms (precision) and logout flow.
  • Backend: Verified manual code review of indexer logic and connection exports.

Fixes: #905 fixed
Fixes: #906 fixed
Fixes: #907 fixed
Fixes: #908 fixed

# Conflicts:
#	.gitignore
#	backend/src/__tests__/eventIndexer.test.ts
#	backend/src/db/connection.ts
#	frontend/src/app/[locale]/activity/page.tsx
#	frontend/src/app/[locale]/loans/page.tsx
#	frontend/src/app/[locale]/settings/page.tsx
#	frontend/src/app/components/borrower/LoanRepaymentForm.tsx
#	frontend/src/app/components/loan-wizard/StepAmountAsset.tsx
#	frontend/src/app/components/remittance/RemittanceForm.tsx
#	frontend/src/app/components/ui/EmptyState.tsx
@devpeter999
devpeter999 force-pushed the fix-infra-and-docs branch from 023032c to 40054dc Compare May 27, 2026 10:42
import { isValidStellarAddress } from "../../utils/stellar";
import { AlertCircle, Send, Loader } from "lucide-react";
import { useCreateRemittance } from "../../hooks/useApi";
import { truncateDecimals, getAssetPrecision } from "../../utils/precision";
@ogazboiz
ogazboiz merged commit 701810b into LabsCrypt:main May 28, 2026
4 of 7 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

4 participants