Commit Graph
14 Commits
Author SHA1 Message Date
Javier G. Montoya S.andGitHub 8d6480c51f chore(rust): bump whitenoise-rs (#365) 2026-02-22 02:54:43 -03:00
AndrewandGitHub 6113687a5b feat: add share button under "Invite to White Noise" callout (#354)
* feat: add share button under "Invite to White Noise" callout

* fix: CHANGELOG link style

* feat: add mocked share_plus test for invite button

* fix: code review & linting
2026-02-20 17:50:17 -03:00
JeffGandGitHub ae203e9d65 Update iOS icons and app name for staging (#330)
* Update iOS icons and app name for staging

* fix(ios): harden build script and correct Release display name

- Add cargo check to environment validation in build_ios.sh
- Add existence check before cd rust to give informative errors
- Replace fragile cd/pod install/cd with pushd/popd and error handling
- Add POSIX-compliant trailing newline to build_ios.sh
- Fix project-level Release APP_DISPLAY_NAME ("White Noise staging" → "White Noise") to match target-level value

* feat(android): add staging flavor launcher icons

Add ic_launcher_foreground, ic_launcher_background, ic_launcher_monochrome,
and legacy ic_launcher PNGs for all densities (mdpi through xxxhdpi) plus
the mipmap-anydpi-v26 adaptive icon XML in the staging source set.

* fix(ios): add CocoaPods availability check to build script

* chore: replace LICENSE copies with symlinks to root

Fixes missing license warnings during iOS builds by ensuring
rust/ and rust_builder/ both symlink to the root LICENSE file.
2026-02-20 19:50:04 +01:00
Javier G. Montoya S.andGitHub d3898b2303 fix(user_search): use already in-memory contacts and bump rust crate for properly working search (#318) 2026-02-19 22:26:50 -03:00
JeffGandGitHub c3b4a19098 fix: handle app upgrade crashes from incompatible data and foreground service receivers (#312)
* fix: handle app upgrade crashes from incompatible data and foreground service

When upgrading from an older version, multiple issues caused crashes:

1. The Rust whitenoise crate's secrets store format changed, causing
   "Secrets store error: Key not found" during initialization. Since
   the Rust singleton (tokio::sync::OnceCell) can't be reinitialized
   after partial failure, a version marker file now detects stale data
   and wipes the data directory before Rust init runs.

2. The flutter_foreground_task plugin stored foregroundServiceType
   0x201 (dataSync|shortService) in native SharedPreferences, but the
   manifest only declares dataSync (0x01). Android rejected
   startForeground() with IllegalArgumentException. A one-time cleanup
   in MainActivity.onCreate() clears these native prefs.

3. FlutterSecureStorage's internal migration from EncryptedSharedPreferences
   re-introduced the old active_account_pubkey after deleteAll(). Fixed by
   calling readAll() first to trigger the migration, then deleteAll().

4. The plugin's RebootReceiver and RestartReceiver caused cascade crashes
   on package update. Both are now disabled via manifest merge overrides.

* chore: remove stale url_launcher from generated plugin files and add build improvements

Remove url_launcher references from Linux/Windows plugin registrants
(dependency was already removed from pubspec.yaml). Add split APK,
AAB build targets and quiet spinner to OpenSSL build script.
2026-02-19 14:47:51 +01:00
a31e528776 Refactor camera permission flow (#194)
* Refactor camera permission flow

* Update CHANGELOG.md

* chore: add permission handler

* feat: add scanner translations

* fix: request camera permission and use permission handler to go to settings in case of denied

* fix: show camera option in ios settings

---------

Co-authored-by: josefinalliende <mariajosefinaalliende@gmail.com>
2026-02-18 14:43:15 +03:00
027089af56 Feat/local notifications (#262)
* chore: add flutter local notifications and flutter foreground task deps

* feat: add bridge notifications methods

* feat: add foreground service to keep notifications stream alive

* feat: add notification service and provider

* feat: add provider to store active chat for notification purposes

* feat: add active chat provider to store if we are in a chat screen

* feat: add active chat route observer to clear active chat on navigation

* feat: add use active chat hook to cancel notifications on active chat

* feat: use active chat hook on invite and chat screen

* feat: translate notifications messages in notification provider

* fix: improve notification system reliability and reduce duplicate state tracking (#271)

* fix: improve notification system reliability and reduce duplicate state tracking

- Simplify useActiveChat hook: remove duplicate set/clear that overlaps
  with ActiveChatRouteObserver, keep only lifecycle handling and
  notification cancellation
- Fix provider modification during widget build: defer
  ActiveChatRouteObserver state updates via Future.microtask
- Add error handling in _initializeAndListen with try/catch
- Wire up battery optimization exemption request after foreground
  service start
- Replace non-deterministic String.hashCode with SHA-256-based
  notification ID generation
- Remove unused RECEIVE_BOOT_COMPLETED permission from manifest
- Expand test coverage for disabled-mode foreground service,
  notification service, and deterministic ID generation

* fix: restore active chat tracking in useActiveChat hook with deferred provider updates

The hook's setActiveChat/clearActiveChat calls were removed in the previous
commit, breaking notification clearing — users received notifications for
the chat they were actively viewing.

Restore the calls but defer them via Future.microtask() to avoid Riverpod's
'provider modification during build' error. Add ref.mounted guards to the
ActiveChatNotifier to handle disposal edge cases.

* feat: improve notifications for multiple accounts (#272)

* fix: improve notification system reliability and reduce duplicate state tracking

- Simplify useActiveChat hook: remove duplicate set/clear that overlaps
  with ActiveChatRouteObserver, keep only lifecycle handling and
  notification cancellation
- Fix provider modification during widget build: defer
  ActiveChatRouteObserver state updates via Future.microtask
- Add error handling in _initializeAndListen with try/catch
- Wire up battery optimization exemption request after foreground
  service start
- Replace non-deterministic String.hashCode with SHA-256-based
  notification ID generation
- Remove unused RECEIVE_BOOT_COMPLETED permission from manifest
- Expand test coverage for disabled-mode foreground service,
  notification service, and deterministic ID generation

* feat: show receiver name in notifications when multiple accounts are logged in

When more than one account exists, notification titles include the
receiver's display name in parentheses (e.g. 'Alice (MyAccount)') so
users know which account the notification is for. Single-account users
see no change.

Closes #265

* feat: switch to correct account when notification is tapped

Include receiver pubkey in the notification payload so the tap handler
can switch to the correct account before navigating to the chat or
invite screen. Exposes a navigator key from Routes so navigation can
happen outside the widget tree.

* fix: use fresh account count per notification and JSON-encode payloads

- Fetch accounts on each notification instead of capturing count once at
  init, so multi-account display stays current when accounts change
- Replace pipe-delimited notification payload with JSON encoding to
  avoid misparse when groupId contains '|' characters
- Add validation and error handling for malformed payloads
- Expand tests for JSON payload format and edge cases

* fix: address review feedback and upgrade flutter_local_notifications to v20

- Upgrade flutter_local_notifications ^19.0.0 → ^20.1.0 (named params)
- Upgrade crypto ^3.0.6 → ^3.0.7
- Bump Java compatibility to 17 for v20 compatibility
- Guard _initializeAndListen against provider disposal with ref.mounted
- Change _initializeAndListen to void return (fire-and-forget)
- Make Future.microtask timing consistent in useActiveChat hook
- Add _initialized warning in cancelForGroup for consistency
- Remove non-essential comments in onRepeatEvent
- Use valid 64-char hex pubkeys in tests
- Fix uninitService test to assert on its own mock

* fix: await show, validate payloads strictly, use realistic test pubkeys

- Await notificationService.show in _handleNotificationUpdate so errors
  propagate to the stream's try/catch
- Wrap stream callback in try/catch to prevent unhandled async exceptions
- Reject unknown triggers and empty receiverPubkey in _handleNotificationTap
- Replace placeholder pubkeys (pk1/pk2) with valid 64-char hex strings
- Add tests for empty receiverPubkey and unknown trigger rejection

* test: improve notification coverage from 98.05% to 99.40%

- Add tests for handleNotificationUpdate (active chat skip, multi-account
  receiver name, DM/group formatting, correct pubkey forwarding)
- Add tests for requestPermission (null plugin, granted, denied, null result)
- Add tests for foregroundServiceProvider and notificationServiceProvider
- Fix uninitService test to use its own mock
- Add coverage exclusions for platform-gated code that requires Android
  runtime (providers, _initializeAndListen, _onNotificationTap,
  _navigateToNotificationTarget, _KeepAliveTaskHandler, static
  FlutterForegroundTask calls)
- Make handleNotificationUpdate @visibleForTesting for direct testing

---------

Co-authored-by: JeffG <202880+erskingardner@users.noreply.github.com>
2026-02-16 14:36:05 +01:00
JeffGandGitHub 113b4fb87c feat(widgets): add WnCarouselIndicator component (#186)
* feat(widgets): add WnCarouselIndicator component

Implement carousel indicator widget for showing position in paginated content.

- Active dot expands (28px) with primary fill color
- Inactive dots are circular (8px) with secondary fill color
- Directional bounce animation using elasticOut curve (600ms)
- Fast color transition (150ms) for smooth deactivation
- 8px gap between indicator dots

Closes #103

* fix: use .r for border radius and remove context anti-pattern

- Change BorderRadius.circular(4.h) to BorderRadius.circular(4.r)
- Remove stored BuildContext field in _InteractiveCarouselIndicator
2026-02-06 11:22:30 +01:00
PepiandGitHub 2cec4e850b Migrate to white noise app bundle id (#163)
* chore: use whitenoise app team and bundle id

* chore: add apk commands

* chore: rename package from sloth to whitenoise

* docs: remove sloth word from readme and agents.md

* chore: replace sloth texts with whitenoise

* chore: remove unused error screen

* docs: copy LICENSE file from whitenoise repo

* chore: upgrade version to 0.3.0+15 so that android apk can replace old whitenoise ones

* refactor: rename MyApp to WnApp

* chore: use new staging bundle id

* chore: rename org.parres to IPF

* chore: remove .so file

* fix: make android signer work after bundle id change

* core: replace org.parres with dev.ipf for widgebtook

* test: improve coverage
2026-02-05 14:45:04 -03:00
Javier G. Montoya S.andGitHub 963c1792c2 feat(rust/src/api/accounts): add is_following_user method (#131) 2026-01-29 17:21:23 -03:00
PepiandGitHub e55e2f30d5 Emoji picker for reactions (#81)
* feat: add icons for emojis categories

* feat: add emoji picker

* feat: move message actions to screen and use emoji picker

* fix: chat input focus after reaction

* docs: update changelog
2026-01-26 16:41:34 -03:00
PepiandGitHub 754842417f Feat/auth-and-navigation (#6)
* feat: add auth providers, hooks and services

* feat: add more base components

* feat: add routing and main screens

* chore: add coverage-report just command

* docs: improve readme

* chore: add android buidl scrips from whitenoise repo
2025-12-18 12:36:03 -03:00
josefinalliende 72a565cdaf chore: setup rust bridge 2025-12-01 10:23:00 -03:00
josefinalliende adea663d6e chore: setup new flutter project 2025-11-24 15:02:01 -03:00