Skip to content

gterm: iPad split-view workspace, Magic Keyboard support, and offscreen iPad UI tests - #44

Merged
madeye merged 2 commits into
mainfrom
test/offscreen-ipad-ui
Sep 15, 2026
Merged

madeye merged 2 commits into
mainfrom
test/offscreen-ipad-ui

Conversation

@madeye

@madeye madeye commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • iPad workspace: Hosts becomes a collapsible NavigationSplitView sidebar beside the terminal, with a Sessions menu to switch live connections without disconnecting. Keys, AI, and Settings open as sheets. Narrow windows fall back to a single column.
  • Magic Keyboard: Command shortcuts via UIKeyCommand (copy / paste / select all, font size, next / previous session, back to Hosts); pointer click, drag selection, and hover routed to ghostty mouse events; two-finger scrollback. Hiding the software keyboard now keeps first-responder focus by swapping in a zero-height inputView, so physical keys keep working. Control and Option combinations still go to the remote.
  • Offscreen iPad UI tests: new gtermUITests target, scripts/test-ipad-ui.py runner that boots a disposable iPad Pro simulator headless, and scripts/ipad-ssh-fixture.py, a loopback paramiko SSH echo fixture that verifies key routing and resize.
  • README section documenting the iPad / Magic Keyboard behaviour and how to run the UI suite.

Verification

  • xcodebuild ... -scheme gterm -sdk iphonesimulator CODE_SIGNING_ALLOWED=NO build: BUILD SUCCEEDED
  • xcodebuild ... -scheme gtermTests test (iPhone 17 simulator): 107 tests, 0 failures
  • uv run --with paramiko python3 scripts/test-ipad-ui.py (iPad Pro 11-inch M5, iOS 26.5): 3 tests, 0 failures

The resize test initially flaked because app.windows.firstMatch sometimes matched a keyboard/effects window whose frame is reported in portrait; the second commit targets the window that contains the Hosts sidebar and waits for the zoom animation to settle.

https://claude.ai/code/session_011AGnzfZpK9Jvx13DcS97DZ

On iPad, Hosts becomes a collapsible NavigationSplitView sidebar next to the
terminal, with a Sessions menu to switch live connections without
disconnecting. Keys, AI, and Settings open as sheets. Narrow windows fall
back to a single column.

Magic Keyboard: Command shortcuts (copy/paste/select all, font size,
next/previous session, back to hosts) via UIKeyCommand; pointer drag
selection, click, and hover routed to ghostty mouse events; two-finger
scrollback. Hiding the software keyboard now keeps first-responder focus
by swapping in a zero-height inputView so physical keys keep working.

Add a gtermUITests target with an offscreen iPad runner
(scripts/test-ipad-ui.py) and a loopback paramiko SSH echo fixture
(scripts/ipad-ssh-fixture.py) that verifies key routing and resize.

Claude-Session: https://claude.ai/code/session_011AGnzfZpK9Jvx13DcS97DZ
The app owns several windows (keyboard, text effects) and
app.windows.firstMatch sometimes returned one whose frame is reported in
portrait, so the restored-width assertion read 834 instead of 1210. Pick
the window containing the Hosts sidebar and wait for two consecutive wide
reads since the zoom animates.

Claude-Session: https://claude.ai/code/session_011AGnzfZpK9Jvx13DcS97DZ
@madeye madeye closed this Sep 15, 2026
@madeye
madeye deleted the test/offscreen-ipad-ui branch September 15, 2026 07:16
@madeye
madeye restored the test/offscreen-ipad-ui branch September 15, 2026 07:16
@madeye madeye reopened this Sep 15, 2026
@madeye
madeye merged commit ce8401c into main Sep 15, 2026
2 checks passed
@madeye
madeye deleted the test/offscreen-ipad-ui branch September 15, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant