mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-31 16:33:34 +08:00
The shadcn migration (ad597ffe) and its follow-up (5b4e224f) were mega-commits: only ~16% of the insertions were UI work. Rolling either one back wholesale also deletes ~3400 lines of unrelated server, Electron, and store hardening -- and because each of those changes shipped with its own tests, the suite stays green while the hardening silently disappears. This rolls back the UI layer only. Reverted (back to c2774fc1): - desktop/src/components, pages, features, theme, i18n - components/ui/**, components.json, src/lib/utils.ts (cn helper) - radix-ui, class-variance-authority, tailwind-merge deps - src-tauri/src/lib.rs hardening: dead code, nothing compiles it (no @tauri-apps dep, no cargo invocation anywhere, and scripts/pr/release-workflow.test.ts asserts Tauri's absence) Kept (identical to main): - src/** -- WhatsApp authDir escape allowing arbitrary recursive directory removal, computer-use tier bypass granting every pre-authorized app full tier, plugin uninstall keepData inversion that deleted data when asked to keep it, plugin project-scope writing to the sidecar cwd, diagnostics share leaking provider config, memory API TOCTOU plus atomic writes - desktop/electron/** -- PTY leak on renderer destruction, IPC boundary validation rejecting NaN and unbounded input - desktop/src/stores/** -- request-id race guards - desktop/src/api, lib/desktopHost -- kept in step with the stores Follows main's b64069a3 in dropping the installed-skills overview. Updated two memorySettings assertions to expect the optimistic-lock fields the retained memory store sends. check:desktop pass (lint clean, 225 files / 2519 passed / 1 skipped, build ok). check:server pass (224 files / 2375 passed / 0 failed).
148 lines
5.7 KiB
JSON
148 lines
5.7 KiB
JSON
{
|
|
"name": "claude-code-desktop",
|
|
"private": true,
|
|
"version": "0.4.11",
|
|
"description": "Desktop coding agent workbench for Claude Code Haha.",
|
|
"homepage": "https://github.com/NanmiCoder/cc-haha",
|
|
"author": {
|
|
"name": "NanmiCoder",
|
|
"email": "relakkes@gmail.com"
|
|
},
|
|
"type": "module",
|
|
"main": "electron-dist/main.cjs",
|
|
"build": {
|
|
"appId": "com.claude-code-haha.desktop",
|
|
"productName": "Claude Code Haha",
|
|
"asar": true,
|
|
"asarUnpack": [
|
|
"dist/**",
|
|
"node_modules/node-pty/**",
|
|
"src-tauri/binaries/**"
|
|
],
|
|
"artifactName": "Claude-Code-Haha-${version}-${os}-${arch}.${ext}",
|
|
"npmRebuild": false,
|
|
"directories": {
|
|
"output": "build-artifacts/electron"
|
|
},
|
|
"files": [
|
|
"dist/**",
|
|
"electron-dist/**",
|
|
"node_modules/node-pty/**",
|
|
"src-tauri/binaries/**",
|
|
"src-tauri/icons/**",
|
|
"src-tauri/resources/preview-agent.js",
|
|
"package.json"
|
|
],
|
|
"mac": {
|
|
"category": "public.app-category.developer-tools",
|
|
"target": [
|
|
"dmg",
|
|
"zip"
|
|
],
|
|
"icon": "src-tauri/icons/icon.icns",
|
|
"hardenedRuntime": true,
|
|
"gatekeeperAssess": false,
|
|
"entitlements": "build/entitlements.mac.plist",
|
|
"entitlementsInherit": "build/entitlements.mac.inherit.plist",
|
|
"signIgnore": [
|
|
"/Contents/Frameworks/.+\\.(?:pak|bin|dat|nib)$",
|
|
"/Contents/Resources/.+\\.(?:asar|pak|bin|dat|icns|png|jpg|jpeg|gif|svg|ttf|woff|woff2)$"
|
|
],
|
|
"notarize": true
|
|
},
|
|
"win": {
|
|
"target": "nsis",
|
|
"icon": "src-tauri/icons/icon.ico"
|
|
},
|
|
"nsis": {
|
|
"oneClick": false,
|
|
"allowToChangeInstallationDirectory": true,
|
|
"include": "build/installer.nsh"
|
|
},
|
|
"linux": {
|
|
"target": [
|
|
"AppImage",
|
|
"deb"
|
|
],
|
|
"icon": "src-tauri/icons",
|
|
"category": "Development",
|
|
"maintainer": "NanmiCoder <relakkes@gmail.com>"
|
|
},
|
|
"publish": [
|
|
{
|
|
"provider": "github",
|
|
"owner": "NanmiCoder",
|
|
"repo": "cc-haha"
|
|
}
|
|
]
|
|
},
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "bun run build:preview-agent && node ./node_modules/typescript/bin/tsc -b && node ./node_modules/vite/bin/vite.js build",
|
|
"prepare:node-pty": "bun run ./scripts/prepare-node-pty.ts",
|
|
"build:electron": "bun run prepare:node-pty && bun build ./electron/main.ts --outfile ./electron-dist/main.cjs --target node --format cjs --external electron --external node-pty && bun build ./electron/preload.ts --outfile ./electron-dist/preload.cjs --target node --format cjs --external electron && bun build ./electron/pet-preload.ts --outfile ./electron-dist/pet-preload.cjs --target node --format cjs --external electron && bun build ./electron/preview-preload.ts --outfile ./electron-dist/preview-preload.cjs --target node --format cjs --external electron",
|
|
"build:preview-agent": "bun run ./scripts/build-preview-agent.ts",
|
|
"prepare:ripgrep": "bun run ./scripts/prepare-ripgrep.ts",
|
|
"build:sidecars": "bun run ./scripts/build-sidecars.ts",
|
|
"test:compiled-sidecar-smoke": "CC_HAHA_RUN_COMPILED_SIDECAR_SMOKE=1 bun run test -- --run scripts/build-sidecars.test.ts",
|
|
"clean:electron-output": "bun run ./scripts/clean-electron-output.ts",
|
|
"build:macos-arm64": "bash ./scripts/build-macos-arm64.sh",
|
|
"build:windows-x64": "powershell -ExecutionPolicy Bypass -File ./scripts/build-windows-x64.ps1",
|
|
"test:windows-storage-recovery": "powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -File ./build/recover-legacy-install-data.ps1 -SelfTest",
|
|
"build:linux-x64": "bash ./scripts/build-linux.sh",
|
|
"build:linux-arm64": "LINUX_ARCH=arm64 bash ./scripts/build-linux.sh",
|
|
"electron:dev": "bun run build:electron && bun run ./scripts/electron-dev.ts",
|
|
"electron:build": "bun run build:sidecars && bun run build && bun run build:electron",
|
|
"electron:package": "bun run clean:electron-output && bun run electron:build && node ./node_modules/electron-builder/out/cli/cli.js --publish never",
|
|
"electron:package:dir": "bun run clean:electron-output && bun run electron:build && node ./node_modules/electron-builder/out/cli/cli.js --dir --publish never",
|
|
"check:electron": "node ./node_modules/typescript/bin/tsc -p electron/tsconfig.json && bun test ./electron && bun run build:electron",
|
|
"preview": "vite preview",
|
|
"test": "vitest",
|
|
"test:ui": "vitest --ui",
|
|
"lint": "node ./node_modules/typescript/bin/tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@dnd-kit/core": "^6.3.1",
|
|
"@dnd-kit/sortable": "^10.0.0",
|
|
"@dnd-kit/utilities": "^3.2.2",
|
|
"@tailwindcss/typography": "^0.5.19",
|
|
"@types/dompurify": "^3.2.0",
|
|
"@xterm/addon-fit": "^0.11.0",
|
|
"@xterm/xterm": "^6.0.0",
|
|
"dompurify": "^3.3.3",
|
|
"electron-updater": "^6.8.3",
|
|
"html2canvas": "^1.4.1",
|
|
"katex": "^0.16.45",
|
|
"lucide-react": "^0.469.0",
|
|
"marked": "^15.0.7",
|
|
"mermaid": "^11.14.0",
|
|
"node-pty": "^1.1.0",
|
|
"prism-react-renderer": "^2.4.1",
|
|
"qrcode": "^1.5.4",
|
|
"react": "^18.3.1",
|
|
"react-diff-viewer-continued": "^4.2.0",
|
|
"react-dom": "^18.3.1",
|
|
"react-shiki": "^0.9.2",
|
|
"shiki": "^4.0.2",
|
|
"zustand": "^5.0.3"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/vite": "^4.0.0",
|
|
"@testing-library/dom": "^10.4.1",
|
|
"@testing-library/jest-dom": "^6.6.3",
|
|
"@testing-library/react": "^16.1.0",
|
|
"@types/node": "^25.9.1",
|
|
"@types/react": "^18.3.18",
|
|
"@types/react-dom": "^18.3.5",
|
|
"@vitejs/plugin-react": "^6.0.1",
|
|
"@vitest/coverage-v8": "3.2.4",
|
|
"electron": "^42.4.0",
|
|
"electron-builder": "^26.8.1",
|
|
"jsdom": "^25.0.1",
|
|
"tailwindcss": "^4.0.0",
|
|
"typescript": "^5.9.3",
|
|
"vite": "^8.0.10",
|
|
"vitest": "^3.0.4"
|
|
}
|
|
}
|