You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a4c5443
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AGENTS.md
+22-59Lines changed: 22 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,10 @@ Every guess costs the user:
96
96
97
97
---
98
98
99
+
## Historical investigation
100
+
101
+
The following records earlier approaches. For current behavior, authorization, and version-specific settings navigation, use the Current implementation section and DEVELOPER.md.
102
+
99
103
## Key Findings
100
104
101
105
### 1. Quick Actions / Automator / Shortcuts do NOT work on empty space
@@ -245,65 +249,24 @@ Every guess costs the user:
245
249
246
250
---
247
251
248
-
## Current Implementation (1.2.1+)
249
-
250
-
1. The project contains two targets:
251
-
- Host app (settings UI)
252
-
- Finder Sync Extension
253
-
2.`FinderSync.swift`:
254
-
- Registers filtered visible top-level home subfolders once in `init()` and never touches `directoryURLs` again. It intentionally avoids `/`, the real home root, `~/Library`, `~/Applications`, and package directories. Pinned by `FinderSyncInvariantTests`.
255
-
- Reads enabled file types from shared defaults in the App Group
256
-
- Adds menu items only for the enabled file types
257
-
- Creates `untitled.ext`, `untitled_0001.ext`, `untitled_0002.ext`, and so on
258
-
- Falls back to Finder's insertion location for empty-space clicks
259
-
- Writes directly to the target URL. No bookmark handling, no `startAccessingSecurityScopedResource()`, no home/non-home fast path.
260
-
3.`ContentView.swift`:
261
-
- Lets the user enable or disable MoreMenu commands in Finder
262
-
- Lets the user toggle individual file types via checkboxes
263
-
- Opens the system Finder Extensions settings page
264
-
4. Local installation flow:
265
-
-`./scripts/install-local.sh`
266
-
- installs to `~/Applications`
267
-
- registers the embedded Finder extension
268
-
- purges legacy `authorizedFolderRecords` / `sharedAuthorizedFolderEntries` state and resets stale `SystemPolicyAppData` TCC for both bundle IDs
-`com.apple.security.temporary-exception.files.home-relative-path.read-write` = `/` — grants the extension sandbox capability to create files anywhere under the user's home folder. The leading `/` is the home root, not the filesystem root. Writes to `/Volumes/*` are denied by the sandbox and surface as a logged error plus `NSSound.beep()`.
286
-
287
-
### Scope: home-only, not filesystem-wide
288
-
289
-
External drives under `/Volumes/*` are intentionally unsupported in this build. FiScript ships `temporary-exception.files.absolute-path.read-write = /` on the App Store for wider scope, but that entitlement only works silently under a stable code signature (Developer ID or App Store). This project currently prefers Apple Development signing for local installs and falls back to ad-hoc signing (`CODE_SIGNING_ALLOWED=NO` + post-build `codesign --sign -`) only when no identity is available. Narrowing the entitlement and monitored Finder Sync scopes matches what the local build can actually deliver without recurring AppData prompts.
290
-
291
-
### Historical notes
292
-
293
-
-**1.1.5–1.1.7**: implemented external-drive access using security-scoped bookmarks handed from host to extension through an App Group. Deleted entirely in 1.2.0.
294
-
-**1.2.0**: first attempted `absolute-path = /` entitlement to match FiScript. Shipped but still exhibited the TCC prompt on every reinstall and missing menu items on `/Volumes/*`. Post-install investigation showed the root cause was ad-hoc signing, not the entitlement set.
295
-
-**1.2.1**: narrowed to `home-relative-path = /`, corrected the TCC reset service in `install-local.sh` (`SystemPolicyAppData`, not `SystemPolicyAppBundles`), documented the signing-level limitation.
296
-
-**Unreleased**: stopped monitoring `/` with Finder Sync after TCC showed `SystemPolicyAppData` attached to the boot-time extension process. MoreMenu now monitors filtered home subfolders and clears stale AppData TCC state during local install.
297
-
298
-
Full research and reasoning: [.claude/plans/0004_new_research_on_rightclick_permission.md](.claude/plans/0004_new_research_on_rightclick_permission.md) §0, §11, §12.
-`menu(for:)` — return custom `NSMenu` for context
304
-
-`NSMenuItem(title:action:keyEquivalent:)` — create menu item
305
-
-`NSMenuItem.target` and `NSMenuItem.action` — wire up the handler
306
-
-`FileManager.default.createFile(atPath:contents:attributes:)` — create the file
252
+
## Current implementation and verification
253
+
254
+
Read [DEVELOPER.md](DEVELOPER.md) before changing signing, App Groups, installation, file creation, or monitored folders. It is the current source for those contracts and their verified evidence.
255
+
256
+
- Host and extension share `MoreMenu/Shared` sources: document catalog, preferences, file creation, target resolution, and home-directory policy.
257
+
- Both products use the App Group `QN24ZH7M6W.GMX.MoreMenu`, authorized by the matching certificate-backed signing Team ID. Local builds reject ad-hoc signing.
258
+
- Preserve consent during upgrades. Migrate the two legacy preferences through the signed host import command; retain old data and never read the unauthorized legacy group from the extension.
259
+
- Use exclusive file creation and retry only filename collisions. Preserve existing contents and propagate other failures.
260
+
- Monitor filtered visible top-level home folders once at initialization. Exclude home/filesystem roots, Library, Applications, and packages. External volumes remain out of scope.
261
+
- Desktop-specific behavior is deferred at the user's request. Keep the existing fallback unchanged until that investigation resumes.
262
+
- Validate with `./scripts/test.sh`, then inspect a signed Release build. Reboot/Finder UI behavior requires live manual validation; passing unit tests alone is insufficient.
263
+
- The app opens Finder's extension-management interface through `FIFinderSyncController.showExtensionManagementInterface()`. Settings paths vary by macOS version.
264
+
265
+
### Corrected permission diagnosis (2026-09-14)
266
+
267
+
The installed 1.2.1 app was already Apple-Development-signed. `containermanagerd` rejected `group.GMX.MoreMenu` because the signature did not authorize that group. TCC subsequently prompted for SystemPolicyAppData with a decision tied to the running process. Apple's documentation describes this consent as per-instance. Stable signing alone and narrower monitoring do not fix unauthorized group membership.
268
+
269
+
The earlier investigation below/above and `.claude/plans/` are historical evidence, not current authorization guidance. Keep the conservative monitored-directory policy while diagnosing each privacy service independently.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,22 @@
1
1
# Changelog
2
2
3
+
## Unreleased
4
+
5
+
### Fixed
6
+
7
+
- Authorize shared preferences with the signing Team-ID-prefixed App Group. The installed app's repeated AppData prompt was traced to an unauthorized `group.GMX.MoreMenu` container, despite Apple Development signing. This supersedes the earlier signing-only diagnosis below.
8
+
- Create new files exclusively and retry filename collisions without replacing existing data.
9
+
- Reject unresolved target metadata rather than creating in a guessed parent folder; show creation errors.
10
+
- Preserve consent and preferences during local upgrades, verify staged signatures, and restore the previous app if migration or registration fails.
11
+
12
+
### Changed
13
+
14
+
- Share one file-type catalog and preference contract between app and extension.
15
+
- Add behavioral Swift tests, installer/signature tests, a shared Xcode test scheme, and CI checks.
16
+
- Require certificate-backed signing for local packages; public releases require Developer ID signing and notarization credentials.
17
+
- Use the Finder Sync extension-management API for settings navigation and label file-type checkboxes for accessibility.
0 commit comments