Skip to content

[bug] 0.10.1 宽态侧栏:记忆入口落在「更多」行下方,点开更多时被菜单遮挡(portal appendChild 到 panelList 末尾) #573

Closed

Description

@hpqc032

现象

宽态侧边栏里,「记忆」入口没有和面板行同组,而是落在「更多」这一行下面;点开「更多」时,弹出的菜单正好压在这一行上把它盖住。

实测当前 nav[class*="panelList"] 的直接子元素顺序(DSH 0.2.2-rc.1 / web,宽态):

插件 / 插件市场 / 自动化任务 / 上下文洞察 / 任务看板 / 技能中心 / 智能体 / SSH
→ 更多(span[class*="moreAnchor"] > button)
→ 记忆(div[data-plugin-entry="@modusensus/dsh-mneme"] > div.mneme-topentry > button)

菜单打开时:更多 行在 y≈418–454,菜单 portal 在 y≈426 起(高 76),「记忆」行在 y≈424–460 —— 两者重叠。

期望:「记忆」和面板行同组(在「更多」之前),或者直接走官方面板注册;至少不应该被自己的相邻行菜单盖住。

复现步骤

  1. web profile 安装 @modusensus/[email protected],默认配置(不依赖任何记忆开关)。
  2. dsh web(DSH 0.2.2-rc.1),展开侧边栏到宽态。
  3. 侧栏出现面板列表 + 「更多」行。本机「更多」由核心 @deepseek-ai/dsh-client-ui-entry-customization 注册 sidebar.panellist.actions(浏览更多插件 / 创建你的插件)触发,任何有面板的宿主都会出现。
  4. 看 nav.panelList 末尾两行:「更多」在前,「记忆」在后。
  5. 点「更多」→ 菜单展开后覆盖「记忆」行。

实际行为 vs 预期行为

  • 实际:「记忆」是 appendChild 到 nav.panelList 末尾的第三方行,排在「更多」之后。
  • 预期:与面板行同组(「更多」之前),或由宿主排序、参与面板固定逻辑。

根因(代码级,供核对)

dsh-mneme/lib/client.js(main 上 8903–8910 行,SidebarTopEntry 内的 place()):

// 展开态落进宿主的面板列表(紧跟「插件 / 自动化任务」);宿主没有面板
// 列表时退回「新会话」行之后,由 .mneme-topentry-native 兜住低调行样式。
const list = wide ? findPanelList(region) : null;
if (list) {
  if (created.parentElement === list && created === list.lastElementChild) return;
  list.appendChild(created);
  return;
}

注释写的是「落进面板列表、紧跟插件/自动化任务」,但 appendChild 永远追加到末尾。

宿主侧(@deepseek-ai/dsh-client-ui-sidebar 0.2.2-rc.1)SidebarRoot:先 panels.filter(...) 渲染面板行,然后渲染 PanelMoreMenu(仅在 sidebar.panellist.actions 有注册时出现)。也就是说 0.2.2 起 panelList 的最后一项不再是面板行,而是「更多」——v0.8.x 时 portal 到末尾刚好落在面板组尾部,现在被新出现的「更多」隔开了。

建议(不指定实现)

  • 最小改法:list 存在时,先找「更多」锚点(list.querySelector('[class*="moreAnchor"]'),与现有 [class*="panelRow"] / [class*="regionArea"] 同类做法,不硬编码哈希类名),有锚点就 insertBefore(created, anchor),没有才 appendChild;幂等判断同步改成 created.previousElementSibling === anchor || created === list.lastElementChild。
  • 或者换官方注册:同时注册 main + sidebar.panellist(id / order / label),见核心 @deepseek-ai/dsh-client-ui-schedule 的做法。这样能进入面板注册顺序、参与「更多」里的固定/取消固定,但需要接受「成为正式面板页」的语义。
  • 顺带一提:因为不是正式面板,「记忆」现在也不在「更多」菜单的可固定项里——如果这是有意的(保持低调的浮动入口),那只需修位置。

环境

  • dsh-mneme 版本:0.10.1(profile 内 npm ls 确认)
  • DSH 版本与 profile:0.2.2-rc.1,web
  • 操作系统:Arch Linux,Linux 7.2.14-arch1-1 x86_64
  • Node:v24.22.2
  • 安装方式:profile 内 npm/pnpm 安装(package.json 固定 @modusensus/dsh-mneme: 0.10.1;同一 profile 也装了 dsh-market)

日志

控制台无报错、无相关 warn;问题只在 DOM 结构上,证据是上面 nav.panelList 的子节点顺序与菜单/行的坐标重叠(用浏览器快照读到的 box 坐标,未贴截图,避免带出会话内容)。如需截图或更精确的宿主 DOM dump,我可以补。

已查现状


本报告由 AI 辅助整理,环境、步骤、DOM 顺序与坐标均已在本机逐条实测。

Activity

  1. added
    bug功能异常、崩溃、数据错误(agent 诊断 → 人工确认)
    on Nov 5, 2026
  2. moved this from 📋 Backlog to 🔨 In Progress in dsh-mneme 任务看板on Nov 5, 2026
  3. added a commit that references this issue on Nov 5, 2026
  4. moved this from 🔨 In Progress to ✅ Done in dsh-mneme 任务看板on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug功能异常、崩溃、数据错误(agent 诊断 → 人工确认)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions