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.

feat(web): drop Share, Split and Close pane from the app menu

Dev jacob0bacfe60a9d0
diff --git a/desktop/lib/web/shell/web_menu_items.dart b/desktop/lib/web/shell/web_menu_items.dart
index c6e95131d..3361b8afc 100644
--- a/desktop/lib/web/shell/web_menu_items.dart
+++ b/desktop/lib/web/shell/web_menu_items.dart
@@ -9,8 +9,9 @@ typedef WebMenuItem = ({String command, String label, WebMenuWidth width});
/// What the menu offers, in groups a thin rule separates. Only what has no
/// 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; keyboard tours and grid layout
-/// stay out of a mouse-first menu. All commands still reaches every one.
+/// tab bar and switcher, attention the bell, sharing and pane work the pane's
+/// own header; keyboard tours and grid layout stay out of a mouse-first menu.
+/// All commands still reaches every one.
const List<List<WebMenuItem>> kWebMenuGroups = [
[
(command: 'machines.list', label: 'Machines', width: WebMenuWidth.any),
@@ -18,13 +19,6 @@ const List<List<WebMenuItem>> kWebMenuGroups = [
// The wide bar has its own Store button; the phone bar gives it up.
(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),
- (command: 'pane.close', label: 'Close pane', width: WebMenuWidth.any),
- ],
[
(command: 'navigation.history', label: 'History', width: WebMenuWidth.any),
(
diff --git a/desktop/test/web/web_app_menu_test.dart b/desktop/test/web/web_app_menu_test.dart
index 8c0d5c3ba..ddf56a341 100644
--- a/desktop/test/web/web_app_menu_test.dart
+++ b/desktop/test/web/web_app_menu_test.dart
@@ -62,12 +62,6 @@ void main() {
findsOneWidget,
);
expect(find.byKey(const ValueKey('web-menu:web.sign_out')), findsOneWidget);
- // An empty tab has no pane to split, zoom or close.
- expect(find.byKey(const ValueKey('web-menu:pane.close')), findsNothing);
- expect(
- find.byKey(const ValueKey('web-menu:pane.split_right')),
- 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 2dcfbb091..2ff983251 100644
--- a/desktop/test/web_menu_items_test.dart
+++ b/desktop/test/web_menu_items_test.dart
@@ -33,6 +33,10 @@ void main() {
'swarm.new',
'harnesses.list',
'navigation.needs_input',
+ 'agent.share',
+ 'pane.split_right',
+ 'pane.split_down',
+ 'pane.close',
'pane.zoom',
'pane.layout',
'keyboard.help',
@@ -42,15 +46,9 @@ void main() {
}
});
- test('the menu splits one way only: right', () {
- final all = _commands(runnableWebMenu((_) => true, compact: false));
- expect(all, contains('pane.split_right'));
- expect(all, isNot(contains('pane.split_down')));
- });
-
test('rows that cannot run, and groups left empty, are not drawn', () {
final menu = runnableWebMenu(
- (command) => !command.startsWith('pane.') && command != 'agent.share',
+ (command) => !command.endsWith('.list'),
compact: false,
);
expect(menu, hasLength(kWebMenuGroups.length - 1));