Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
442a9dd
Initial plan
Copilot Mar 29, 2026
b25d54e
Add new app icon, CI/CD workflows, and cross-platform porting docs
Copilot Mar 29, 2026
72e6337
Add files via upload
kiyarose Mar 29, 2026
044a78d
Use provided icon, rename to PinStick, and modernize workflows
Copilot Mar 29, 2026
8cce034
Fix test product names consistency
Copilot Mar 29, 2026
af47eaa
Rename app file to PinStickApp and address review feedback
Copilot Mar 29, 2026
1b2362e
Update docs for PinStick app rename
Copilot Mar 29, 2026
8df88df
Set explicit permissions on placeholder jobs
Copilot Mar 29, 2026
fc2fd79
Switch cross-platform port to Flutter and add CI builds
Copilot Mar 29, 2026
0e66c3d
Revert "Switch cross-platform port to Flutter and add CI builds"
Copilot Mar 29, 2026
84c1d77
Restore Tauri cross-platform port and CI builds
Copilot Mar 29, 2026
5c2d7b5
Remove native mac CI, fix cross-platform workflows and review feedback
Copilot Mar 29, 2026
41ce172
Fix Tauri pin toggle and bump version 2.5.3
Copilot Mar 29, 2026
ded05c6
Document runner pinning and note load error handling
Copilot Mar 29, 2026
e2c8e01
Add Windows icon and release artifacts workflows
Copilot Mar 29, 2026
b4e1bb6
Bump to 2.5.5 and doc tweaks
Copilot Mar 29, 2026
186f6da
Clarify load errors and bump version 2.5.6
Copilot Mar 29, 2026
f33ae79
Adjust messaging and bump version 2.5.7
Copilot Mar 29, 2026
fe7c26d
Refine comments and bump version 2.5.8
Copilot Mar 29, 2026
eecd461
Fix app version export on Windows runners
Copilot Mar 29, 2026
863dbf4
Fix tauri icon bundling on macOS
Copilot Mar 29, 2026
40fb911
Re-encode tauri icon PNG
Copilot Mar 29, 2026
3b8a5a6
chore: log build attempt status
Copilot Mar 29, 2026
9cb7aec
chore: revert generated tauri icons
Copilot Mar 29, 2026
9aa9843
Generate Tauri icons in CI from source PNG
kiyarose Mar 29, 2026
31afe1f
Remove legacy root icon assets
kiyarose Mar 29, 2026
59f2d6c
Merge pull request #3 from SillyLittleTech/codex/fix-macos-ci-build-a…
kiyarose Mar 29, 2026
e0a769f
Fix Windows workflow installer artifact detection
kiyarose Mar 29, 2026
c50e071
Merge pull request #4 from SillyLittleTech/codex/fix-windows-ci-workf…
kiyarose Mar 29, 2026
3922145
Harden Windows installer artifact detection in workflows
kiyarose Mar 29, 2026
246f45a
Restrict Windows artifact globbing to installer-like files
kiyarose Mar 29, 2026
383db01
Merge pull request #5 from SillyLittleTech/codex/fix-windows-installe…
kiyarose Mar 29, 2026
12d4af5
Upload all discovered Windows installers in CI
kiyarose Mar 29, 2026
951f411
Merge branch 'copilot/update-app-icon-and-cicd-workflows' into codex/…
kiyarose Mar 29, 2026
654c3ec
Remove dead wix glob pattern; Tauri v1 outputs WiX files to bundle/ms…
Copilot Mar 29, 2026
d090ed1
Merge pull request #6 from SillyLittleTech/codex/fix-windows-installe…
kiyarose Mar 29, 2026
00abd45
Add .ico bundle icon for Windows Tauri builds
kiyarose Mar 30, 2026
7fe615f
Use npx tauri build in CI and enable global Tauri API
kiyarose Mar 30, 2026
f2250cc
Name Windows artifacts as install MSI and portable EXE
kiyarose Mar 30, 2026
ad0f90b
Update .github/workflows/prerelease.yml
kiyarose Mar 30, 2026
e41b1b4
Merge branch 'copilot/update-app-icon-and-cicd-workflows' into codex/…
kiyarose Mar 30, 2026
a11d0ad
Merge pull request #7 from SillyLittleTech/codex/fix-windows-installe…
kiyarose Mar 30, 2026
2ca9f82
Fix Linux renderer loading and macOS app signing defaults
kiyarose Mar 30, 2026
51d262e
Merge pull request #8 from SillyLittleTech/codex/fix-macos-build-dama…
kiyarose Mar 30, 2026
1228c28
Fix Linux blank screen from unsupported JS operators
kiyarose Mar 30, 2026
1f91b94
Merge pull request #9 from SillyLittleTech/codex/fix-blank-screen-in-…
kiyarose Mar 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
212 changes: 212 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
# PinStick — Development & Porting Guide

