Skip to content

Fix Windows notification color inversion#211

Open
rtibbles wants to merge 1 commit intomainfrom
codex/fix-kolibri-tray-icon-color-inversion
Open

Fix Windows notification color inversion#211
rtibbles wants to merge 1 commit intomainfrom
codex/fix-kolibri-tray-icon-color-inversion

Conversation

@rtibbles
Copy link
Copy Markdown
Member

@rtibbles rtibbles commented Dec 3, 2025

Summary

  • Updates Windows notifications to use the NotificationMessage wxPython component to ensure notification color handling
  • Adds error handling in case the notification fails to create

Fixes #184

Testing

On Windows 11, go to Settings > Personalization > Colors.
Set "Choose your mode" to Light.
Launch the Kolibri application.
Wait for the "Kolibri is starting..." or "Kolibri Ready" notification to appear.
Observe that the colors of the Kolibri logo within the notification are no longer inverted.


Codex Task

@rtibbles rtibbles force-pushed the codex/fix-kolibri-tray-icon-color-inversion branch from 492bae9 to 2520cbd Compare December 3, 2025 17:23
@rtibbles rtibbles changed the title Remove redundant wxPython import comment Fix Windows notification color inversion Dec 3, 2025
@rtibbles rtibbles marked this pull request as draft December 3, 2025 19:02
@rtibbles rtibbles requested a review from rtibblesbot March 4, 2026 03:45
Copy link
Copy Markdown

@rtibblesbot rtibblesbot left a comment

Choose a reason for hiding this comment

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

Clean fix for the Windows notification icon color inversion (#184). Replaces legacy ShowBalloon() with wx.adv.NotificationMessage, which handles icon rendering correctly across Windows themes. CI passing.

  • praise: Good defensive fallback chain and error handling throughout

@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Reviewed the pull request diff checking for:

  • Correctness: bugs, edge cases, undocumented behavior, resource leaks, hardcoded values
  • Design: unnecessary complexity, naming, readability, comment accuracy, redundant state
  • Architecture: duplicated concerns, minimal interfaces, composition over inheritance
  • Testing: behavior-based assertions, mocks only at hard boundaries, accurate coverage
  • Completeness: missing dependencies, unupdated usages, i18n, accessibility, security
  • Principles: DRY (same reason to change), SRP, Rule of Three (no premature abstraction)
  • Checked CI status and linked issue acceptance criteria
  • For UI changes: inspected screenshots for layout, visual completeness, and consistency

logging.error(
f"Failed to show notification with NotificationMessage: {notification_error}"
)
self._show_legacy_notification(title, message, timeout)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

praise: Well-structured fallback chain: NotificationMessageShowBalloonMessageBox. Each layer catches specific exceptions and logs before falling through, so notifications degrade gracefully on older Windows versions or unexpected runtime errors.

# Cached icon used for notifications
self._tray_icon = None
# Keep reference alive while shown
self._last_notification = None
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

praise: Good call keeping _last_notification as an instance attribute — prevents the NotificationMessage object from being garbage-collected while the notification is still visible.

@rtibbles rtibbles marked this pull request as ready for review March 5, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows Notification Icon Colors are Inverted in Light Theme

2 participants