6 Commits

Author SHA1 Message Date
程序员阿江(Relakkes)
28b1ccf0d2 fix(desktop): 移除 canonical .app 重签名,避免 Keychain ACL 失配导致 403
症状: 桌面端激活 Claude Official provider 后所有请求报
403 "Request not allowed",Tauri 原生产物(target/.../bundle/macos/)
能跑,但脚本输出的 canonical 产物(build-artifacts/macos-arm64/)报错。

根因: 脚本里的 sign_app_bundle() 用 `codesign --force --deep --sign -`
对 sidecar 和外层 .app 重签,想统一 signing identifier,但这会改变
sidecar binary 的 code signature hash。macOS Keychain ACL 按 hash
识别 caller —— 重签后的 sidecar 对 Keychain 来说是"陌生 binary",
弹"允许访问"对话框但 sidecar 无 UI 弹不出,被静默拒绝,CLI 读不到
OAuth token,SDK 构造空 Authorization,Anthropic 返回 403。

修复: 移除 sign_app_bundle 及其调用。Tauri 的 --no-sign flag 只是不做
Developer ID 签名,ad-hoc 签名 Tauri 自己已经做好了,再签一次纯属
多此一举,还破坏了 Tauri 签好的 Keychain ACL 关系。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 21:13:43 +08:00
程序员阿江(Relakkes)
d0cf2544d2 fix(desktop): DMG Finder 美化失败时降级为默认布局而非整脚本 fail
macOS Sequoia+ 对 Finder AppleScript 做了限制,"toolbar visible"
"statusbar visible" 之类的 container window 属性不再支持,会返回
-10006 错误。在 set -e 下导致整个 build-macos-arm64.sh 炸掉,canonical
目录里没有 DMG。

美化失败不是 blocker —— DMG 本身是可用的,只是用户双击打开看到的
是 Finder 默认排布。这里:
- osascript 非零退出只 warn,不让 set -e 中断脚本
- 顺手把 hdiutil detach 也加了 -force fallback,osascript 可能
  把 volume 窗口打开了导致 normal detach 因 "Resource busy" 失败

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 21:02:57 +08:00
程序员阿江(Relakkes)
bea8153d17 fix(desktop): build 脚本加 fresh-build 保险,避免 sidecar 缓存复用
修 src/ 后 build 出来的 .app 里 sidecar 还是旧代码的诡异问题 ——
Bun.build/Tauri bundler 某层缓存把 desktop/src-tauri/binaries/ 里的
旧 sidecar binary 复用进了新 .app,即便删掉 .app 也救不回来,因为
binary 源目录不在 .app 里。

加 3 道保险:
- 硬删 sidecar 源 binary + Tauri bundle + 前端 dist 目录
- 显式跑 bun run build + bun run build:sidecars(set -e 会捕获失败)
- tauri build 用 --config 覆盖 beforeBuildCommand 为 no-op,避免
  build:sidecars 被重复执行浪费 ~10s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 20:40:46 +08:00
程序员阿江(Relakkes)
870e03d88b docs(desktop): 全面更新桌面端文档,替换真实截图,修复 DMG 布局
- 重写 02-architecture.md:修正 Rust 函数签名、补充 AdapterSidecar/Updater 插件、更新目录结构
- 重写 03-features.md:补充 ComputerUse/ToolInspection/ImageGallery 等新组件和页面
- 精简 04-installation.md:仅保留 macOS/Windows,新增 Web UI 模式说明
- 精简 index.md:移除过时配图说明表格
- 删除 8 张 AI 渲染概念图,替换为 9 张真实应用截图
- 新增 desktop/README.md:开发/构建指南 + macOS 常见问题
- 修复 DMG 构建脚本:通过 AppleScript 控制图标布局(App 左/Applications 右)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 10:25:36 +08:00
程序员阿江(Relakkes)
0e60cadb13 chore(desktop): 构建改进与 UI 完善
- build-sidecars.ts macOS 编译后自动 ad-hoc codesign
- build-macos-arm64.sh 构建流程优化
- tauri.conf.json 配置更新
- i18n 中英文翻译补充
- Settings 页面与 uiStore 调整
2026-04-15 14:18:55 +08:00
程序员阿江(Relakkes)
635a966c3e fix(desktop): unblock rollout with reliable session and IM flows
This folds together the desktop-side fixes needed before broader rollout.
Session resume no longer deadlocks waiting on init, Mermaid and inline image
output render inside chat, task and sub-agent state stay visible during
execution, local build/release paths are safer, and Feishu/Telegram now expose
lightweight mobile commands (/help, /status, /clear) without adding a new
adapter-specific protocol.

Constraint: Desktop releases must publish updater artifacts from non-draft GitHub releases
Constraint: IM commands need short, phone-friendly responses and low operational complexity
Rejected: Add a dedicated IM command API surface | re-used existing slash commands and session/task REST endpoints to keep adapters thin
Rejected: Wait for task_update push events in WebUI | added low-risk polling because the current frontend ignores that event path
Confidence: medium
Scope-risk: broad
Reversibility: clean
Directive: Keep IM command replies terse and mobile-first, and merge local fallback slash commands when server-provided lists are partial
Tested: cd desktop && bun x vitest run src/components/chat/MermaidRenderer.test.tsx src/components/markdown/MarkdownRenderer.test.tsx
Tested: cd desktop && bun x vitest run src/components/chat/composerUtils.test.ts src/pages/ActiveSession.test.tsx src/stores/chatStore.test.ts
Tested: cd desktop && bun run lint
Tested: bun test src/server/__tests__/conversations.test.ts --test-name-pattern "SDK init arrives only after the first user turn" --timeout 60000
Tested: cd adapters && bun test common/ feishu/ telegram/
Tested: cd adapters && bunx tsc --noEmit
Not-tested: Full GitHub Actions release run on all three desktop platforms
Not-tested: Local DMG packaging end-to-end on Apple Silicon
Not-tested: Real Feishu/Telegram device sessions against a live adapter process
2026-04-10 16:41:59 +08:00