dsh-jira-work-overview 0.0.0-stage → 0.14.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/CHANGELOG.md ADDED
@@ -0,0 +1,255 @@
1
+ # Changelog
2
+
3
+ All notable changes to **dsh-jira-work-overview** are documented here.
4
+
5
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The first 25 releases were built in a single day, so the dates are real but the cadence was not: each entry lists what changed, not how long it took.
6
+
7
+ ## [0.14.0] - 2026-11-19
8
+
9
+ 高亮不再写死「`Highest` 就是最高级」,改为挂到 Jira 自己给的优先级名次上。
10
+
11
+ 本版同时**首次发布到 npm**(公开包):`plugin_manager install_bundle(target="dsh-jira-work-overview")`(也可以 `npm i dsh-jira-work-overview`)。三种安装方式(npm / GitHub 直装 / 本地路径)见 README。
12
+
13
+ ### Added
14
+
15
+ - **面板高亮按 Jira 的优先级名次,而不是按名字。** 名次取自 `GET /rest/api/3/priority` 返回数组的**下标**(0 = 站点里的最高级):名次 0 红底 / 名次 1 琥珀底 / 其余不上色(徽标照旧)。于是站点调换优先级顺序、或者用 `P0` / `Blocker` 这类自定义名字也照样正确。拿不到名次(旧载荷 / 站点没暴露这个接口)时退回原来的名字匹配(`Highest` / `High`),行为不变。
16
+ - `--json` 的每个 item 新增 `priorityId`(Jira 的优先级 id,字符串)与 `priorityRank`(上面的名次,拿不到时 `null`);单条 issue 的 `--json` 同样带上。文本输出不受影响。
17
+ - `test/dsh-jira-visual.mjs` 新增 H 段:自定义名字(`Blocker` / `P0` / …)仍按名次上色、徽标配色只看名次、剥掉 `priorityRank` 时名字兜底仍生效。
18
+ - `test/dsh-jira-i18n.mjs` 的 fetch 桩加了优先级清单,断言名次来自站点顺序、`priorityId` 原样带出。
19
+
20
+ ### Changed
21
+
22
+ - 优先级清单**不带任何参数**地取一次就够:结果缓存 6 小时;失败(例如令牌没有权限)短退避 5 分钟,其间不再重试。**这个能力是可选的** —— 清单拿不到只是不上色,列表查询本身照常成功。
23
+ - 没用 `priorityscheme` 系列接口:`GET /rest/api/3/priorityscheme/{id}` 实测返回 `405 Method 'GET' is not supported`,列表接口对普通用户回空表(要 Administer Jira 权限),所以「按 scheme 排序」这条路对普通令牌不可得;`GET /rest/api/3/priority` 只需要 "Permission to access Jira",且实测其顺序与 JQL `ORDER BY priority ASC/DESC` 的结果一致。
24
+
25
+ ## [0.13.4] - 2026-11-19
26
+
27
+ 去标识化版本:仓库转为公开之前,把属于作者本人 Jira 的值从代码、文档与 git 历史里全部拿掉。
28
+
29
+ ### Changed
30
+
31
+ - **示例项目键统一成虚构的 `APP`**:README / 代码注释 / 工具说明 / 测试 fixture 里原先写着作者自己的项目键和几条真实 issue key,现在一律是虚构的 `APP-####`(截图生成器里原有的 `APP` / `OPS` 工单保持原样)。
32
+ - **`projectKey` 的默认值改成 `''`**(原先硬编码成作者的项目键)。它只用于展示;`boardId` 本来就没有默认值。两者都填在你自己的 profile patch 里(README 的配置示例是虚构的 `APP` / `42`)。
33
+ - **测试脚本不再硬编码本机 checkout 路径**:6 个真实站点套件原先写着作者机器上的绝对路径,现在从脚本自身位置推导(`dirname(dirname(fileURLToPath(import.meta.url)))`),换机器 / 换目录都能跑。
34
+ - **真实站点套件的项目键与看板 id 改由环境提供**:优先 `DSH_JIRA_PROJECT` / `DSH_JIRA_BOARD`,其次读 env 文件里的 `JIRA_PROJECT` / `JIRA_BOARD`,都没有时才用虚构的 `APP` / `42`;离线套件用固定假值。
35
+
36
+ ### Security
37
+
38
+ - 文档里的令牌掩码示例(首尾各 4 位那串)换成纯假值 `ATAT…0000`;fixture token 的尾部也不再复用真实 token 的最后 4 位。
39
+ - git 历史整体重写(所有提交与 4 个 tag 一起重指),把同样的值从历史提交的内容里拿掉;`v0.13.3` 及更早的 Release 仍按 tag 名解析到脱敏后的提交。
40
+
41
+ ## [0.13.3] - 2026-11-19
42
+
43
+ ### Fixed
44
+
45
+ - **「折叠全部」后组头的标题与日期错位。** `@tanstack/react-virtual` 的默认 `getItemKey` 是 `index => index`(库里的 `defaultKeyExtractor`),实测行高按**下标**缓存。折叠 / 展开会让同一串下标换成完全不同的条目:折叠前下标 1 是任务行(约 32px),折叠后下标 1 变成第二个组头(约 64px),复用旧高度就把两个组头压在一起 —— 上一个组头底部的「迭代区间」(日期)和下一个组头的标题叠住了。现在 `getItemKey` 按条目身份取(`g:<组 id>` / `i:<issue key>`),折叠前后同一个组头命中它自己那份实测高度(元素缓存 `elementsCache` 同理)。
46
+ - 虚拟列表的 `estimateSize` 改成按条目类型估(组头 64px / 任务行 32px):此前一律按 32px 估,滚动中每量到一个组头整列就往下窜一截,`scrollHeight` 与滚动条滑块跟着跳。
47
+ - **滚动列表时 macOS 整屏闪一下。** 面板与令牌弹窗的整屏遮罩(`.jmw-mask`、`.jmw-credmask`)用了 `backdrop-filter:blur(2px)`:整窗大小的 backdrop-filter 在 macOS + Electron 上会在滚动重绘时让整屏闪一下。遮罩现在只压暗(`--dsw-alias-bg-mask-1`)不再模糊 —— 2px 高斯加在 24% 黑上本来就几乎看不出来,去掉没有观感损失却拿掉了整窗合成层。
48
+
49
+ ### Added
50
+
51
+ - `test/dsh-jira-visual.mjs` 新增 G 段(`PASS`/`FAIL` + 退出码):钉死「条目 key 跟着身份走」「折叠前后同一个 key 能复用高度」「estimateSize 按类型分开」「两处遮罩里没有 backdrop-filter 声明」。
52
+ - README 的产品截图(`docs/images/{panel,panel-watch,sidebar-entry}{,.zh}.png`,浅色主题、中英各一套),插在 README.md / README.zh.md 的开头、安装(左侧栏入口)和面板小节里。图是**离线生成**的:真 `client.js` 组件 + 真插件 CSS + 一套**虚构**的 APP/OPS 工单,序列化成静态 HTML 后用无头 Chrome 截图 —— 所以图里不会出现真实站点、账号或 issue 摘要。
53
+ - `test/dsh-jira-shot.mjs`:上面那套图的生成器(离线,不联网;`--lang en,zh` / `--theme light|dark` / `--only …` / `--out <目录>`,找不到 Chrome 时打印 `SKIP:` 并以 0 退出)。
54
+ - `package.json` 的 `files` 加上 `docs`,让 npm 包里的 README 也能显示这些图片。
55
+
56
+ ## [0.13.2] - 2026-11-19
57
+
58
+ ### Fixed
59
+
60
+ - **The client half never loaded after the 0.13.0 rename.** `client.js` still registered its bundle as `@local/dsh-jira-work-overview` while the package — and therefore the host's client-module row — is `dsh-jira-work-overview`. The host composes the boot graph by package name and only reports `client-modules: bundle <url> loaded without registering "<package>" via __ModuleLoader__.load`, so the whole browser half stayed dark: the left-sidebar entry, the overlay panel and all three config pages disappeared while `plugin_manager` kept showing `fiberPhase: "active"`. The registered id now equals `package.json.name`.
61
+ - `README.zh.md` still called the package `@local/dsh-jira-work-overview` in its title and in the two `plugins.bundle.config` / `plugins.row.config` key examples.
62
+
63
+ ### Added
64
+
65
+ - `test/dsh-jira-bundle-id.mjs`: offline regression suite that pins `window.__ModuleLoader__.load({ id })` and `cordis.patch.yml`'s `insert[].name` to `package.json.name`, and rejects any `@local/` leftover in `client.js` / `cordis.patch.yml` / `package.json`.
66
+
67
+ ## [0.13.1] - 2026-11-19
68
+
69
+ ### Removed
70
+
71
+ - The three stale test suites (`test/dsh-jira-client.mjs`, `test/dsh-jira-client2.mjs`, `test/dsh-jira-watch.mjs`): they predated the 0.7 panel redesign, had failed ever since, and are covered by `test/dsh-jira-visual.mjs` + `test/dsh-jira-credential.mjs`.
72
+
73
+ ## [0.13.0] - 2026-11-19
74
+
75
+ ### Added
76
+ - `LICENSE` (MIT), `CHANGELOG.md`, `.gitignore`, and an English-first `README.md` (the previous Chinese README is kept as `README.zh.md`).
77
+ - `err.noBaseUrl`: a clear message when the Jira site URL has not been configured yet.
78
+ - `CHANGELOG.md` is included in the published `files`.
79
+
80
+ ### Changed
81
+ - Package renamed `@local/dsh-jira-work-overview` → **`dsh-jira-work-overview`** so it can be installed from npm/git by anyone; `private: true` removed, `license` / `author` / `keywords` added.
82
+ - `cordis.patch.yml` now ships **neutral defaults only** — no Jira site, email, project key or board id (they belong to each user's profile and are set in the panel).
83
+ - `DEFAULTS.baseUrl` and `DEFAULTS.projectKey` are empty instead of the author's values; `jira.site()` was added so the site URL is always read from live settings.
84
+
85
+ ## [0.12.0] - 2026-11-19
86
+
87
+ ### Added
88
+ - Virtualized issue list using `@tanstack/react-virtual` (it is part of DSH's base module table, so no bundling is needed): only the visible rows live in the DOM, the container is sized with `getTotalSize()`, and row heights are re-measured by `measureElement`. Falls back to full rendering with a single `console.warn` when the module is unavailable.
89
+ - `maxResults: 0` = **unlimited** (now the default): the host pages until there is no next page.
90
+ - A safety net for unbounded fetches: 5000 items / 50 pages / one `timeoutMs` budget, with `AbortSignal.any()` merging the caller signal and the timeout. Partial results are returned **honestly** with `hasMore: true`.
91
+ - Footer states "loaded N (all)" / "safety cap 5000 reached, more available" / "cap M".
92
+
93
+ ### Removed
94
+ - The progressive rendering of 0.11.0 (`renderCount`, `RENDER_FIRST`, `RENDER_STEP`, the "rendering N / M rows" line).
95
+
96
+ ## [0.11.0] - 2026-11-18
97
+
98
+ ### Added
99
+ - Header shows the **accurate total** for the current project + status filter, taken from Jira's `approximate-count` endpoint (verified against full pagination: 9 = 9, 332 = 332).
100
+ - Single-select **status filter** in the toolbar (default: all statuses), applied server-side through `--status=<name>` so list and counts can never disagree.
101
+ - `--status` on the slash command and tool parameter, with `AND status = "X"` inserted **before** `ORDER BY` (concatenating after it makes Jira return HTTP 400).
102
+
103
+ ### Changed
104
+ - The panel always queries "all my issues"; the unused scope segment control was removed. The slash command still defaults to `open`, and background watch is unchanged.
105
+ - Item cap raised to 500 / 1000 with progressive rendering (later replaced by 0.12.0's virtualization).
106
+
107
+ ## [0.10.0] - 2026-11-18
108
+
109
+ ### Added
110
+ - **Editor picker** for "open `cordis.patch.yml`": the host detects editors that actually exist on the machine (`EDITOR_CANDIDATES`, `where` on Windows, PATH lookup on Linux) and renders only those, remembers the last one (`preferredEditor`), and also accepts a free-form application name or path (passed as a single argv, no shell).
111
+ - Accurate totals: `total` and `projectTotals` in the JSON payload (project tabs no longer show a number; the total moved next to the scope control).
112
+
113
+ ### Fixed
114
+ - JQL conditions are now inserted before `ORDER BY` (`withJqlClause`), which previously produced invalid JQL and silently empty `projectTotals`.
115
+
116
+ ## [0.9.0] - 2026-11-18
117
+
118
+ ### Added
119
+ - **Internationalization**: the host keeps a `TEXT = { zh, en }` dictionary (146 keys) and resolves the language from `DSH_JIRA_LANG` → per-call override (`--lang=` / `?lang=`) → `language` config → the host `locale.preference` → the language the panel reported → system env → ICU → `en`.
120
+ - Configure dialog: **UI language chips** (auto / 中文 / English) and the **"open `cordis.patch.yml`"** section (default app, system app chooser, file-manager reveal), exposed through `POST /api/jira-work-overview/settings {open: …}` and `patch` info on `GET`.
121
+ - Client half follows `locale/change` and reports its language on every request, so tool output matches the panel.
122
+
123
+ ### Changed
124
+ - Plugin display name → **Jira work overview**; panel fixed to the DSH language setting; Jira data is never translated.
125
+
126
+ ## [0.8.10] - 2026-11-18
127
+
128
+ ### Added
129
+ - **Windows/Linux support**: notifications dispatch per platform (osascript / PowerShell Toast with `-EncodedCommand` / `notify-send`), all failures silent; toast text truncated to 200 characters.
130
+ - Font fallbacks for Windows (`Segoe UI`, `Microsoft YaHei`, `Consolas`, `Cascadia Mono`).
131
+ - Test scripts no longer hardcode `/tmp` (`DSH_JIRA_TMP`, `os.tmpdir()`), and README gained a platform-support section.
132
+
133
+ ### Changed
134
+ - The project strip's scrollbar is visible (5 px) because Windows has no overlay scrollbars.
135
+
136
+ ## [0.8.9] - 2026-11-18
137
+
138
+ ### Added
139
+ - Configurable fetch size (`maxResults`, runtime-editable) and a **"load more"** button (appears only when the host truncated the result).
140
+ - `--limit=<n>` on the slash command; `MAX_PAGES` raised and the "there is more" line added to text output.
141
+
142
+ ### Fixed
143
+ - Documented and answered that the query is **one global JQL** — the limit is a cross-project, cross-sprint total, not a per-sprint count.
144
+
145
+ ## [0.8.8] - 2026-11-18
146
+
147
+ ### Fixed
148
+ - Tool header and Basic-auth header now read the email through `liveSetting()` instead of the startup snapshot, so editing the email takes effect immediately.
149
+
150
+ ## [0.8.7] - 2026-11-18
151
+
152
+ ### Added
153
+ - The login **email is editable** in the configure dialog (token and email are a pair); "Save & verify" checks the combination against `/rest/api/3/myself` and refuses to store a rejected pair.
154
+ - `resolveToken()` reports where the credential came from; `writeSettings()` can persist the email.
155
+
156
+ ## [0.8.6] - 2026-11-18
157
+
158
+ ### Added
159
+ - **Project tabs** with scroll buttons, so several Jira projects can be viewed in one panel; grouping is recomputed per project.
160
+ - The configure dialog no longer shows the (read-only) project name and board id.
161
+
162
+ ### Fixed
163
+ - Test predicate `className.startsWith('jmw-row')` also matched `jmw-rowmeta`.
164
+
165
+ ## [0.8.5] - 2026-11-18
166
+
167
+ ### Changed
168
+ - Everything except the token applies **as you change it**: watch switch, interval (700 ms debounce, immediate on blur/Enter), notifications and language write straight to the profile patch. Only the token keeps an explicit "save" button.
169
+
170
+ ## [0.8.4] - 2026-11-18
171
+
172
+ ### Fixed
173
+ - The configure dialog is a real centred modal again (a previous CSS rewrite had deleted `.jmw-credmask` / `.jmw-credmodal` / `.jmw-btn.ghost`).
174
+ - Button colours are hardcoded (`#4d6bfe` / `#d64545`) because `--dsw-alias-brand-primary` resolves to near-white in the dark theme — white text on a white button.
175
+ - Closing the panel closes every overlay: the configure dialog's open state moved into the shared snapshot (`closeAll()`), so reopening the panel shows only the list.
176
+
177
+ ## [0.8.3] - 2026-11-18
178
+
179
+ ### Added
180
+ - Grouped configure page ("title + content" per feature), a configurable watch interval, inline button colours, and a **settings write route** (`/api/jira-work-overview/settings`) that persists `watchEnabled` / `watchIntervalMs` / `notify` through the host `settings` service into the profile's `cordis.patch.yml`.
181
+ - The watch loop became self-scheduling (`setTimeout` re-read on every tick) and listens for `loader/volatile-update`, so changes apply without a restart.
182
+
183
+ ## [0.8.2] - 2026-11-18
184
+
185
+ ### Changed
186
+ - Token settings moved into their own modal, opened from a **Configure** button at the right of the panel title (Esc closes the modal first, then the panel).
187
+
188
+ ## [0.8.1] - 2026-11-18
189
+
190
+ ### Added
191
+ - Two more ways to reach the settings: a bundle-level config section on the plugin detail page (`plugins.bundle.config`) and a panel entry, because the row-level `plugins.row.config` entry is only "the row title is clickable" — no visible "Configure" label.
192
+
193
+ ## [0.8.0] - 2026-11-18
194
+
195
+ ### Added
196
+ - **API token editing** in the plugin's own config page: masked current value (`ATAT…0000`), password input, verification against `/rest/api/3/myself`, 401/403 refusal (nothing is stored), two-step clear, and a read-only list of the effective settings. Token stays in the DSH credential store.
197
+
198
+ ### Changed
199
+ - Plugin renamed from "Jira my sprint" to **Jira work overview** (package, routes, slot ids, CSS markers, i18n descriptions).
200
+
201
+ ## [0.7.3] - 2026-11-18
202
+
203
+ ### Added
204
+ - Switching scope/status **aborts the previous request** (AbortSignal plus a sequence number that discards stale responses) and dims the old list while the new one loads.
205
+
206
+ ## [0.7.2] - 2026-11-18
207
+
208
+ ### Changed
209
+ - Removed the "current sprint" entry: the open view is already grouped per sprint.
210
+
211
+ ## [0.7.1] - 2026-11-18
212
+
213
+ ### Removed
214
+ - The "active sprint" line in tool output (the board's sprint states do not match reality).
215
+
216
+ ## [0.7.0] - 2026-11-18
217
+
218
+ ### Added
219
+ - High/Highest issues are highlighted with a row background, stronger colour for Highest.
220
+
221
+ ### Removed
222
+ - The "in progress" chip and per-sprint "ended N days ago" text — the board's sprint state is not a reliable work-progress signal.
223
+
224
+ ## [0.6.0] - 2026-11-18
225
+
226
+ ### Added
227
+ - **Status changes from the panel**: per-row status dropdown listing the issue's real workflow transitions (fetched live), applied through `POST /rest/api/3/issue/{key}/transitions` and re-read afterwards (the API returns 204).
228
+ - The `jira_transition` tool (preview by default) and a `transition` fetch route.
229
+
230
+ ## [0.5.0] - 2026-11-18
231
+
232
+ ### Added
233
+ - **Live watch**: the host polls "assigned to me and not done", diffs it (new / status change / left the list), sends desktop notifications and exposes a long-polling fetch route (`/api/jira-work-overview/state`) that feeds a sidebar unread badge and a "what changed" banner with mark-as-read.
234
+ - Panel auto-refreshes when a change arrives.
235
+
236
+ ## [0.4.0] - 2026-11-18
237
+
238
+ ### Added
239
+ - Issues grouped by **sprint** (newest sprint first), collapsible groups (fully-done groups start collapsed), a unified card style, and the sprint field resolved by `schema.custom` (`com.pyxis.greenhopper.jira:gh-sprint`) instead of the localised name.
240
+
241
+ ## [0.3.0] - 2026-11-18
242
+
243
+ ### Added
244
+ - **Client panel**: a "Jira work overview" entry at the bottom of the left sidebar opens a modal with the work-item list; data comes from the host through `ctx.remote.commands.execute('/jira --json')`.
245
+ - Returns explicitly refused to use a build-time Host remote BFF, so the command is the shared implementation for humans and the agent.
246
+
247
+ ## [0.2.0] - 2026-11-18
248
+
249
+ ### Added
250
+ - `/jira` slash command rendering in the command surface (no model message, no tokens), argument parsing for scope / issue key / raw JQL, and a clearer network error carrying the error cause.
251
+
252
+ ## [0.1.0] - 2026-11-18
253
+
254
+ ### Added
255
+ - First working bundle: `jira_my_work` and `jira_issue` tools backed by `/rest/api/3/search/jql`, grouped Markdown output with a status distribution, the `Config` card, and the token read from the DSH credential store (`ctx.get('credentials')` → env → config), with a migration note when a plaintext token is present.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Zhaohong Fei
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,195 @@
1
- # Temporary Holding Version
1
+ # dsh-jira-work-overview
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Show **your** Jira work items — with their real workflow status — inside [DeepSeek Harness](https://github.com/deepseek-ai) (DSH): as agent tools, as a `/jira` slash command, and as a panel in the left sidebar with a live unread badge.
4
+
5
+ > 中文说明见 [README.zh.md](README.zh.md) · Changelog: [CHANGELOG.md](CHANGELOG.md) · License: [MIT](LICENSE)
6
+
7
+ <p align="center">
8
+ <img src="docs/images/panel.png" width="1040" alt="The Jira panel inside DSH: rows grouped by sprint, with status chips, High/Highest highlights, project tabs and a single-select status filter">
9
+ </p>
10
+
11
+ ---
12
+
13
+ ## What you get
14
+
15
+ - **Rows are highlighted by Jira's own priority order** — the top two levels get a row background and a left bar (reddest = highest), read from `GET /rest/api/3/priority` rather than a hard-coded "Highest", so a site that reorders priorities or uses custom names (`P0`, `Blocker`) still gets it right. Everything below stays uncoloured. If the site does not expose that list, the panel falls back to matching the names `Highest` / `High`.
16
+ - **Left-sidebar panel** — one row per issue, grouped by sprint (collapsible, newest sprint first), with project tabs, a single-select **status filter**, an **accurate total** in the header, priority highlighting (see above), and a status dropdown to move an issue through its workflow.
17
+ - **Live watch** — the host polls "assigned to me and not done" in the background; new assignments / status changes show a **system notification**, an **unread badge** on the sidebar entry, and a "what changed" banner with *mark as read*. The panel refreshes itself when a change arrives.
18
+ - **Three agent tools** — `jira_my_work`, `jira_issue`, `jira_transition` (preview by default, writes only with `apply: true`).
19
+ - **One slash command** — `/jira [--json] [--limit=<n>|0] [--lang=<tag>] [open|sprint|all | <issue key> | <JQL>]`; it renders in the command surface, so it costs no model tokens.
20
+ - **Configure dialog** — Jira site / email / API token (token goes to the DSH credential store), fetch size, watch switch + interval, notification switch, UI language, and one-click **open `cordis.patch.yml`** (default app / system "open with" chooser / detected editors / custom app).
21
+ - **Bilingual UI** — follows the DSH language setting (`设置 → 通用 → 语言`), live; Jira-returned text (summaries, status names, labels) is always shown verbatim.
22
+
23
+ ## Requirements
24
+
25
+ | | |
26
+ | --- | --- |
27
+ | DSH | Desktop app or `dsh web`, with the plugin manager (`plugin_manager`) available |
28
+ | Jira | Cloud or Server, plus an **API token** for your own account and your login email |
29
+ | Build step | none — the package ships `index.js` (host half) and `client.js` (web half) as-is |
30
+
31
+ ## Install
32
+
33
+ DSH installs plugins from an **installation spec** — anything `pnpm add` accepts (registry package name, git URL, tarball, absolute path). Pick one:
34
+
35
+ ```bash
36
+ # 1) from the npm registry (published since 0.14.0; pin a version with @0.14.0)
37
+ plugin_manager install_bundle(target="dsh-jira-work-overview")
38
+
39
+ # 2) straight from GitHub (no npm publishing needed)
40
+ plugin_manager install_bundle(target="github:EagleSoap/dsh-jira-work-overview")
41
+
42
+ # 3) from a local checkout
43
+ plugin_manager install_bundle(target="/absolute/path/to/dsh-jira-work-overview")
44
+ ```
45
+
46
+ Or do it in the UI: left icon rail → **Plugins** → install, and paste the same spec.
47
+
48
+ Installing adds `dsh-jira-work-overview` to your profile's bundle list and inserts the plugin row declared in `cordis.patch.yml`. The host then serves the web half as a plugin bundle — **refresh the page** (Cmd/Ctrl+R) and the sidebar entry appears.
49
+
50
+ <img src="docs/images/sidebar-entry.png" width="248" alt="The 'My Jira work items' entry above Settings in the left sidebar, showing an unread badge">
51
+
52
+ ## First-run configuration
53
+
54
+ The bundled `cordis.patch.yml` deliberately contains **no site-specific values**, so nothing of the author's Jira account is shipped. Open the panel, click **配置 / Configure** in the panel header, and fill in:
55
+
56
+ | Field | Example | Required |
57
+ | --- | --- | --- |
58
+ | Jira site URL (`baseUrl`) | `https://your-site.atlassian.net` | ✅ — the tools tell you when it is missing |
59
+ | Login email (`email`) | `you@example.com` | ✅ (Basic auth = email + token) |
60
+ | API token | create one at [id.atlassian.com → API tokens](https://id.atlassian.com/manage-profile/security/api-tokens) | ✅ |
61
+ | Project key / board id | `APP` / `42` | optional, used for labels and the sprint field |
62
+ | Fetch size (`maxResults`) | `0` = unlimited | optional |
63
+ | Watch switch / interval, notifications, UI language | — | optional (change = save) |
64
+
65
+ The token is written to the **DSH credential store** (key `JIRA_API_TOKEN` unless you change `credentialKey`); it never enters the repo, the logs, or the UI (the panel only shows a masked form such as `ATAT…0000`). Before storing, the plugin verifies the email + token pair against `/rest/api/3/myself` and refuses to save a rejected token.
66
+
67
+ Prefer files? Add an override row to your profile's `cordis.patch.yml` (this is also where the panel writes the ✏️ fields):
68
+
69
+ ```yaml
70
+ - id: jira-work-overview
71
+ config:
72
+ baseUrl: https://your-site.atlassian.net
73
+ email: you@example.com
74
+ projectKey: YOURKEY
75
+ boardId: 42
76
+ ```
77
+
78
+ ## Usage
79
+
80
+ ### Panel
81
+
82
+ - **Project tabs** (with `‹ ›` scrolling) filter by issue-key prefix; **status filter** is single-select, defaults to "all statuses".
83
+ - The header shows the **accurate total** for the current project + status, straight from Jira's `approximate-count`.
84
+ - Click a **status chip** on any row to move the issue; the list reloads. **Esc** closes the top-most layer (status menu → configure dialog → panel).
85
+ - The list is **virtualized**: thousands of rows scroll smoothly because only the visible ones are in the DOM.
86
+
87
+ <img src="docs/images/panel-watch.png" width="1040" alt="The live-change banner and a row with its status dropdown open (To Do / In Progress / IN QA / Done)">
88
+
89
+ ### Slash command
90
+
91
+ ```
92
+ /jira # my open items, text
93
+ /jira --json # same, as JSON (used by the panel)
94
+ /jira --limit=200 # cap this call (0 = unlimited)
95
+ /jira --status="IN QA" # server-side status filter
96
+ /jira APP-4051 # one issue in full
97
+ /jira project = APP AND duedate is not EMPTY
98
+ ```
99
+
100
+ ### Agent tools
101
+
102
+ | Tool | Purpose |
103
+ | --- | --- |
104
+ | `jira_my_work` | my issues + status, grouped; `scope` = `open` / `sprint` / `all`, or your own `jql`; `status` filter; `limit` |
105
+ | `jira_issue` | one issue in full: fields, description (ADF → plain text), optional recent comments |
106
+ | `jira_transition` | list the workflow transitions of an issue, or apply one (`apply: true`) — preview by default |
107
+
108
+ ### Live watch and notifications
109
+
110
+ The host polls `assignee = currentUser() AND statusCategory != Done` every `watchIntervalMs` (default 60 s, minimum 15 s). New assignments and status changes notify; items that simply leave the open list are recorded but stay silent. The first poll only establishes a baseline. Notifications use `osascript` on macOS, a PowerShell Toast on Windows, and `notify-send` elsewhere — silently degrading if the platform refuses.
111
+
112
+ ## Configuration reference
113
+
114
+ | Key | Default | Meaning |
115
+ | --- | --- | --- |
116
+ | `baseUrl` | `''` | Jira site root, e.g. `https://your-site.atlassian.net` (**required**) |
117
+ | `email` ✏️ | `''` | login email used for Basic auth |
118
+ | `apiToken` | `''` | fallback only — prefer the DSH credential store |
119
+ | `credentialKey` | `JIRA_API_TOKEN` | credential-store key that holds the token |
120
+ | `projectKey` | `''` | optional project label |
121
+ | `boardId` | — | agile board id, used to read the active sprint |
122
+ | `maxResults` ✏️ | `0` | fetch cap: `0` = unlimited, otherwise 10–5000 (safety net: 5000 items / 50 pages / one `timeoutMs` budget) |
123
+ | `timeoutMs` | `30000` | HTTP timeout, and the total budget for one paged fetch |
124
+ | `watchEnabled` ✏️ | `true` | background watch on/off |
125
+ | `watchIntervalMs` ✏️ | `60000` | watch interval (≥ 15000) |
126
+ | `notify` ✏️ | `true` | desktop notifications on changes |
127
+ | `language` ✏️ | `auto` | UI/tool language: `auto` / `zh` / `en` |
128
+ | `preferredEditor` ✏️ | `''` | last editor used for "open `cordis.patch.yml`" |
129
+
130
+ ✏️ = runtime-editable: the panel writes it through the host `settings` service into the **active profile's `cordis.patch.yml`**, and it applies immediately (no restart).
131
+
132
+ ## Platform support
133
+
134
+ | | macOS | Windows | Linux |
135
+ | --- | --- | --- | --- |
136
+ | Notifications | `osascript` | PowerShell Toast (`-EncodedCommand`) | `notify-send` |
137
+ | Open `cordis.patch.yml` | `open` / `open -R` / osascript app chooser | `cmd /c start` / `rundll32 … OpenAs_RunDLL` / `explorer /select,` | `xdg-open` |
138
+ | Host paths | POSIX | avoid spaces in the install path — DSH records it as a `link:` dependency | POSIX |
139
+
140
+ The web half only uses standard React/DOM APIs (`color-mix`, `createPortal` are supported on all three).
141
+
142
+ ## Internationalization
143
+
144
+ The plugin's own copy follows the DSH language setting; English and Chinese ship with the plugin and every other language falls back to English. Resolution order: `DSH_JIRA_LANG` → per-call override (`--lang=` / `?lang=`) → `language` config → the host `locale.preference` → the panel-reported language → system env → ICU → `en`. Jira data is never translated.
145
+
146
+ ## Troubleshooting
147
+
148
+ | Symptom | Meaning |
149
+ | --- | --- |
150
+ | `Cannot reach https://… (…): ECONNRESET` / `HTTP 000` | your machine cannot reach Jira right now (VPN/proxy/network), not a plugin bug |
151
+ | "No matching work items" with no error row | the query returned nothing — widen the status filter or the project tab |
152
+ | footer says "live watch unavailable" | the Electron shell did not expose a fetch transport; the panel/badge degrade, tools still work |
153
+ | footer says "live watch disconnected" | transient transport error; it retries with backoff |
154
+ | token rejected when saving | the email + token pair is wrong, or the token has no Jira access |
155
+
156
+ Behind a corporate proxy on Windows, DSH needs the proxy env vars it was started with (`NODE_USE_ENV_PROXY=1`) — the plugin itself never talks to the network outside `fetch`.
157
+
158
+ ## Security and privacy
159
+
160
+ - The API token lives in the **DSH credential store**; the plugin only ever returns a masked form + its source, never the value. There is no place in the code where a full token is logged or rendered.
161
+ - The plugin reads **only issues assigned to you** (the JQL always starts from `assignee = currentUser()`) and writes **only** the workflow transition you click, plus your own settings.
162
+ - Your Jira site / email are personal configuration: they belong in your profile (`cordis.patch.yml` / the panel), **not** in this repository.
163
+
164
+ ## Development
165
+
166
+ ```
167
+ dsh-jira-work-overview/
168
+ ├── index.js host half: tools, /jira command, fetch routes, watch loop, Jira client
169
+ ├── client.js web half: sidebar entry, panel, configure dialog (plain React via __ModuleLoader__)
170
+ ├── cordis.patch.yml the plugin row this bundle inserts (neutral defaults only)
171
+ ├── locale/{zh,en}.json plugin-list title/description (file name = language id, en.json required)
172
+ ├── icon.svg plugin-list icon (36×36, transparent, theme-friendly strokes)
173
+ ├── docs/images/ README screenshots, rendered by `test/dsh-jira-shot.mjs`
174
+ └── test/ offline + real-Jira suites
175
+ ```
176
+
177
+ Tests run under DSH's own Electron-as-Node binary (`ELECTRON_RUN_AS_NODE=1`):
178
+
179
+ ```bash
180
+ BIN="/Applications/DeepSeek Harness.app/Contents/MacOS/DeepSeek Harness"
181
+ ELECTRON_RUN_AS_NODE=1 "$BIN" test/dsh-jira-visual.mjs # offline: rendering, virtualization, filters
182
+ ELECTRON_RUN_AS_NODE=1 "$BIN" test/dsh-jira-credential.mjs # offline: config panel, routes, paging
183
+ ELECTRON_RUN_AS_NODE=1 "$BIN" test/dsh-jira-i18n.mjs # offline: language matrix + dict parity
184
+ ELECTRON_RUN_AS_NODE=1 "$BIN" test/dsh-jira-transition.mjs # real Jira (read-only + failure paths)
185
+ ELECTRON_RUN_AS_NODE=1 "$BIN" test/dsh-jira-status.mjs # real Jira (skips itself when unreachable)
186
+ ELECTRON_RUN_AS_NODE=1 "$BIN" test/dsh-jira-shot.mjs # regenerate docs/images (headless Chrome, fake data)
187
+ ```
188
+
189
+ The screenshots are generated offline too: `test/dsh-jira-shot.mjs` renders the real `client.js` components with the real plugin CSS and a fixed set of **made-up** APP/OPS issues, serializes them to static HTML and lets headless Chrome shoot them — so the images never contain a real site, account or issue. Run it with `--lang en,zh`, `--theme dark`, `--only panel|panel-watch|sidebar-entry` or `--out <dir>`; it prints `SKIP:` and exits 0 when no Chrome is installed.
190
+
191
+ The host half imports `@deepseek-ai/schemastery`, which only resolves inside the app, so the suites copy `index.js` next to a copy of that dependency in a temp dir (`DSH_JIRA_TMP` overrides the location). Real-Jira suites read a token from `DSH_JIRA_ENV_FILE` (default `$TMP/.dsh_jira_env`, `chmod 600`) and **skip** when Jira is unreachable instead of reporting a false regression.
192
+
193
+ ## License
194
+
195
+ [MIT](LICENSE) © 2026 Zhaohong Fei