Skip to content

Update quarantine-manager extension#28620

Merged
raycastbot merged 4 commits into
raycast:mainfrom
nurkamol:ext/quarantine-manager
Jun 8, 2026
Merged

Update quarantine-manager extension#28620
raycastbot merged 4 commits into
raycast:mainfrom
nurkamol:ext/quarantine-manager

Conversation

@nurkamol

@nurkamol nurkamol commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Description

Update to the existing Quarantine Manager extension.

This implements a community feature request from the original submission (#25892): support for checking apps and folders, not just single files. macOS app bundles in particular can contain many internal quarantined files that a top-level check would miss.

What's new

  • Directory scanning in both commands. Selecting a folder or .app now scans its contents for quarantined files:
    • Apps (.app) are scanned recursively (bundles are self-contained), surfacing every internal quarantined file plus the bundle's own flag.
    • Plain folders are scanned one level deep (immediate contents only) so large directories like Downloads stay responsive.
  • Check Quarantine Status lists each quarantined item found inside an app/folder; you can drill into any of them for details.
  • Remove Quarantine shows an aggregate summary and clears com.apple.quarantine from a whole bundle/folder at once via xattr -dr, after a confirmation showing how many items are affected. A recursive "Remove All Attributes" (xattr -cr) is also available.
  • Fix: raw binary attributes (e.g. com.apple.macl, com.apple.provenance) are now displayed as hex instead of unreadable control characters.

Directory scanning batches xattr calls and uses spawnSync/execFileSync with array arguments (no shell-string interpolation of paths), consistent with the existing hardening.

Resolves the request in #25892.

Screencast

Tested locally via npm run dev and a distribution build (npm run build) in Raycast:

  • Check Quarantine Status on an .app → recursive list of internal quarantined files (and the bundle's own flag).
  • Check Quarantine Status on ~/Downloads → immediate quarantined children only.
  • Remove Quarantine on an app/folder → count-confirmation, then recursive clear; re-scan shows clean.
  • Single-file behavior unchanged; binary attributes render as hex.

Checklist

- Merge upstream Store contributions (execFileSync hardening, optimized images)
- Pull contributions
- Add app/folder quarantine scanning; fix binary xattr display
- Add installation link for Raycast Extension
- GitHub release: add screenshots to README, update CHANGELOG to v1.0.0
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: quarantine-manager Issues related to the quarantine-manager extension platform: macOS OP is author The OP of the PR is the author of the extension labels Jun 8, 2026
@raycastbot

Copy link
Copy Markdown
Collaborator

Thank you for the update! 🎉

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days.

@nurkamol nurkamol marked this pull request as ready for review June 8, 2026 09:35
@nurkamol nurkamol mentioned this pull request Jun 8, 2026
5 tasks
@greptile-apps

greptile-apps Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR extends the Quarantine Manager extension to support directory and .app bundle inputs in both commands, addressing a community feature request from the original submission.

  • Directory scanning: .app bundles are scanned recursively via xattr -r; plain folders are scanned one level deep using chunked spawnSync calls with a sentinel argument to guarantee prefixed output even for single-child directories.
  • Check Quarantine Status: renders a searchable list of every quarantined item found inside an app or folder, with drill-down detail views per entry.
  • Remove Quarantine: shows an aggregate count confirmation before calling the already-recursive removeQuarantine (xattr -dr) or the newly recursive removeAllAttributes (xattr -cr); binary attributes (e.g. com.apple.macl) are now displayed as hex instead of raw control characters.

Confidence Score: 5/5

The change is safe to merge; the only finding is a minor changelog date format issue.

The directory scanning logic is well-structured: the shallow path chunks children to stay under ARG_MAX and appends a sentinel to force prefixed xattr output, while the recursive path delegates entirely to xattr -r. The removal handlers correctly reuse the existing xattr -dr path and the new xattr -cr path behind confirmation dialogs. No logic errors or security issues were found in the changed code.

No files require special attention beyond the CHANGELOG placeholder fix.

Important Files Changed

Filename Overview
extensions/quarantine-manager/src/utils.ts Adds isDirectory, looksBinary, scanDirectory, readQuarantineValue, and collectQuarantinedPaths; extends removeAllAttributes with an optional recursive flag. Shallow scan correctly chunks children and appends a sentinel to force prefixed xattr output; recursive scan uses a single xattr -r call with generous timeout and buffer limits.
extensions/quarantine-manager/src/check-quarantine.tsx Adds ready-dir state that renders a searchable list of quarantined items found inside an app or folder; single-file path is unchanged. Logic, branching, and UI all look correct.
extensions/quarantine-manager/src/remove-quarantine.tsx Adds ready-dir state with confirmation-gated recursive quarantine removal and recursive remove-all-attributes; delegates to the already-recursive removeQuarantine (xattr -dr) and the new removeAllAttributes(path, true) call. Confirmation dialogs accurately describe the operation.
extensions/quarantine-manager/CHANGELOG.md New update entry uses a hardcoded date (2026-06-08) instead of the required {PR_MERGE_DATE} placeholder.
extensions/quarantine-manager/README.md Documents the new app/folder scanning behaviour, adds install button, and updates the tips section. No issues.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
extensions/quarantine-manager/CHANGELOG.md:3
The update entry uses a hardcoded date (`2026-06-08`) instead of the `{PR_MERGE_DATE}` placeholder. Raycast's convention is for the merge date to be populated automatically at release time — a hardcoded date bypasses that mechanism and may be incorrect if the PR merges on a different day.

```suggestion
## [Scan apps and folders] - {PR_MERGE_DATE}
```

Reviews (3): Last reviewed commit: "Update CHANGELOG.md" | Re-trigger Greptile

Comment thread extensions/quarantine-manager/src/utils.ts Outdated
Comment thread extensions/quarantine-manager/src/utils.ts Outdated
Comment thread extensions/quarantine-manager/src/remove-quarantine.tsx
@nurkamol

nurkamol commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review @greptile-apps — addressed in the latest commit:

  • Issue 1 (single-child false "clean") — fixed. The shallow scan now appends the directory itself as a sentinel argument so xattr always has ≥2 path args and emits the <path>: <attr> prefixed format, even when a folder has exactly one child. Verified a lone quarantined child is now detected.
  • Issue 2 (ARG_MAX on large folders) — fixed. Children are processed in chunks of 256 rather than passed in a single xattr invocation. Verified on a 300-file folder.
  • Issue 3 (action title case) — kept as (recursive). The @raycast/prefer-title-case rule in @raycast/eslint-config warns on (Recursive) and auto-fixes it to lowercase, so ray lint is only clean with the lowercase form. Confirmation-dialog titles and headings still use Title Case (Recursive).

@greptile-apps

greptile-apps Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

All three fixes look good:

  1. Single-child sentinel — appending dirPath to every batch is a clean solution. collectQuarantinedPaths already filters it out via excludePath, so it won't accidentally surface the directory twice even when it carries its own quarantine flag.

  2. ARG_MAX chunking — chunk size of 256 is reasonable. Paths that are ~200 chars each would sum to ~51 KB per batch, well under the macOS ARG_MAX limit.

  3. Action title case — fair point. If @raycast/prefer-title-case specifically auto-fixes (Recursive)(recursive), the linter is the authoritative source here. Keeping it lowercase to satisfy ray lint is the right call.

LGTM — the core correctness bugs are resolved and the ESLint constraint is a legitimate override.

Tip: You can customize Greptile's behavior for this repo with .greptile/rules.md and .greptile/config.json.

@nurkamol

nurkamol commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@0xdhrv thank you for reviewing and approving the original submission (#25892)! This is a follow-up update to the same extension, adding the app/folder quarantine scanning that was requested there. If you have a moment, would you mind taking a look? All CI checks pass and the Greptile review feedback has been addressed. No rush at all — much appreciated. 🙏

@0xdhrv 0xdhrv self-assigned this Jun 8, 2026

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

Looks good to me, approved ✅

@raycastbot raycastbot merged commit 8c54fe9 into raycast:main Jun 8, 2026
3 checks passed
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Published to the Raycast Store:
https://raycast.com/nurkamol/quarantine-manager

@raycastbot

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: quarantine-manager Issues related to the quarantine-manager extension OP is author The OP of the PR is the author of the extension platform: macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants