Skip to content

Batch meter registration, downloadable receipts, request logging, a11y improvements - #720

Merged
Dev-AdeTutu merged 2 commits into
Dev-AdeTutu:mainfrom
autostack-art:feat/a11y-batch-register-receipts-request-logging
Aug 27, 2026
Merged

Batch meter registration, downloadable receipts, request logging, a11y improvements#720
Dev-AdeTutu merged 2 commits into
Dev-AdeTutu:mainfrom
autostack-art:feat/a11y-batch-register-receipts-request-logging

Conversation

@autostack-art

@autostack-art autostack-art commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #681, closes #682, closes #683, closes #684

  • Add batch meter registration function #682 – Batch meter registration: new batch_register_meters(meters: Vec<(String, Address)>) contract function (admin-only, max 100 per batch). Duplicate meter IDs within the batch, already-registered meter IDs, and non-allowlisted owners are skipped individually (batch_skip event) rather than failing the whole transaction; successes emit meter_registered. Wired up via a new POST /api/meters/batch backend endpoint with request validation and an early duplicate-ID check.
  • Add request/response logging middleware #684 – Request/response logging middleware: backend/src/lib/requestLogger.ts assigns a request_id per request (returned as X-Request-Id), redacts sensitive fields (secrets, tokens, passwords, API keys), always logs errors, and samples 10% of successful requests. Toggle with LOG_REQUESTS=false.
  • Generate downloadable payment receipts #683 – Downloadable payment receipts: "Download Receipt" button on payment history rows generates a PDF (via jspdf) with a QR code (via qrcode) linking to the blockchain explorer, plus a best-effort XLM→USD conversion.
  • Improve keyboard navigation and screen reader support #681 – Keyboard navigation & screen reader support: skip-to-content link, high-contrast :focus-visible outline site-wide, a reusable useModalA11y hook providing focus trap + Escape-to-close + focus restore (applied to OfflinePaymentModal), Escape closes the mobile nav menu, aria-labels on icon-only buttons, a labeled nav landmark, and a #main-content landmark on every page.

Documentation updated in backend/API.md, contracts/README.md, and new docs/ACCESSIBILITY.md.

Testing

Per instructions, automated tests were skipped for this change. Verified with tsc --noEmit on the frontend (no new type errors introduced) and manual review of the Rust contract addition.

autostack-art and others added 2 commits August 26, 2026 15:30
…ments

- contracts: add batch_register_meters(meters: Vec<(String, Address)>) to
  register up to 100 meters in a single admin transaction, skipping
  duplicates/non-allowlisted owners/already-registered IDs with a
  batch_skip event, and emitting meter_registered per success (Dev-AdeTutu#682)
- backend: wire batch_register_meters via new POST /api/meters/batch,
  with request validation and duplicate-id rejection (Dev-AdeTutu#682)
- backend: add requestLogger middleware — per-request request_id
  (X-Request-Id header), sensitive-field redaction, 10% sampling of
  successful requests with all errors logged, toggle via LOG_REQUESTS (Dev-AdeTutu#684)
- frontend: add "Download Receipt" PDF generation (jsPDF + QR code linking
  to the blockchain explorer) on payment history rows (Dev-AdeTutu#683)
- frontend: accessibility pass — skip-to-content link, high-contrast
  focus-visible outline, modal focus trap + Escape-to-close
  (useModalA11y), Escape closes mobile nav, aria-labels on icon buttons,
  nav landmark label, main-content landmarks on every page (Dev-AdeTutu#681)
- docs: document the above in backend/API.md, contracts/README.md, and
  new docs/ACCESSIBILITY.md

Closes Dev-AdeTutu#681, Dev-AdeTutu#682, Dev-AdeTutu#683, Dev-AdeTutu#684

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HL4h1sEGCEoCUuH1qxex3j
@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@autostack-art 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

@Dev-AdeTutu
Dev-AdeTutu merged commit 3463765 into Dev-AdeTutu:main Aug 27, 2026
1 check failed
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