feat: 统一聊天面板(官方 shadcn)+ 1.3.14 审计修复批 + CVE 补丁#767
Merged
Conversation
added 7 commits
July 5, 2026 00:28
@tauri-apps/plugin-shell (npm) 与 tauri-plugin-shell (crate) 的声明下限 ——npm `^2.0.1`、crate `"2"`——都落在 GHSA-c9pr-q8gx-3mgp 影响范围 (`< 2.2.1`,CRITICAL:`open` 端点作用域校验绕过,可致 RCE)。本项目 src/lib/ipc/utils.ts 正是通过该 `open` 端点打开外链,属受影响用法。 两个 lockfile 实际已解析到 2.3.5,但清单声明的下限仍是漏洞版本,供应链 扫描(SkillSpector SC4)因此读取到 2.0.1 报警。此处仅把两侧声明下限抬到 最新安全版 2.3.5,使清单与锁定版本一致、扫描不再命中;解析版本不变,无 运行时行为变化。 Closes #668
- CRIT Apple Speech 取消/超时不终止 SFSpeechRecognitionTask(SendableTask+cancel_flag+[task cancel]+100ms 轮询) - HIGH windows_ime 未安装分支反致设置保存事务锁死(抽纯函数 keyboard_list_pref_short_circuit) - HIGH 侧向键 Released 卡死自愈 + macOS flags 类位竞态 + Linux 显式拒绝 - HIGH coordinator/hotkey_loops unused_assignments clippy 回归 - MED 火山 429 限流不重试(RateLimited)/ Heatmap clamp / 授权失败反馈 / SendInput 分类单一真相 / SendInputOptions 收敛 - 清理 删死码 ?? '重启' / side_aware 死字段 / 孤儿 MarketplaceModal cargo test 552-0 / npm build 绿。windows cfg 部分需 CI 四平台验证。
@shadcn/react 官方 primitive + base-rhea registry 原文内嵌 components/chat/ui/ (message-scroller/marker/bubble/message/card/empty/input-group/button/input/ textarea/spinner,仅按 CLI 规则改 import 路径;button 保留 3 行 React18 inert 归一)。Tailwind v4 作用域隔离:utilities source(none) + @source 只扫聊天文件、 无层导入压过 global.css;官方主题 shadcn/tailwind.css + tw-animate-css。 胶囊同款思考动画(orbFeed 单 GL 源镜像多头像)、GitHub 头像(CSP img-src 放行)、 出现/消失生命周期 hook。平台门控:非 darwin 构建 DCE 掉 Less Computer chunk。 删除旧自制 Marker/MessageScroller 组件。
Card + Empty + InputGroup + MessageScroller 官方组合;QA=Message 带头像形态 (右 GitHub / 左旋转 orb),LC=Marker 工具行形态(无头像)。 语音状态只在输入区:录音红光/转译黑光绕输入组跑圈,问题落定即停; 思考头像行门控在用户消息落定之后(修「AI 头像先出现、动画抽搐」)。 LC 事件空轮自愈 + mount 后 less_computer_sync 重放(webview 冷加载丢 user 事件导致「后端在跑前端空白/用户的话不显示」)。纯白背景、官方 24px 圆角、出现/消失动画(chat-panel:shown/closing)。
- 恢复桌面 invoke_handler 的 qa_submit_text / qa_toggle_recording(此前删 qa_window_pin 时误删相邻项,真机报 Command qa_submit_text not found) - QA/LC 窗口转非激活 NSPanel(胶囊同管线:NonactivatingPanelMask + CanJoinAllSpaces|FullScreenAuxiliary),chat_panel_focus_keyboard 改主线程 makeKeyAndOrderFront:打字不激活 app、主窗口不再被带出、frontmost 保持 用户原 app(划词选区在多轮期间仍可读) - Less Computer 事件按全局单调 seq 写入环形缓冲(fresh user 清空、cap 2048 丢最旧),新命令 less_computer_sync 供前端 mount 重放(仅 less-computer 窗口可调);附 2 个单测 - show/hide 生命周期:show 发 chat-panel:shown 并作废挂起 hide;hide 先发 chat-panel:closing、240ms 后真正隐藏(AtomicU64 世代防快速关-开竞态) - QA/LC 窗口统一固定 420×540;删除 qa_window_pin / less_computer_window_resize 整链(无消费方)
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Collaborator
Author
自审记录(两路独立审查,双 Approve)Rust 侧(scope: src-tauri 全部 diff;cargo check/test 554-0 复跑):
TypeScript 侧(scope: src 全部 diff;tsc 零错误):
结论:无 CRITICAL/HIGH,不需要改动。等 CI 四平台绿后合并。 |
H-Chris233
approved these changes
Jul 6, 2026
H-Chris233
left a comment
Collaborator
There was a problem hiding this comment.
经过一轮验证,未发现明显问题。建议进行实机测试后合并。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
概要
三块内容打包:1.3.14 审计修复批、tauri-plugin-shell CVE 补丁、划词追问 / Less Computer 浮窗全量重做(官方 shadcn base 组件)。
统一聊天面板(用户逐条验收的六项修正)
组件库(
src/components/chat/):@shadcn/react官方 primitive + base-rhea registry 原文内嵌(message-scroller/marker/bubble/message/card/empty/input-group/button/input/textarea/spinner),仅按 CLI 规则改 import;button 保留 3 行 React18 inert 归一source(none)+@source只扫聊天文件、无层导入,主窗口样式零污染(实测)shadcn/tailwind.css+tw-animate-css(shimmer/scroll-fade/scrollbar 全官方定义)六项体验修正:
makeKeyAndOrderFront—— 打字不激活 app;frontmost 保持用户原 app,顺带根治划词选区多轮丢失lastRole==='user'chat-panel:shown、hide 先发chat-panel:closing240ms 后真隐藏(AtomicU64 世代防快速关-开竞态)两个真机 bug 根修:
Command qa_submit_text not found:桌面 invoke_handler 此前误删qa_submit_text/qa_toggle_recording(与 qa_window_pin 相邻),已恢复less_computer_sync供 mount 重放,前端按 seq 去重衔接(+2 单测)审计修复批(558fb51)
Apple Speech 取消泄漏 / IME 未安装分支设置保存锁死 / 侧向键 Released 卡死 + macOS 竞态 + Linux 拒绝 / 火山 429 / clippy 回归 / 前端 clamp + 失败反馈
依赖
验证
PR Type
Bug fix, Enhancement, Tests
Description
Fix critical bugs: Apple Speech cancel, IME lock, hotkey stuck, volcano 429
Unify chat panel with official shadcn/ui components and nonactivating NSPanel
Add event buffer for Less Computer cold-start, improve SendInput consistency
Add comprehensive tests for all fixes and self-healing logic
Diagram Walkthrough
File Walkthrough
29 files
Convert chat panels to nonactivating NSPanel and add animated hideAdd event buffer for Less Computer cold-start windowAdd chat panel focus keyboard command and less computer syncAdd chat avatar components: ThinkingOrb, OrbAvatar, UserAvatarAdd shadcn InputGroup component for chatAdd shadcn Bubble component for chatCreate shared orb rendering feed for chat avatarsAdd event sequence number to LessComputerEvent typeAdd shadcn MessageScroller componentAdd shadcn Button componentAdd shadcn Card componentAdd shadcn Empty componentAdd shadcn Message componentAdd chat index exportAdd shadcn Marker componentAdd chat lifecycle managementAdd markdown component for chatAdd shadcn Input componentAdd shadcn Textarea componentAdd IPC chat-panel moduleAdd shadcn Spinner componentAdd chat utility functionsAdd chat CSS stylesUpdate LessComputerPanel for unified shadcn UIUpdate QaPanel for unified shadcn UIUpdate App for new chat panel windowsUpdate less-computer IPC for sync and focusUpdate IPC index with new commandsUpdate QA IPC for new commands8 files
Fix Apple Speech cancellation with SendableTask and pollingAdd self-healing for side-aware combo stuck and race-free flagsUnify SendInput character classification to prevent fallbackmisdetectionClassify 429 as RateLimited and skip retryFix IME save lock by short-circuiting uninstall keyboard list prefFix hotkey loops clippy warningsFix Heatmap clampUpdate PermissionsSection for IME changes3 files
Refactor coordinator to use shared dictation helpersRefactor SiriGL to use hostRef and export shaders for orbFeedRefactor QA coordinator for unified chat panel1 files
Update insertion tests to use expected_sendinput_typed_chars5 files
Update Chinese Traditional i18nUpdate Japanese i18nUpdate Korean i18nUpdate Chinese Simplified i18nUpdate English i18n2 files
Update Vite config for Tailwind v4 scopeUpdate Tauri config for chat panels1 files
Update package.json dependencies3 files