Skip to content

Arrange Keys: drag-to-reorder the key rail and visionOS cluster - #62

Merged
jhen0409 merged 1 commit into
mainfrom
arrange-keys
Aug 27, 2026
Merged

Arrange Keys: drag-to-reorder the key rail and visionOS cluster#62
jhen0409 merged 1 commit into
mainfrom
arrange-keys

Conversation

@jhen0409

@jhen0409 jhen0409 commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Arrange Keys (⋯ menu → Arrange Keys…): the keys wiggle and become drag sources; drop a key onto the key it should sit beside. It is the window tabs' drag and drop — UIDragInteraction on each TerminalTallyKeyControl, UIDropInteraction targets whose delegate is one shared KeyBarDropCoordinator (nearest other key by centre lights like a tab cell; landing parks the displaced keys for UIKit's drop animator). The rail (iPad/iPhone) and the visionOS cluster context adopt it through KeyBarDropSurface.
  • The order is a permutation of slots (KeyBarOrder, KeyBarSlot — keyboard/mic share one slot, TMUX/HRDR another), stored device-local (KeyBarOrderStore); gaps and widths never move. Rails reconcile the order in layout (never part of the render signature), so a drop, RESET or a VoiceOver move re-creates no key.
  • visionOS: a drop on the other slab's key crosses the UMD (both slabs plus the UMD/bar slabs are drop hosts); the ARRANGE KEYS bar (lamp · RESET · DONE) is its own ornament slab below the console row, one per tab, observing the store for RESET itself. GUIDE moves from the console row into the ⋯ menu (guideIsDirectChip, one decision for rows and menu).
  • Tabs and keys share the process-local drag item recipe (TerminalChromeDragPayload / TerminalChromeDragItem); the pane's file-drop gate refuses every chrome drag with one check; the tab strip's drop rule now runs through the same pure RowDropGeometry.

Verification

  • Vision Pro device: the pinch-and-drag across the UMD and back verified by hand.
  • build.sh build + targeted unit suites green on visionOS and iPad (key control, rail/cluster incl. fake UIDropSession drives of the coordinator, order model, UMD, window, pane, tab strip); build.sh lint 0 violations; check-metadata.rb OK.
  • New build.sh uitest [vos|ipad]MultiplexUITests/ArrangeKeysUITests: real-touch press-and-drag of ESC onto TAB passes on the final code (iPad Pro 11-inch (M5), iOS 26.4 simulator: escape control tabcontrol tab escape, RESET restores, DONE). The visionOS simulator cannot synthesize a lift for a drag interaction — the test skips the drag there.
  • Headless Vision Pro sim proofs (debug.arrangekeys, debug.arrangekeysmove): bar below the console row, a key carried across the UMD; console row shows GUIDE gone and ⋯ present.

Notes

  • Not in CI: the XCUITest lane needs the dev-sshd harness.

@jhen0409
jhen0409 force-pushed the arrange-keys branch 2 times, most recently from 2217040 to 5ef1e61 Compare August 27, 2026 06:45
- ⋯ menu → Arrange Keys…: the keys wiggle and each is a system drag
  source; the move is the tab strip's UIDragInteraction/UIDropInteraction
  recipe, shared by the iPad rail and the visionOS cluster through one
  KeyBarDropCoordinator (nearest-key target, tab-cell highlight, displaced-
  neighbour landing). TerminalChromeDragPayload/TerminalChromeDragItem are
  the process-local item recipe tabs and keys now share; the pane's file
  gate refuses every chrome drag with one check.
- The order is a slot permutation (KeyBarOrder, KeyBarOrderStore,
  device-local); rails reconcile it in layout, gaps and widths stay put.
  visionOS: a drop on the other slab crosses the UMD; the ARRANGE KEYS bar
  (RESET · DONE) is its own slab below the console row, one per tab.
- visionOS: GUIDE moves from the console row into the ⋯ menu.
- MultiplexUITests + `build.sh uitest` (XCUITest press-and-drag), unit
  tests with fake drop sessions on both platforms, docs and TestFlight notes.
@jhen0409
jhen0409 merged commit e95fd22 into main Aug 27, 2026
2 checks passed
@jhen0409
jhen0409 deleted the arrange-keys branch August 27, 2026 09:05
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