Skip to content

Aa: an Off detent, so 1× is not both "leave my window" and a fit (#179) - #181

Open
ArfiArfath21 wants to merge 1 commit into
Saffsanity:mainfrom
ArfiArfath21:aa-off
Open

ArfiArfath21 wants to merge 1 commit into
Saffsanity:mainfrom
ArfiArfath21:aa-off

Conversation

@ArfiArfath21

Copy link
Copy Markdown

Closes #179.

With no scale the host leaves the Mac window alone. The Aa control showed that state as 1×, the same as a fit at 1×, so once Aa had been touched nothing took a device back to "leave my window", and each selection shrank the window again until the person disconnected (the reporter's workaround).

What it does

  • Aa's ruler gets an Off detent, one 0.25 step below 0.5×. An untouched Aa now shows Off (it used to read 1×), a tap on an untouched control still changes nothing, and dragging left of 0.5× lands on Off. VoiceOver says "Off", and decrement from 0.5× reaches it.
  • Choosing Off sends no scale, as an untouched Aa always did.
  • Host: when the connection that had a scale sends a viewport without one, the windows Sill sized go back to their own frames at once (restoreFits, the path a window takes when it stops streaming), instead of at the end of the session. It is tracked per connection (fitScales), so another device's viewport without a scale ends nobody's fit.
  • With the virtual display on, no scale means 1× there, so the control does not offer Off (offered, from the Mac's setting as the device knows it).
  • TextScale (new, Sources/StreamProtocol, so no project-file entry) holds the detents, snapping, titles and the "ends a fit" rule; the old TextScaleControl.snap and its detent list moved into it, and TextScaleControl.label still exists. 18 new checks in the protocol check, 8 mutants, all caught. Tests/checks/README.md and docs/DEVELOPMENT.md (Windows sized for a device) say so.

For review

  • Decision for you: an untouched Aa now reads "Off" where it read "1×". It is what the issue asks for (the two states told apart), and I think it is the honest label, but it is a visible change, and a first drag right now needs three detents to reach 1×. A smaller alternative is to keep the untouched label and add Off only as a way back.
  • StreamCoordinator.swift, the .viewport case: the restore happens before viewport is updated. Worth a look next to your fit-by-default branch and Could Sill scale apps while not using Virtual Display mode #70, which also touch when windows are fitted.
  • The restore uses restoreFits(keeping: nil), which also puts back a window that is streaming now; the catalog's size check then restarts the pipeline, as for any resize.

Verified, and not

  • Tests/checks/run-all.sh protocol passes (210 checks) and its eight new mutants are caught. swift build -c release --product SillHost builds. The iOS target type-checks with my Xcode 26.6 apart from the error main already has (DeviceHingeContext in DuoPostureReader.swift, which needs the 27.1 SDK).
  • I have not run the app, and not on a live Mac: the ruler's look with a sixth detent, and the host putting a window back when Off is chosen, are untested end to end. The restore reuses the existing stop path, but I have not seen it fire.

AI assistance: this change was written by an AI coding assistant (Claude) at my direction. I reviewed the diff and ran the checks above.

…fsanity#179)

With no scale the host leaves the Mac window alone, but the control showed
that state as 1×, the same as a fit at 1×, and nothing took a device back
to it short of disconnecting. The ruler gets an Off detent one step below
0.5×, which an untouched Aa now shows. Choosing it sends no scale, and the
host puts the windows it sized back at once, for the connection that had
fitted them (another device's viewport without a scale ends nobody's fit).

With the virtual display on, no scale means 1× there, so the control does
not offer Off. TextScale is pure and in the protocol check, with eight
mutants.
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.

Aa shows 1× for both original window size and active resizing, with no way to reset

1 participant