Repository navigation
fix(sidebar): keep the bottom workbench toggle while the right panel is open - #1053
Merged
Menghuan1918 merged 3 commits intoOct 26, 2026
Merged
Conversation
…is open The header toggle bailed out whenever the host's right sidebar was expanded, so opening that panel first left the bottom workbench unreachable until it was collapsed again. The session header's utilities seat and the panel's own Split / Fullscreen / Collapse cluster sit in two different columns, so they never overlap. The blank-session fixed fallback keeps its guard: that entry anchors to the left of the panel controls and would cover panel content while expanded. tests/bottom-toggle.spec.tsx pins both behaviours.
The header toggle no longer hides while the host's right panel is expanded.
davidLi17
added a commit
to davidLi17/DSH-better-sidebar
that referenced
this pull request
Oct 25, 2026
Selectively backport open upstream PRs omdsh-dev#1040 (598714b), omdsh-dev#1055 (828452a), and omdsh-dev#1053 (f2ad4b1). Isolate Mermaid layout with authenticated sandbox messaging, recover from malformed diagrams, cancel/promote queued renders, preserve Windows Markdown separators and keep the bottom workbench toggle reachable. Preserve LHG draft/image sidechat behavior and selective omdsh-dev#1050 performance fixes. Ship prebuilt lib without lifecycle hooks. Validation: 230 files, 2790 tests passed, 17 skipped; typecheck, lint, build, consumer types, pack and fresh official DSH rc1 install/start passed. Real browser UI and native Windows unverified; see maintenance record.
This was referenced Nov 21, 2026
wally8-8
pushed a commit
to wally8-8/DSH-better-sidebar
that referenced
this pull request
Nov 21, 2026
blank 会话里宿主不渲染会话头 utilities,插件的底部工作台入口只剩右上角那个 备用入口;而它在宿主右侧面板展开时整个不渲染,于是「先开右栏」就再也打不开 底部工作台。omdsh-dev#1053 修的是正常会话的会话头入口,这一处当时被留了下来。 现在展开态照常渲染,并改锚**面板左缘**:展开态宿主的 Split / Fullscreen / Collapse 搬进了面板内部,锚在那簇控件左侧会落进面板、盖住面板内容;面板左缘 那一格是会话头那一行的右端空位,与收起态入口同一列。 真实宿主(DSH 0.2.2-rc.5 + Chromium,1440x900,空白新会话)实测: - 收起态:入口 1364,11(不变); - 展开态:修复前屏上 0 个入口,修复后 756,10(面板左缘 792),点击可打开底部面板。 tests/dock-fallback.spec.tsx 把「展开态不渲染」改成「展开态渲染且锚在面板左缘 756px 并仍可点击」(还原旧守卫即红);tests/e2e/blank-session-dock-entry.e2e.ts 新增真实宿主用例:展开右栏后入口仍在、屏上恰好一个、右缘不越过面板左缘。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
先展开宿主原生右侧栏,会话头右上角的底部工作台开关就整枚消失,只能先收起右栏才能打开工作台。
根因是
BottomDockToggle里的一条早退:它当初的理由是「右栏展开时右上角是一簇自己的控件(Split / Fullscreen / Collapse right sidebar),入口挤进去会跟它们打架」。但这两者并不在同一列:右栏控件簇在右栏列内,而本入口挂在会话头的
conversation.session.header.utilities(中间列),中间还隔着headerCorner。所以这条早退既没有避免冲突,又让入口在最需要的时候不可达。改动
src/client/Sidebar.tsx:删掉if (useRightPanelOpen()) return null与对应 import,注释改写为「为什么现在可以常显」。src/client/sidebar/dock-fallback.tsx:只改注释。空白会话的position: fixed兜底入口保留rightOpen判断——它锚在右栏控件左侧,右栏展开时锚点落在面板内部,放过去会盖住面板内容。两条入口的取舍不同,注释写明区别。tests/bottom-toggle.spec.tsx(新增,2 用例):[data-sidebar-right-toggle])在场时,[data-dsh-bottom-toggle]仍然渲染;bottomOpen。CHANGELOG.md:未发布段补一条用户可见说明。验证
pnpm typecheck:通过。pnpm vitest run tests/bottom-toggle.spec.tsx tests/dock-fallback.spec.tsx tests/theme.spec.ts:33 passed。pnpm test:2772 passed / 1 failed,唯一失败是tests/plugin-meta.spec.ts的 Windowstar输出 CRLF(package/icon.svg\r);该失败在dev基线上可复现,与本改动无关。pnpm build:通过;产物lib/client.js中data-dsh-bottom-toggle命中 5 次(与改动前一致)。link:方式挂载本分支,重启后无 pageerror / console error。未验证项:
pnpm test:mount真实挂载门禁需要在 DSH 0.2.1-rc.1 基线上跑(本机 PATH 上是 0.2.0-rc.2),留给 CI。范围
不改 host、不加依赖/路由、不改会话格式、不新增轮询。空白会话兜底入口的行为保持不变。