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.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
Merge batch 11-05 i2150: #3188 (#3193)
0xken152def4eed8ff6
diff --git a/desktop/lib/super_tabs/controller.dart b/desktop/lib/super_tabs/controller.dartindex c0cb2a2d8..c60ab3663 100644--- a/desktop/lib/super_tabs/controller.dart+++ b/desktop/lib/super_tabs/controller.dart@@ -411,7 +411,7 @@ class SuperTabController extends ChangeNotifier {openedThread = root == null ? null : (conversationId: to, root: root);threadTarget = null;_threadUnshown = root != null;- _reopenThread = root != null;+ _reopenThread = false;}}@@ -4019,7 +4019,10 @@ class SuperTabController extends ChangeNotifier {_before.removeWhere((id, _) => !allowed.contains(id));_readAt.removeWhere((id, _) => removed.contains(id));if (!allowed.contains(selectedId)) {- selectedId = next.projects.firstOrNull?.leadConversationId ?? 'lead';+ _moveView(+ to: next.projects.firstOrNull?.leadConversationId ?? 'lead',+ );+ if (openedThread != null) unawaited(loadThread());}selectedId = _shownFor(selectedId);if (localAccessChanged) _saveSoon();diff --git a/desktop/test/super_tab_thread_composer_test.dart b/desktop/test/super_tab_thread_composer_test.dartindex e1d3706f4..8c39e077f 100644--- a/desktop/test/super_tab_thread_composer_test.dart+++ b/desktop/test/super_tab_thread_composer_test.dart@@ -621,6 +621,54 @@ void main() {},);+ testThread('returning to a chat reads its thread only once', (+ tester,+ ) async {+ final server = threaded();+ final c = await openThread(tester, server);+ await c.select('offline');+ await tester.pumpAndSettle();+ var reads = 0;+ server.onRead = (path) {+ if (Uri.parse(path).queryParameters['thread'] == 'message-1') reads++;+ };++ await c.select('lead');+ await tester.pumpAndSettle();+ expect(c.threadOnScreen, 'message-1');+ expect(reads, 1);++ (server.state['conversations'] as List).first['title'] = 'Renamed lead';+ await c.refresh();+ await tester.pumpAndSettle();+ expect(c.threadOnScreen, 'message-1');+ expect(reads, 1);+ });++ testThread('losing the selected chat restores the fallback thread', (+ tester,+ ) async {+ final server = threaded();+ final c = await openThread(tester, server);+ await c.select('offline');+ await tester.pumpAndSettle();+ expect(panel, findsNothing);+ var reads = 0;+ server.onRead = (path) {+ if (Uri.parse(path).queryParameters['thread'] == 'message-1') reads++;+ };++ (server.state['conversations'] as List).removeWhere(+ (chat) => chat['id'] == 'offline',+ );+ await c.refresh();+ await tester.pumpAndSettle();+ expect(c.selectedId, 'lead');+ expect(c.threadOnScreen, 'message-1');+ expect(panel, findsOneWidget);+ expect(reads, 1);+ });+test('open threads survive a saved view restart per conversation',() async {