Sitelet https://github.com/Ameyanagi/aibo/pull/24
Skip to content

Fix Windows screenshot and selected-text capture - #24

Merged
Ameyanagi merged 1 commit into
mainfrom
codex/windows-capture-context
Aug 4, 2026
Merged

Ameyanagi merged 1 commit into
mainfrom
codex/windows-capture-context

Conversation

@Ameyanagi

Copy link
Copy Markdown
Owner

Summary

  • show the existing native screen-region capture action in the Windows attachment and Help menus
  • snapshot the source app before the aibo panel can take focus
  • keep the Windows panel non-activating until selected text is safely captured
  • preserve the original focus snapshot when a selection starts a fresh conversation

Verification

  • cargo test --workspace --all-targets --locked
  • cargo clippy --workspace --all-features --all-targets --locked -- -D warnings
  • cargo clippy --target x86_64-pc-windows-msvc -p aibo-platform -p aibo-ui --all-features --all-targets -- -D warnings -A unsafe-code

Copilot AI review requested due to automatic review settings August 4, 2026 01:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

Shortcut strings for the Windows region-capture binding are inconsistent with the app’s hotkey label formatting, causing UI/docs mismatch.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR improves Windows context/screenshot capture by snapshotting the source app before the aibo panel can take focus, and by exposing the existing native region-capture action in the UI and docs.

Changes:

  • Thread an optional AppRef focus snapshot through UiRequest::CaptureContext into the runtime capture pipeline.
  • Keep the Windows panel non-activating during context capture, then focus the composer once capture completes/fails.
  • Show region-capture shortcuts in the attachment/help overlays and update the README shortcut table.
File summaries
File Description
src/main.rs Runtime capture now accepts an optional AppRef snapshot to avoid mis-attributing context after focus changes.
README.md Documents Windows region-capture chord alongside the macOS binding.
crates/aibo-ui/src/panel.rs Shows region-capture action in attach/help overlays on platforms that support it.
crates/aibo-ui/src/bridge.rs Extends UiRequest::CaptureContext to carry the optional AppRef.
crates/aibo-ui/src/app.rs Adds non-activating Windows summon flow and preserves focus snapshot across selection-driven fresh starts.
crates/aibo-platform/src/macos/mod.rs Adds a synchronous frontmost-app snapshot helper used pre-presentation.
crates/aibo-platform/src/lib.rs Exposes cross-platform focused_app_ref() for the UI to snapshot focus cheaply before presenting.
Review details
  • Files reviewed: 7/7 changed files
  • Comments generated: 2
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment on lines +2764 to +2767
#[cfg(target_os = "windows")]
{
Some("Ctrl+Shift+Alt+Space")
}
Comment thread README.md
|---|---|
| `⌥Space` | Summon / dismiss the panel (Windows: `Ctrl+Shift+Space`) |
| `⌥⇧Space` | Crop a screen region and open it as an attachment (macOS) |
| `⌥⇧Space` | Crop a screen region and open it as an attachment (Windows: `Ctrl+Shift+Alt+Space`) |
@Ameyanagi
Ameyanagi merged commit fb5a9ec into main Aug 4, 2026
15 checks passed
@Ameyanagi
Ameyanagi deleted the codex/windows-capture-context branch August 4, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants