Repository navigation
feat(desktop-gpui): New Cap icon, Quick Look thumbnail and preview extensions - #3482
ItsEeleeya wants to merge 10 commits into
Conversation
Ship two signed Quick Look extensions in Cap.app/Contents/PlugIns: thumbnails from screenshots/display.jpg (falling back to the screenshot image in recording-meta.json) and previews of output/result.mp4 with the same image fallback. Export the so.cap.desktop.project UTI so Finder matches .cap packages. scripts/build-macos-bundles.mjs compiles the Swift package and signs each appex with the app's identity before tauri bundle copies them in.
Check that each extension declares its own extension point and bundle id, that each principal class matches the @objc name its provider exports, that signing uses hardened runtime with the sandbox entitlements, and that signed appex are copied into PlugIns. Cover the opt-in --profile=debug path, which stays out of CI.
Compile icons/cap-solarium.icon and icons/Cap.xcassets with actool into Resources/Assets.car for release and debug bundles, and set CFBundleIconName, CFBundleIconFile (icon.icns), and NSAccentColorName in the GPUI Info.plist. Sea Glass drives the Windows and Linux icons. The runtime dock icon is debug-only and uses cap-debug-icon.png. Release never calls setApplicationIconImage, so macOS keeps the compiled icon's native layers.
Check the actool arguments for the Icon Composer file and asset catalog, the icon name and accent name parsed from actool's partial plist, using a fixture captured from real actool output.
|
@ItsEeleeya is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
| }); | ||
| const result = await buildMacosPackages( | ||
| target, | ||
| [...bundleArgs, ...(profile === "debug" ? ["--debug"] : [])], |
There was a problem hiding this comment.
Debug bundles use release files
--profile=debug stages a debug binary on every platform, but only the macOS branch passes --debug to Tauri. On Windows or Linux, a local debug bundle therefore looks for the release binary instead. It fails if that binary is missing, or packages a release binary left from an earlier build. Forward --debug on those platforms too, or reject this option outside macOS.
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/bundle-gpui.mjs
Line: 201
Comment:
**Debug bundles use release files**
`--profile=debug` stages a debug binary on every platform, but only the macOS branch passes `--debug` to Tauri. On Windows or Linux, a local debug bundle therefore looks for the release binary instead. It fails if that binary is missing, or packages a release binary left from an earlier build. Forward `--debug` on those platforms too, or reject this option outside macOS.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
|
||
| - name: Test desktop build preparation | ||
| run: node --test scripts/prepare-gpui-dependency.test.mjs scripts/build-macos-packages.test.mjs scripts/bundle-gpui.test.mjs scripts/finalize-macos-packages.test.mjs | ||
| run: node --test scripts/prepare-gpui-dependency.test.mjs scripts/build-macos-packages.test.mjs scripts/bundle-gpui.test.mjs scripts/build-macos-bundles.test.mjs scripts/finalize-macos-packages.test.mjs |
There was a problem hiding this comment.
Neither explicit test command includes the new build-macos-icon.test.mjs. The gpui filter also omits scripts/build-macos-icon*, so a later change limited to this helper will skip the desktop checks. Add the helper to the filter and its tests to both commands. Otherwise, a regression may first surface during a macOS release.
Knowledge Base Used: Build and release automation
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ci.yml
Line: 369
Comment:
**Icon tests never run**
Neither explicit test command includes the new `build-macos-icon.test.mjs`. The `gpui` filter also omits `scripts/build-macos-icon*`, so a later change limited to this helper will skip the desktop checks. Add the helper to the filter and its tests to both commands. Otherwise, a regression may first surface during a macOS release.
**Knowledge Base Used:** [Build and release automation](https://app.greptile.com/cap/-/custom-context/knowledge-base/capsoftware/cap/-/docs/build-and-release-automation.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
|
||
| - name: Test desktop build preparation | ||
| run: node --test scripts/prepare-gpui-dependency.test.mjs scripts/build-macos-packages.test.mjs scripts/bundle-gpui.test.mjs scripts/finalize-macos-packages.test.mjs | ||
| run: node --test scripts/prepare-gpui-dependency.test.mjs scripts/build-macos-packages.test.mjs scripts/bundle-gpui.test.mjs scripts/build-macos-bundles.test.mjs scripts/finalize-macos-packages.test.mjs |
There was a problem hiding this comment.
Pull request CI never compiles the new Swift products. build-macos-bundles.test.mjs checks text and JavaScript helpers; the remaining desktop steps run Rust tests. Only the release command reaches swift build, so a provider compile error can pass these checks and stop the next macOS release. Add an unsigned Swift build on the macOS jobs.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ci.yml
Line: 369
Comment:
**Swift builds skip PR checks**
Pull request CI never compiles the new Swift products. `build-macos-bundles.test.mjs` checks text and JavaScript helpers; the remaining desktop steps run Rust tests. Only the release command reaches `swift build`, so a provider compile error can pass these checks and stop the next macOS release. Add an unsigned Swift build on the macOS jobs.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| "colors" : [ | ||
| { | ||
| "color" : { | ||
| "color-space" : "srgb", | ||
| "components" : { |
There was a problem hiding this comment.
The new asset catalog JSON uses spaces for indentation. AGENTS.md requires tabs for new JSON files and says not to override that rule per file. Format this file and Cap.xcassets/Contents.json with tabs before merging to satisfy the repository requirement.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop-gpui/icons/Cap.xcassets/AccentColor.colorset/Contents.json
Line: 2-6
Comment:
**Asset JSON uses spaces**
The new asset catalog JSON uses spaces for indentation. `AGENTS.md` requires tabs for new JSON files and says not to override that rule per file. Format this file and `Cap.xcassets/Contents.json` with tabs before merging to satisfy the repository requirement.
**Context Used:** AGENTS.md ([source](https://github.com/capsoftware/cap/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
…in CI Pass --debug to tauri bundle on every platform, not only macOS, so a local debug bundle never packages a release binary. Run the icon helper tests in the desktop checks and the desktop-gpui path filter, and compile the Swift Quick Look products on the macOS jobs. Format the Cap.xcassets catalogs with tabs.
This PR adds macOS Finder integration and branding for the GPUI app:
.cappackages, shipped as two signed extensions inCap.app/Contents/PlugIns/.actoolintoAssets.car.icon.icnsremains as the fallback for older macOS.AccentColorasset, which native controls pick up.Changes
Quick Look (
apps/macos-bundles/,scripts/build-macos-bundles.mjs)screenshots/display.jpg, or the screenshot image named inrecording-meta.json(for screenshot packages, which storeoriginal.png).output/result.mp4when present, with the same image fallback.CapProject.swiftfor the lookup.build-macos-bundles.mjsbuilds the products, assembles each.appex, and signs it withAPPLE_SIGNING_IDENTITYandAPPLE_KEYCHAIN, using hardened runtime, a timestamp, and the sandbox entitlements. CI fails without an identity. Local builds warn and produce unsigned bundles.bundle-gpui.mjsplaces the signed bundles inPlugIns/throughmacOS.files, beforetauri bundleseals the app.apps/desktop-gpui/Info.plistdeclares theso.cap.desktop.projectUTI (conforms tocom.apple.package, extensioncap).Icons and accent (
apps/desktop-gpui/icons/,scripts/build-macos-icon.mjs)cap-solarium.iconandCap.xcassetsare compiled withactoolintoAssets.carfor release and debug bundles. The partial plist suppliesCFBundleIconNameandNSAccentColorName, whichInfo.plistalso declares.AccentColoris set to#007AFF(light) and#0A84FF(dark), matching the theme's accent values.icon.icnsis the legacy icon, and Windows and Linux useSea Glass Icon(icon.png,icon.ico).build.rsand the NSIS installer icon point at these.tauri.conf.jsonicon paths now point aticons/in the GPUI app.Debug build
bundle-gpui.mjs --profile=debugbuilds the GPUI binary without--releaseand bundles it. It refuses to run whenCIis set.#[cfg(debug_assertions)], usingassets/cap-debug-icon.png.permission_guide.rsusesassets/app-icon.png(the Sea Glass art) for its in-window icon.Testing
Assets.car,icon.icns, theCFBundleIconName/NSAccentColorNamekeys, and both extensions. It verifies withcodesign --verify --deep --strict./Applications/Cap.appand are enabled.cargo runshows the debug Dock icon.Notes for reviewers
TAURI_SIGNING_PRIVATE_KEYisn't set.apps/desktop. It can't read.iconorAssets.carfrom config, so the icon compile and theAssets.carplacement are done by our scripts.New Icons
Fix debug bundling on Windows and Linux and satisfy the required JSON formatting before merging.
Findings
Fix with agent prompt
Summary
Adds macOS Quick Look extensions and updates Cap's icons and accent color.
ItsEeleeya explicitly described unsigned local extensions as intentional: local builds warn when no signing identity is supplied.
Reviews (1) · Last reviewed commit: "chore: exclude the Icon Composer source ..." · Reviewed by Greptile