diff --git a/lib/app/app_controller_web_core.dart b/lib/app/app_controller_web_core.dart index 28457c59..75ebd3f1 100644 --- a/lib/app/app_controller_web_core.dart +++ b/lib/app/app_controller_web_core.dart @@ -287,6 +287,33 @@ class AppController extends ChangeNotifier { ); } + Future prepareForExit() async { + // Web doesn't have native termination handling. + // Best effort flush if session persistence is configured. + if (usesRemoteSessionPersistence) { + // Remote sessions are persisted server-side. + } + } + + Map desktopStatusSnapshot() { + final runningTasks = tasksControllerInternal.running.length; + final queuedTasks = tasksControllerInternal.queue.length; + final failedTasks = tasksControllerInternal.failed.length; + final scheduledTasks = tasksControllerInternal.scheduled.length; + return { + 'connectionStatus': connection.status.name, + 'connectionLabel': connection.status.label, + 'runningTasks': runningTasks, + 'pausedTasks': 0, + 'timedOutTasks': 0, + 'queuedTasks': queuedTasks, + 'scheduledTasks': scheduledTasks, + 'failedTasks': failedTasks, + 'totalTasks': tasksControllerInternal.totalCount, + 'badgeCount': runningTasks + queuedTasks, + }; + } + @override void dispose() { unawaited(relayEventsSubscriptionInternal.cancel()); diff --git a/pubspec.yaml b/pubspec.yaml index 17184c95..ef006e93 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,9 +2,9 @@ name: xworkmate description: "XWorkmate desktop-first AI workspace shell." publish_to: 'none' -version: 1.0.0+2 -build-date: 2026-03-27 -build-id: dc1fb76 +version: 1.0.1+3 +build-date: 2026-03-28 +build-id: cc00864 environment: sdk: ^3.11.0