Repository navigation
Releases
v1.1.1 — 修复弹层越出屏幕 / Fix: panel could render off-screen
修复
弹层会跑到屏幕外。 触发点在会话头最右侧,旧代码给 right 只钳了下界、没钳上界,于是「窗口比屏幕还宽」(笔记本外接屏很常见)时,388px 宽的面板有一大截不可见,而且没有任何报错。
实测复现:虚拟屏幕 1707×1067,DSH 窗口 1721×1033 —— 面板约三分之一落在屏幕外。
现在 computeAnchor() 把面板四边都钳进视口:宽度取与 CSS 相同的上限 min(388, 100vw − 20),right 落在 [8, 视口宽 − 宽度 − 8],top 也不会被顶出底边。
其他
- 定位逻辑从组件里抽成纯函数
computeAnchor(),新增 9 条断言,其中包含本次的现场参数。 - 新增「JS 常量 ↔ CSS 必须一致」的联动断言:以后单独改 CSS 的
388/64vh/540px/100vw - 20px会让钳制静默失效,现在会直接测试失败。 - 门禁 223 项全绿。
升级
客户端半边改动,重载一次页面即可(Ctrl+R),不需要重启 DSH。
Fixed
The panel could render off-screen. Its trigger sits at the far right of the session header, and the old code clamped right only at the lower bound. Whenever the window is wider than the display — common with an external monitor on a laptop — a 388px-wide panel ended up partly off-screen, without any error.
Reproduced with: virtual screen 1707×1067, DSH window 1721×1033 — about a third of the panel was invisible.
computeAnchor() now clamps all four sides into the viewport: the width uses the same limit as the CSS, min(388, 100vw − 20); right stays within [8, viewport − width − 8]; and top can no longer be pushed past the bottom edge.
Also
- The positioning math moved out of the component into a pure
computeAnchor(), with 9 new assertions, including this exact field case. - New assertions that the JS constants match the CSS literals (
388/64vh/540px/100vw - 20px). Touching only the CSS used to break the clamping silently; now it fails the test suite. - 223 gate assertions, all green.
Upgrading
This is a client-half change — reload the page (Ctrl+R); no DSH restart needed.
v1.1.0 — 改名为 dsh-download-progress / Renamed to dsh-download-progress
改名 + 重新定位。
项目从 dsh-task-progress 改名为 dsh-download-progress —— 插件生态里已经有一堆同名项目,而且新名字更能说明它是干什么的。
同时把定位讲明白了:这个插件是专为 DSH 的下载任务做的。在 DSH 里,下载几乎总是以后台任务的形式发生的,进度只打在任务输出里;这个插件就是那份输出的一眼可见版。两个 README 的开头都新增了专门一节,并如实解释了「为什么它也会列出别的后台任务」——下载与普通后台任务在 DSH 里共用同一本名册(ctx.jobs),插件不能也不该去猜哪条才是下载。
⚠️ 破坏性变更
- 安装规格:
github:MorixMa/dsh-task-progress→github:MorixMa/dsh-download-progress - 包名、
dsh-plugin.json的id、profile 里的 bundle 名 - 状态路由
GET /task-progress→GET /download-progress - 打开路由
POST /task-progress/open→POST /download-progress/open - Loader 行 entry id
task-progress→download-progress - CSS 类与
@keyframes前缀dtp-→ddp-
已装旧版的请先卸载再装新版。
功能
零变化 —— 解析逻辑与界面行为与 1.0.0 完全一致。
Rename + repositioning.
The project is renamed from dsh-task-progress to dsh-download-progress — the plugin ecosystem already has plenty of same-named projects, and the new name actually says what it does.
Its purpose is now stated up front: this plugin is built for DSH's download tasks. In DSH, downloads almost always happen as background jobs whose progress only ever appears in the job's output; this plugin is the one-glance view of that output. Both READMEs gained a dedicated section, plus an honest explanation of why it also lists other background jobs — downloads and ordinary background jobs share one roster (ctx.jobs) in DSH, and the plugin cannot, and should not, guess which entry is a download.
⚠️ Breaking changes
- Install spec:
github:MorixMa/dsh-task-progress→github:MorixMa/dsh-download-progress - Package name, the
dsh-plugin.jsonid, and the profile bundle name - Status route
GET /task-progress→GET /download-progress - Open route
POST /task-progress/open→POST /download-progress/open - Loader entry id
task-progress→download-progress - CSS class and
@keyframesprefixdtp-→ddp-
Uninstall the old version before installing this one.
Functionality
Unchanged — parsing logic and UI behaviour are identical to 1.0.0.
v1.0.0 — 会话头任务进度指示器 / Session-header task progress indicator
首个公开发布版。
会话头右侧一个常驻的下载图标,自动发现正在跑的后台任务与下载任务,用环形进度、动画进度条、速率与剩余时间实时呈现。点开是任务清单,已完成文件单击即用系统默认应用打开,另有按钮在文件管理器中定位它。
不依赖任何第三方插件:客户端只用 DSH 核心的 ctx.slots,宿主只用 ctx.webServer。
- 进度读取走
ctx.jobs的非消耗接口list()/readAt(),不移动模型的job_output游标,也不触发任何完成通知 - 有副作用的只有
POST /task-progress/open:浏览器信任围栏 + 短时白名单(10 分钟 TTL / 128 条),只认插件自己刚报告过的产物路径 - 打开与定位交给宿主服务
ctx.sessionController的openPath/revealPath,插件不 spawn 进程 - host 产物零 import / 零 require,client 产物只
require("react"),构建零依赖 - 解析器认 curl
--progress-bar(\r刷新)、wget(45%[===> ] 7.98M 1.21MB/s eta 8s)、aria2 与通用 JSON
安装
dsh plugin --profile <profile 名> add github:MorixMa/dsh-task-progress
First public release.
A persistent download-style icon in the DSH session header that discovers running background jobs and downloads on its own, and renders them as a progress ring, animated bars, transfer speed and ETA. Clicking a finished file opens it with the OS default application; a folder button reveals it in the file manager.
No third-party plugin required — the client uses DSH core's ctx.slots, the host uses ctx.webServer.
- Progress is read through
ctx.jobs' non-consuminglist()/readAt(), so the model'sjob_outputcursor never moves and no completion notice fires - The only side-effecting route is
POST /task-progress/open: a browser trust fence plus a short-lived allowlist (10-minute TTL, 128 entries) of artifact paths this plugin itself just reported - Opening and revealing go through the host service
ctx.sessionController'sopenPath/revealPath; the plugin never spawns a process - Zero-import host artifact, client artifact requires only
react, zero build dependencies - The parser handles curl
--progress-bar(\r-refreshed), wget (45%[===> ] 7.98M 1.21MB/s eta 8s), aria2, and generic JSON
Install
dsh plugin --profile <profile-name> add github:MorixMa/dsh-task-progress