Skip to content

v0.6.7: profile pictures on notifications; Windows freeze fixes (from #26) - #38

Merged
karem505 merged 2 commits into
masterfrom
ccr-d1abd228-5xa5l1
Oct 9, 2026
Merged

karem505 merged 2 commits into
masterfrom
ccr-d1abd228-5xa5l1

Conversation

@karem505

@karem505 karem505 commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

This is the v0.6.7 release. Notes are in docs/release-notes/v0.6.7.md.

Profile pictures on notifications (suggested in #3)

  • bridge.js: takes the icon WhatsApp passes to new Notification() or registration.showNotification(). Only blob:, data: and https: URLs are fetched, without credentials. The image is cropped to a centre square, scaled to 96px and re-encoded as PNG, because Windows toasts can't show WebP. The bridge waits at most 1.5s for it; if the picture can't be loaded in time, the toast goes out without it.

  • notify command: takes an optional icon (base64 PNG).

  • New notif_icon.rs:

    • decodes the base64 itself, so there's no new crate and the Flatpak sources are unchanged;
    • accepts only a PNG of up to 256 KB;
    • writes it under the app cache dir with a content-hash name and deletes files older than a day.

    It writes only after the lock, the Notifications setting and de-duplication have passed.

  • Display: on Windows it's Toast::icon(path, IconCrop::Circular); on Linux the plugin's .icon(path). macOS always shows the app icon.

  • Logging: the log only records notif path: icon <scheme> ok|unavailable and "toast shown with picture", never the picture or its URL.

Windows freeze fixes (ported from #26 by @matheuscardosoj)

  • Async window-creating commands: add_account, open_account, rename_account, remove_account, open_settings and lock_app are now async. A synchronous command runs inside WebView2's IPC callback, and creating a WebView2 there can deadlock (wry#583).
  • Account changes: they're serialized with accounts::lock_mutations(). An added account whose window fails to build is rolled back.
  • Autostart off is now a no-op when it's already off. Windows used to report NotFound.

Testing

  • On Linux: clippy (-D warnings) and fmt are clean, cargo test passes (106 tests, 4 of them new for icon decode, validation and pruning), and the bridge tests pass, including a new one for picture forwarding, timeouts and refused URL schemes.
  • cargo clippy cross-checked for x86_64-pc-windows-msvc and aarch64-apple-darwin. My code adds no new warnings there; the remaining hits are older lints elsewhere on those targets.
  • Not run against a logged-in WhatsApp, so it's unverified whether WhatsApp's picture URL can be fetched from the page. If it can't, the log shows icon … unavailable and the toast looks as before.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L8dUghRiNrKrHHR5BNMSSD

claude and others added 2 commits October 9, 2026 23:12
Ported from #26 by @matheuscardosoj.

- Commands that create a window (add/open account, open settings, lock now)
  are now async. A synchronous command runs inside WebView2's IPC callback,
  and building another WebView2 there can deadlock on Windows (wry#583).
- Account commands hold one lock across load-modify-save, now that they can
  run concurrently, and adding an account rolls back if its window fails to
  build instead of leaving an account with no window.
- Saving Settings with "Launch at system startup" off no longer warns on
  Windows when the Run entry is already absent.

Co-Authored-By: matheuscardosoj <97991988+matheuscardosoj@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L8dUghRiNrKrHHR5BNMSSD
bridge.js takes the picture WhatsApp attaches to its notification (blob:,
data: or https: URL), crops it to a square, scales it to 96px and re-encodes
it as PNG, giving up after 1.5s so a toast is never held back. Rust checks
it is a PNG of a sensible size, stores it in the app cache under a
content-derived name (pruned after a day) and attaches it: round on a
Windows toast, the notification icon on Linux. The log records only whether
a picture was attached, per URL scheme.

Also bumps the version to 0.6.7 with release notes.

Suggested by @mhanxhan in #3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L8dUghRiNrKrHHR5BNMSSD
@karem505 karem505 changed the title fix(windows): build windows from async commands; quiet autostart-off (from #26) v0.6.7: profile pictures on notifications; Windows freeze fixes (from #26) Oct 9, 2026
@karem505
karem505 merged commit b0b574a into master Oct 9, 2026
7 checks 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.

2 participants