Repository navigation
Conversation
10 tasks done
Owner
|
Thanks Livio, this is a lot of careful work: fresh window IDs, one-use tokens, geometry verification. Two things stop it from landing as it is:
The widget side also can't be both "built-in only" and published on the registry. I'll put this on hold until #7/#9 settle, and loop you in on that discussion. |
The widget bridge adds instanceId to every command payload, so the strict inspect/run schemas rejected every request with invalid-request and the widget showed "no safe target" for any tap. Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Two gaps showed up against live apps. Some frontmost apps never report a focused window — Electron shells among them — while AXMainWindow or the window list still answer, so inspect now falls back through those attributes; identity is still proven by the Core Graphics window match. And an app can answer the Window → Move & Resize press without honouring it (Warp's menu item exists yet does nothing), which surfaced as geometry-unverified. When the menu did not move the window to the target frame, its position and size are now set directly on the AX window and re-verified. Co-Authored-By: Claude <noreply@anthropic.com>
CGWindowList omits window names unless the caller holds Screen Recording, so every candidate was dropped and inspect answered no-safe-window under the helper identity while succeeding under a terminal that has the grant. An empty candidate title now means "unknown" rather than "different": the owner PID and bounds still prove identity, and the widget finally shows the inspector's real error — such as accessibility-permission-required — instead of the generic no-target. Co-Authored-By: Claude <noreply@anthropic.com>
Each `swift file.swift` invocation costs several hundred milliseconds in the compiler driver before the script's first line, which made every inspect and every action feel laggy. resolveNative builds the script once under a content hash in the shared cache and runs that binary, falling back to the interpreter when no toolchain is available. Co-Authored-By: Claude <noreply@anthropic.com>
The next-display action walked every NSScreen, so a window on the last screen in sorted order wrapped onto the Xeneon Edge — the strip is the dashboard itself, not a destination for app windows. kioskDisplayIDs() finds the screen the helper's kiosk covers edge-to-edge (layer > 0 plus an exact CGDisplayBounds match, which the layer-0 admin window that stops at the menu bar can never satisfy) and nextDisplayIndex cycles only through the remaining screens. A window already sitting on the kiosk display moves to the first usable one; when no usable screen remains the action reports no-next-display as before. The selection logic runs under a test-next-display probe like the existing identity tests. Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
fdussert
requested changes
Oct 21, 2026
fdussert
left a comment
Owner
There was a problem hiding this comment.
Thanks Livio, the follow-ups are solid work: the owner-and-bounds match without Screen Recording, skipping the Edge on next-display, and the tests around both. A few things still stand between this and main:
- The Swift still runs on the user's Mac. Compiling with
/usr/bin/swiftcinto$TMPDIRon first use moves the problem without solving it. Without the Command Line Tools,swift/swiftcare xcode-select shims that pop the "install developer tools" dialog, and with the widget polling every 1–2 s that dialog will keep coming back. The cached binary is also run on presence alone (no ownership or mode check), with the helper's Accessibility grant behind it. This needs to live innative/as a small executable built and signed with the helper, the wayfremkit-scanis (build-helper.sh,build-app.sh, path passed in by the helper likeFREMKIT_SCANNER). - It breaks the downloadable app.
rectangle.ts:23resolvesnew URL(..., import.meta.url)at module load. In the CJS bundleimport.metais empty, so the server throwsERR_INVALID_URLon startup, whether or not anyone installed the widget. - CI:
rectangle.test.tsshells out to/usr/bin/swiftand AppKit; CI runs on Ubuntu. Once the code is innative/, those cases belong inscripts/test-helper.sh. - Smaller: window titles go through argv (visible to
ps), so stdin or the window id alone would be better; a demo fake for therectanglechannel; the test-only modes shouldn't ship in the production binary; after rebasing on main,CommandContextneedspairedin the tests and the provider goes inregisterRealProviders(). - On the Sietch side (fdussert/fremkit-sietch#19): the README still says "built-in" and mentions the Refresh button that 1.2.0 removed, and
authorshould be you.
The design question with #7/#9 still holds, so this stays on hold for now. Fixing 1–3 would make it ready to pick up as soon as that's settled.
2 of 3 tasks
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.
What this changes
Adds a built-in-only macOS window-placement provider for Fremkit's
rectanglecommand. Each action uses a freshly inspected target, a unique Core Graphics window ID, a one-use token, and geometry verification; the provider excludes Fremkit's own windows and does not invoke or depend on Rectangle.app.How to see it
Pair this provider with the Rectangle widget PR in
fdussert/fremkit-sietch. On macOS, grant the Fremkit helper Accessibility access, select a harmless target window, then try left-half, right-half, fill, and next-display. Existing native acceptance verified left-half, right-half, and fill against an owned scratch window. Next-display correctly returnedno-next-displayon the one-display test setup; transfer to a second physical display remains unverified.Checks
ac5dbfd63fa1384a927a5114e461c04f475637a0.The branch is 13 commits behind current upstream
main; the merge-tree check found no conflicts. The PR preserves the exact reviewed source commits, so it has not been rebased. The worktree contains an existing untrackedserver/node_modulesdirectory; it is not part of this PR.