Skip to content

Resolve unexpected file read alerts - #113

Merged
cyanzhong merged 1 commit into
mainfrom
develop
Oct 20, 2026
Merged

cyanzhong merged 1 commit into
mainfrom
develop

Conversation

@cyanzhong

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Explicit file scans remain uncached, causing repeated file reads and OCR when reopening the menu.

1 open issue
What changed in this PR

This PR aims to prevent unexpected file-read alerts during automatic clipboard detection while preserving explicit file scanning.

Changes:

  • Adds a file-access guard to pasteboard image loading.
  • Disables file access for observer-triggered detection.
  • Leaves skipped files uncached for later explicit scanning.
File Description
TextGrabber2/​Sources/​Extensions/​NSPasteboard+Extension.swift Adds file-reference detection and guarded image loading.
TextGrabber2/​Sources/​App/​App+Observer.swift Disables file access during automatic detection.
TextGrabber2/​Sources/​App/​App+Detection.swift Passes the access policy and adjusts caching.
TextGrabber2/​Sources/​App/​App.swift Makes the detection cache count optional.

Review effort: Balanced

Comment thread TextGrabber2/Sources/App/App+Detection.swift Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Failed-read caching and overlapping scans can prevent retries and duplicate menu results.

2 open issues
1 resolved since last review

Review effort: Balanced

Comment thread TextGrabber2/Sources/App/App+Detection.swift
Comment thread TextGrabber2/Sources/App/App+Detection.swift Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused changes preserve explicit file detection, and no blocking issues were identified.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@cyanzhong
cyanzhong merged commit af48d9a into main Oct 20, 2026
2 checks passed
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