Skip to content

Fix/frontend cleanup 556 559 - #601

Merged
ogazboiz merged 13 commits into
LabsCrypt:mainfrom
MethelyDev:fix/frontend-cleanup-556-559
May 31, 2026
Merged

Fix/frontend cleanup 556 559#601
ogazboiz merged 13 commits into
LabsCrypt:mainfrom
MethelyDev:fix/frontend-cleanup-556-559

Conversation

@MethelyDev

Copy link
Copy Markdown
Contributor

Pull Request: Frontend cleanup — dead code removal, modal a11y, shared API helpers

Summary

This PR addresses four related frontend maintenance issues in a single branch:

Changes by issue

Issue Files
closes #556 Removed hooks/useCancelStream.ts, hooks/useWithdrawStream.ts; trimmed lib/api/streams.ts
closes #557 Removed components/ui/Banner.tsx, lib/banner.config.ts
closes #558 Added lib/api/_shared.ts; updated lib/dashboard.ts, lib/api/streams.ts
closes #559 Added hooks/useModalDialog.ts; updated stream-creation modals

Test plan

  • npm run build --workspace=frontend passes
  • npm test --workspace=frontend passes (existing utils tests unchanged)
  • Confirm no imports of removed hooks, Banner, or cancelStream/withdrawStream REST helpers
  • Open Create Stream wizard — Tab cycles within modal only; Escape closes; focus returns to trigger
  • Open Cancel Stream confirm modal — same keyboard/a11y behavior; Escape blocked while submitting
  • Open Top Up modal — input auto-focused; Tab trapped; Escape closes when idle
  • Dashboard and incoming streams pages still load stream lists correctly (shared endpoint resolver)

Notes

Samuel1505 and others added 13 commits May 31, 2026 22:14
Move getStreamsEndpointCandidates, toTokenAmount, and STROOPS_DIVISOR into lib/api/_shared.ts so dashboard and streams modules share one resolver.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ypt#558)

Replace duplicated endpoint resolver and stroop conversion with imports from lib/api/_shared.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ons (LabsCrypt#556, LabsCrypt#558)

Import shared helpers from _shared.ts and delete unused cancelStream/withdrawStream REST helpers that only backed removed hooks.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cancellation is handled via Soroban on stream detail; this hook had no importers.

Co-authored-by: Cursor <cursoragent@cursor.com>
Incoming withdrawals use useIncomingStreams; this hook had no importers.

Co-authored-by: Cursor <cursoragent@cursor.com>
Banner was never mounted anywhere in the app layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
Config only supported the removed Banner component.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ypt#559)

Provides focus trap, Escape-to-close, body scroll lock, and focus restoration on unmount.

Co-authored-by: Cursor <cursoragent@cursor.com>
…izard (LabsCrypt#559)

Set role=dialog, aria-modal, aria-labelledby, and wire useModalDialog for keyboard accessibility.

Co-authored-by: Cursor <cursoragent@cursor.com>
…dal (LabsCrypt#559)

Set role=dialog, aria-modal, aria-labelledby, and wire useModalDialog for keyboard accessibility.

Co-authored-by: Cursor <cursoragent@cursor.com>
…sCrypt#559)

Set role=dialog, aria-modal, aria-labelledby, and wire useModalDialog with input auto-focus.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ogazboiz
ogazboiz merged commit 1ab1c19 into LabsCrypt:main May 31, 2026
4 of 8 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

3 participants