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 merge/mobile-main

bubu-dudu7ae9720847ed
diff --cc mobile/lib/state/phone_desk.dart
index 9812a8e4e,7af0397c3..1a71f2414
--- a/mobile/lib/state/phone_desk.dart
+++ b/mobile/lib/state/phone_desk.dart
@@@ -232,21 -232,12 +232,23 @@@ class PhoneDesk
/// so still names the tab Find was opened over. The phone is in the picked tab
/// from here, as it is after [createTabFor]. A tab closed on another computer
/// while the form was open falls back to the tab the phone is in.
- void adopt(AgentRef agent, {String? name, String? tabId}) {
+ ///
+ /// [newTab] is the `+` at the end of Find's tab chips: the agent opens a tab
+ /// of its own ([createTabFor]), the way the desktop's `+` opens a New Tab that
+ /// becomes everyone's tab once its first harness is in it. It travels with
+ /// the request rather than being armed here, so only the agent asked for
+ /// from that `+` gets the tab — never a fork or a form opened later.
+ void adopt(
+ AgentRef agent, {
+ String? name,
+ String? tabId,
+ bool newTab = false,
+ }) {
if (!_state.enabled) return;
- final wanted = _newTabForNextAgent;
+ final wanted = newTab || _newTabForNextAgent;
+ final wantedName = _newTabName;
_newTabForNextAgent = false;
+ _newTabName = null;
final pane = DeskPaneRef(
machineId: agent.machineId,
agentId: agent.agentId,