Skip to content

Free window header occluded by client top bar -> tab stuck at top / 浮窗页眉被顶栏遮挡,tab 卡在顶部拖不回来 #599

Description

@ldmuggle

提交前确认 / Pre-submit checklist

  • 我已搜索现有 issue,确认没有完全相同的条目(只有完全一致才算重复)| I searched existing issues and confirmed there is no exact duplicate (only exactly identical issues count as duplicates)
  • 我已确认使用最新版本 dsh-better-sidebar / I confirmed I am on the latest dsh-better-sidebar version

运行环境 / Environment

Desktop 实现(如 deepseek-harness-desktop)/ Desktop build (e.g. deepseek-harness-desktop)

DSH Web 版本 + 浏览器 / DSH Web version + Browser

dsh-plugin-desktop v2.0.5

Desktop 实现仓库 / Desktop repo(源头 / upstream)

No response

插件版本 / Plugin version

v0.18.1(DSH Desktop 插件市场安装)

类别 / Category

🐛 Bug(功能异常 / Something is broken)

描述 / Description

现象 / What happened
浮窗(free window)模式下,把 tab 拖到客户端最顶部时,页眉(唯一拖拽把手)被顶栏遮挡,浮窗卡在顶部拖不回来。所有浮窗 tab 都受影响(不只某个插件)。
In free-window mode, dragging a tab to the very top hides the header (the only drag handle) under the client's top bar; the tab gets stuck and cannot be dragged out. Affects ALL floating tabs.

期望行为 / Expected behavior
浮窗页眉不被顶栏遮挡、随时能拖出;或浮窗 top 被钳制在不低于顶栏的位置。
The header should never be occluded by the top bar, so the window can always be dragged; or the float's top should be clamped below the top bar.

复现步骤 / Steps to reproduce (required)

  1. 开任意 tab → 拖出成浮窗。 Open any tab → drag out to a floating window.
  2. 把浮窗拖到客户端最顶部。 Drag the float window to the very top of the client.
  3. 页眉被顶栏遮住,浮窗卡住、无法拖出。 The header is hidden under the top bar; the window is stuck.
  4. (绕法)切到"无顶部"布局 → 拖出 → 切回。 Workaround: switch to the no-top layout, drag it out, switch back.

截图或日志 / Screenshots or logs
(可附一张"浮窗卡在顶部、页眉被遮挡"的截图)(attach a screenshot of the stuck window)


客户端 / Client:DSH Desktop v2.0.5 (dsh-plugin-desktop);默认布局有顶栏,另有"无顶部"布局模式(顶栏高度随布局模式变)。
根因 / Root causesrc/client/FreeWindow.tsxclampMove 允许浮窗 top = 0(视口最顶),压在顶栏下;34px floatHeader 被遮挡。
建议修复 / Suggested fixclampMovetop 下限改为 max(titlebarInset, panelHost.top),自适应有顶/无顶布局:

const host = rootRef.current?.closest('[data-dsh-panel-host]')
const env = parseDesktopEnv()
const minTop = Math.max(env.titlebarInset, host ? host.getBoundingClientRect().top : 0)
// y 下限:Math.min(Math.max(y, minTop), Math.max(minTop, vh - float.h))

### 补充信息 / Additional context

_No response_

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions