fix(ui): DS Bot 页里工作台入口不渲染——改挂 shell.overlay (v0.5.3-local.13) #14

Merged
wangheng merged 1 commits from fix/v0.5.3-local.13-overlay-fallback into main 2026-12-03 17:07:22 +08:00
Owner

实测 DevTools:DS Bot 页下 dsh-wt_edgeStrip 数量为 0,组件未挂载。原因:ds-bot 0.4.5 用 shadow(sidebar.footer.action) 接管侧栏 footer 座位,我们的注册在该页不渲染。

修法:同一组件再注册一份到 shell.overlay,用 slotRole 分流:sidebar 实例只在非 DS Bot 视图渲染,overlay 实例只在检测到 DS Bot 左栏时渲染,两者互斥。

已知取舍:overlay 实例拿不到 sidebar.worktable.project 的宿主项目条目,DS Bot 页里这部分不显示。

npm run pack 全绿。

实测 DevTools:DS Bot 页下 dsh-wt_edgeStrip 数量为 0,组件未挂载。原因:ds-bot 0.4.5 用 shadow(sidebar.footer.action) 接管侧栏 footer 座位,我们的注册在该页不渲染。 修法:同一组件再注册一份到 shell.overlay,用 slotRole 分流:sidebar 实例只在非 DS Bot 视图渲染,overlay 实例只在检测到 DS Bot 左栏时渲染,两者互斥。 已知取舍:overlay 实例拿不到 sidebar.worktable.project 的宿主项目条目,DS Bot 页里这部分不显示。 npm run pack 全绿。
wangheng added 1 commit 2026-12-03 17:07:21 +08:00
实测 DevTools:DS Bot 页下 `document.querySelectorAll('.dsh-wt_edgeStrip').length === 0`,
组件根本没有挂载。原因:ds-bot 0.4.5 用 shadow("sidebar.footer.action", ...)
接管了侧栏 footer 座位(bot-account / bot-return),我们的注册在该页不渲染。

修法:同一组件再注册一份到 shell.overlay(ds-bot 不接管该层),用 slotRole 分流:
- sidebar 实例:非 DS Bot 视图渲染(经典布局,保持原行为)
- overlay 实例:检测到 DS Bot 左栏时渲染(800ms 轮询 [class*="bt-leftcol"] 等)

两实例互斥,不会重复或同时消失。

已知取舍:overlay 实例拿不到 sidebar.worktable.project 的宿主项目列表
(跨座位 children 不可见),DS Bot 页里这部分入驻条目不显示;
工作台自身项目、二级页面、设置等不受影响。

验证:npm run pack 全绿,双资产同源 8f093ee7…。
wangheng merged commit f5bbc7cd57 into main 2026-12-03 17:07:22 +08:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: xiaoqu/dsh-worktable#14