Skip to content

macOS: preview_snapshot should read the live window on request, not the last-render PNG #346

Description

@obj-p

The #254 plan (docs/254-macos-native-window-plan.md, "The four crossings" §4) specifies that the agent snapshots its own live window on request. Today preview_snapshot serves the PNG the render entry wrote at the last render, so any interaction after that render — flipping a toggle, scrolling a list, typed text — is invisible to snapshots until the next edit re-renders.

Suggested shape (uses machinery added in PR #343): a generated on-demand snapshot entry (@_cdecl, like recordPreviewWindowState) that re-rasters the current content view (cacheDisplay) to the session's image path, run by the daemon over runOnMain when preview_snapshot is called on a visible macOS session. Headless sessions are unaffected (render-time PNG is already the truth there).

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions