Add URL trigger expansion and marketing asset scripts - #190
Merged
superhighfives merged 3 commits intoMar 16, 2026
Conversation
New pika:// URL triggers: set foreground/background color, show/hide/toggle history drawer, open About/Help/Preferences windows, resize window, and force light/dark/system appearance. Updates HelpView with all new triggers. Adds build/marketing/ scripts (capture.sh, generate.ts, manifest.json) for automated screenshot capture and compositing of release marketing assets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Auto-detects pika-releases/Production Exports/Pika * (v<version>)/Pika.app and passes it to capture.sh via PIKA_APP, using open -a to route URL triggers to that exact binary. Launches Pika before capture and quits it after. Falls back to system Pika if no export is found. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a color history feature (with a drawer UI and navigation), introduces a dedicated Help window, expands pika:// URL automation, and updates localizations + ancillary tooling to support these additions.
Changes:
- Add persistent color history storage with a bottom “history drawer”, toggle UI, and keyboard/navigation actions.
- Introduce a new Help window/view that documents shortcuts and URL triggers, and add Help entry points in the app menu.
- Expand URL scheme handling (
pika://set,pika://history,pika://window,pika://appearance) and add marketing screenshot generation scripts.
Reviewed changes
Copilot reviewed 27 out of 30 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Pika/Views/NavigationMenuItems.swift | Adds menu items for toggling history and opening Help. |
| Pika/Views/NavigationMenu.swift | Adds a toolbar toggle button for the history drawer + a hidden shortcut binding. |
| Pika/Views/KeyboardShortcutKey.swift | Adjusts shortcut key UI sizing. |
| Pika/Views/KeyboardShortcutGrid.swift | Reworks shortcut grid layout and adds history shortcut entry. |
| Pika/Views/HelpView.swift | New Help window content (shortcuts, URL triggers, formats, links). |
| Pika/Views/ContentView.swift | Integrates the history drawer, history recording, and history navigation notifications. |
| Pika/Views/ColorHistoryDrawer.swift | New history drawer UI (chips, context menu actions, clear button). |
| Pika/Views/AboutView.swift | Refactors About UI and reuses the external link row component. |
| Pika/Services/WindowCoordinator.swift | Adds Help window creation and adjusts window sizing. |
| Pika/Services/URLSchemeHandler.swift | Adds new URL actions (set/history/window/appearance) and refactors parsing. |
| Pika/Services/Eyedroppers.swift | Implements history recording, undo/redo stacks, and history navigation/apply operations. |
| Pika/Services/ColorPair.swift | New model for storing a foreground/background pair in Defaults. |
| Pika/Constants/Defaults.swift | Adds Defaults keys for history + undo/redo stacks + drawer visibility. |
| Pika/Constants/Constants.swift | Adds notification names and localized strings for Help + History. |
| Pika/Assets/zh-Hant.lproj/Localizable.strings | Adds Traditional Chinese localization file content for new strings. |
| Pika/Assets/zh-Hans.lproj/Localizable.strings | Adds Simplified Chinese localization file content for new strings. |
| Pika/Assets/pl.lproj/Localizable.strings | Adds Help/History strings in Polish. |
| Pika/Assets/hr.lproj/Localizable.strings | Adds Help/History strings in Croatian. |
| Pika/Assets/fr.lproj/Localizable.strings | Adds Help/History strings in French. |
| Pika/Assets/es.lproj/Localizable.strings | Adds Help/History strings in Spanish. |
| Pika/Assets/en.lproj/Localizable.strings | Adds Help/History strings in English. |
| Pika/Assets/de.lproj/Localizable.strings | Adds Help/History strings in German. |
| Pika/Assets/Base.lproj/Main.storyboard | Adds menu actions/items for history toggling and navigation. |
| Pika/AppDelegate.swift | Wires new actions, adds key monitoring for history navigation, switches undo/redo to new stack logic. |
| Pika.xcodeproj/project.pbxproj | Adds new source files to targets and bumps version numbers. |
| build/marketing/package.json | Adds Node deps for marketing asset generation. |
| build/marketing/manifest.json | Defines capture/composite manifest for marketing screenshots. |
| build/marketing/generate.ts | Adds capture/composite/figma export pipeline script. |
| build/marketing/capture.sh | Adds shell helper to drive Pika via URL triggers and capture window screenshots. |
| .gitignore | Updates ignored build outputs and ignores marketing capture output directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
- Fix pika://set/... URL parsing: pass arg1 (hex) not arg2 (nil) to handleSet - Skip pushUndo() in recordHistory() when history is empty to avoid restoring an empty snapshot on first undo - Guard against empty history in swap() to prevent index-out-of-range crash - Remove stale isActivePair reference from ColorPair comment (active tracking is now by id, not hex equality) - Fix history toggle hidden shortcut: ⌘Y → plain H to match storyboard/docs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Owner
Author
|
Addressed all five review comments in b1787af:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pika://URL scheme with 12 new actions for setting colors, controlling the history drawer, opening windows, resizing, and forcing appearanceHelpViewwith all new trigger groupsbuild/marketing/scripts (capture.sh,generate.ts,manifest.json) for automated marketing screenshot capture and compositing at release timeNew URL triggers
pika://set/foreground/<hex>pika://set/background/<hex>pika://history/showpika://history/hidepika://history/togglepika://window/aboutpika://window/helppika://window/preferencespika://window/resize/<w>/<h>pika://appearance/lightpika://appearance/darkpika://appearance/systemMarketing scripts
cd pika npm install --prefix build/marketing npx tsx build/marketing/generate.ts --version 1.3.0 --allOutputs versioned assets to
pika-releases/Marketing/v<version>/— web JPGs (@2x + @1x) and shadow-trimmed Figma PNGs.Test plan
pika://set/foreground/fbbf24updates foreground color to yellowpika://set/background/e74661updates background color to redpika://history/showopens drawer when hidden;hidecloses when open;toggleflips statepika://window/about,/help,/preferencesopen correct windowspika://window/resize/480/300resizes window to 480×300ptpika://appearance/darkforces dark mode;/lightforces light;/systemrestores following🤖 Generated with Claude Code