mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-17 13:13:35 +08:00
The chat reference action was still tied too closely to message-local mouseup timing, and the floating fixed-position control stayed inside virtualized message DOM. In Electron Chromium that made multi-line ranges race selection settlement and let transformed ancestors offset the button away from the viewport position we calculated. This reads settled document selections after pointerup/selectionchange, portals the action to document.body, and prefers right-side placement for multi-line selections. Constraint: Electron Chromium selectionchange can settle after message-local mouse events Rejected: Keep the popover inside the message node | transformed/virtualized ancestors offset fixed positioning in real browser layout Confidence: high Scope-risk: narrow Directive: Keep chat selection actions portaled; do not reparent under virtualized message rows without browser-coordinate verification Tested: cd desktop && bun run test -- src/components/chat/MessageList.test.tsx Tested: bun run check:desktop Tested: Playwright Chromium smoke for multi-line selection, single-line selection, and outside-click dismissal on local desktop harness
Claude Code Haha Desktop
基于 Tauri 2 + React 的桌面客户端。
开发
bun install
bun run tauri dev
构建
# macOS (Apple Silicon)
./scripts/build-macos-arm64.sh
# Windows (x64, MSI only)
.\scripts\build-windows-x64.ps1
构建产物位于 build-artifacts/ 目录,文件名会显式包含平台、架构和包类型。
常见问题
macOS 提示"已损坏,无法打开"
xattr -cr /Applications/Claude\ Code\ Haha.app