修复: 前端UX一致性(Dashboard状态映射/状态徽章全局/Knowledge下一条与失败反馈/Ideas筛选与错误条/ConfirmDialog安全/快捷菜单状态机/分页越界) + 后端校验(queue/count-list一致/软删拒改/父聚合/promote CAS/MCP状态机收口/update白名单剔除id/created_at) + 销账

This commit is contained in:
lxy
2026-08-09 21:35:58 +08:00
parent 8bc5380ecb
commit fbd8fae44b
30 changed files with 829 additions and 138 deletions
+5 -3
View File
@@ -106,10 +106,12 @@ const resizing = ref(false)
// maximized=全宽(flex:1填充) | sidebar=固定宽
const panelStyle = computed(() => {
if (aiStore.state.maximized) return { flex: '1', minWidth: '0' }
// LW-11:内联 width 用 min(panelWidth, 100vw) —— 小屏 media query 的 width:100vw 会被内联样式
// 更高优先级覆盖致失效;min() 让窄视口下宽度钳制到 100vw,media query 的 absolute 定位/层级仍生效
return {
width: panelWidth.value + 'px',
minWidth: panelWidth.value + 'px',
maxWidth: panelWidth.value + 'px',
width: `min(${panelWidth.value}px, 100vw)`,
minWidth: `min(${panelWidth.value}px, 100vw)`,
maxWidth: `min(${panelWidth.value}px, 100vw)`,
}
})
+5 -5
View File
@@ -92,15 +92,16 @@ const appSettings = useAppSettingsStore()
// 展开 192px(文字+图标) / 收缩 56px(仅图标,hover tooltip 显示文字)
// 优先级:用户手动设置 > 小窗口自动收缩(≤768px)
const COLLAPSE_THRESHOLD = 768
const userCollapsed = ref(false) // 用户手动设置的收缩状态
// LW-10:useSetting 响应式读(loadAll 异步填充缓存后 watch 自动同步刷新)——
// 原 onMounted 用 appSettings.get 同步读早于父级 loadAll 完成,重启后偏好丢失
const userCollapsed = appSettings.useSetting('df-sidebar-collapsed', false)
const isNarrowWindow = ref(false) // 小窗口自动收缩标记
const collapsed = computed(() => userCollapsed.value || isNarrowWindow.value)
// 持久化用户手动收缩状态
// 持久化用户手动收缩状态(useSetting 写 ref 自动 debounce 落库,无需显式 appSettings.set)
function toggleCollapsed() {
userCollapsed.value = !userCollapsed.value
void appSettings.set('df-sidebar-collapsed', userCollapsed.value)
}
// 监听窗口宽度:小窗口自动收缩(但不改变用户偏好)
@@ -118,8 +119,7 @@ function handleCollapseKeydown(e: KeyboardEvent) {
}
onMounted(async () => {
// 恢复用户偏好(默认展开)
userCollapsed.value = appSettings.get('df-sidebar-collapsed', false)
// LW-10:收缩偏好由 useSetting 响应式恢复(loadAll 填充缓存后 watch 自动同步),移除 onMounted 同步读
// 检查当前窗口宽度
checkWindowWidth()
window.addEventListener('resize', checkWindowWidth)