Repository navigation
Conversation
|
@x1xhlol is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
|
Thanks for porting this to the GPUI app, @x1xhlol! Before we can merge, the PR needs a 5/5 from Greptile on its latest commit and green CI. It's at 3/5 right now. The two P1s need fixing first:
The P2s are worth fixing in the same pass: notifications showing when they're turned off, the image save blocking the text copy, the capture button going missing on an existing crop, and English-only notification text. Once those are in, request a re-review. #3239 and #3240 are stacked on this one, so it makes sense to land this first. |
c2faff2 to
1fd7e44
Compare
|
@greptileai review |
1fd7e44 to
94ddce2
Compare
|
@greptileai review |
94ddce2 to
5ce07ee
Compare
5ce07ee to
939044e
Compare
|
Thanks! Can you get Greptile to 5/5 on the latest commit and resolve the conflicts with main? Then we'll take a look. |
Summary
GPUI port of #2095. A new global hotkey opens the area picker in OCR mode; releasing a drawn area recognizes the text in it and copies it to the clipboard.
HotkeyAction::OcrArea(ocrArea), seeded once to Cmd+Shift+T (macOS) / Ctrl+Shift+T. Seeding uses the samehotkeys.seededarray the Tauri app writes, so it never re-adds a binding the user cleared and skips the combo if another action already owns it.app_windows::arm_ocr_areasetsTargetSelect::ocr_areawithout changing the user's recording mode. Every other arming path clears it. While it is set, the area overlay uses screenshot sizing and chrome (is_screenshot_like()), and a fresh draw callsocr::capture_textinstead oftake_screenshot.ocr::capture_text: capture, then OCR via Vision (cidre, macOS) orWindows.Media.Ocr. OCR is macOS/Windows only: on Linux the hotkey is not seeded or registered and the OCR settings and shortcut row are hidden. The trimmed text goes to the clipboard and plays the notification sound. A failed optional screenshot save is reported separately and does not drop the copied text; error notifications respectenableNotifications. If the picker is owned by the editor, that picker is cancelled through its normal path before OCR arms. The main window comes back without focus only if the picker hid it (ocr_finished).ocrKeepScreenshot(save the region as a normal screenshot bundle through the newscreenshot::write_screenshot_bundle, without opening the editor) andocrShowNotification(posts throughnotify-ruston macOS/Windows).

Confidence Score: 5/5
The PR appears safe to merge, with no new blocking issue established.Summary
Adds area-based OCR through a global shortcut on macOS and Windows.
No new findings were accepted. Native builds and visual checks were not run.
Reviews (3) · Last reviewed commit: "Add global OCR text capture to the GPUI ..." · Reviewed by Greptile