From cb470d33d2665fcc6f8448d2736777656cf0cbe7 Mon Sep 17 00:00:00 2001
From: Matthias Nott <mnott@mnsoft.org>
Date: Tue, 24 Mar 2026 00:25:07 +0100
Subject: [PATCH] feat: MQTT migration, offline catch_up, clean session, image support
---
lib/screens/navigate_screen.dart | 19 +++++--------------
1 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/lib/screens/navigate_screen.dart b/lib/screens/navigate_screen.dart
index 9ffa4cf..b0cfc88 100644
--- a/lib/screens/navigate_screen.dart
+++ b/lib/screens/navigate_screen.dart
@@ -192,20 +192,11 @@
void _sendKey(String key) {
_haptic();
- // Send via WebSocket - the chat screen's WS is in the provider
- // We need to access the WS through the provider system
- // For now, send a nav command message
+ // Send via MQTT - the chat screen's MQTT service is in the provider
final activeSessionId = ref.read(activeSessionIdProvider);
- // Build the navigate command
- // This sends a key press to the AIBroker daemon
- // which forwards it to the active terminal session
- // The WS is managed by ChatScreen, so we'll use a message approach
-
- // Since we can't directly access the WS from here,
- // we send through the provider approach - the message will be picked up
- // by the WS service in ChatScreen via a shared notification mechanism.
- // For simplicity, we use a global event bus pattern.
+ // Send a key press to the AIBroker daemon via the MQTT service.
+ // NavigateNotifier bridges the navigate screen to the chat screen's MQTT service.
NavigateNotifier.instance?.sendKey(key, activeSessionId);
@@ -228,8 +219,8 @@
}
}
-/// Global notifier to bridge navigate screen to WebSocket.
-/// Set by ChatScreen when WS is initialized.
+/// Global notifier to bridge navigate screen to MQTT service.
+/// Set by ChatScreen when MQTT is initialized.
class NavigateNotifier {
static NavigateNotifier? instance;
--
Gitblit v1.3.1