## Project Overview

PinStick is a lightweight macOS note-pinning app (formerly named "Jot") built with Swift/SwiftUI. It lives in the `SillyLittleTech/PinStick` repository.

---

## Branch Strategy

| Branch | Purpose |
|---|---|
| `main` | Stable macOS app with ARM (Apple Silicon) support |
| `cross-platform-dev` | Windows and Linux porting work |

### Working Rules
- All production-ready macOS changes merge into `main`.
- Cross-platform experiments stay on `cross-platform-dev` until proven stable and tested.
- Bug fixes that apply to both platforms should be cherry-picked from `main` into `cross-platform-dev` (or vice-versa) rather than duplicated.
- Open a PR to `main` only when the cross-platform work is validated through CI.

---

## ARM Support (Apple Silicon)

The app was originally built with x64 in mind. To make it ARM-native:

### Xcode Build Settings
1. Open `Jot.xcodeproj` (unzip `Jot.xcodeproj.zip` first).
2. Select the **Jot** target → **Build Settings**.
3. Set **Architectures** to `$(ARCHS_STANDARD)` (includes `arm64` + `x86_64` automatically).
4. Set **Build Active Architecture Only** to `No` for Release builds.
5. Under **Deployment**, set **macOS Deployment Target** to `14.0` or later (matching the current project) for full Apple Silicon support.

### Verifying ARM Compatibility
```bash
# After building, check the binary supports both architectures
lipo -info build/Release/PinStick.app/Contents/MacOS/PinStick
# Expected: Architectures in the fat file: arm64 x86_64
```

### Testing Recommendations
- Build and run on Apple Silicon hardware (M1/M2/M3).
- Use GitHub Actions `macos-latest` runners — they run on Apple Silicon and will catch ARM-specific issues in CI.
- Run existing unit tests (`JotTests`) after the architecture change to confirm no regressions.

---

## Windows & Linux Porting Strategy

### Why Not a Full Rewrite Immediately?
AI-generated cross-platform code can have platform-specific bugs that are impossible to catch without running the app. The strategy below uses CI runners and beta testers as the safety net, avoiding the need for local VMs.

### Framework Options

| Framework | Language | Pros | Cons |
|---|---|---|---|
| **Qt** | C++ | Native look, powerful, cross-platform | Steep learning curve, C++ |
| **Tauri** | Rust + Web (HTML/CSS/JS) | Lightweight, modern, secure | Rust learning curve |
| **Flutter** | Dart | Fast UI, growing desktop support | Non-native look by default |
| **.NET MAUI** | C# | Microsoft-backed, good Windows support | Less mature on Linux |
| **Electron** | JS/TypeScript | Easy, huge ecosystem | Large binary size |

**Recommendation for PinStick**: Given the app's simplicity (note editor + pin-to-front), **Tauri** is the best fit — it produces small binaries, uses web tech for the UI, and has first-class GitHub Actions support.

### Code Organization for Shared Logic

```
PinStick/
├── shared/ # Business logic shared across platforms
│ ├── models/ # Note data model
│ └── storage/ # Persistence layer
├── macos/ # Native Swift/SwiftUI macOS app
│ └── Sources/
├── cross-platform/ # Tauri / Qt / Flutter app (cross-platform-dev branch)
│ ├── src-tauri/ # Rust backend
│ └── src/ # Web frontend (HTML/CSS/JS)
└── .github/
└── workflows/
```

---

## GitHub Actions CI/CD

### Current Workflows

| Workflow | Trigger | What It Does |
|---|---|---|
| `prerelease.yml` | PR marked ready for review | Builds macOS app, creates prerelease; includes Windows/Linux placeholder job for future ports |
| `build-and-release.yml` | Push to `main` | Builds macOS app, tags release, publishes; includes Windows/Linux placeholder job for future ports |

### Testing on Windows & Linux Without Local VMs

GitHub Actions provides free hosted runners for all major platforms:

```yaml
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
```

This lets CI compile and test the cross-platform build on actual Windows and Linux machines without installing anything locally.

