Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
b2bcce9
Added app inspection and built modernization plan
juancavallotti Apr 3, 2026
fdae392
Moved legacy code to the side and bootstrapped a brand new xcode project
juancavallotti Apr 3, 2026
ea39983
Added migration status
juancavallotti Apr 3, 2026
a492f56
Added build instructions
juancavallotti Apr 3, 2026
4f23e2f
Implemented phase 1
juancavallotti Apr 3, 2026
1f5c00a
Implemented phase 2
juancavallotti Apr 3, 2026
8e26769
Implemented phase 2
juancavallotti Apr 3, 2026
b8f55a8
Updated copilot instructions
juancavallotti Apr 3, 2026
702e345
Implemented phase 3
juancavallotti Apr 3, 2026
bd094e4
Settings page now comes forth
juancavallotti Apr 3, 2026
459d571
Fixed items clipped menu grouping
juancavallotti Apr 3, 2026
bc60b0f
Fixed startup load of previous settings
juancavallotti Apr 3, 2026
6c1bb33
fixed unnecessary ask for permissions
juancavallotti Apr 3, 2026
d7a700b
Improved menu handling
juancavallotti Apr 3, 2026
ad17349
Menu now working correctly
juancavallotti Apr 3, 2026
53796ad
iteratef over the snippets experience
juancavallotti Apr 3, 2026
a608b8a
Further implemented the snippets behavior
juancavallotti Apr 3, 2026
f5500f3
Enhanced snippet management ux
juancavallotti Apr 3, 2026
06ec9d3
Implemented pasting images
juancavallotti Apr 3, 2026
23f562d
Fixed thumbnail on main menu
juancavallotti Apr 3, 2026
62cc785
Added icon set
juancavallotti Apr 3, 2026
ad9b015
Added fix for pasting crash
juancavallotti Apr 3, 2026
9645361
Updated app signing
juancavallotti Apr 3, 2026
2416903
Improved project yaml
juancavallotti Apr 3, 2026
238c212
Updated project settings
juancavallotti Apr 3, 2026
7dc81c4
Improved Snippet editor ux
juancavallotti Apr 3, 2026
3765a7c
Enhanced UX and removed unnecessary settings
juancavallotti Apr 3, 2026
2e5065b
Fixed snippets migration and added phase 4 to migrate actions
juancavallotti Apr 3, 2026
7f5dff5
Part 1 of phase 4
juancavallotti Apr 3, 2026
bdfd6d5
Added actions as a tree
juancavallotti Apr 3, 2026
80ed858
Updated action polish
juancavallotti Apr 3, 2026
f7eedfd
Added actions to clip menu
juancavallotti Apr 3, 2026
be15c71
Javascript actions now regrouped as folders
juancavallotti Apr 3, 2026
faed8c8
Improved preferences
juancavallotti Apr 3, 2026
23dba42
Added actions to the main menu
juancavallotti Apr 3, 2026
e9a49e5
Actions menu now always show
juancavallotti Apr 3, 2026
c8c4d81
Added action application
juancavallotti Apr 3, 2026
cbd0801
Fixed JS bridge
juancavallotti Apr 3, 2026
234a71a
Basic actions now working
juancavallotti Apr 3, 2026
6f3c667
Imports now working on v8 engine
juancavallotti Apr 3, 2026
6cd745d
Cleaned up old code
juancavallotti Apr 3, 2026
1caa790
Finished modernization of clipmenu
juancavallotti Apr 3, 2026
c25369d
Added distribution
juancavallotti Apr 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
56 changes: 56 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# ClipMenu — Agent Instructions

## Migration Status Rule

**Every agent that completes or advances a migration step MUST update `migration_status.md` before finishing.**

This applies to any work that:
- Implements or stubs a file listed in `Sources/`
- Changes `project.yml` or regenerates `ClipMenu.xcodeproj`
- Adds, removes, or modifies a package dependency
- Makes a structural change to `Sources/`
- Completes or partially completes any task listed under "Not Started" or "In Progress" in `migration_status.md`

