Fix desktop chat UX and add PR regression gates / 修复桌面聊天体验并增加 PR 回归门禁#2334
Fix desktop chat UX and add PR regression gates / 修复桌面聊天体验并增加 PR 回归门禁#2334SivanCola wants to merge 3 commits into
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Resolved the merge conflicts with upstream/main in commit 68fa9de. Root cause: upstream/main changed the same desktop surfaces as this PR, especially App.tsx, composer, Markdown/file pills, context panel, styles, and JumpBar behavior. Technical approach: merged upstream MCP/context-panel and composer token-highlight changes, kept this PR's virtualized JumpBar navigation and desktop scroll/approval-tray UX fixes, then formatted the affected desktop files under the current Biome gate. Verification:
中文说明:已在 68fa9de 解决与 upstream/main 的合并冲突。 问题原因:upstream/main 和本 PR 同时修改了桌面端 App、composer、Markdown 文件标签、context panel、styles 以及 JumpBar 相关区域。 技术方案:保留 upstream 的 MCP/context-panel 与 composer token 高亮等新增能力,同时保留本 PR 的虚拟列表 JumpBar 跳转、滚动跟随和审批托盘等桌面 UX 修复,并按当前 Biome 门禁格式化受影响文件。 验证:上述 desktop focused checks 和 pre-push 的完整 npm run verify 均已通过。 |
Summary
This PR focuses on desktop chat UX, interaction reliability, PR regression prevention, and desktop bundle splitting.
It fixes several desktop-side UI and interaction issues:
Root Cause
The main issues came from a combination of layout and process gaps:
src tests;desktop/srcand the desktop Vite config were not part of the required PR gate, so desktop-only regressions could pass review and CI.Technical Approach
button/dialogstructures and added focus-safe keyboard behavior where needed.dangerouslySetInnerHTMLfrom reasoning card inline formatting and rendered inline highlights with React nodes instead.react-virtuososcrollToIndex, derive active state from visible ranges, and reduce the control's default visual weight until hover/focus.lint:desktop,build:desktop, andverify:desktop, expandednpm run lint/npm run verify, and updated CI to install and build desktop dependencies.manualChunksforvendor-react,vendor-markdown,vendor-code,vendor-ui, andvendor-tauri.Focused Optimization Points
Verification
npm run lint:desktopnpm run build:desktopnpm run lintnpm run verifyvia the pre-push hooknpx vitest run tests/desktop-sidebar-new-chat-layout.test.tsnpm run test -- desktop/src/ui/jump-bar.test.tsx中文说明
本 PR 集中处理桌面端聊天体验、交互可靠性、PR 回归防护和桌面端打包分包问题。
主要修复的问题包括:
问题原因
这些问题主要由几类原因叠加造成:
src tests,没有把desktop/src和桌面端 Vite 配置纳入 PR 必过门禁,导致桌面端专属问题可以绕过检查。技术方案
button/dialog结构,并补齐必要的键盘与焦点行为。dangerouslySetInnerHTML,改用 React node 渲染内联高亮。react-virtuososcrollToIndex跳转,通过可见范围同步当前状态,并弱化默认视觉权重,仅在 hover/focus 时强调显示。lint:desktop、build:desktop、verify:desktop,扩展npm run lint和npm run verify,并让 CI 安装和构建桌面端依赖。manualChunks拆出vendor-react、vendor-markdown、vendor-code、vendor-ui、vendor-tauri。本次集中优化点
验证
npm run lint:desktopnpm run build:desktopnpm run lintnpm run verifynpx vitest run tests/desktop-sidebar-new-chat-layout.test.ts