feat: add JSON, C# and TypeScript file options#28
Conversation
Greptile SummaryThis PR adds more developer file types to the Finder “New File” menu. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "fix: register JSON, C# and TypeScript to..." | Re-trigger Greptile |
| static NSString * const kFeatureJsonFile = @"feature_json_file"; | ||
| static NSString * const kFeatureCSharpFile = @"feature_csharp_file"; | ||
| static NSString * const kFeatureTypeScriptFile = @"feature_typescript_file"; |
There was a problem hiding this comment.
These new keys gate menu items in the Finder extension, but they are not added to the app-side feature list that builds the settings checkboxes. Since missing keys default to enabled, JSON, C#, and TypeScript files appear in the menu with no settings UI path for users to turn them off.
Resolves Greptile review comment on PR GarfieldFluffJr#28: the new feature keys were present in the Finder extension but missing from the fileFeatures array in AppDelegate.m, so the settings modal had no checkbox to disable them. Now JSON, C# and TypeScript appear in the settings checkboxes, consistent with the existing Text, Markdown and Office file types.
|
Addressed Greptile's review comment: the JSON, C# and TypeScript feature keys are now registered in AppDelegate.m's fileFeatures array, so they appear in the settings checkboxes. Ready for re-review. |
Adds three new file types to the right-click 'New File' submenu: - JSON File (.json) - C# File (.cs) - TypeScript File (.ts) All three reuse the existing createFileWithExtension: helper that already powers Text and Markdown files, so they create empty files via a touch shell command (bypasses sandboxing). Each new file type is gated by a UserDefaults feature key (defaulting to enabled) and is consistent with the existing kFeature* pattern used throughout the extension.
The new feature keys are checked by the Finder extension but were not exposed in the settings modal. Since missing keys default to enabled, users had no way to disable the new file types from the settings UI. Adds the three new keys to the fileFeatures array so they appear as checkboxes in the settings window, consistent with the existing Text, Markdown and Office file types.
3c89144 to
7252618
Compare
|
Fixed the Greptile review concern. The new The PR is now reduced to 2 commits and 2 files:
I also cleaned up some earlier rebundle commits (bundle ID, App Group, DEVELOPMENT_TEAM) since they only make sense on a local fork, not in the upstream repo. The PR diff against |
|
Both Greptile review comments addressed in 7252618 (feature keys registered in AppDelegate.m fileFeatures array). Ready for re-review and maintainer approval. @greptile-apps review |
# Conflicts: # MacNewFileFinderExtension/FinderSync.m
|
Hi @GarfieldFluffJr 👋 I've just resolved the merge conflict in The conflict was between the new JSON/C#/TypeScript menu items (this PR) and the updated menu logic on GitHub now reports the PR as MERGEABLE / CLEAN — no conflicts remaining. It's ready for review/merge whenever you get a chance. Thanks! |
Description
Adds three new file types to the right-click
New Filesubmenu:.json).cs).ts)Implementation
All three reuse the existing
createFileWithExtension:helper that already powers the Text and Markdown file creation, so they create empty files via the sametouchshell command pattern (which is needed to bypass the Finder Sync extension sandboxing).Each new file type is gated by a
UserDefaultsfeature key —feature_json_file,feature_csharp_file,feature_typescript_file— and defaults to enabled, consistent with the existingkFeature*pattern. This means they will automatically appear in the settings modal of the full-feature build and can be toggled off by users who don't want them.Changes
MacNewFileFinderExtension/FinderSync.m(+45 lines, -0 lines):kFeature*constantsdocumenticon, matching the style of other generic file types)createFileWithExtension:Testing
The change is minimal and follows the exact same pattern as the existing Text and Markdown file types, which are known to work. The wrapper methods are 3-line passthroughs to a well-tested helper. No new shell commands, no new icons, no new entitlements.
The diff is non-breaking: existing file types continue to work identically. The new file types only appear for users who have not explicitly disabled them (i.e. everyone by default).
Why these three?
JSON, C# and TypeScript are among the most common file types developers create from scratch in the Finder today. The existing app already supports the iWork/Office formats but skips the most-used dev formats.