Conversation
Render the app's SwiftUI surfaces to PNG headlessly so an agent can SEE the UI
and validate it against the specs, locally — no menu bar, no mic, no
screen-capture, deterministic.
- SnapshotRenderer + main() gate: `OQ_SNAPSHOT_DIR=<dir> openquack` renders the
recording overlay's states (listening / thinking / pasted / interrupted /
kickoff) to <dir>/*.png via ImageRenderer, then exits.
- The render→see→validate→fix→re-render loop, run on the first output, caught two
interrupted-overlay bugs that no unit test would: the notice was truncated
("…audio devic…") and the headline misread "Copied to clipboard" on a recording
that was cut short. Fixed here — headline → "Recording interrupted", notice →
"Saved what we captured" (fits the pill) — confirmed by re-rendering.
Build + 269 tests green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
SPEC
SPEC-044 (Agent-driven UI snapshot validation)
Milestone
Adoption focus — auto-validation / ship confidently.
Why
Lets an agent see the UI and validate it against the specs locally (no cloud, no mic, no screen-capture) — catching the bug class unit tests miss: correct logic, wrong rendered UI. Directly from "the agent should drive testing, see the UI to validate by the specs, and improve on its own, run locally."
Change
SnapshotRenderer+ amain()gate:OQ_SNAPSHOT_DIR=<dir> openquackrenders the recording-overlay states to PNG viaImageRendererand exits — deterministic, headless.Tests
swift build && swift testgreen (269)Privacy impact
None — local SwiftUI → local PNG, inert unless
OQ_SNAPSHOT_DIRis set; no network.Out of scope
NSApp.delegate(incremental).