Skip to content

Cache theme colors and harden overlay retries#4

Merged
Batchhh merged 1 commit intomainfrom
feature/theme-overlay-retries
Mar 23, 2026
Merged

Cache theme colors and harden overlay retries#4
Batchhh merged 1 commit intomainfrom
feature/theme-overlay-retries

Conversation

@Batchhh
Copy link
Owner

@Batchhh Batchhh commented Mar 23, 2026

Summary

  • Cache theme color lookups in src/ui/theme.rs so repeated access returns precomputed UIColor values instead of rebuilding them on every call.
  • Switch several UI registries and feedback generators to parking_lot::Mutex and remove unnecessary .unwrap() locking in menu handling and rendering paths.
  • Simplify a few animation/toast closures to reduce cloning noise and keep retained view references clearer.
  • Harden overlay initialization in src/ui/window.rs with bounded retry attempts and exponential backoff before giving up.

Testing

  • Not run.
  • Reviewed the diff for overlay retry behavior to confirm retries are capped at 10 attempts and reset after a successful window fetch.
  • Reviewed theme accessors to confirm each public getter now returns a cached static color value.
  • Reviewed menu lock call sites to confirm they consistently use the updated mutex type and locking style.

- Switch menu registries and feedback generator to `parking_lot::Mutex`
- Cache theme color accessors behind lazy statics
- Retry overlay init with exponential backoff and cap
@Batchhh Batchhh merged commit 495ec4e into main Mar 23, 2026
1 check passed
@Batchhh Batchhh deleted the feature/theme-overlay-retries branch March 23, 2026 17:41
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