Repository navigation
Conversation
Adds a fourth follow mode that connects to Textream on the Mac over the Remote Connection WebSocket (httpPort + 1) and renders its script and word-by-word highlighting in the native prompter. The Mac's microphone does the tracking; the phone only draws, so mirror, column and reading position all apply natively. Connect by scanning the QR code from the Mac's Settings → Remote, or by typing host:port. The address is remembered. Reconnects with backoff when the link drops. Requires NSLocalNetworkUsageDescription on iOS. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The iOS app has no way to get a script from the Mac. This adds a fourth follow mode, Follow Mac, that consumes the feed the Mac already broadcasts for the browser Remote Connection and renders it in the native prompter:
MacQRScannerView,AVCaptureMetadataOutput), or by typinghost:port. The address is remembered.MacFolloweropens aURLSessionWebSocketTasktohttpPort + 1and decodes the existingBrowserStateJSON (words,highlightedCharCount,isActive, …). The Mac's microphone does the word tracking; the phone only draws.words.joined(" ")as its script, so character offsets line up with the Mac's counts. Mirror, column and reading position all apply natively.NSLocalNetworkUsageDescriptionto the iOS Info.plist, which iOS requires for the local socket.No Mac-side changes: the QR code and WebSocket are exactly what the browser remote uses today.
Known limitation: if the Mac changes page mid-session the phone keeps the original script; leave and re-enter the session to pick up the new one.
Written without Xcode.
MacFollower.swifttype-checks against the macOS SDK (it is Foundation/Observation only) and every touched file passesswiftc -parse, but the UI and the on-device end-to-end flow have not been compiled against the iOS SDK or run. Please build and try it against a Mac with Remote Connection on before merging; happy to fix anything that turns up.🤖 Generated with Claude Code