**How to update:**
1. Move the completed task from "Not Started" → "Completed" (or update its checkbox).
2. If a task is partially done, move it to "In Progress" with a short note on what remains.
3. Update the "Overall progress" summary line at the top.
4. Do **not** remove the "Key Decisions" table entries without explicit user instruction.

## Architecture

- New Swift source lives in `Sources/` (see `doc/migration.md` for the full directory spec).
- Legacy Objective-C source was removed from this repository after migration completion.
- Build system: XcodeGen — edit `project.yml`, then run `xcodegen generate` to regenerate `ClipMenu.xcodeproj`.
- The `.xcodeproj` is generated output; never hand-edit `project.pbxproj`.

## SwiftUI View Rule

**Every SwiftUI `View` in `Sources/UI/` MUST have at least one `#Preview` block.**

- The preview must compile and render without requiring a live app or device.
- Use in-memory `ModelContainer` when SwiftData models are needed:
```swift
.modelContainer(for: [ClipEntry.self, ...], inMemory: true)
```
- Inject required environment values using test instances:
```swift
.environment(ClipMenuSettings())
.environment(\.clipsService, ClipsService(settings: ClipMenuSettings()))
```
- A view file without a `#Preview` block must not be marked completed in `migration_status.md`.

## Build & Verify

```sh
xcodegen generate
xcodebuild -project ClipMenu.xcodeproj -scheme ClipMenu -configuration Debug build \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
```

Both commands must succeed with no errors before a task is marked completed.

## Behavior Reference

Legacy source references are historical only and are no longer available in this repository.
When implementing behavior changes, rely on the current Swift implementation and documented behavior in `doc/features.md`.
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"chat.tools.terminal.autoApprove": {
"xcodebuild": true,
"defaults": true,
"true": true
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets.xcassets/AppIcon.appiconset/AppIcon-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets.xcassets/AppIcon.appiconset/AppIcon-32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"images" : [
{
"filename" : "AppIcon-16.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"filename" : "AppIcon-16@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"filename" : "AppIcon-32.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"filename" : "AppIcon-32@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"filename" : "AppIcon-128.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"filename" : "AppIcon-128@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"filename" : "AppIcon-256.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"filename" : "AppIcon-256@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"filename" : "AppIcon-512.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"filename" : "AppIcon-512@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
65 changes: 65 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Build And Release Guide

This repository contains the active Swift/XcodeGen ClipMenu project.

## Prerequisites

```sh
xcode-select -p
brew install xcodegen
```

## Generate Project

Run whenever `project.yml` changes:

```sh
xcodegen generate
```

## Build (Debug)

```sh
xcodebuild -project ClipMenu.xcodeproj -scheme ClipMenu -configuration Debug build \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
```

## Build (Release)

```sh
xcodebuild -project ClipMenu.xcodeproj -scheme ClipMenu -configuration Release build \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
```

## Run From Xcode

1. Open `ClipMenu.xcodeproj`.
2. Select scheme `ClipMenu`.
3. Run with `Debug` configuration.

ClipMenu is a menu bar app (`LSUIElement = YES`), so it does not appear in the Dock while running.

## Accessibility Note

Paste simulation uses CGEvent and requires Accessibility permission:

- System Settings -> Privacy & Security -> Accessibility

## Release Direction

- Legacy Sparkle/appcast release scripts were removed during repository cleanup.
- Packaging/notarization should be implemented through a modern, explicit archive/export pipeline when needed.

## Troubleshooting

`xcodegen: command not found`

```sh
brew install xcodegen
```

Code signing errors in local/CI builds

- Use `CODE_SIGN_IDENTITY=""`
- Use `CODE_SIGNING_REQUIRED=NO`
- Use `CODE_SIGNING_ALLOWED=NO`
16 changes: 16 additions & 0 deletions ClipMenu.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!--
ClipMenu is NOT sandboxed.
CGEvent-based paste (kCGSessionEventTap) requires Accessibility permission,
which is incompatible with the App Sandbox. The user grants this once at
runtime via the standard system prompt in AppDelegate.
-->

<!-- Required for CGEvent Cmd+V synthesis -->
<key>com.apple.security.automation.apple-events</key>
<true/>
</dict>
</plist>
Loading