dsh-railkeeper 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +105 -2
- package/README.zh-CN.md +115 -0
- package/cordis.patch.yml +6 -0
- package/docs/DETAIL.md +72 -0
- package/icon.svg +14 -0
- package/lib/client.js +3835 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +67 -4
- package/scripts/build-client.mjs +242 -0
- package/scripts/release.sh +134 -0
- package/src/client/api.js +91 -0
- package/src/client/i18n.js +268 -0
- package/src/client/icons.js +173 -0
- package/src/client/index.js +81 -0
- package/src/client/menu.js +69 -0
- package/src/client/model.js +338 -0
- package/src/client/rail.js +1401 -0
- package/src/client/settings.js +803 -0
- package/src/client/store.js +251 -0
- package/src/host/index.js +36 -0
- package/src/host/routes.js +260 -0
- package/src/host/store.js +264 -0
- package/src/shared/config.js +250 -0
- package/test/config.test.mjs +128 -0
- package/test/host.test.mjs +268 -0
- package/test/menu.test.mjs +59 -0
- package/test/model.test.mjs +185 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-railkeeper contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,106 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Railkeeper
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
English | [简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
Take over the left rail of [DeepSeek Harness](https://www.deepseek.com/en/harness/): **reorder, rename, re-icon, hide, and group** the panel buttons. Changes apply instantly and survive restarts.
|
|
6
|
+
|
|
7
|
+
Railkeeper is a drop-in replacement for the unmaintained `dsh-panellist`, written against the current DSH client API (`0.2.2`), with a **one-click import of an existing `dsh-panellist` configuration**.
|
|
8
|
+
|
|
9
|
+
## What it does
|
|
10
|
+
|
|
11
|
+
| Capability | Notes |
|
|
12
|
+
|---|---|
|
|
13
|
+
| Reorder | Drag the handle, or use the ↑ / ↓ buttons (keyboard reachable). |
|
|
14
|
+
| Rename | Type a new name; clearing it restores the plugin's own label. |
|
|
15
|
+
| Re-icon | 24 built-in line glyphs; "Original icon" restores the plugin's own. |
|
|
16
|
+
| Hide | A hidden panel keeps working and stays selectable — its rail row is just not drawn. |
|
|
17
|
+
| Group | Merge two or more panels into one rail row. Clicking that row opens a member menu beside it instead of navigating away. |
|
|
18
|
+
| Import / export | The whole configuration as JSON, for backup or moving between machines. |
|
|
19
|
+
| Migrate | Reads `$DSH_HOME/panellist.json` and converts it to this plugin's shape. |
|
|
20
|
+
| Storage | One JSON document at `$DSH_HOME/railkeeper.json`, split per profile, mode `0600`. |
|
|
21
|
+
|
|
22
|
+
Configuration is the only state Railkeeper owns. It never rewrites the profile's `cordis.patch.yml`, and a broken config file is copied aside (`.corrupt-<timestamp>`) instead of being discarded.
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
dsh plugin --profile desktop add dsh-railkeeper
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or install a local checkout from **Settings → Plugins → Add plugin**.
|
|
31
|
+
|
|
32
|
+
Then open **Settings → Panel list**.
|
|
33
|
+
|
|
34
|
+
## Important: do not run two rail managers at once
|
|
35
|
+
|
|
36
|
+
Railkeeper rewrites the `sidebar.panellist` registrations that the sidebar shell reads. Any other plugin doing the same will fight it, and the two will overwrite each other in a loop.
|
|
37
|
+
|
|
38
|
+
The transition that catches people: **if you just disabled `dsh-panellist` and did not reload the page, its client half is still loaded** and still rewriting the same entries. Railkeeper detects this, stops rewriting order and names, and shows a banner asking you to reload the page (or restart the app). Hide markers are still applied, so nothing is lost.
|
|
39
|
+
|
|
40
|
+
Reload the page once and Railkeeper owns the rail on its own.
|
|
41
|
+
|
|
42
|
+
## Compatibility
|
|
43
|
+
|
|
44
|
+
- DSH `>=0.2.0-rc.2 <0.3.0-0`, verified on `0.2.2-rc.3`.
|
|
45
|
+
- Node `^22.19.0 || >=24.0.0` (only for building and testing).
|
|
46
|
+
|
|
47
|
+
Railkeeper deliberately depends on **no** Harness client package besides React. Icons, controls, styles, and the settings page are its own, so a DSH release that renames or removes an internal export cannot blank it out.
|
|
48
|
+
|
|
49
|
+
The one internal seam it does use: rewriting a slot registration's `options` does not notify subscribers, so Railkeeper registers and immediately disposes a throwaway entry to nudge the sidebar into re-reading the ledger. If that ever stops working, the rail simply stops following the configuration — panels keep loading, nothing breaks. The plugin reports what it measured to `GET /railkeeper/api/client-status` so this is diagnosable rather than mysterious.
|
|
50
|
+
|
|
51
|
+
## HTTP surface
|
|
52
|
+
|
|
53
|
+
All endpoints live under `/railkeeper/api`, are reachable only from loopback, and are also fenced by `Host`; write requests additionally require same-origin (or no `Origin` at all, which is the Desktop IPC bridge).
|
|
54
|
+
|
|
55
|
+
| Method | Path | Purpose |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| `GET` | `/health` | Storage and profile status. |
|
|
58
|
+
| `GET` | `/config` | The current profile's configuration. |
|
|
59
|
+
| `PUT` | `/config` | Save `{ config }`. Rejects invalid input with `400` and a reason. |
|
|
60
|
+
| `POST` | `/config/reset` | Restore an empty configuration. |
|
|
61
|
+
| `GET` | `/legacy` | Convert an existing `dsh-panellist` configuration. |
|
|
62
|
+
| `GET`/`POST` | `/client-status` | Recent diagnostics reported by the browser half (in memory, last 50). |
|
|
63
|
+
|
|
64
|
+
## Configuration shape
|
|
65
|
+
|
|
66
|
+
```jsonc
|
|
67
|
+
{
|
|
68
|
+
"schemaVersion": 1,
|
|
69
|
+
"profiles": {
|
|
70
|
+
"desktop": {
|
|
71
|
+
"sequence": [
|
|
72
|
+
{ "type": "panel", "id": "plugins" },
|
|
73
|
+
{ "type": "group", "id": "g_1", "label": "Stats", "icon": "chart",
|
|
74
|
+
"members": ["dsh-context", "personal-kit-usage"] }
|
|
75
|
+
],
|
|
76
|
+
"panels": {
|
|
77
|
+
"schedules": { "hidden": true },
|
|
78
|
+
"personal-kit-models": { "label": "Models", "icon": "bolt" }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
`sequence` describes order and grouping only. `panels` holds per-panel overrides. Rows for panels that are not currently registered are **kept**, so uninstalling a plugin and reinstalling it puts its row back where it was; the settings page lists them under "Configured but not installed".
|
|
86
|
+
|
|
87
|
+
## Development
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
node scripts/build-client.mjs # build lib/client.js from src/client/
|
|
91
|
+
node --test "test/*.test.mjs" # 51 tests: config, plan, host store, routes, migration
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`src/client/*` is plain ES modules. The build inlines them into the single browser bundle DSH expects (`window.__ModuleLoader__.load({ id, factory })`), because runtime `require()` only resolves platform seeds.
|
|
95
|
+
|
|
96
|
+
After changing `src/client/*`, rebuilding is picked up by the client HMR without restarting the app; changing `src/host/*` needs an app restart. Bump `CLIENT_VERSION` in `src/client/index.js` when you change client code — it is reported to `/client-status` so you can confirm which generation is live.
|
|
97
|
+
|
|
98
|
+
## Verification status
|
|
99
|
+
|
|
100
|
+
`test/` covers the configuration model, the render plan, the flyout placement math, the host store, the loopback routes, and the `dsh-panellist` migration.
|
|
101
|
+
|
|
102
|
+
The DOM paths are **not** unit-tested: rewriting rail rows, hiding, and the group flyout all need a real browser. They are verified in a running app by reading the real DOM after each rebuild — row count, visible row count, per-row labels, hidden-marker count, and group-row marker count are reported to `/client-status` and compared against the plan. Every stylesheet selector railkeeper injects is scoped to the rail `nav` (`[data-rk-rail]`) or to its own `.rk-*` classes, so it cannot restyle another page.
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
MIT
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Railkeeper(左栏管家)
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 简体中文
|
|
4
|
+
|
|
5
|
+
接管 [DeepSeek Harness](https://www.deepseek.com/zh/harness/) 的左侧栏:**排序、改名、换图标、隐藏、分组**。改动即时生效,重启后保留。
|
|
6
|
+
|
|
7
|
+
它是已停止维护的 `dsh-panellist` 的替代品,按当前 DSH 客户端接口(`0.2.2`)重写,并且**一键导入已有的 `dsh-panellist` 配置**。
|
|
8
|
+
|
|
9
|
+
## 能做什么
|
|
10
|
+
|
|
11
|
+
| 能力 | 说明 |
|
|
12
|
+
|---|---|
|
|
13
|
+
| 排序 | 拖动手柄,或用 ↑ / ↓ 按钮(键盘可达)。 |
|
|
14
|
+
| 改名 | 直接输入新名字;清空即恢复插件自己的名称。 |
|
|
15
|
+
| 换图标 | 24 个内置线条图标;选「原始图标」恢复插件自带图标。 |
|
|
16
|
+
| 隐藏 | 隐藏的面板照常工作、照常可选,只是左侧栏不再画它那一行。 |
|
|
17
|
+
| 分组 | 把两个以上面板合成一行;点这一行会在旁边弹出成员菜单,而不是把你带走。 |
|
|
18
|
+
| 导入 / 导出 | 整份配置导出为 JSON,可备份、可换机器。 |
|
|
19
|
+
| 迁移 | 读取 `$DSH_HOME/panellist.json` 并转换成本插件结构。 |
|
|
20
|
+
| 存储 | 单文件 `$DSH_HOME/railkeeper.json`,按 profile 分节,权限 `0600`。 |
|
|
21
|
+
|
|
22
|
+
配置是本插件唯一自己持有的状态。它**不会**去改 profile 的 `cordis.patch.yml`;配置文件损坏时会先复制成 `.corrupt-<时间戳>` 留档,而不是直接丢掉。
|
|
23
|
+
|
|
24
|
+
## 安装
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
dsh plugin --profile desktop add dsh-railkeeper
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
本地目录安装:**设置 → 插件 → 添加插件**。
|
|
31
|
+
|
|
32
|
+
装完打开 **设置 → 面板列表**。
|
|
33
|
+
|
|
34
|
+
## 重要:不要同时运行两个左栏管理插件
|
|
35
|
+
|
|
36
|
+
Railkeeper 改写的是侧栏读取的 `sidebar.panellist` 注册表。任何做同样事情的插件都会和它打架——两边会互相覆盖,形成来回对写。
|
|
37
|
+
|
|
38
|
+
最容易踩到的场景:**刚停用 `dsh-panellist` 但没有重新加载页面**,它的浏览器半区还在内存里跑,还在改同一批条目。Railkeeper 会检测到这一点,暂停改写顺序与名称,并给出提示让你重新加载页面(或重启应用)。「隐藏」标记仍然生效,不会丢东西。
|
|
39
|
+
|
|
40
|
+
重新加载一次页面,railkeeper 就会独占左栏。
|
|
41
|
+
|
|
42
|
+
## 兼容性
|
|
43
|
+
|
|
44
|
+
- DSH `>=0.2.0-rc.2 <0.3.0-0`,实测 `0.2.2-rc.3`。
|
|
45
|
+
- Node `^22.19.0 || >=24.0.0`(仅构建与测试需要)。
|
|
46
|
+
|
|
47
|
+
Railkeeper 刻意**不依赖**任何 Harness 客户端包(React 除外):图标、控件、样式、设置页全部自带。这样 DSH 某次发布改掉内部导出名,也不会把本插件打成空白。
|
|
48
|
+
|
|
49
|
+
它确实用到一个内核接缝:改写注册表条目上的 `options` 不会通知订阅者,所以本插件会注册一个临时条目并立刻释放,推动侧栏重新读一遍注册表。这个技巧哪天失效,结果也只是「左栏不再跟随配置」,面板照常加载,不会崩。插件会把每轮实测结果上报到 `GET /railkeeper/api/client-status`,让这件事可查而不是玄学。
|
|
50
|
+
|
|
51
|
+
## HTTP 接口
|
|
52
|
+
|
|
53
|
+
全部挂在 `/railkeeper/api` 下,只允许回环访问,并额外校验 `Host`;写请求还要求同源(完全没有 `Origin` 的情况放行,那是桌面版的 IPC 桥)。
|
|
54
|
+
|
|
55
|
+
| 方法 | 路径 | 用途 |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| `GET` | `/health` | 存储与 profile 状态。 |
|
|
58
|
+
| `GET` | `/config` | 当前 profile 的配置。 |
|
|
59
|
+
| `PUT` | `/config` | 保存 `{ config }`;非法输入回 `400` 并说明原因。 |
|
|
60
|
+
| `POST` | `/config/reset` | 恢复空配置。 |
|
|
61
|
+
| `GET` | `/legacy` | 转换已有的 `dsh-panellist` 配置。 |
|
|
62
|
+
| `GET`/`POST` | `/client-status` | 浏览器半区最近的上报(内存里保留最近 50 条)。 |
|
|
63
|
+
|
|
64
|
+
## 配置结构
|
|
65
|
+
|
|
66
|
+
```jsonc
|
|
67
|
+
{
|
|
68
|
+
"schemaVersion": 1,
|
|
69
|
+
"profiles": {
|
|
70
|
+
"desktop": {
|
|
71
|
+
"sequence": [
|
|
72
|
+
{ "type": "panel", "id": "plugins" },
|
|
73
|
+
{ "type": "group", "id": "g_1", "label": "统计", "icon": "chart",
|
|
74
|
+
"members": ["dsh-context", "personal-kit-usage"] }
|
|
75
|
+
],
|
|
76
|
+
"panels": {
|
|
77
|
+
"schedules": { "hidden": true },
|
|
78
|
+
"personal-kit-models": { "label": "模型开关", "icon": "bolt" }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
`sequence` 只描述顺序与分组关系;`panels` 存单个面板的覆盖项。当前没注册的面板行会**保留**,所以插件卸了再装回来,那一行会回到原来的位置;设置页把它们列在「已配置但当前未安装」下面。
|
|
86
|
+
|
|
87
|
+
## 开发
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
node scripts/build-client.mjs # 由 src/client/ 构建 lib/client.js
|
|
91
|
+
node --test "test/*.test.mjs" # 51 项:配置、计划、宿主存储、路由、迁移
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`src/client/*` 是普通 ES 模块。构建会把它们内联成 DSH 要求的单一浏览器产物(`window.__ModuleLoader__.load({ id, factory })`),因为运行时 `require()` 只能解析平台 seed。
|
|
95
|
+
|
|
96
|
+
改完 `src/client/*` 后重新构建,客户端 HMR 会热生效,不用重启应用;改 `src/host/*` 需要重启。改动客户端代码时顺手递增 `src/client/index.js` 里的 `CLIENT_VERSION`——它会上报到 `/client-status`,用来确认现在跑的是哪一代。
|
|
97
|
+
|
|
98
|
+
## 自检
|
|
99
|
+
|
|
100
|
+
页面加载后不久,本插件会跑一次**隐形**自检(它打开的菜单不绘制、不抢焦点),专门覆盖两条会“静默失效”的路径:
|
|
101
|
+
|
|
102
|
+
- `selectProbe` —— 直接调 `layout.selectPanel(成员)` 并把 `activePanelId` 读回来,然后还原原来的选中项。
|
|
103
|
+
- `clickProbe` —— 渲染分组弹出菜单,在第一个菜单项上派发一次真实的 `MouseEvent`,记录处理函数有没有执行、选中项最后落在哪。
|
|
104
|
+
|
|
105
|
+
两个结果、注册表现状、以及真实 DOM 的测量值都在 `GET /railkeeper/api/client-status` 里。外壳的槽位或布局行为一旦变化,这里会直接暴露,而不是表现为“点了没反应”。
|
|
106
|
+
|
|
107
|
+
## 验证到什么程度
|
|
108
|
+
|
|
109
|
+
`test/` 覆盖配置模型、渲染计划、弹出菜单的摆放计算、宿主存储、回环路由,以及 `dsh-panellist` 迁移。
|
|
110
|
+
|
|
111
|
+
DOM 相关的路径**没有**单元测试:改写轨道行、隐藏、分组弹出菜单都需要真实浏览器。它们是在真实应用里、每轮重建后读真实 DOM 验证的——行数、实际画出的行数、每行标签、隐藏标记数、分组行标记数都会上报到 `/client-status`,并与计划逐项对照。本插件注入的每一条样式选择器都被限定在轨道 `nav`(`[data-rk-rail]`)或它自己的 `.rk-*` 类名下,因此不可能改到别的页面。
|
|
112
|
+
|
|
113
|
+
## 许可
|
|
114
|
+
|
|
115
|
+
MIT
|
package/cordis.patch.yml
ADDED
package/docs/DETAIL.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Railkeeper
|
|
2
|
+
|
|
3
|
+
Take over the left rail of DeepSeek Harness: reorder, rename, re-icon, hide, and group the panel buttons. Changes apply instantly and survive restarts.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
Open **Settings → Panel list**. Every registered rail panel appears as a row.
|
|
8
|
+
|
|
9
|
+
- **Reorder** — drag the `⠿` handle, or use the ↑ / ↓ buttons.
|
|
10
|
+
- **Rename** — type into the row's name field. Clearing it restores the plugin's own label.
|
|
11
|
+
- **Re-icon** — click the leading icon button and pick one of the 24 built-in glyphs, or "Original icon".
|
|
12
|
+
- **Hide** — the `●` / `◌` toggle. A hidden panel keeps working and stays selectable; only its rail row is not drawn.
|
|
13
|
+
- **Group** — tick two or more panels and press "Group selected". The group takes one rail row; clicking that row opens a member menu beside it (Escape, an outside click, or scrolling closes it). Ungroup with `⇲`.
|
|
14
|
+
- **Import / export** — the whole configuration as JSON.
|
|
15
|
+
- **Migrate** — "Import from dsh-panellist" reads `$DSH_HOME/panellist.json` and converts it.
|
|
16
|
+
|
|
17
|
+
Changes save automatically, shortly after you stop editing. The status line under the title says whether the current state is saved.
|
|
18
|
+
|
|
19
|
+
## Limitations
|
|
20
|
+
|
|
21
|
+
- **One rail manager at a time.** Railkeeper rewrites the `sidebar.panellist` registrations the sidebar shell reads. Another plugin doing the same will overwrite it and vice versa. If a just-disabled plugin's code is still in the page (no reload since), Railkeeper stops rewriting order and names and shows a banner; reload the page to recover. Hide markers keep working during that time.
|
|
22
|
+
- **A hidden panel is still mounted.** Hiding is a CSS-level hide of the rail row, not an unload. The panel's own code keeps running.
|
|
23
|
+
- **A group row opens a menu.** The click is taken over in the capture phase so the shell does not navigate away. A `main` page is still registered for the group, because the shell's More menu routes through the same `selectPanel` call; reaching a group from there shows a plain member list styled like an official entry page.
|
|
24
|
+
- **Icons come from a fixed set of 24.** There is no SVG upload; an imported icon name with no equivalent is dropped with a warning rather than stored.
|
|
25
|
+
- **Configuration follows the profile, not the window.** Two windows on the same profile share one configuration.
|
|
26
|
+
- **The conflict detector needs three consecutive observations** before it pauses rewriting, so a single stray write does not trip it.
|
|
27
|
+
|
|
28
|
+
## Configuration
|
|
29
|
+
|
|
30
|
+
One JSON document at `$DSH_HOME/railkeeper.json`, split per profile:
|
|
31
|
+
|
|
32
|
+
```jsonc
|
|
33
|
+
{
|
|
34
|
+
"schemaVersion": 1,
|
|
35
|
+
"profiles": {
|
|
36
|
+
"desktop": {
|
|
37
|
+
"sequence": [
|
|
38
|
+
{ "type": "panel", "id": "plugins" },
|
|
39
|
+
{ "type": "group", "id": "g_1", "label": "Stats", "icon": "chart",
|
|
40
|
+
"members": ["dsh-context", "personal-kit-usage"] }
|
|
41
|
+
],
|
|
42
|
+
"panels": {
|
|
43
|
+
"schedules": { "hidden": true },
|
|
44
|
+
"personal-kit-models": { "label": "Models", "icon": "bolt" }
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- `sequence` — order and grouping only. `{type:'panel'}` is one standalone row; `{type:'group'}` is one row holding `members`.
|
|
52
|
+
- `panels` — per-panel overrides: `label`, `icon`, `hidden`.
|
|
53
|
+
- Rows for panels that are not currently registered are kept, so reinstalling a plugin restores its position. They are listed under "Configured but not installed".
|
|
54
|
+
- An invalid document is never written. On read, a corrupt file is copied to `railkeeper.json.corrupt-<timestamp>` and an empty configuration is served; the file is never deleted.
|
|
55
|
+
|
|
56
|
+
## Self-test
|
|
57
|
+
|
|
58
|
+
Shortly after load, railkeeper runs an invisible self-test (the menu it opens is not painted and does not take focus) over the two paths that fail silently: selecting a panel through `layout.selectPanel`, and clicking a flyout item through a real `MouseEvent`. Results are `selectProbe` and `clickProbe` in `GET /railkeeper/api/client-status`.
|
|
59
|
+
|
|
60
|
+
## Troubleshooting
|
|
61
|
+
|
|
62
|
+
**The rail does not follow the configuration.** Read `GET /railkeeper/api/client-status` on the running server's port. Each `rebuild` record carries the plan (`planRows`), what was written (`appliedOrders`), what the registry holds now (`ledgerOrders`), and the measured DOM (`rows`, `visibleRows`, `rowLabels`, `hiddenMarkers`). `appliedOrders` differing from `ledgerOrders` means another writer is active.
|
|
63
|
+
|
|
64
|
+
**A banner says another rail manager is active.** Reload the page (Cmd+R) or restart the app. Most often this is a disabled `dsh-panellist` whose client half is still loaded in the current page.
|
|
65
|
+
|
|
66
|
+
**A group row or a flyout item does nothing.** `clickProbe.after` should name the clicked member, and `flyoutFallbacks` should be `0`; both are in `/railkeeper/api/client-status`.
|
|
67
|
+
|
|
68
|
+
**The settings page is empty.** The host half did not answer. Check that the plugin is enabled in **Settings → Plugins**, then press Retry.
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
MIT
|
package/icon.svg
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" role="img" aria-label="Railkeeper">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="rk-bg" x1="8" y1="6" x2="56" y2="58" gradientUnits="userSpaceOnUse">
|
|
4
|
+
<stop offset="0" stop-color="#24405f"/>
|
|
5
|
+
<stop offset="1" stop-color="#101b2b"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect x="2" y="2" width="60" height="60" rx="15" fill="url(#rk-bg)"/>
|
|
9
|
+
<rect x="13" y="13" width="38" height="38" rx="9" fill="none" stroke="#8fb7ff" stroke-opacity=".55" stroke-width="2"/>
|
|
10
|
+
<rect x="20" y="20" width="6" height="24" rx="3" fill="#e8f1ff"/>
|
|
11
|
+
<rect x="29" y="20" width="6" height="15" rx="3" fill="#9cc0ff"/>
|
|
12
|
+
<rect x="38" y="20" width="6" height="9" rx="3" fill="#5f8fe6"/>
|
|
13
|
+
<circle cx="41" cy="38" r="4.2" fill="#ffd166" stroke="#101b2b" stroke-width="1.6"/>
|
|
14
|
+
</svg>
|