feat(guid): refresh sidebar actions and skills market entry#1945
feat(guid): refresh sidebar actions and skills market entry#1945
Conversation
Unifies sidebar quick actions and updates the Guid skills market experience to be more discoverable and consistent with the new interaction flow. Made-with: Cursor
CI 检查未通过以下 job 在本次自动化 review 时未通过,请修复:
本次自动化 review 暂缓,待 CI 全部通过后将重新处理。 |
Updates stale assertions for ACP conversation creation and search selection flow, and includes required formatting-only changes so CI quality checks pass. Made-with: Cursor
Hides the batch-manage icon in collapsed sidebar so the new chat plus button remains centered and visible. Made-with: Cursor
Sider passes this key for the full-width search trigger; missing entries showed the key string in the UI. Made-with: Cursor
Adds a GPU-friendly hover/press animation for the new chat plus icon and respects reduced-motion preferences without changing sidebar layout behavior. Made-with: Cursor
Adds a desktop-only drag handle to snap the sidebar between collapsed and expanded states with a small hysteresis zone to avoid flicker. Made-with: Cursor
Code Review:feat(guid): refresh sidebar actions and skills market entry (#1945)变更概述本 PR 刷新了侧栏顶部操作区域(新会话、搜索、批量管理)在折叠/展开状态下的布局和交互,新增桌面端侧栏拖拽调整宽度功能,将助手详情编辑能力内嵌到 Guid 页面的 方案评估结论: 整体方案方向正确——侧栏拖拽、折叠/展开自适应、双击防抖等都是合理的 UX 改进。将 remote agent 路径合并到 ACP 统一路径也是好的简化。但 问题清单🟠 HIGH — AssistantSelectionArea 中 modal/drawer 树完整重复文件: 问题代码: // 第一处(isPresetAgent 分支,约第 298 行起)
<AssistantEditDrawer editVisible={editor.editVisible} ... />
<DeleteAssistantModal ... />
<AddSkillsModal ... />
<SkillConfirmModals ... />
<AddCustomPathModal ... />
// 第二处(列表视图分支,约第 449 行起)— 完全相同的 props
<AssistantEditDrawer editVisible={editor.editVisible} ... />
<DeleteAssistantModal ... />
<AddSkillsModal ... />
<SkillConfirmModals ... />
<AddCustomPathModal ... />问题说明:两个 return 分支中完整复制了 ~180 行一模一样的 JSX(5 个 modal/drawer 及其所有 props)。这违反了 DRY 原则,任何 props 变更都需要在两处同步修改,极易引发不一致。 修复建议: 将 modal 树提取到组件底部的一个公共片段中,两个分支共享同一份渲染: const modalTree = (
<>
{agentMessageContext}
<AssistantEditDrawer ... />
<DeleteAssistantModal ... />
<AddSkillsModal ... />
<SkillConfirmModals ... />
<AddCustomPathModal ... />
</>
);
// 在两个 return 中:
return (
<div className='mt-12px w-full'>
{/* 各自的内容 */}
{modalTree}
</div>
);🟠 HIGH — SkillsMarketBanner enabled 状态硬编码 light-mode 颜色文件: 问题代码: style={
enabled
? {
backgroundColor: 'rgba(255, 255, 255, 0.45)',
borderColor: 'rgba(0, 0, 0, 0.08)',
}
: undefined
}问题说明: 修复建议: style={
enabled
? {
backgroundColor: 'color-mix(in srgb, var(--color-bg-2) 45%, transparent)',
borderColor: 'var(--color-border-1)',
}
: undefined
}🟡 MEDIUM — Layout.tsx 拖拽未清理 body style 的边界情况文件: 问题代码: document.body.style.cursor = 'col-resize';
document.body.style.userSelect = 'none';问题说明:如果用户在拖拽过程中鼠标移出窗口(Electron BrowserWindow 之外)并释放鼠标, 修复建议: 在 effect 中增加 const handleBlur = () => endDrag();
window.addEventListener('blur', handleBlur);
return () => {
window.removeEventListener('mousemove', handleMouseMove);
window.removeEventListener('mouseup', endDrag);
window.removeEventListener('blur', handleBlur);
endDrag();
};🟡 MEDIUM — openAssistantDetails useCallback 依赖了未稳定化的 editor 对象文件: 问题代码: }, [agentMessage, assistants, customAgents, editor, selectedAgentInfo?.customAgentId, selectedAgentKey, t]);问题说明: 修复建议: }, [agentMessage, assistants, customAgents, editor.handleEdit, selectedAgentInfo?.customAgentId, selectedAgentKey, t]);汇总
结论本报告由本地 CONCLUSION: CONDITIONAL |
- Extract duplicated modal/drawer tree (~180 lines) into shared variable - Replace hardcoded light-mode colors with semantic tokens for dark mode compat - Add window blur listener to clean up drag cursor/userSelect state - Narrow useCallback dependency from entire editor object to editor.handleEdit Review follow-up for #1945
PR Fix 验证报告原始 PR: #1945
总结: ✅ 已修复 4 个 | ❌ 未能修复 0 个 |
Summary
Changes
Sideraction layout and interaction styling.ConversationSearchPopovertrigger behavior and styles for full-width sidebar usage.Related Issue
Closes #1944
Test Plan
Made with Cursor