Repository navigation
Conversation
defi window-preview <id> prints the latest picture Defi holds of a window as a JPEG data URI, at most 800 pixels long. It reads the capture store on the IPC queue, never starts a capture and never touches the disk, so a launcher can show window pictures without asking for Screen Recording itself.
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — The new command serves cached window pictures to socket clients using Defi's Screen Recording permission. Human judgment is needed on whether that access should be available to all socket clients or require explicit opt-in or client restrictions. You can add or adjust custom eligibility rules. Learn more. |
Owner
Author
|
Closing: the Raycast extension stays a simple list, like the other window manager extensions; no window pictures for now. |
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
defi window-preview <id>prints the latest picture Defi holds of a window as a JPEG data URI, at most 800 pixels long. The Raycast extension (#261) uses it to show window pictures, so the launcher captures nothing and needs no Screen Recording of its own.CONFIGURATION.mdanddocs/internals/overview-capture.md.Evidence
WindowPreviewTests: a 1600×1000 picture with a clear corner becomes an 800×500 JPEG whose corner takes the edge colour, and a small picture is never scaled up.WindowPreviewResponseTests: picture, Screen Recording missing, no picture yet, bad usage, other commands untouched.make verifypasses.make verify-desktopand the installed build were not run).Merge Danger
Door: two-way
Blast Radius: small. One new read-only IPC command. It exposes window pictures to any process of the same user that can reach the socket, the same trust boundary as window titles today.
Note
Add
window-previewCLI command to serve window pictures as JPEG data URIswindowPreviewDataURIin WindowPreview.swift, which checks Screen Recording authorization, reads the window's picture from the capture store, and returns a JPEG data URI (max side 800px, quality 0.75, no upscaling, transparent areas filled white).window-preview <id>command handler in DaemonCommands.swift. It is answered before the read-response cache and deferred-command paths, and maps authorization, missing-picture, and argument errors to command responses.Macroscope summarized f1fb660.