feat: add local-first private AI digest workflow

Migrate app code into canonical feature slices, add phone-only AI digest scheduling and review, wire local notification/background task support, and cover the flow with tests.
This commit is contained in:
Rijad Zuzo
2026-05-17 00:17:20 +02:00
parent dab50abf0e
commit f655adfbea
212 changed files with 24178 additions and 15895 deletions
+4
View File
@@ -0,0 +1,4 @@
# Reachability
Network availability checks and platform-specific reachability code live here.
This folder should answer "can we talk to the network?" and nothing more.
@@ -30,19 +30,17 @@ class IoNetworkReachability implements NetworkReachability {
Stream<bool> watch({Duration timeout = const Duration(seconds: 2)}) {
final Stream<dynamic> changes =
_connectivity.onConnectivityChanged as Stream<dynamic>;
return changes
.asyncMap((dynamic event) async {
final Iterable<ConnectivityResult> results =
_normalizeConnectivityResults(event);
final bool hasTransport = results.any(
(ConnectivityResult result) => result != ConnectivityResult.none,
);
if (!hasTransport) {
return false;
}
return isReachable(timeout: timeout);
})
.distinct();
return changes.asyncMap((dynamic event) async {
final Iterable<ConnectivityResult> results =
_normalizeConnectivityResults(event);
final bool hasTransport = results.any(
(ConnectivityResult result) => result != ConnectivityResult.none,
);
if (!hasTransport) {
return false;
}
return isReachable(timeout: timeout);
}).distinct();
}
Iterable<ConnectivityResult> _normalizeConnectivityResults(dynamic event) {