Skip to content

feat: rate limiting, keyboard navigation, and accessibility - #2

Merged
tanRdev merged 2 commits into
mainfrom
tan/schooner
Jan 30, 2026
Merged

feat: rate limiting, keyboard navigation, and accessibility#2
tanRdev merged 2 commits into
mainfrom
tan/schooner

Conversation

@tanRdev

@tanRdev tanRdev commented Jan 30, 2026

Copy link
Copy Markdown
Owner

This PR adds Gmail API rate limiting with exponential backoff and improves keyboard navigation and screen reader support.

Changes

Backend (Rust)

  • Detect Gmail API rate limit errors (HTTP 429)
  • Implement exponential backoff with jitter: starts at 1 minute, caps at 5 minutes
  • Add backoff_until and backoff_logged to AppState to track retry state
  • Add rand dependency for jitter calculation

Frontend (React)

  • Add focus-visible ring styles to all buttons for keyboard navigation
  • Add aria-label attributes to icon-only buttons (Settings, Privacy, Logout, Quit)
  • Make CodeCard keyboard accessible: adds tabIndex, role="button", and Enter/Space handling
  • Add Firefox scrollbar styling (scrollbar-width, scrollbar-color)
  • Remove duplicate shadow-inner-glow CSS utility

Testing

  • TypeScript compiles: npm run build
  • Rust compiles: cargo check
  • Tab through UI elements to verify focus rings appear
  • Verify CodeCard copies on Enter/Space key press

- Add RATE_LIMIT_ERROR constant to gmail.rs
- Implement exponential backoff with jitter when hitting rate limits
- Add backoff_until and backoff_logged to AppState
- Add calculate_backoff() function with 1-5 minute range
- Add rand dependency for jitter calculation
- Add focus-visible ring styles to all interactive elements
- Add aria-label attributes to icon-only buttons
- Make CodeCard keyboard accessible with tabIndex and onKeyDown
- Add Firefox scrollbar styling (scrollbar-width, scrollbar-color)
- Remove duplicate shadow-inner-glow CSS utility
- Remove unused Shield import from PrivacyDashboard
@tanRdev
tanRdev merged commit 5bc08d9 into main Jan 30, 2026
1 check 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

Development

Successfully merging this pull request may close these issues.

1 participant