Skip to content

fix(core): permission spam#15091

Open
neriousy wants to merge 1 commit intoanomalyco:devfrom
neriousy:fix/permission-spam
Open

fix(core): permission spam#15091
neriousy wants to merge 1 commit intoanomalyco:devfrom
neriousy:fix/permission-spam

Conversation

@neriousy
Copy link
Contributor

@neriousy neriousy commented Feb 25, 2026

Issue for this PR

Closes #15090 #14982

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

My thesis: after some changing in how the sidecar is spawned it is more tightly coupled with the desktop app
Due to this scanning the personal directories was requesting users for permission to personal folders.
It never went away

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

We need some mac users to verify it

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

not on mac hard to test, help me

If you do not follow this template your PR will be automatically rejected.

Copilot AI review requested due to automatic review settings February 25, 2026 16:34
@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. contributor labels Feb 25, 2026
@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Feb 25, 2026
@github-actions
Copy link
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

1 similar comment
@github-actions
Copy link
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes macOS permission prompt spam by preventing the global-home directory scanner from traversing common user folders that trigger TCC privacy prompts.

Changes:

  • Expand the macOS ignore list for the “global home” directory discovery logic to skip standard personal folders (Desktop/Documents/Downloads/etc.).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +351 to +359
ignore.add("Applications")
ignore.add("Desktop")
ignore.add("Documents")
ignore.add("Downloads")
ignore.add("Library")
ignore.add("Movies")
ignore.add("Music")
ignore.add("Pictures")
ignore.add("Public")
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The macOS ignore list is built with a long sequence of ignore.add(...) calls, which is a bit error-prone to maintain (easy to miss/duplicate entries). Consider defining the list as an array (or constant) and adding via a simple loop so it’s easier to audit and update.

Suggested change
ignore.add("Applications")
ignore.add("Desktop")
ignore.add("Documents")
ignore.add("Downloads")
ignore.add("Library")
ignore.add("Movies")
ignore.add("Music")
ignore.add("Pictures")
ignore.add("Public")
const macOsIgnore = [
"Applications",
"Desktop",
"Documents",
"Downloads",
"Library",
"Movies",
"Music",
"Pictures",
"Public",
]
for (const name of macOsIgnore) {
ignore.add(name)
}

Copilot uses AI. Check for mistakes.
Comment on lines +350 to +356
if (process.platform === "darwin") {
ignore.add("Applications")
ignore.add("Desktop")
ignore.add("Documents")
ignore.add("Downloads")
ignore.add("Library")
ignore.add("Movies")
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

This change alters the directory discovery behavior for the global home case on macOS (skipping common user folders to avoid permission prompts), but there doesn’t appear to be test coverage for this path. Consider adding a unit test that asserts these folder names are excluded when isGlobalHome on darwin (potentially by factoring the ignore-list construction into a helper that can be tested without having to mutate process.platform).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Permission request spam

2 participants