Skip to content

Conversation

@adithya-234
Copy link
Contributor

…race condition

  • Use capability.id instead of title for validation checks in add_app_provider
  • Improve external_integration validation to handle actions without webhook
  • Trim chat and memory prompts before submission
  • Add low battery warning (<10%) on firmware update page to prevent bricking
  • Disable firmware update button when battery is too low
  • Fix race condition in WAL sync where _device could become null during async operations

…race condition

- Use capability.id instead of title for validation checks in add_app_provider
- Improve external_integration validation to handle actions without webhook
- Trim chat and memory prompts before submission
- Add low battery warning (<10%) on firmware update page to prevent bricking
- Disable firmware update button when battery is too low
- Fix race condition in WAL sync where _device could become null during async operations
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces several important fixes and improvements. It correctly changes app provider validation to use capability.id and improves logic for external integrations. It also adds a crucial safety feature for firmware updates by checking for low battery, displaying a warning, and disabling the update button. Additionally, it fixes a race condition in the WAL sync service by correctly handling a potentially nullable device object during async operations. My review focuses on adherence to the project's coding conventions, specifically regarding color opacity modification, ensuring the use of withValues({double? alpha}) instead of withOpacity() as per established rules.

Comment on lines +437 to +439
color: Colors.red.withOpacity(0.1),
borderRadius: BorderRadius.circular(12),
border: Border.all(color: Colors.red.withOpacity(0.3)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The general rules suggest using the withValues({double? alpha}) extension method instead of the deprecated withOpacity() for modifying a color's opacity. This should be applied here for consistency and to adhere to best practices.

Suggested change
color: Colors.red.withOpacity(0.1),
borderRadius: BorderRadius.circular(12),
border: Border.all(color: Colors.red.withOpacity(0.3)),
color: Colors.red.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(12),
border: Border.all(color: Colors.red.withValues(alpha: 0.3)),
References
  1. The project's general rules recommend using the withValues({double? alpha}) extension method for changing a color's opacity, as withOpacity() is considered deprecated.

child: Text(
otaUpdateSteps.isEmpty ? "Start Update" : "Update",
style: TextStyle(
color: isBatteryTooLow ? Colors.white.withOpacity(0.4) : Colors.white,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

According to the general rules, withValues({double? alpha}) should be used instead of withOpacity(). Please update this line to follow the established convention.

Suggested change
color: isBatteryTooLow ? Colors.white.withOpacity(0.4) : Colors.white,
color: isBatteryTooLow ? Colors.white.withValues(alpha: 0.4) : Colors.white,
References
  1. The project's general rules recommend using the withValues({double? alpha}) extension method for changing a color's opacity, as withOpacity() is considered deprecated.

@adithya-234 adithya-234 changed the title Fix app provider validation, add firmware battery check, and fix WAL … Fix app provider validation, add firmware battery check, and fix Bugs Dec 26, 2025
@adithya-234 adithya-234 changed the title Fix app provider validation, add firmware battery check, and fix Bugs Fix app provider validation, add firmware battery check, and Fix WAL Dec 26, 2025
@mdmohsin7
Copy link
Member

too many changes in a single PR, also conflicts, pls feel free to reopen when its ready for review and also does not have multiple changes/fixes in a single PR

@mdmohsin7 mdmohsin7 closed this Jan 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

Hey @adithya-234 👋

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:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our roadmap and vision

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! 💜

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.

2 participants