#### Docker for Lightweight Linux Testing
```yaml
- name: Test on Linux (Docker)
uses: addnab/docker-run-action@v3
with:
image: ubuntu:22.04
run: |
./cross-platform/scripts/build-linux.sh
./cross-platform/scripts/test-linux.sh
```

#### Adding Cross-Platform Builds to Workflows (Future)
When the cross-platform branch matures, extend `build-and-release.yml` with:
```yaml
- name: Build Windows App
if: runner.os == 'Windows'
run: |
cd cross-platform
npm run tauri build -- --target x86_64-pc-windows-msvc

- name: Build Linux App
if: runner.os == 'Linux'
run: |
cd cross-platform
npm run tauri build -- --target x86_64-unknown-linux-gnu
```

---

## Beta Testing Program

For real-world validation without a local VM:

1. **macOS** — TestFlight or direct `.app.zip` distribution via GitHub Releases.
2. **Windows** — GitHub Releases `.exe` / `.msi` installer; recruit Windows beta testers.
3. **Linux** — AppImage or Flatpak distributed via GitHub Releases.

Collect crash reports using Sentry or a lightweight logging service to catch issues you can't reproduce locally.

---

## Development Workflow

### Working on the `cross-platform-dev` Branch

```bash
git fetch origin
git checkout cross-platform-dev
# Make changes, commit, push
git push origin cross-platform-dev
```

Opening a PR from `cross-platform-dev` → `main` will trigger the prerelease workflow, giving you a build artifact before merging.

### Running CI Builds Without Merging

Trigger the release workflow manually with `workflow_dispatch`:

1. Go to **Actions** → **Build & Release macOS App**.
2. Click **Run workflow**, set **draft** to `true`.
3. GitHub will build and produce a draft release you can download and test.

### Merging Strategy

1. All Windows/Linux work stays on `cross-platform-dev`.
2. When a platform is stable (passes CI, passes beta testing):
- Open a PR from `cross-platform-dev` → `main`.
- The prerelease workflow builds and uploads artifacts automatically.
- After review and merge, the release workflow publishes the new version.
3. Bump `MARKETING_VERSION` in `Jot.xcodeproj/project.pbxproj` before merging to trigger a new release tag.

---

## Project Structure Notes

```
PinStick/
├── Jot.xcodeproj.zip # Xcode project (unzip before building)
├── PinStickApp.swift # App entry point + ContentView
├── Item.swift # Data model
├── Jot.entitlements # macOS sandbox entitlements
├── Contents.json # AppIcon.xcassets icon catalog
├── icon_*.png # App icon assets (all sizes)
├── JotTests.swift # Unit tests
├── JotUITests.swift # UI tests
├── JotUITestsLaunchTests.swift
└── .github/
├── workflows/
│ ├── prerelease.yml # PR prerelease automation
│ └── build-and-release.yml # Main branch release automation
└── copilot-instructions.md # This file
```

### Asset Catalog Icon Sizes (macOS)

| File | Logical Size | Scale |
|---|---|---|
| `icon_16x16.png` | 16×16 | @1x |
| `icon_32x32.png` | 16×16 | @2x |
| `icon_32x32 1.png` | 32×32 | @1x |
| `icon_64x64.png` | 32×32 | @2x |
| `icon_128x128.png` | 128×128 | @1x |
| `icon_256x256.png` | 128×128 | @2x |
| `icon_256x256 1.png` | 256×256 | @1x |
| `icon_512x512.png` | 256×256 | @2x |
| `icon_512x512 1.png` | 512×512 | @1x |
| `icon_1024x1024.png` | 512×512 | @2x |
18 changes: 18 additions & 0 deletions .github/scripts/extract-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail

PROJECT_ZIP="${PROJECT_ZIP:-Jot.xcodeproj.zip}"
PROJECT_DIR="Jot.xcodeproj"
TMP_DIR="$(mktemp -d 2>/dev/null || mktemp -d -t jotproj)"
trap 'rm -rf "$TMP_DIR"' EXIT

unzip -o "$PROJECT_ZIP" "$PROJECT_DIR/project.pbxproj" -d "$TMP_DIR" >/dev/null
PBXPROJ="$TMP_DIR/$PROJECT_DIR/project.pbxproj"

VERSION=$(grep -m1 'MARKETING_VERSION = ' "$PBXPROJ" | awk -F ' = ' '{ gsub(/;/,"",$2); print $2; exit }')
if [ -z "$VERSION" ]; then
echo "Could not extract MARKETING_VERSION" >&2
exit 1
fi

echo "v$VERSION"
Loading
Loading