mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
Tauri WebView was allowed to call the desktop sidecar API, but the CSP still blocked image loads from that same local server, so extracted IDE icons degraded to the generic code glyph in packaged builds. macOS detection also trusted command shims before app bundles, which let stale JetBrains Toolbox scripts keep removed IDEs visible. Constraint: Opener icons are served by the per-run desktop sidecar on localhost or 127.0.0.1 Rejected: Bundle a fixed static icon set | the product should use detected installed application icons across platforms Rejected: Trust macOS command shims for detection | stale shims survive app removal and make the menu lie Confidence: high Scope-risk: narrow Directive: Keep macOS IDE detection anchored to real app bundles before accepting command shims Tested: bun test src/server/__tests__/open-target-service.test.ts src/server/__tests__/open-target-api.test.ts desktop/src-tauri/tauri-config.test.ts Tested: cd desktop && bun run test -- src/api/client.test.ts src/api/openTargets.test.ts src/stores/openTargetStore.test.ts src/components/layout/OpenProjectMenu.test.tsx src/components/layout/TabBar.test.tsx Tested: cd desktop && bun run lint
81 lines
2.2 KiB
JSON
81 lines
2.2 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/nicegui/nicegui/main/nicegui/static/tauri-schema-v2.json",
|
|
"productName": "Claude Code Haha",
|
|
"version": "0.2.6",
|
|
"identifier": "com.claude-code-haha.desktop",
|
|
"build": {
|
|
"frontendDist": "../dist",
|
|
"devUrl": "http://localhost:1420",
|
|
"beforeDevCommand": "bun run build:sidecars && bun run dev",
|
|
"beforeBuildCommand": "bun run build && bun run build:sidecars"
|
|
},
|
|
"app": {
|
|
"windows": [
|
|
{
|
|
"title": "Claude Code Haha",
|
|
"width": 1440,
|
|
"height": 960,
|
|
"minWidth": 960,
|
|
"minHeight": 640,
|
|
"decorations": true,
|
|
"transparent": false,
|
|
"acceptFirstMouse": true
|
|
}
|
|
],
|
|
"security": {
|
|
"dangerousDisableAssetCspModification": ["style-src"],
|
|
"csp": "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: asset: https://asset.localhost http://127.0.0.1:* http://localhost:*; font-src 'self' data:; connect-src 'self' ws://127.0.0.1:* http://127.0.0.1:* ws://localhost:* http://localhost:*; media-src 'self' blob:"
|
|
}
|
|
},
|
|
"plugins": {
|
|
"updater": {
|
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDlCOUIwRDExQTc5RTFGMzYKUldRMkg1Nm5FUTJibTJ2cGlHY0pkL0dGemxXMUlzc01pVTVMM1U3WGpmWUtrUC8wK2ErSXhLKzEK",
|
|
"endpoints": [
|
|
"https://github.com/NanmiCoder/cc-haha/releases/latest/download/latest.json"
|
|
],
|
|
"windows": {
|
|
"installMode": "passive"
|
|
}
|
|
}
|
|
},
|
|
"bundle": {
|
|
"active": true,
|
|
"targets": "all",
|
|
"createUpdaterArtifacts": true,
|
|
"windows": {
|
|
"nsis": {
|
|
"installerHooks": "windows-installer-hooks.nsh"
|
|
}
|
|
},
|
|
"externalBin": [
|
|
"binaries/claude-sidecar"
|
|
],
|
|
"resources": [
|
|
"../dist"
|
|
],
|
|
"icon": [
|
|
"icons/32x32.png",
|
|
"icons/128x128.png",
|
|
"icons/128x128@2x.png",
|
|
"icons/icon.icns",
|
|
"icons/icon.ico"
|
|
],
|
|
"macOS": {
|
|
"dmg": {
|
|
"appPosition": {
|
|
"x": 180,
|
|
"y": 170
|
|
},
|
|
"applicationFolderPosition": {
|
|
"x": 480,
|
|
"y": 170
|
|
},
|
|
"windowSize": {
|
|
"width": 660,
|
|
"height": 400
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|