Fix: add missing dart:math import in capture_provider + bump to 781#5709
Fix: add missing dart:math import in capture_provider + bump to 781#5709
Conversation
Fixes Codemagic build failure — min(), pow(), Random() require dart:math. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Greptile SummaryThis is a minimal, surgical fix that adds a missing Key changes:
No issues found. The fix is correct and complete — all three Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant WS as WebSocket
participant CP as CaptureProvider
participant Math as dart:math
WS->>CP: onDisconnected(closeCode)
CP->>CP: _startKeepAliveServices()
CP->>CP: _getReconnectDelay()
CP->>Math: pow(2, _reconnectAttempt)
CP->>Math: min(powResult, 120)
CP->>Math: Random().nextInt(cap * 1000)
Math-->>CP: jitterMs (exponential backoff delay)
CP->>CP: schedule reconnect after Duration(ms: jitterMs)
CP->>CP: _reconnectAttempt++
CP-->>WS: reconnect attempt
Last reviewed commit: 6b1fbad |
|
Closing — reverting the root cause PR #5617 instead of patching the import. |
|
Hey @beastoin 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! 💜 |
|
Hey @beastoin 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! 💜 |
Summary
import 'dart:math';tocapture_provider.dart— fixes Codemagic build failuremin(),pow(),Random()at line 1328-1329 requiredart:mathContext
Codemagic iOS+Android builds have been failing since this import was missing. This was introduced by a recent PR that added exponential backoff reconnect logic without the required import.
Please wait ~5 min after merging before merging other app PRs to avoid
cancel_previous_buildscancellation.🤖 Generated with Claude Code