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.

Refactor web menu items: update comments for clarity and remove 'Share' from menu options

Dev jacob43086a54b13f
diff --git a/desktop/lib/web/shell/web_menu_items.dart b/desktop/lib/web/shell/web_menu_items.dart
index 9c56dc391..617108de1 100644
--- a/desktop/lib/web/shell/web_menu_items.dart
+++ b/desktop/lib/web/shell/web_menu_items.dart
@@ -10,10 +10,11 @@ typedef WebMenuItem = ({String command, String label, WebMenuWidth width});
/// other door in the browser chrome: new work is the `+` beside the tabs
/// (a new tab opens on "Start an agent"), agents the search button, tabs the
/// tab bar and switcher, attention the bell, closing a pane its own header;
-/// keyboard tours and grid layout stay out of a mouse-first menu. Sharing and
-/// splitting are here because the header gave them up: Share is an
-/// experimental button, off until asked for, and a split is an edge to hover,
-/// which a finger cannot. All commands still reaches every one.
+/// keyboard tours and grid layout stay out of a mouse-first menu. Splitting is
+/// here because the header gave it up: a split is an edge to hover, which a
+/// finger cannot. Sharing is not — Share is an experimental button, off until
+/// its setting is switched on, and a row here would put it back for everyone.
+/// All commands still reaches every one.
const List<List<WebMenuItem>> kWebMenuGroups = [
[
(command: 'machines.list', label: 'Machines', width: WebMenuWidth.any),
@@ -22,7 +23,6 @@ const List<List<WebMenuItem>> kWebMenuGroups = [
(command: 'app.store', label: 'Store', width: WebMenuWidth.compact),
],
[
- (command: 'agent.share', label: 'Share harness', width: WebMenuWidth.any),
// One split, always to the right: a second "down" row only lengthens the
// menu, and All commands still has Split down.
(command: 'pane.split_right', label: 'Split pane', width: WebMenuWidth.any),
diff --git a/desktop/test/web/web_app_menu_test.dart b/desktop/test/web/web_app_menu_test.dart
index 4aad8f04e..f788d10d4 100644
--- a/desktop/test/web/web_app_menu_test.dart
+++ b/desktop/test/web/web_app_menu_test.dart
@@ -62,12 +62,11 @@ void main() {
findsOneWidget,
);
expect(find.byKey(const ValueKey('web-menu:web.sign_out')), findsOneWidget);
- // An empty tab has no pane to split and no harness to share.
+ // An empty tab has no pane to split.
expect(
find.byKey(const ValueKey('web-menu:pane.split_right')),
findsNothing,
);
- expect(find.byKey(const ValueKey('web-menu:agent.share')), findsNothing);
await tester.tap(find.byKey(const ValueKey('web-menu:app.settings')));
await tester.pump(const Duration(milliseconds: 400));
expect(find.byType(SettingsScreen), findsOneWidget);
diff --git a/desktop/test/web_menu_items_test.dart b/desktop/test/web_menu_items_test.dart
index 4553e3e76..84d2758de 100644
--- a/desktop/test/web_menu_items_test.dart
+++ b/desktop/test/web_menu_items_test.dart
@@ -33,6 +33,8 @@ void main() {
'swarm.new',
'harnesses.list',
'navigation.needs_input',
+ // Share is the Experimental setting's to show, never the menu's.
+ 'agent.share',
'pane.split_down',
'pane.close',
'pane.zoom',
@@ -44,14 +46,14 @@ void main() {
}
});
- test('sharing and one split, to the right, have a row', () {
+ test('one split, to the right, has a row', () {
final all = _commands(runnableWebMenu((_) => true, compact: true));
- expect(all, containsAll(['agent.share', 'pane.split_right']));
+ expect(all, contains('pane.split_right'));
});
test('rows that cannot run, and groups left empty, are not drawn', () {
final menu = runnableWebMenu(
- (command) => !command.startsWith('pane.') && command != 'agent.share',
+ (command) => !command.startsWith('pane.'),
compact: false,
);
expect(menu, hasLength(kWebMenuGroups.length - 1));