Skip to content

侧边栏设置无法持久化:settings 命名空间在 host 侧未注册,写入被拒(settings-not-exposed) #77

Description

@Fro2en12

环境

  • 插件版本:0.12.1(npm registry 安装,profile 依赖声明 "dsh-better-sidebar": "0.12.1"
  • dsh Web(deepseek-harness 本地源码启动 pnpm dsh web),Windows 11,profile = web
  • 页面 http://127.0.0.1:3080

现象

侧边栏偏好(默认宽度、Tab/查看器开关等 General 设置区的选项)修改后无法持久化:重启 dsh web 后回到旧值。$DSH_HOME/settings.yaml 中的 dsh-better-sidebar 段停留在历史写入的值,之后的新修改从未落盘。

实测证据(针对当前运行的 dsh web 进程)

  1. ~/.dsh/settings.yaml 中存在 dsh-better-sidebar 段(说明此前某个进程里 host 半边曾注册并写入成功);

  2. 当前进程:POST /api/settings.describe 返回的 namespaces 列表里没有 dsh-better-sidebar —— 即 host 半边当前没有注册该 settings 命名空间;

  3. POST /api/settings.mutate{ ns: 'dsh-better-sidebar', ops: [{ op: 'set', path: ['defaultWidthPercent'], value: 42 }] })返回错误:

    settings-not-exposed: settings namespace "dsh-better-sidebar" is not exposed to configuration clients
    

    也就是说,设置面板里的写入请求会被 host 直接拒绝;

  4. 已排除"装完没重启":插件安装于 01:03,dsh web 当前进程启动于 08:29。

定位线索

  • 同一 profile 中,通过 dsh plugin --profile web add <本地路径> 安装的 dsh-download-progress 的 host 半边是正常的(其 /api/download-progress/state 返回 200);而通过 npm/git 依赖声明方式进入 profile 的 dsh-better-sidebar(本插件)与 dsh-ui-status-label 的 host 半边均未挂载(后者我在其仓库也提了同款 issue)。
  • 猜测与 bundle patch 的 - insert: 在 host roster 的挂载方式/安装渠道有关,或 host 半边启动时加载失败且被静默吞掉。希望作者能确认 0.12.1 经 npm/dsh plugin add 安装时 host 半边的挂载路径,以及加载失败时是否有日志输出。

建议

  1. 当 settings 写入被拒绝(settings-not-exposed)时,设置 UI 应给出可见提示,而不是静默失败——现在用户无法知道自己的偏好根本没被保存;
  2. host 半边挂载/加载失败时在启动日志中显式报错,便于此类问题排查。

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions