Skip to content

Fix/issues 509 512 514 517 - #529

Merged
ogazboiz merged 3 commits into
LabsCrypt:mainfrom
xeladev4:fix/issues-509-512-514-517
May 29, 2026
Merged

Fix/issues 509 512 514 517#529
ogazboiz merged 3 commits into
LabsCrypt:mainfrom
xeladev4:fix/issues-509-512-514-517

Conversation

@xeladev4

@xeladev4 xeladev4 commented May 29, 2026

Copy link
Copy Markdown
Contributor

Fix frontend debug logging, accessibility, dead code, and backend pagination

Summary

This PR addresses four issues spanning frontend UX improvements and backend API consistency:

  • Removes debug console logging from SSE event handling and stream-detail page
  • Removes unused users query parameter that the backend ignores
  • Adds accessible ARIA label to the top-up amount input field
  • Removes dead legacy Dashboard component with hardcoded mock data
  • Adds page parameter support to the stream events endpoint for consistent pagination

Fixes

Closes #509
Closes #512
Closes #514
Closes #517

Changes

Frontend

Issue #509: Remove debug console logging and unused users param

  • Removed console.log('SSE connected:', data.clientId) from useStreamEvents hook onmessage handler
  • Removed console.error() calls from SSE message parsing
  • Removed console.log() call from reconnect retry logic
  • Removed unused users query parameter appended to SSE subscription URL
  • Updated buildUrl dependency array to remove userPublicKeys

Issue #512: Add accessible label to top-up input

  • Added aria-label="Top-up amount" to the number input field on stream detail page
  • Maintains existing placeholder as a visual hint, not the sole accessible label
  • No visual changes to the UI

Issue #514: Remove dead Dashboard component

  • Deleted frontend/src/components/Dashboard.tsx which contained hardcoded mock stream data
  • This was a legacy component not used by the application (live dashboard is at app/dashboard/page.tsx)

Backend

Issue #517: Add page parameter support

  • Updated getStreamEvents controller to accept optional page query parameter
  • Maps 1-based page number to offset: offset = (page - 1) * limit
  • Page parameter is only used when offset and cursor are not provided
  • Maintains full backward compatibility with existing offset/cursor-based pagination
  • Mirrors the behavior of the sibling /v1/events endpoint

Test Plan

  • Frontend builds successfully: cd frontend && npm run build
  • Backend builds successfully: cd backend && npm run build
  • Frontend lint passes: cd frontend && npm run lint
  • Backend tests pass: cd backend && npm run test
  • No console errors when stream-detail page loads
  • Browser console shows no debug logs during SSE event updates
  • Top-up input properly labeled in accessibility tools
  • Stream event pagination works: /v1/streams/123/events?page=2&limit=10
  • Backward compatibility: offset/cursor-based pagination still works

Architecture Notes

  • No schema or API contract changes (page parameter is additive)
  • User-scoped events continue to arrive via server-side user subscription
  • Removed unused users parameter reduces noise in URL construction

Branch

fix/issues-509-512-514-517

xeladev4 added 3 commits May 29, 2026 04:03
…ssible label

- Remove console.log/console.error from useStreamEvents hook
- Remove unused 'users' query parameter from SSE subscription URL
- Remove debug logging from reconnect retry logic
- Add aria-label to top-up amount input for accessibility (fixes LabsCrypt#509, LabsCrypt#512)
- Delete unused Dashboard.tsx which contained hardcoded mock data
- The live dashboard is implemented in app/dashboard/page.tsx (fixes LabsCrypt#514)
- Accept optional 1-based page query parameter in getStreamEvents
- Map page to offset = (page - 1) * limit when offset is not provided
- Maintain backward compatibility with existing offset/cursor parameters (fixes LabsCrypt#517)
@ogazboiz
ogazboiz merged commit 1d15b17 into LabsCrypt:main May 29, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment