Skip to content

feat(desktop-gpui): New Cap icon, Quick Look thumbnail and preview extensions - #3482

Open
ItsEeleeya wants to merge 10 commits into
CapSoftware:mainfrom
ItsEeleeya:macos-extra-bundles
Open

ItsEeleeya wants to merge 10 commits into
CapSoftware:mainfrom
ItsEeleeya:macos-extra-bundles

Conversation

@ItsEeleeya

@ItsEeleeya ItsEeleeya commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds macOS Finder integration and branding for the GPUI app:

  • Quick Look thumbnails and previews for .cap packages, shipped as two signed extensions in Cap.app/Contents/PlugIns/.
  • Icon Composer icon for macOS 26+, compiled with actool into Assets.car. icon.icns remains as the fallback for older macOS.
  • Cap accent color via the bundle's AccentColor asset, which native controls pick up.

Changes

Quick Look (apps/macos-bundles/, scripts/build-macos-bundles.mjs)

  • A Swift package with two extension products. Each extension is its own bundle because an appex declares a single extension point.
  • Thumbnails use screenshots/display.jpg, or the screenshot image named in recording-meta.json (for screenshot packages, which store original.png).
  • Previews use output/result.mp4 when present, with the same image fallback.
  • Both share CapProject.swift for the lookup.
  • build-macos-bundles.mjs builds the products, assembles each .appex, and signs it with APPLE_SIGNING_IDENTITY and APPLE_KEYCHAIN, using hardened runtime, a timestamp, and the sandbox entitlements. CI fails without an identity. Local builds warn and produce unsigned bundles.
  • bundle-gpui.mjs places the signed bundles in PlugIns/ through macOS.files, before tauri bundle seals the app.
  • apps/desktop-gpui/Info.plist declares the so.cap.desktop.project UTI (conforms to com.apple.package, extension cap).

Icons and accent (apps/desktop-gpui/icons/, scripts/build-macos-icon.mjs)

  • cap-solarium.icon and Cap.xcassets are compiled with actool into Assets.car for release and debug bundles. The partial plist supplies CFBundleIconName and NSAccentColorName, which Info.plist also declares.
  • AccentColor is set to #007AFF (light) and #0A84FF (dark), matching the theme's accent values.
  • icon.icns is the legacy icon, and Windows and Linux use Sea Glass Icon (icon.png, icon.ico). build.rs and the NSIS installer icon point at these.
  • tauri.conf.json icon paths now point at icons/ in the GPUI app.
  • Updated Wix and NSIS installer images.

Debug build

  • bundle-gpui.mjs --profile=debug builds the GPUI binary without --release and bundles it. It refuses to run when CI is set.
  • The runtime Dock icon is set only under #[cfg(debug_assertions)], using assets/cap-debug-icon.png.
  • permission_guide.rs uses assets/app-icon.png (the Sea Glass art) for its in-window icon.

Testing

  • Manually verified on macOS:
    • The debug bundle contains Assets.car, icon.icns, the CFBundleIconName / NSAccentColorName keys, and both extensions. It verifies with codesign --verify --deep --strict.
    • Both extensions register from /Applications/Cap.app and are enabled.
    • Recording and screenshot thumbnails and Quick Look previews work in Finder.
    • The accent color and the Icon Composer icon appear as expected.
    • The debug cargo run shows the debug Dock icon.

Notes for reviewers

  • Signing and notarization of the appex in CI is untested here. The local build cannot notarize because TAURI_SIGNING_PRIVATE_KEY isn't set.
  • Tauri CLI is 2.5.0 in apps/desktop. It can't read .icon or Assets.car from config, so the icon compile and the Assets.car placement are done by our scripts.

New Icons

new-icons

RetriggerView in GreptileConfidence Score: 4/5

Fix debug bundling on Windows and Linux and satisfy the required JSON formatting before merging.

Findings

  1. P1 Debug bundles use release files ▶
  2. P2 Icon tests never run ▶
  3. P2 Swift builds skip PR checks ▶
  4. P2 Asset JSON uses spaces ▶
Fix with agent prompt
### Issue 1
scripts/bundle-gpui.mjs:201
`--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.

### Issue 2
.github/workflows/ci.yml:369
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.

### Issue 3
.github/workflows/ci.yml:369
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.

### Issue 4
apps/desktop-gpui/icons/Cap.xcassets/AccentColor.colorset/Contents.json:2-6
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.

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!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds macOS Quick Look extensions and updates Cap's icons and accent color.

  • Finder can show thumbnails and previews for Cap projects.
  • Cap’s desktop apps show the new Cap icon and macOS accent color.
  • Local GPUI debug bundles use a separate Dock icon.

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

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.
@vercel

vercel Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

@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.

@ItsEeleeya
ItsEeleeya marked this pull request as ready for review October 27, 2026 16:18
Comment thread scripts/bundle-gpui.mjs Outdated
});
const result = await buildMacosPackages(
target,
[...bundleArgs, ...(profile === "debug" ? ["--debug"] : [])],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Comment thread .github/workflows/ci.yml Outdated

- 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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

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.

Comment thread .github/workflows/ci.yml Outdated

- 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

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.

Comment on lines +2 to +6
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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)

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 branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant