Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/phone.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ line too. A touchscreen laptop whose primary pointer is a mouse keeps Enter's
send.

At phone widths, Settings opens a list in two groups. This phone:
Notifications, Appearance and Privacy, the two analytics switches. Machine: the
Notifications, Appearance, Privacy, the two analytics switches, and
Experiments, which each device turns on for itself: Bots on the computer leaves
the phone's bar without its Bots tab until the phone switches them on too.
Machine: the
machine itself with its connection, which opens Machines, then Usage, Voice and
Archived threads. Each opens a screen of its own; the back button or browser
Back returns to the list. Theme and accent belong to the current device;
Expand All @@ -52,7 +55,7 @@ CLIProxyAPI gateway on or off
([providers](providers.md#switching-the-gateway-from-limits)).

Provider accounts, keyboard shortcuts, plugins, resource limits, the brain, the
task manager, worktrees, automatic compaction, diagnostics, experiments, the
task manager, worktrees, automatic compaction, diagnostics, the
tour, adding and removing devices and server configuration stay in desktop
settings; a link or a card in a conversation that names one of those pages
still opens it. Project management stays on the desktop too. This smaller
Expand Down
6 changes: 5 additions & 1 deletion packages/ui/src/components/MobileSettings.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import TelemetrySettings from './TelemetrySettings.svelte';
import { AppWindow, ArchiveRestore, ArrowLeft, Bell, ChevronRight, Coins, Gauge, KeyRound, Lock, Monitor, Palette, Mic } from '@lucide/svelte';
import { AppWindow, ArchiveRestore, ArrowLeft, Bell, ChevronRight, Coins, FlaskConical, Gauge, KeyRound, Lock, Monitor, Palette, Mic } from '@lucide/svelte';
import type { Store } from '../lib/store.svelte';
import { workspace } from '../lib/workspace.svelte';
import { strings } from '../lib/strings';
Expand Down Expand Up @@ -108,6 +108,10 @@
<button class="ghost row" data-testid="mobile-settings-privacy" onclick={() => { privacy = true; }}>
<Lock size={20} /><span class="ui-label">{strings.mobile.settingsPrivacy}</span><ChevronRight size={18} />
</button>
<!-- Experiments are kept per device: Bots on the computer leaves the phone's tab bar without them until the phone turns its own on. -->
<button class="ghost row" data-testid="settings-tab-experiments" onclick={() => store.showSettings('experiments')}>
<FlaskConical size={20} /><span class="ui-label">{strings.settings.tabs.experiments}</span><ChevronRight size={18} />
</button>
</div>
</section>
<section aria-labelledby="remote-machine">
Expand Down
10 changes: 9 additions & 1 deletion packages/ui/src/components/MobileSettings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,22 @@ test('the phone settings hold this phone\'s three screens and the machine\'s ess
store.showSettings();
await waitFor(home);
expect([...document.querySelectorAll<HTMLElement>('[data-testid=mobile-settings-home] .row')].map(row => row.dataset.testid)).toEqual([
'mobile-settings-phone', 'settings-tab-appearance', 'mobile-settings-privacy',
'mobile-settings-phone', 'settings-tab-appearance', 'mobile-settings-privacy', 'settings-tab-experiments',
'mobile-settings-connection', 'settings-tab-usage', 'settings-tab-voice', 'mobile-settings-browser-profiles', 'mobile-settings-windows', 'mobile-settings-archived',
'mobile-settings-secrets'
]);
// The header already says Settings, and the list's display options group the threads.
expect(document.querySelector('[data-testid=mobile-settings-home] h1')).toBeNull();
expect(document.querySelector('[data-testid=setting-group-working-threads]')).toBeNull();

// Experiments are this phone's own: Bots on the computer does not give the phone its tab until it is switched on here.
expect(document.querySelector('[data-testid=mobile-agents]')).toBeNull();
query<HTMLButtonElement>('[data-testid=settings-tab-experiments]').click();
await waitFor(() => document.querySelector('[data-testid=experiment-resident-agents]') !== null);
query<HTMLInputElement>('[data-testid=experiment-resident-agents]').click();
await waitFor(() => document.querySelector('[data-testid=mobile-tabs] [data-testid=mobile-agents]') !== null);
await back();

query<HTMLButtonElement>('[data-testid=mobile-settings-browser-profiles]').click();
await waitFor(() => document.querySelector('[data-testid=browser-profiles-card]') !== null);
await back();
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/mobile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test('phone settings expose browser profiles and allowed windows only to owners
await navigateMobile('mobile-settings');
await page.waitFor(`document.querySelector('[data-testid=mobile-settings-home]')`);
const rows = `[...document.querySelectorAll('[data-testid=mobile-settings-home] .row')].map(row => row.dataset.testid)`;
const expected = ['mobile-settings-phone', 'settings-tab-appearance', 'mobile-settings-privacy', 'mobile-settings-connection', 'settings-tab-usage', 'settings-tab-voice', 'mobile-settings-browser-profiles', 'mobile-settings-windows', 'mobile-settings-archived', 'mobile-settings-secrets'];
const expected = ['mobile-settings-phone', 'settings-tab-appearance', 'mobile-settings-privacy', 'settings-tab-experiments', 'mobile-settings-connection', 'settings-tab-usage', 'settings-tab-voice', 'mobile-settings-browser-profiles', 'mobile-settings-windows', 'mobile-settings-archived', 'mobile-settings-secrets'];
expect(await page.evaluate<string[]>(rows)).toEqual(expected);
expect(await page.evaluate(`document.querySelector('[data-testid=settings-tab-resources]') === null && document.querySelector('[data-testid=settings-tab-keyboard]') === null`)).toBe(true);
await page.evaluate(`(() => { const store=__boiteTest.workspace.active; store.client.becomes('session'); store.principal='session'; })()`);
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/whip.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ test('Whip phone controls stay reachable with agents and disable mid-hit', async
await page.screenshot(join(import.meta.dir, '.artifacts', 'whip-phone.png'));
// The phone control lives in the list's header; the bottom bar holds only the places.
expect(await page.evaluate(`!document.querySelector('[data-testid=mobile-tabs] [data-testid=whip-button-mobile]')`)).toBe(true);
// A phone's settings list has no Experiments: the page stays reachable for a test.
// The phone's own Experiments page, as its settings row opens it.
await page.evaluate(`__boiteTest.workspace.active.showSettings('experiments')`);
await page.waitFor(`document.querySelector('${toggle}')`);
await page.click('[data-testid=experiment-resident-agents]');
Expand All @@ -255,7 +255,7 @@ test('Whip phone controls stay reachable with agents and disable mid-hit', async
await page.click(button);
expect(await page.evaluate(`document.getElementById('app').getAnimations().length`)).toBe(0);
expect(await page.evaluate(`document.querySelector('[data-testid=whip-canvas]') === null`)).toBe(true);
// A phone's settings list has no Experiments: the page stays reachable for a test.
// The phone's own Experiments page, as its settings row opens it.
await page.evaluate(`__boiteTest.workspace.active.showSettings('experiments')`);
await page.waitFor(`document.querySelector('${toggle}')`);
await page.send('Emulation.setEmulatedMedia', { features: [{ name: 'prefers-reduced-motion', value: 'no-preference' }] });
Expand Down
Loading