Skip to content

Feat: screenORC - #437

Open
rancescolon wants to merge 3 commits into
vicinaehq:mainfrom
rancescolon:main
Open

rancescolon wants to merge 3 commits into
vicinaehq:mainfrom
rancescolon:main

Conversation

@rancescolon

Copy link
Copy Markdown

Capture a region of your screen on Linux to perform OCR or scan QR codes/barcodes, automatically copying the extracted text directly to your clipboard.

Two no-view commands: Scan & copy text (OCR) and Scan QR code (ZBar decoding)
One view command: Select Recognition Languages to pick and save preferred Tesseract languages (stored in LocalStorage)
Missing language detection: If Tesseract data is missing, automatically copies the required system package name (e.g. tesseract-data-spa) to clipboard for quick installation
Refactored execution flow with retry validation to ensure seamless region capture via Spectacle and clipboard delivery

Source repository: https://github.com/rancescolon/extensions

Notes for review

System utilities required: spectacle (region capture), tesseract (OCR), and zbarimg (QR scanning).
No remote network calls or analytics.
Files written: temporary image files in the system temp folder (cleaned up automatically in finally blocks).
Explicit error handling for missing CLI utilities and missing language data files.

Checks run locally

npm run check-dependencies passes
npm ci and npm run build succeed from a clean checkout
npm run lint, npm run format, and npm run typecheck pass
Tested manually in a local Vicinae instance on Linux

first working version of screenORC

- text scan
- lan picker
- qr code scanner
@clankus-aurelius

clankus-aurelius commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Thanks for contributing an extension to Vicinae! 👋

Before publication, this pull request receives two reviews:

  1. An automated review for extension guidelines, safety, error handling, and likely correctness issues.
  2. A final review from a Vicinae maintainer.

✅ Ready for human review. The automated reviewer approved the latest commit and a maintainer has been notified.

No blocking findings remain on the latest commit.

The automated reviewer examines only the current commit. New commits invalidate its previous decision and start another review.

@clankus-aurelius clankus-aurelius added the ai-reviewing Automated extension review is running label Oct 20, 2026

@clankus-aurelius clankus-aurelius left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The extension has several error paths that silently fail or report success incorrectly, and its setup documentation overstates or misrepresents system-specific requirements.


Automated extension review passed. A maintainer review is still required.

This is an AI-generated first pass and may be mistaken. If a finding is unclear or incorrect, reply in the relevant thread and mention @aurelleb.

Comment thread extensions/screenorc/src/tools.ts
Comment thread extensions/screenorc/src/tools.ts
Comment thread extensions/screenorc/src/tools.ts Outdated
Comment thread extensions/screenorc/src/select-language.tsx Outdated
Comment thread extensions/screenorc/README.md
Comment thread extensions/screenorc/README.md Outdated
@clankus-aurelius clankus-aurelius added human-reviewable Automated review passed; ready for maintainer review and removed ai-reviewing Automated extension review is running labels Oct 20, 2026
@clankus-aurelius

Copy link
Copy Markdown
Collaborator

@aurelleb automated review passed for bf50248; this extension is ready for your review.

minor changes to following rules.json
@clankus-aurelius clankus-aurelius added ai-reviewing Automated extension review is running and removed human-reviewable Automated review passed; ready for maintainer review labels Oct 20, 2026

@clankus-aurelius clankus-aurelius left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Four issues remain: two README requirements are still misleading, and the new numeric exit-code checks misclassify common cancellation/no-result outcomes.


Automated extension review passed. A maintainer review is still required.

This is an AI-generated first pass and may be mistaken. If a finding is unclear or incorrect, reply in the relevant thread and mention @aurelleb.

Comment thread extensions/screenorc/src/tools.ts
Comment thread extensions/screenorc/src/tools.ts Outdated
Comment thread extensions/screenorc/README.md
Comment thread extensions/screenorc/README.md
@clankus-aurelius clankus-aurelius added human-reviewable Automated review passed; ready for maintainer review and removed ai-reviewing Automated extension review is running labels Oct 20, 2026
@rancescolon rancescolon changed the title screenORC Feat: screenORC Oct 20, 2026
@clankus-aurelius clankus-aurelius added ai-reviewing Automated extension review is running and removed human-reviewable Automated review passed; ready for maintainer review labels Oct 20, 2026

@clankus-aurelius clankus-aurelius left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Three issues remain: the README still overstates distro-specific package accuracy, while the revised error handling silently hides Spectacle failures and still does not reliably recognize ZBar’s no-symbol exit status.


Automated extension review passed. A maintainer review is still required.

This is an AI-generated first pass and may be mistaken. If a finding is unclear or incorrect, reply in the relevant thread and mention @aurelleb.


1. Run one of the scan commands from Vicinae. The launcher closes.
2. Spectacle shows its region selector. Drag over the target area (Pressing `Esc` cancels silently).
3. The tool processes the image (via Tesseract or ZBar), copies the decoded result to your clipboard, and confirms via a HUD toast.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🟠 Warning — Package helper still implies distro-specific accuracy

Rule: MANIFEST-001

The README calls the generated value the required package for the user's distro, but the implementation performs no distribution detection and always constructs tesseract-data-<language>.

Suggested resolution: Describe it as an example package name that users must verify for their distribution, or implement distribution-specific mappings.

Suggested change
3. The tool processes the image (via Tesseract or ZBar), copies the decoded result to your clipboard, and confirms via a HUD toast.
4. *Missing Language Pack Helper*: If a Tesseract language pack is missing, it copies an example package name (e.g., `tesseract-data-spa`) to your clipboard; verify the correct package name for your distribution.

Comment on lines +31 to +40
try {
const stats = await fs.stat(outPath);
if (stats.size > 0) {
return true;
}
} catch {
return false;
}
return false;
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🟠 Warning — Spectacle failures are silently treated as cancellation

Rule: UX-001

Every Spectacle error other than ENOENT now returns false when no output exists, so permission, display-server, and other operational failures silently exit as though the user cancelled.

Suggested resolution: Treat only Spectacle's cancellation exit status as cancellation; rethrow other failures so performScanAndCopy shows actionable failure feedback.

Comment on lines +116 to +119
}

// zbarimg returns non-zero when no symbols are found
const isNoSymbols =

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🟠 Warning — ZBar no-symbol exit status remains unrecognized

Rule: CORRECTNESS-001

The revised condition still ignores ZBar's numeric no-symbol exit status 4. If stderr lacks the selected phrases, an ordinary image with no symbol is reported as a ZBar failure; matching every WARNING can also suppress unrelated failures.

Suggested resolution: Recognize exit status 4 explicitly and remove the broad WARNING match.

Suggested change
}
// zbarimg returns non-zero when no symbols are found
const isNoSymbols =
// zbarimg returns exit status 4 when no symbols are found
const isNoSymbols =
errOutput.includes("no symbols found") || err.status === 4 || err.code === 4 || err.code === "4";

@clankus-aurelius clankus-aurelius added human-reviewable Automated review passed; ready for maintainer review and removed ai-reviewing Automated extension review is running labels Oct 20, 2026

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

human-reviewable Automated review passed; ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants