Redesign mobile driver overlay layout and clarify action copy (#5647)
Clarify the mobile-driving experience by updating outdated terminology and making actions more precise. Generic "Mobile" references are replaced with "Phone", and action buttons now explicitly distinguish between "this" terminal and "all" terminals. Also introduces a modern card layout featuring a smartphone icon badge and a live status indicator, complete with updated locales, tests, and a standalone HTML preview.
This commit is contained in:
parent
7f63a4708f
commit
bd546b47d2
|
|
@ -210,6 +210,7 @@ export const JA_VALUE_OVERRIDES = {
|
|||
Ding: 'ディン',
|
||||
'Take back': '操作を取り戻す',
|
||||
'Mobile driving': 'モバイルで操作中',
|
||||
'Phone driving': 'スマホ操作中',
|
||||
'Mobile is driving this browser': 'モバイルがこのブラウザを操作しています',
|
||||
'Wants to run': '実行をリクエスト中',
|
||||
'No states found': 'ステータスが見つかりません',
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ export default function TerminalSettingsScreen() {
|
|||
While you're using a terminal on your phone, Orca shrinks it to fit your screen. When
|
||||
you close the app or switch away, this controls whether it stays at phone size (so
|
||||
interactive CLI tools don't reflow) or resizes back to your desktop. You can always
|
||||
tap Restore on the terminal banner to resize it manually.
|
||||
use Restore this terminal or Restore all terminals on the banner to resize manually.
|
||||
</Text>
|
||||
|
||||
{hosts.length === 0 ? (
|
||||
|
|
|
|||
|
|
@ -0,0 +1,523 @@
|
|||
<!doctype html>
|
||||
<html lang="en" class="dark">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Mobile Driver Overlay — Orca Preview</title>
|
||||
<style>
|
||||
/* ── Orca dark tokens (from main.css .dark) ── */
|
||||
:root {
|
||||
--background: #0a0a0a;
|
||||
--foreground: #fafafa;
|
||||
--card: #171717;
|
||||
--card-foreground: #fafafa;
|
||||
--primary: #e5e5e5;
|
||||
--primary-foreground: #171717;
|
||||
--muted: #262626;
|
||||
--muted-foreground: #a1a1a1;
|
||||
--accent: #404040;
|
||||
--accent-foreground: #fafafa;
|
||||
--border: rgb(255 255 255 / 0.07);
|
||||
--input: rgb(255 255 255 / 0.15);
|
||||
--ring: #737373;
|
||||
--radius: 0.625rem;
|
||||
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
|
||||
'Courier New', monospace;
|
||||
--orca-pane-title-height: 24px;
|
||||
--orca-pane-title-fg: rgb(255 255 255 / 0.52);
|
||||
--orca-pane-title-separator: rgb(255 255 255 / 0.06);
|
||||
--shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
||||
--xterm-bg: #000000;
|
||||
--xterm-fg: #cccccc;
|
||||
--xterm-green: #23d18b;
|
||||
--xterm-blue: #3b8eea;
|
||||
--xterm-dim: #6a6a6a;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Geist';
|
||||
src: url('../src/renderer/src/assets/fonts/Geist-Variable.woff2') format('woff2');
|
||||
font-weight: 100 900;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
|
||||
background: var(--background);
|
||||
color: var(--foreground);
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
|
||||
/* ── Preview chrome (switcher only — not part of Orca UI) ── */
|
||||
.preview-chrome {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 100;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
padding: 0.625rem 1rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
background: color-mix(in srgb, var(--card) 92%, transparent);
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
.preview-chrome h1 {
|
||||
margin: 0;
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 600;
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
|
||||
.state-tabs {
|
||||
display: flex;
|
||||
gap: 0.375rem;
|
||||
}
|
||||
|
||||
.state-tab {
|
||||
height: 1.75rem;
|
||||
padding: 0 0.75rem;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: calc(var(--radius) - 2px);
|
||||
background: transparent;
|
||||
color: var(--muted-foreground);
|
||||
font: inherit;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.state-tab[aria-selected='true'] {
|
||||
border-color: var(--input);
|
||||
background: color-mix(in srgb, var(--input) 30%, transparent);
|
||||
color: var(--foreground);
|
||||
}
|
||||
|
||||
/* ── Orca workspace frame ── */
|
||||
.workspace {
|
||||
height: 100%;
|
||||
padding-top: 3rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.workspace-main {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
/* Terminal pane — matches .pane + .terminal-container */
|
||||
.pane {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
min-height: 28rem;
|
||||
overflow: hidden;
|
||||
background: var(--xterm-bg);
|
||||
}
|
||||
|
||||
.pane[data-has-title]::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: var(--orca-pane-title-height);
|
||||
left: -5px;
|
||||
right: -5px;
|
||||
height: 1px;
|
||||
background: var(--orca-pane-title-separator);
|
||||
z-index: 6;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.pane-title-bar {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: var(--orca-pane-title-height);
|
||||
z-index: 5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 8px;
|
||||
font-size: 13px;
|
||||
font-family: var(--font-mono);
|
||||
color: var(--orca-pane-title-fg);
|
||||
background: transparent;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.xterm-container {
|
||||
position: relative;
|
||||
width: calc(100% - 4px);
|
||||
height: calc(100% - var(--orca-pane-title-height));
|
||||
margin-top: var(--orca-pane-title-height);
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.xterm-screen {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
padding: 8px 10px;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 13px;
|
||||
line-height: 1.35;
|
||||
color: var(--xterm-fg);
|
||||
white-space: pre;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.xterm-screen .green {
|
||||
color: var(--xterm-green);
|
||||
}
|
||||
|
||||
.xterm-screen .blue {
|
||||
color: var(--xterm-blue);
|
||||
}
|
||||
|
||||
.xterm-screen .dim {
|
||||
color: var(--xterm-dim);
|
||||
}
|
||||
|
||||
/* ── MobileDriverOverlay (from MobileDriverOverlay.tsx) ── */
|
||||
.mobile-driver-banner {
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 50;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.mobile-driver-banner.is-chip {
|
||||
align-items: flex-start;
|
||||
justify-content: flex-end;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.overlay-card {
|
||||
pointer-events: auto;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
max-width: 30rem;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius);
|
||||
background: var(--card);
|
||||
color: var(--card-foreground);
|
||||
padding: 1.5rem 1.5rem 1.25rem;
|
||||
box-shadow: var(--shadow-xs);
|
||||
}
|
||||
|
||||
.overlay-header {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.phone-icon-badge {
|
||||
display: flex;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 9999px;
|
||||
}
|
||||
|
||||
.phone-icon-badge.tone-driving {
|
||||
background: var(--muted);
|
||||
}
|
||||
|
||||
.phone-icon-badge.tone-held {
|
||||
background: color-mix(in srgb, var(--muted) 60%, transparent);
|
||||
}
|
||||
|
||||
.phone-icon-badge svg {
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
color: var(--foreground);
|
||||
}
|
||||
|
||||
.overlay-copy {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.overlay-eyebrow {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.375rem;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.025em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.overlay-eyebrow.tone-driving {
|
||||
color: var(--foreground);
|
||||
}
|
||||
|
||||
.overlay-eyebrow.tone-held {
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
|
||||
.live-dot {
|
||||
width: 0.375rem;
|
||||
height: 0.375rem;
|
||||
border-radius: 9999px;
|
||||
background: var(--foreground);
|
||||
}
|
||||
|
||||
.overlay-title {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.overlay-body {
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.625;
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
|
||||
.overlay-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
gap: 0.5rem;
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
/* Button primitive (button.tsx, dark theme) */
|
||||
[data-slot='button'] {
|
||||
display: inline-flex;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.375rem;
|
||||
border-radius: calc(var(--radius) - 2px);
|
||||
border: 1px solid transparent;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
cursor: default;
|
||||
outline: none;
|
||||
transition: all 150ms ease;
|
||||
}
|
||||
|
||||
[data-slot='button'][data-size='sm'] {
|
||||
height: 2rem;
|
||||
padding: 0 0.75rem;
|
||||
}
|
||||
|
||||
[data-slot='button'][data-size='xs'] {
|
||||
height: 1.5rem;
|
||||
gap: 0.25rem;
|
||||
padding: 0 0.5rem;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
[data-slot='button'][data-variant='default'] {
|
||||
background: var(--primary);
|
||||
color: var(--primary-foreground);
|
||||
}
|
||||
|
||||
[data-slot='button'][data-variant='default'].is-focused {
|
||||
border-color: var(--ring);
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
|
||||
}
|
||||
|
||||
[data-slot='button'][data-variant='outline'] {
|
||||
border-color: var(--input);
|
||||
background: color-mix(in srgb, var(--input) 30%, transparent);
|
||||
color: var(--foreground);
|
||||
box-shadow: var(--shadow-xs);
|
||||
}
|
||||
|
||||
[data-slot='button'][data-variant='ghost'] {
|
||||
background: transparent;
|
||||
color: var(--foreground);
|
||||
padding-left: 0.25rem;
|
||||
padding-right: 0.25rem;
|
||||
}
|
||||
|
||||
/* LockChip */
|
||||
.mobile-driver-banner .lock-chip {
|
||||
pointer-events: auto;
|
||||
position: absolute;
|
||||
right: 0.5rem;
|
||||
top: 0.5rem;
|
||||
z-index: 50;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.375rem;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 9999px;
|
||||
background: var(--card);
|
||||
color: var(--card-foreground);
|
||||
padding: 0.25rem 0.5rem;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 500;
|
||||
box-shadow: var(--shadow-xs);
|
||||
}
|
||||
|
||||
.lock-chip svg {
|
||||
width: 0.75rem;
|
||||
height: 0.75rem;
|
||||
color: var(--foreground);
|
||||
}
|
||||
|
||||
.state-panel[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="preview-chrome">
|
||||
<h1>Mobile Driver Overlay — production layout preview</h1>
|
||||
<div class="state-tabs" role="tablist" aria-label="Overlay state">
|
||||
<button class="state-tab" type="button" role="tab" data-state="driving" aria-selected="false">
|
||||
Phone in control
|
||||
</button>
|
||||
<button class="state-tab" type="button" role="tab" data-state="held" aria-selected="true">
|
||||
Phone session ended
|
||||
</button>
|
||||
<button class="state-tab" type="button" role="tab" data-state="chip" aria-selected="false">
|
||||
Collapsed chip
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="workspace">
|
||||
<div class="workspace-main">
|
||||
<div class="pane" data-has-title>
|
||||
<div class="pane-title-bar">
|
||||
<span class="pane-title-text">bash — fix-phone-resizing</span>
|
||||
</div>
|
||||
|
||||
<div class="xterm-container">
|
||||
<div class="xterm-screen" aria-hidden="true">
|
||||
<span class="green">➜</span> fix-phone-resizing <span class="dim">git:(</span><span class="blue">fix-phone-resizing</span><span class="dim">) ✗</span>
|
||||
<span class="green">➜</span> fix-phone-resizing <span class="dim">git status</span>
|
||||
On branch fix-phone-resizing
|
||||
Changes not staged for commit:
|
||||
<span class="dim">modified:</span> src/renderer/src/components/terminal-pane/MobileDriverOverlay.tsx
|
||||
<span class="dim">modified:</span> src/renderer/src/i18n/locales/en.json
|
||||
|
||||
<span class="green">➜</span> fix-phone-resizing <span class="dim">_</span></div>
|
||||
|
||||
<!-- Driving -->
|
||||
<div class="state-panel mobile-driver-banner" id="panel-driving" role="dialog" hidden>
|
||||
<div class="overlay-card">
|
||||
<div class="overlay-header">
|
||||
<div class="phone-icon-badge tone-driving">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
||||
<rect width="14" height="20" x="5" y="2" rx="2" ry="2" />
|
||||
<path d="M12 18h.01" />
|
||||
</svg>
|
||||
</div>
|
||||
<div class="overlay-copy">
|
||||
<div class="overlay-eyebrow tone-driving">
|
||||
<span class="live-dot" aria-hidden="true"></span>
|
||||
<span>From your phone</span>
|
||||
</div>
|
||||
<div class="overlay-title">Your phone is in control</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overlay-body">
|
||||
Desktop keyboard is paused. Take back this terminal to type here, take back all terminals your phone controls, or collapse to keep watching.
|
||||
</div>
|
||||
<div class="overlay-actions">
|
||||
<button data-slot="button" data-variant="outline" data-size="sm" type="button">Collapse</button>
|
||||
<button data-slot="button" data-variant="outline" data-size="sm" type="button">Take back all terminals</button>
|
||||
<button data-slot="button" data-variant="default" data-size="sm" type="button" class="is-focused">Take back this terminal</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Held -->
|
||||
<div class="state-panel mobile-driver-banner" id="panel-held" role="dialog">
|
||||
<div class="overlay-card">
|
||||
<div class="overlay-header">
|
||||
<div class="phone-icon-badge tone-held">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
||||
<rect width="14" height="20" x="5" y="2" rx="2" ry="2" />
|
||||
<path d="M12 18h.01" />
|
||||
</svg>
|
||||
</div>
|
||||
<div class="overlay-copy">
|
||||
<div class="overlay-eyebrow tone-held">
|
||||
<span>From your phone</span>
|
||||
</div>
|
||||
<div class="overlay-title">Your phone left this at phone size</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overlay-body">
|
||||
Your phone session ended. Restore to desktop size for this terminal, or for all terminals your phone left at phone size.
|
||||
</div>
|
||||
<div class="overlay-actions">
|
||||
<button data-slot="button" data-variant="outline" data-size="sm" type="button">Restore all terminals</button>
|
||||
<button data-slot="button" data-variant="default" data-size="sm" type="button" class="is-focused">Restore this terminal</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Chip -->
|
||||
<div class="state-panel mobile-driver-banner is-chip" id="panel-chip" hidden>
|
||||
<div class="lock-chip mobile-driver-banner">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
||||
<rect width="14" height="20" x="5" y="2" rx="2" ry="2" />
|
||||
<path d="M12 18h.01" />
|
||||
</svg>
|
||||
<button data-slot="button" data-variant="ghost" data-size="xs" type="button">Phone driving</button>
|
||||
<button data-slot="button" data-variant="default" data-size="xs" type="button">Take back</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const tabs = document.querySelectorAll('.state-tab')
|
||||
const panels = {
|
||||
driving: document.getElementById('panel-driving'),
|
||||
held: document.getElementById('panel-held'),
|
||||
chip: document.getElementById('panel-chip')
|
||||
}
|
||||
|
||||
function showState(state) {
|
||||
for (const [key, panel] of Object.entries(panels)) {
|
||||
panel.hidden = key !== state
|
||||
}
|
||||
tabs.forEach((tab) => {
|
||||
tab.setAttribute('aria-selected', tab.dataset.state === state ? 'true' : 'false')
|
||||
})
|
||||
}
|
||||
|
||||
tabs.forEach((tab) => {
|
||||
tab.addEventListener('click', () => showState(tab.dataset.state))
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -26,7 +26,7 @@ export function MobileAutoRestoreFitSection({
|
|||
<p className="text-muted-foreground mb-3 text-xs">
|
||||
{translate(
|
||||
'auto.components.settings.MobilePane.35100bca5d',
|
||||
"While you're using a terminal on your phone, Orca shrinks it to fit your phone screen. When you close the app or switch away, this controls whether it stays at phone size (so interactive CLI tools don't reflow) or resizes back to your desktop. You can always click Restore on the terminal banner to resize it manually."
|
||||
"While you're using a terminal on your phone, Orca shrinks it to fit your phone screen. When you close the app or switch away, this controls whether it stays at phone size (so interactive CLI tools don't reflow) or resizes back to your desktop. You can always use Restore this terminal or Restore all terminals on the banner to resize manually."
|
||||
)}
|
||||
</p>
|
||||
<Select
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'
|
|||
import { MobileDriverOverlay } from './MobileDriverOverlay'
|
||||
|
||||
type OverlayProps = {
|
||||
actionLabel: string
|
||||
actionPending: boolean
|
||||
allActionLabel?: string
|
||||
allActionPending?: boolean
|
||||
|
|
@ -101,13 +102,29 @@ describe('MobileDriverOverlay', () => {
|
|||
expect(overlay.props.actionPending).toBe(false)
|
||||
})
|
||||
|
||||
it('exposes held-fit restore labels for single and all terminals', () => {
|
||||
hookRuntime.stateIndex = 0
|
||||
hookRuntime.refIndex = 0
|
||||
|
||||
const overlay = MobileDriverOverlay({
|
||||
driver: { kind: 'idle' } as never,
|
||||
hasFitOverride: true,
|
||||
onAction: vi.fn(),
|
||||
onAllAction: vi.fn()
|
||||
}) as OverlayElement
|
||||
|
||||
expect(overlay.props.actionLabel).toBe('Restore this terminal')
|
||||
expect(overlay.props.allActionLabel).toBe('Restore all terminals')
|
||||
})
|
||||
|
||||
it('exposes an all-terminals restore action when provided', async () => {
|
||||
const onAction = vi.fn()
|
||||
const onAllAction = vi.fn()
|
||||
|
||||
const overlay = renderOverlay(onAction, onAllAction)
|
||||
|
||||
expect(overlay.props.allActionLabel).toBe('Resize all terminals')
|
||||
expect(overlay.props.actionLabel).toBe('Take back this terminal')
|
||||
expect(overlay.props.allActionLabel).toBe('Take back all terminals')
|
||||
expect(overlay.props.allActionPending).toBe(false)
|
||||
await overlay.props.onAllAction?.()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { useCallback, useEffect, useId, useRef, useState, type ReactElement } from 'react'
|
||||
import { Smartphone } from 'lucide-react'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { cn } from '@/lib/utils'
|
||||
import type { DriverState } from '@/lib/pane-manager/mobile-driver-state'
|
||||
|
|
@ -91,17 +92,26 @@ export function MobileDriverOverlay({
|
|||
if (isHeldAtPhoneFit) {
|
||||
return (
|
||||
<LoudOverlay
|
||||
eyebrow="Held at phone size"
|
||||
eyebrow={translate(
|
||||
'auto.components.terminal.pane.MobileDriverOverlay.f2a8b9c1d3',
|
||||
'From your phone'
|
||||
)}
|
||||
title={translate(
|
||||
'auto.components.terminal.pane.MobileDriverOverlay.faa367dc74',
|
||||
'This terminal is sized for your mobile app'
|
||||
'Your phone left this at phone size'
|
||||
)}
|
||||
body={translate(
|
||||
'auto.components.terminal.pane.MobileDriverOverlay.a6b1d8f3e2',
|
||||
'Your phone session ended. Restore to desktop size for this terminal, or for all terminals your phone left at phone size.'
|
||||
)}
|
||||
actionLabel={translate(
|
||||
'auto.components.terminal.pane.MobileDriverOverlay.b3d8e1f42a',
|
||||
'Restore this terminal'
|
||||
)}
|
||||
body="The session is still being held at the dimensions your phone last reported. Restore to use it on your desktop."
|
||||
actionLabel="Restore desktop size"
|
||||
actionPending={actionPending}
|
||||
allActionLabel={translate(
|
||||
'auto.components.terminal.pane.MobileDriverOverlay.54f7d6f69d',
|
||||
'Resize all terminals'
|
||||
'auto.components.terminal.pane.MobileDriverOverlay.e8c4f2a91b',
|
||||
'Restore all terminals'
|
||||
)}
|
||||
allActionPending={allActionPending}
|
||||
onAction={handleAction}
|
||||
|
|
@ -127,17 +137,26 @@ export function MobileDriverOverlay({
|
|||
|
||||
return (
|
||||
<LoudOverlay
|
||||
eyebrow="Mobile is driving this terminal"
|
||||
title={translate(
|
||||
'auto.components.terminal.pane.MobileDriverOverlay.3eed73394f',
|
||||
'Your keyboard is paused'
|
||||
eyebrow={translate(
|
||||
'auto.components.terminal.pane.MobileDriverOverlay.f2a8b9c1d3',
|
||||
'From your phone'
|
||||
)}
|
||||
title={translate(
|
||||
'auto.components.terminal.pane.MobileDriverOverlay.c7e4a2b8f1',
|
||||
'Your phone is in control'
|
||||
)}
|
||||
body={translate(
|
||||
'auto.components.terminal.pane.MobileDriverOverlay.d9f3c6e2a4',
|
||||
'Desktop keyboard is paused. Take back this terminal to type here, take back all terminals your phone controls, or collapse to keep watching.'
|
||||
)}
|
||||
actionLabel={translate(
|
||||
'auto.components.terminal.pane.MobileDriverOverlay.c8f2e1a4b9',
|
||||
'Take back this terminal'
|
||||
)}
|
||||
body="Output below is being typed from your phone. Take back to resume typing on the desktop, or collapse to keep watching."
|
||||
actionLabel="Take back"
|
||||
actionPending={actionPending}
|
||||
allActionLabel={translate(
|
||||
'auto.components.terminal.pane.MobileDriverOverlay.54f7d6f69d',
|
||||
'Resize all terminals'
|
||||
'Take back all terminals'
|
||||
)}
|
||||
allActionPending={allActionPending}
|
||||
onAction={handleAction}
|
||||
|
|
@ -218,17 +237,31 @@ function LoudOverlay({
|
|||
)}
|
||||
>
|
||||
<div className="pointer-events-auto flex w-full max-w-[30rem] flex-col gap-3 rounded-lg border border-border bg-card p-6 pb-5 text-card-foreground shadow-xs">
|
||||
<div
|
||||
className={cn(
|
||||
'flex items-center gap-1.5 text-xs font-medium',
|
||||
tone === 'driving' ? 'text-foreground' : 'text-muted-foreground'
|
||||
)}
|
||||
>
|
||||
<span aria-hidden="true">●</span>
|
||||
<span>{eyebrow}</span>
|
||||
</div>
|
||||
<div id={titleId} className="text-base font-semibold leading-tight">
|
||||
{title}
|
||||
<div className="flex items-start gap-3">
|
||||
<div
|
||||
className={cn(
|
||||
'flex size-10 shrink-0 items-center justify-center rounded-full border border-border',
|
||||
tone === 'driving' ? 'bg-muted' : 'bg-muted/60'
|
||||
)}
|
||||
>
|
||||
<Smartphone className="size-5 text-foreground" aria-hidden="true" />
|
||||
</div>
|
||||
<div className="flex min-w-0 flex-1 flex-col gap-1">
|
||||
<div
|
||||
className={cn(
|
||||
'flex items-center gap-1.5 text-xs font-medium uppercase tracking-wide',
|
||||
tone === 'driving' ? 'text-foreground' : 'text-muted-foreground'
|
||||
)}
|
||||
>
|
||||
{tone === 'driving' ? (
|
||||
<span aria-hidden="true" className="size-1.5 rounded-full bg-foreground" />
|
||||
) : null}
|
||||
<span>{eyebrow}</span>
|
||||
</div>
|
||||
<div id={titleId} className="text-base font-semibold leading-tight">
|
||||
{title}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id={bodyId} className="text-sm leading-relaxed text-muted-foreground">
|
||||
{body}
|
||||
|
|
@ -293,7 +326,7 @@ function LockChip({
|
|||
rootClassName
|
||||
)}
|
||||
>
|
||||
<span aria-hidden="true" className="size-2 rounded-full bg-foreground" />
|
||||
<Smartphone className="size-3 text-foreground" aria-hidden="true" />
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
|
|
@ -301,10 +334,7 @@ function LockChip({
|
|||
className="px-1 font-medium"
|
||||
onClick={onExpand}
|
||||
>
|
||||
{translate(
|
||||
'auto.components.terminal.pane.MobileDriverOverlay.c44659e09f',
|
||||
'Mobile driving'
|
||||
)}
|
||||
{translate('auto.components.terminal.pane.MobileDriverOverlay.c44659e09f', 'Phone driving')}
|
||||
</Button>
|
||||
<Button type="button" variant="default" size="xs" onClick={onAction} disabled={actionPending}>
|
||||
{translate('auto.components.terminal.pane.MobileDriverOverlay.c6460cf584', 'Take back')}
|
||||
|
|
|
|||
|
|
@ -2248,11 +2248,18 @@
|
|||
},
|
||||
"MobileDriverOverlay": {
|
||||
"c6460cf584": "Take back",
|
||||
"c44659e09f": "Mobile driving",
|
||||
"c8f2e1a4b9": "Take back this terminal",
|
||||
"c44659e09f": "Phone driving",
|
||||
"7cffad954c": "Collapse",
|
||||
"3eed73394f": "Your keyboard is paused",
|
||||
"faa367dc74": "This terminal is sized for your mobile app",
|
||||
"54f7d6f69d": "Resize all terminals"
|
||||
"faa367dc74": "Your phone left this at phone size",
|
||||
"54f7d6f69d": "Take back all terminals",
|
||||
"b3d8e1f42a": "Restore this terminal",
|
||||
"e8c4f2a91b": "Restore all terminals",
|
||||
"f2a8b9c1d3": "From your phone",
|
||||
"c7e4a2b8f1": "Your phone is in control",
|
||||
"d9f3c6e2a4": "Desktop keyboard is paused. Take back this terminal to type here, take back all terminals your phone controls, or collapse to keep watching.",
|
||||
"a6b1d8f3e2": "Your phone session ended. Restore to desktop size for this terminal, or for all terminals your phone left at phone size."
|
||||
},
|
||||
"TerminalAgentSessionForkDialog": {
|
||||
"17fc841e59": "Copy context",
|
||||
|
|
@ -5160,7 +5167,7 @@
|
|||
},
|
||||
"MobilePane": {
|
||||
"dd3cd78d04": "Scan with Orca Mobile",
|
||||
"35100bca5d": "While you're using a terminal on your phone, Orca shrinks it to fit your phone screen. When you close the app or switch away, this controls whether it stays at phone size (so interactive CLI tools don't reflow) or resizes back to your desktop. You can always click Restore on the terminal banner to resize it manually.",
|
||||
"35100bca5d": "While you're using a terminal on your phone, Orca shrinks it to fit your phone screen. When you close the app or switch away, this controls whether it stays at phone size (so interactive CLI tools don't reflow) or resizes back to your desktop. You can always use Restore this terminal or Restore all terminals on the banner to resize manually.",
|
||||
"ee56f1c7e4": "When you leave the mobile app",
|
||||
"3939fd062c": "Revoking a device disconnects it immediately.",
|
||||
"254a6d09e4": "Paired",
|
||||
|
|
|
|||
|
|
@ -2248,11 +2248,18 @@
|
|||
},
|
||||
"MobileDriverOverlay": {
|
||||
"c6460cf584": "Devolver",
|
||||
"c44659e09f": "conducción móvil",
|
||||
"c8f2e1a4b9": "Recuperar este terminal",
|
||||
"c44659e09f": "Teléfono al mando",
|
||||
"7cffad954c": "Colapsar",
|
||||
"3eed73394f": "Tu teclado está en pausa",
|
||||
"faa367dc74": "Este terminal tiene el tamaño adecuado para tu aplicación móvil",
|
||||
"54f7d6f69d": "Cambiar tamaño de todas las terminales"
|
||||
"faa367dc74": "Tu teléfono dejó esto en tamaño móvil",
|
||||
"54f7d6f69d": "Recuperar todos los terminales",
|
||||
"b3d8e1f42a": "Restaurar este terminal",
|
||||
"e8c4f2a91b": "Restaurar todos los terminales",
|
||||
"f2a8b9c1d3": "Desde tu teléfono",
|
||||
"c7e4a2b8f1": "Tu teléfono está al mando",
|
||||
"d9f3c6e2a4": "El teclado del escritorio está en pausa. Recupera este terminal para escribir aquí, recupera todos los terminales que controla tu teléfono, o colapsa para seguir mirando.",
|
||||
"a6b1d8f3e2": "La sesión del teléfono terminó. Restaura el tamaño de escritorio para este terminal o para todos los terminales que tu teléfono dejó en tamaño móvil."
|
||||
},
|
||||
"TerminalAgentSessionForkDialog": {
|
||||
"17fc841e59": "Copiar contexto",
|
||||
|
|
@ -5123,7 +5130,7 @@
|
|||
},
|
||||
"MobilePane": {
|
||||
"dd3cd78d04": "Escanear con Orca Móvil",
|
||||
"35100bca5d": "Mientras usas un terminal en tu teléfono, Orca lo reduce para que se ajuste a la pantalla de tu teléfono. Cuando cierra la aplicación o la abandona, esto controla si permanece en el tamaño del teléfono (para que las herramientas CLI interactivas no vuelvan a fluir) o cambia de tamaño a su escritorio. Siempre puedes hacer clic en Restaurar en el banner del terminal para cambiar su tamaño manualmente.",
|
||||
"35100bca5d": "Mientras usas un terminal en tu teléfono, Orca lo reduce para que se ajuste a la pantalla de tu teléfono. Cuando cierra la aplicación o la abandona, esto controla si permanece en el tamaño del teléfono (para que las herramientas CLI interactivas no vuelvan a fluir) o cambia de tamaño a su escritorio. Siempre puedes usar Restaurar este terminal o Restaurar todos los terminales en el banner para cambiar el tamaño manualmente.",
|
||||
"ee56f1c7e4": "Cuando sales de la aplicación móvil",
|
||||
"3939fd062c": "Revocar un dispositivo lo desconecta inmediatamente.",
|
||||
"254a6d09e4": "emparejado",
|
||||
|
|
|
|||
|
|
@ -2248,11 +2248,18 @@
|
|||
},
|
||||
"MobileDriverOverlay": {
|
||||
"c6460cf584": "操作を取り戻す",
|
||||
"c44659e09f": "モバイルで操作中",
|
||||
"c8f2e1a4b9": "このターミナルを取り戻す",
|
||||
"c44659e09f": "スマホ操作中",
|
||||
"7cffad954c": "折りたたむ",
|
||||
"3eed73394f": "キーボードが一時停止しています",
|
||||
"faa367dc74": "この terminal はモバイル アプリに合わせたサイズになっています",
|
||||
"54f7d6f69d": "すべての terminal のサイズを変更"
|
||||
"faa367dc74": "スマホが携帯サイズのまま残しています",
|
||||
"54f7d6f69d": "すべてのターミナルを取り戻す",
|
||||
"b3d8e1f42a": "このターミナルを復元",
|
||||
"e8c4f2a91b": "すべてのターミナルを復元",
|
||||
"f2a8b9c1d3": "スマホから",
|
||||
"c7e4a2b8f1": "スマホが操作中です",
|
||||
"d9f3c6e2a4": "デスクトップのキーボードは一時停止中です。このターミナルを取り戻してここで入力するか、スマホが操作しているすべてのターミナルを取り戻すか、折りたたんで見続けてください。",
|
||||
"a6b1d8f3e2": "スマホのセッションは終了しました。このターミナル、またはスマホが携帯サイズのまま残したすべてのターミナルをデスクトップサイズに復元してください。"
|
||||
},
|
||||
"TerminalAgentSessionForkDialog": {
|
||||
"17fc841e59": "コンテキストをコピーする",
|
||||
|
|
@ -5145,7 +5152,7 @@
|
|||
},
|
||||
"MobilePane": {
|
||||
"dd3cd78d04": "Orca モバイルでスキャン",
|
||||
"35100bca5d": "スマートフォンで terminal を使用している間、Orca はスマートフォンの画面に合わせて terminal を縮小します。アプリを閉じるか別のアプリに切り替えるときに、アプリをスマートフォンサイズのままにするか (インタラクティブ CLI ツールがリフローしないように)、サイズを変更してデスクトップに戻るかを制御します。terminal バナーの [復元] をクリックすると、いつでも手動でサイズを変更できます。",
|
||||
"35100bca5d": "スマートフォンで terminal を使用している間、Orca はスマートフォンの画面に合わせて terminal を縮小します。アプリを閉じるか別のアプリに切り替えるときに、アプリをスマートフォンサイズのままにするか (インタラクティブ CLI ツールがリフローしないように)、サイズを変更してデスクトップに戻るかを制御します。バナーの「このターミナルを復元」または「すべてのターミナルを復元」を使えば、いつでも手動でサイズを変更できます。",
|
||||
"ee56f1c7e4": "モバイルアプリを終了するとき",
|
||||
"3939fd062c": "デバイスを取り消すと、デバイスはすぐに切断されます。",
|
||||
"254a6d09e4": "ペアリング済み",
|
||||
|
|
|
|||
|
|
@ -2248,11 +2248,18 @@
|
|||
},
|
||||
"MobileDriverOverlay": {
|
||||
"c6460cf584": "회수",
|
||||
"c44659e09f": "모바일 원격 조작",
|
||||
"c8f2e1a4b9": "이 터미널 다시 가져오기",
|
||||
"c44659e09f": "휴대폰 조작 중",
|
||||
"7cffad954c": "접기",
|
||||
"3eed73394f": "키보드가 일시중지되었습니다.",
|
||||
"faa367dc74": "이 terminal은 모바일 앱에 맞게 크기가 조정됩니다.",
|
||||
"54f7d6f69d": "모든 terminal 크기 조정"
|
||||
"faa367dc74": "휴대폰이 휴대폰 크기로 남겨 둠",
|
||||
"54f7d6f69d": "모든 터미널 다시 가져오기",
|
||||
"b3d8e1f42a": "이 터미널 복원",
|
||||
"e8c4f2a91b": "모든 터미널 복원",
|
||||
"f2a8b9c1d3": "휴대폰에서",
|
||||
"c7e4a2b8f1": "휴대폰이 제어 중",
|
||||
"d9f3c6e2a4": "데스크톱 키보드가 일시 중지되었습니다. 여기서 입력하려면 이 터미널을 다시 가져오거나, 휴대폰이 제어하는 모든 터미널을 다시 가져오거나, 계속 보려면 접으세요.",
|
||||
"a6b1d8f3e2": "휴대폰 세션이 종료되었습니다. 이 터미널 또는 휴대폰이 휴대폰 크기로 남긴 모든 터미널을 데스크톱 크기로 복원하세요."
|
||||
},
|
||||
"TerminalAgentSessionForkDialog": {
|
||||
"17fc841e59": "컨텍스트 복사",
|
||||
|
|
@ -5108,7 +5115,7 @@
|
|||
},
|
||||
"MobilePane": {
|
||||
"dd3cd78d04": "Orca 모바일로 스캔",
|
||||
"35100bca5d": "휴대폰에서 terminal을 사용하는 동안 Orca는 휴대폰 화면에 맞게 terminal을 축소합니다. 앱을 닫거나 다른 곳으로 전환하면 앱이 휴대폰 크기로 유지되는지(대화형 CLI 도구가 리플로우되지 않음) 또는 데스크탑으로 다시 크기가 조정되는지 여부가 제어됩니다. 언제든지 terminal 배너에서 복원을 클릭하여 수동으로 크기를 조정할 수 있습니다.",
|
||||
"35100bca5d": "휴대폰에서 terminal을 사용하는 동안 Orca는 휴대폰 화면에 맞게 terminal을 축소합니다. 앱을 닫거나 다른 곳으로 전환하면 앱이 휴대폰 크기로 유지되는지(대화형 CLI 도구가 리플로우되지 않음) 또는 데스크탑으로 다시 크기가 조정되는지 여부가 제어됩니다. 배너에서 이 터미널 복원 또는 모든 터미널 복원을 사용해 언제든지 수동으로 크기를 조정할 수 있습니다.",
|
||||
"ee56f1c7e4": "모바일 앱을 나갈 때",
|
||||
"3939fd062c": "장치를 취소하면 즉시 연결이 끊어집니다.",
|
||||
"254a6d09e4": "페어링됨",
|
||||
|
|
|
|||
|
|
@ -2248,11 +2248,18 @@
|
|||
},
|
||||
"MobileDriverOverlay": {
|
||||
"c6460cf584": "收回",
|
||||
"c44659e09f": "手机驾驶",
|
||||
"c8f2e1a4b9": "收回此终端",
|
||||
"c44659e09f": "手机控制中",
|
||||
"7cffad954c": "折叠",
|
||||
"3eed73394f": "您的键盘已暂停",
|
||||
"faa367dc74": "该 terminal 的尺寸适合您的手机应用程序",
|
||||
"54f7d6f69d": "调整所有 terminal 尺寸"
|
||||
"faa367dc74": "手机将此终端留在手机尺寸",
|
||||
"54f7d6f69d": "收回所有终端",
|
||||
"b3d8e1f42a": "恢复此终端",
|
||||
"e8c4f2a91b": "恢复所有终端",
|
||||
"f2a8b9c1d3": "来自手机",
|
||||
"c7e4a2b8f1": "手机正在控制",
|
||||
"d9f3c6e2a4": "桌面键盘已暂停。收回此终端以在此输入,收回手机控制的所有终端,或折叠以继续观看。",
|
||||
"a6b1d8f3e2": "手机会话已结束。将此终端或手机留在手机尺寸的所有终端恢复为桌面尺寸。"
|
||||
},
|
||||
"TerminalAgentSessionForkDialog": {
|
||||
"17fc841e59": "复制上下文",
|
||||
|
|
@ -5108,7 +5115,7 @@
|
|||
},
|
||||
"MobilePane": {
|
||||
"dd3cd78d04": "使用 Orca Mobile 扫描",
|
||||
"35100bca5d": "当您在手机上使用 terminal 时,Orca 会将其缩小以适合您的手机屏幕。当您关闭应用程序或切换离开时,这可以控制它是保持手机大小(因此交互式 CLI 工具不会回流)还是将大小调整回桌面。您始终可以单击 terminal 横幅上的“恢复”来手动调整其大小。",
|
||||
"35100bca5d": "当您在手机上使用 terminal 时,Orca 会将其缩小以适合您的手机屏幕。当您关闭应用程序或切换离开时,这可以控制它是保持手机大小(因此交互式 CLI 工具不会回流)还是将大小调整回桌面。您始终可以在横幅上使用“恢复此终端”或“恢复所有终端”来手动调整大小。",
|
||||
"ee56f1c7e4": "当您离开手机应用程序时",
|
||||
"3939fd062c": "撤销设备会立即断开连接。",
|
||||
"254a6d09e4": "配对",
|
||||
|
|
|
|||
|
|
@ -37,13 +37,15 @@ test('mobile subscribe mounts overlay; collapse → chip; Take back dismisses',
|
|||
await sendMobileSubscribeIpc(electronApp, { ptyId, cols: 45, rows: 20 })
|
||||
|
||||
await expect(overlay).toBeVisible({ timeout: 15_000 })
|
||||
await expect(overlay).toContainText(/mobile is driving this terminal/i)
|
||||
await expect(overlay).toContainText(/your keyboard is paused/i)
|
||||
await expect(overlay).toContainText(/from your phone/i)
|
||||
await expect(overlay).toContainText(/your phone is in control/i)
|
||||
await expectExpandedOverlayLeavesPaneReadable(orcaPage, ptyId)
|
||||
|
||||
const takeBack = overlay.getByRole('button', { name: /take back/i })
|
||||
const takeBackThisTerminal = overlay.getByRole('button', { name: /take back this terminal/i })
|
||||
const takeBackAllTerminals = overlay.getByRole('button', { name: /take back all terminals/i })
|
||||
const collapse = overlay.getByRole('button', { name: /^collapse$/i })
|
||||
await expect(takeBack).toBeVisible()
|
||||
await expect(takeBackThisTerminal).toBeVisible()
|
||||
await expect(takeBackAllTerminals).toBeVisible()
|
||||
await expect(collapse).toBeVisible()
|
||||
|
||||
await captureAttachment(orcaPage, testInfo, 'overlay-loud.png')
|
||||
|
|
@ -52,19 +54,19 @@ test('mobile subscribe mounts overlay; collapse → chip; Take back dismisses',
|
|||
// engaged. The user can keep watching live mobile output while the chip
|
||||
// remains a one-click escape hatch back to desktop control.
|
||||
await collapse.click()
|
||||
await expect(overlay).toContainText(/mobile driving/i)
|
||||
await expect(overlay).toContainText(/phone driving/i)
|
||||
await expect(overlay.getByRole('button', { name: /take back/i })).toBeVisible()
|
||||
await expect(overlay).not.toContainText(/your keyboard is paused/i)
|
||||
await expect(overlay).not.toContainText(/your phone is in control/i)
|
||||
await expectChipIsCompactInPane(orcaPage, ptyId)
|
||||
|
||||
await captureAttachment(orcaPage, testInfo, 'overlay-collapsed.png')
|
||||
|
||||
await overlay.getByRole('button', { name: /mobile driving/i }).click()
|
||||
await expect(overlay).toContainText(/your keyboard is paused/i)
|
||||
await overlay.getByRole('button', { name: /phone driving/i }).click()
|
||||
await expect(overlay).toContainText(/your phone is in control/i)
|
||||
await expectExpandedOverlayLeavesPaneReadable(orcaPage, ptyId)
|
||||
|
||||
await collapse.click()
|
||||
await expect(overlay).not.toContainText(/your keyboard is paused/i)
|
||||
await expect(overlay).not.toContainText(/your phone is in control/i)
|
||||
|
||||
// Take back from the chip dismisses the overlay. The button calls
|
||||
// runtime.restoreTerminalFit via IPC; main responds with desktop-fit + idle
|
||||
|
|
@ -96,16 +98,18 @@ test('held phone-fit state mounts restore overlay without collapse', async ({
|
|||
await sendHeldPhoneFitIpc(electronApp, { ptyId, cols: 45, rows: 20 })
|
||||
|
||||
await expect(overlay).toBeVisible({ timeout: 15_000 })
|
||||
await expect(overlay).toContainText(/held at phone size/i)
|
||||
await expect(overlay).toContainText(/restore to use it on your desktop/i)
|
||||
await expect(overlay.getByRole('button', { name: /restore desktop size/i })).toBeVisible()
|
||||
await expect(overlay).toContainText(/from your phone/i)
|
||||
await expect(overlay).toContainText(/your phone left this at phone size/i)
|
||||
await expect(overlay).toContainText(/all terminals your phone left at phone size/i)
|
||||
await expect(overlay.getByRole('button', { name: /restore this terminal/i })).toBeVisible()
|
||||
await expect(overlay.getByRole('button', { name: /restore all terminals/i })).toBeVisible()
|
||||
await expect(overlay.getByRole('button', { name: /^collapse$/i })).toHaveCount(0)
|
||||
await expect(overlay.getByRole('button', { name: /take back/i })).toHaveCount(0)
|
||||
await expectExpandedOverlayLeavesPaneReadable(orcaPage, ptyId)
|
||||
|
||||
await captureAttachment(orcaPage, testInfo, 'overlay-held-fit.png')
|
||||
|
||||
await overlay.getByRole('button', { name: /restore desktop size/i }).click()
|
||||
await overlay.getByRole('button', { name: /restore this terminal/i }).click()
|
||||
await expectRestoreTerminalFitCalls(electronApp, [ptyId])
|
||||
await sendDesktopRestoreIpc(electronApp, { ptyId })
|
||||
await expect(overlay).toBeHidden({ timeout: 15_000 })
|
||||
|
|
|
|||
Loading…
Reference in New Issue