Skip to content

feat(overview): multi-display overview and display arrangement editing - #283

Draft
raiseCatError wants to merge 31 commits into
devfrom
feat/overview-integrated
Draft

raiseCatError wants to merge 31 commits into
devfrom
feat/overview-integrated

Conversation

@raiseCatError

@raiseCatError raiseCatError commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Adds a map of the Mac's displays and a full-screen display overview to the receiver. You can also rearrange the Mac's displays from the receiver, and the Mac's owner confirms the change on the Mac.

This PR is large. Its commits are in build order and each one compiles, so review them one at a time.

Changes

  • Display geometry in the window catalog. Each display now has its position, scale and refresh rate, plus mirrorOf. Two flags mark this receiver's own MeowDisplay screen (own) and other MeowDisplay screens (meow). The Mac sets both flags from its session records, never from display names. Older receivers ignore the new keys.
  • Arrangement map in Stage Peek. The Displays section draws the real arrangement. MeowDisplay screens appear as placeholders. The Mac never captures them, and they can't be tapped. Older Macs keep the grid.
  • Full-screen overview. You can pan, zoom, use Fit All, select a display, and show it in a pane. For live content, use Show in Pane.
    • Tiles are stills from the existing display thumbnails: 560 pixels wide, JPEG, without the cursor. They refresh about every 3 seconds while the overview is open, and the Mac captures at most one batch every 2 seconds.
    • Because the tiles are stills, zooming in past the fit view only enlarges the still.
  • iPhone Duo fold. When the Duo is held like a book, the toolbar and the action bar split around the fold, so no button sits on it. The arrangement itself can cross the fold.
  • Identify Displays shows a label on each Mac screen for about 3 seconds. Move Cursor Here moves the Mac cursor to the centre of a display. It needs control and only works on listed displays.
  • Mac cursor in the overview. The Mac reports the cursor position only while the overview is open, at up to 10 updates per second. It stops 120 seconds after the receiver's last renewal.
  • Arrangement editing.
    1. The receiver proposes a new arrangement.
    2. The Mac's owner confirms it in a prompt on the Mac. With no answer in 60 seconds, the request is denied.
    3. The Mac checks control and the current arrangement again, applies the change for this session only, and verifies it.
    4. If the receiver does not choose Keep within 15 seconds, the Mac puts the old arrangement back. It does the same on Revert, disconnect or session end.
  • Saved position fix. An edit that moved this receiver's own Extend display was saved as its position before Keep. If the session ended before Keep, the next connection put the display back in the unkept position. The Mac now saves the restored position when an edit is put back.

Protocol

Additive, no pv change. Everything is under welcome.features displayArrange (PROTOCOL.md section 6.10):

  • displayArrangeRequest, displayArrangeState, displayArrangeKeep, displayArrangeRevert
  • displayIdentify, cursorToDisplay
  • overviewCursorWatch, overviewCursor

The Mac also sends the window catalog again when its displays change while a receiver is browsing.

Tests

  • Full macOS unit suite at 76307eb: 3686 tests, 0 failures. 3 tests skip because they need live permissions. The arrangement tests pass at the head (67 tests, 4 of them new).
  • Compile-only builds of the iOS app and the Mac Receiver.

Not in this PR

  • Live content and direct input inside the overview. Show in Pane covers both.
  • Display sources in tabs or floats. A display can't float on iOS.
  • The overview in the Mac Receiver.
  • A higher-resolution still when you zoom in.

Not verified yet

Nothing here has run on a device. Arrangement editing changes the Mac's real display arrangement, so it needs a planned device test with the owner's approval.

…rangement on display changes

welcome feature displayActions. displayIdentify labels each listed Mac
screen for 3 s (rate limited, click-through). cursorToDisplay moves the
Mac cursor to the centre of a listed display, only with control, checked
again right before the move. While browsing, the Mac resends the catalog
when its displays change.
# Conflicts:
#	Mac/MacSender.swift
#	PROTOCOL.md
… scale from the environment, not UIScreen.main
…view test

On iPad the strip's accessibility frame covers the whole screen, so a hold at its centre lands on a pane. Hold just inside the left edge (the default Stage Peek Edge), then the right, and pull inward.
On iPad the first window in the tree is an empty, zero-size one, so frames checked against it never intersect.
Rotation dismisses the overview today, which stopped the navigation test
before Fit All, tap targeting and Show in Pane were checked. The rotation
check now runs on its own so the other steps still report.
…h a resize

A width change closed Stage Peek, which removed the gallery and dismissed the screens presented from it, losing their state. While the display overview or the arrangement editor is open the peek now stays open underneath. Without one, a width change still closes it unless the search is focused.
… fixture

MEOW_UITEST_STAGE_PEEK=1 (Debug only) hosts the real Stage Peek overlay over three sample displays and narrows its canvas after the overview opens.
…ough a rotation; editor through a rotation

The live rotation test now selects a display, zooms and pans, rotates portrait, landscape, portrait and checks the overview stays presented, keeps its selection, and draws every tile where it was. Done returns to the open Stage Peek gallery. A second test checks Show in Pane after the round trip. A third opens the arrangement editor, rotates with nothing changed (Apply stays disabled) and leaves with Cancel, so the Mac's arrangement is not touched.
…itor check

With MEOW_LIVE_REQUEST_CONTROL=1 the editor test taps Request Control when Arrange… is hidden and waits up to 120 s for the owner to approve on the Mac. It never approves, drags a display or taps Apply.
…it on the approval states

The first version swiped down, which closed Stage Peek, and then tapped a pane's Request Control pill as the gallery faded, so no request reached the Mac. Now it taps the gallery's own hittable Request Control before any scrolling and waits until the request is approved (the control note goes away) or refused (Ask Again), up to 120 s.
…tor check

A Mac that always allows this device grants control without a prompt, and tapping Request Control closes Stage Peek. The editor check now reopens Stage Peek and looks for Arrange… until control arrives (up to 120 s).

This branch has not been deployed

No deployments
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