PAILot Flutter - TODO

High Priority

MQTT Protocol Migration — NEXT MAJOR TASK

Replace ad-hoc WebSocket protocol with MQTT for reliable, ordered messaging.

Why: Current protocol has no delivery guarantees, no message ordering, no offline queuing. Messages get lost on daemon restart, duplicated on catch_up, and arrive out of order.

Server (AIBroker): - Embed MQTT broker (aedes) in daemon alongside existing WebSocket - Topics: pailot/{sessionId}/out (server→app), pailot/{sessionId}/in (app→server) - System topics: pailot/sessions, pailot/status, pailot/typing/{sessionId} - QoS 1 (at-least-once) for messages, QoS 0 for typing indicators - Retained messages for session list and last screenshot - Clean session=false so broker queues messages for offline clients - Bridge MQTT messages to/from existing AIBP routing

Flutter App: - Replace WebSocket client with mqtt_client package - Subscribe to pailot/+/out for all session messages - Publish to pailot/{sessionId}/in for user messages - Message ID-based dedup (MQTT can deliver duplicates with QoS 1) - Ordered by broker — no client-side sorting needed - Offline messages delivered automatically on reconnect

Migration: - Phase 1: Add MQTT alongside WebSocket, dual-publish - Phase 2: Flutter app switches to MQTT - Phase 3: Remove WebSocket from PAILot gateway

Pending Features

File Transfer (send/receive arbitrary files)

Voice+Image Combined Message

Push Notifications (iOS APNs) — NEXT SESSION with user at computer

App Name Renaming (Runner → PAILot)

Known Issues

Audio

UI

Navigation