Lassoly Shows How to Build a macOS Selection Toolbar With Explicit Network Boundaries
The article describes the challenge of building a Mac selection toolbar that works for both selectable browser text and scanned PDFs where a selection yields only a pixel rectangle. It presents a reference architecture drawn from Lassoly, whose Mac client builds on the GPL-3.0 project Easydict for selection capture and on-device OCR. The design covers Accessibility-based text retrieval with pointer-relative fallback positioning, and guards against stale selections by tagging toolbar actions with the candidate's generation. For screenshot OCR, it uses Apple's Vision framework to recognize text in cropped captures, which requires Screen Recording permission. The author stresses careful coordinate mapping across display scale factors and notes that OCR output is a best guess that needs thorough testing.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in