Skip to content

feat: decode QR codes and barcodes in GPUI text capture - #3239

Open
x1xhlol wants to merge 2 commits into
CapSoftware:mainfrom
x1xhlol:devin/gpui-ocr-barcodes
Open

x1xhlol wants to merge 2 commits into
CapSoftware:mainfrom
x1xhlol:devin/gpui-ocr-barcodes

Conversation

@x1xhlol

@x1xhlol x1xhlol commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

GPUI port of #2096, stacked on the GPUI OCR capture PR (it includes that commit and only adds one more on top).

ocr::capture_text now runs barcode::decode_barcode first (rxing, luma8, TryHarder). If a QR code or barcode is found, its payload is copied. Otherwise it falls back to platform OCR. Barcode payloads are copied byte-exact; only OCR text is trimmed. Tests encode a QR code (with meaningful whitespace) and a Code128 barcode with rxing and assert the exact decoded text. Both steps run in one spawn_blocking.

rxing is added with default-features = false, so the lockfile only gains rxing and 4 small crates and no existing versions change.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new actionable issue was established.

Summary

Adds barcode-first text capture to the GPUI desktop app. When no barcode is found, capture falls back to platform OCR.

  • People can select a screen area and copy its text or barcode payload.

Reviews (2) · Last reviewed commit: "Decode QR codes and barcodes in GPUI tex..." · Reviewed by Greptile

@vercel

vercel Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

@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.

@socket-security

socket-security Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​rxing@​0.9.388100100100100

View full report

Comment thread apps/desktop-gpui/src/ocr.rs Resolved
Comment thread apps/desktop-gpui/src/ocr.rs Resolved
Comment thread apps/desktop-gpui/src/ocr.rs Resolved
Comment thread apps/desktop-gpui/src/ocr.rs Resolved
Comment thread apps/desktop-gpui/src/barcode.rs Resolved
@richiemcilroy

Copy link
Copy Markdown
Member

Thanks @x1xhlol! This is stacked on #3238, so it can only merge after that one does.

Like #3238, it needs a 5/5 from Greptile on its latest commit and green CI before we can merge. It's at 4/5 because of one P1: the copied barcode text gets changed. Barcode and QR payloads should go to the clipboard exactly as decoded, with no trimming or other normalisation, since they're often URLs, Wi-Fi configs or IDs where every byte matters. Please also mention the new dependency and its licence in the description. Once #3238 is in, rebase onto main and request a re-review.

@x1xhlol

x1xhlol commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

@greptileai review

@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/gpui-ocr-barcodes branch 2 times, most recently from e85f444 to 3ac70e4 Compare October 25, 2026 14:23
@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/gpui-ocr-barcodes branch from 3ac70e4 to 2fca79f Compare October 25, 2026 14:51
@richiemcilroy

Copy link
Copy Markdown
Member

Thanks! Can you get Greptile to 5/5 on the latest commit and resolve the conflicts with main? Then we'll take a look.

This branch has not been deployed

No deployments
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