Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Merge remote-tracking branch 'origin/main' into feat/mobile-ios-android

Dev jacobdd87e4b1cc19
diff --cc mobile/lib/state/app_state.dart
index b999175b9,7fd34fbf6..8af177d00
--- a/mobile/lib/state/app_state.dart
+++ b/mobile/lib/state/app_state.dart
@@@ -5690,20 -5371,12 +5690,25 @@@ class AppNotifier extends ChangeNotifie
);
}
+ /// Open the stream for a tile that already knows what it wants.
+ ///
+ /// Separate from [assignAgentToPane] because a restored tile takes this path
+ /// on its own, later, when its machine finally answers — the intent was
+ /// settled at launch, and nothing about the selection should move again then.
- Future<void> _attachSession(TerminalPane pane) async {
+ /// ⚠️ **Every session built here CLAIMS the terminal** — [takeControl] is
+ /// true unless the caller is a guess about where the thumb goes next
+ /// ([warmAgentPane]), and nothing else opens a stream.
+ ///
+ /// The phone used to ask politely and land on a read-only stream with a "Take
+ /// control" band over it, which is what opening the app looked like whenever
+ /// a desktop had the agent — a band, an empty terminal, and a press before a
+ /// single key could be typed. A phone is picked up to type at an agent, so
+ /// arriving IS the claim now; the desktop it displaces says who took it and
+ /// has the same button back.
+ Future<void> _attachSession(
+ TerminalPane pane, {
+ bool takeControl = true,
+ }) async {
if (_disposed || !allPanes.contains(pane) || pane.session != null) return;
final wantedAgentId = pane.agentId;
if (wantedAgentId == null) return;