dsh-jira-work-overview 0.15.0 → 0.16.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 +108 -0
- package/README.md +33 -3
- package/README.zh.md +46 -3
- package/client.js +1114 -21
- package/docs/images/panel-epic.png +0 -0
- package/docs/images/panel-epic.zh.png +0 -0
- package/docs/images/panel-plan.png +0 -0
- package/docs/images/panel-plan.zh.png +0 -0
- package/docs/images/panel-search.png +0 -0
- package/docs/images/panel-search.zh.png +0 -0
- package/docs/images/panel-watch.png +0 -0
- package/docs/images/panel-watch.zh.png +0 -0
- package/docs/images/panel.png +0 -0
- package/docs/images/panel.zh.png +0 -0
- package/index.js +855 -25
- package/package.json +1 -1
- package/test/README.md +6 -3
- package/test/dsh-jira-credential.mjs +28 -3
- package/test/dsh-jira-epic.mjs +104 -0
- package/test/dsh-jira-json.mjs +9 -0
- package/test/dsh-jira-plan.mjs +749 -0
- package/test/dsh-jira-search.mjs +216 -0
- package/test/dsh-jira-shot.mjs +274 -42
- package/test/dsh-jira-status.mjs +5 -1
- package/test/dsh-jira-visual.mjs +236 -14
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,114 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.16.0] - 2026-11-20
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **任务行的「计划」按钮:在项目绑定的工作区里开一条 plan 模式会话。** 每条任务末尾多一个 `☰ 计划`,
|
|
14
|
+
点一下就在该项目关联的工作区里新建一条会话,先 `/plan` 再把这单任务投给它——第一条消息只要求
|
|
15
|
+
「列出将要执行的修改任务」,由用户在对话里敲定或修改;已经计划过的任务按钮标成已绑定(`on`),
|
|
16
|
+
再点只打开原来那条,不会重复建。Jira 卡信息不全(没有标题 / 描述 / 父任务与关联)时,第一条消息会
|
|
17
|
+
明确要求中断并提示「Jira 任务不明确,无法进行任务」,并列出缺什么。
|
|
18
|
+
- **一条任务只对应一条计划对话**:绑定存在 volatile 配置 `planSessions`(一行一条
|
|
19
|
+
`ISSUE<TAB>sessionId`)。本地映射丢了(换浏览器、清过配置)也不要紧——每条计划对话的第一条消息
|
|
20
|
+
都带 `JIRA_PLAN_SESSION:<KEY>` 标记,host 直接翻会话日志找它并补回绑定;会话日志是唯一真相,
|
|
21
|
+
配置只是它的缓存。
|
|
22
|
+
- 没绑工作区、profile 里没配 plan 模式(`deepseek-ai/dsh-plan-mode` 的 `section`)时直接报错说明,
|
|
23
|
+
不建半成品会话;刚建出来的会话在宿主注册完 agent 前会报 `session/not-found`,投递按退避重试。
|
|
24
|
+
- Host:新增第 6 条通道 `/api/jira-work-overview/plan`(`GET` 读映射;`POST` 的 `create` / `search` /
|
|
25
|
+
`link` / `unlink` / `clear`),`planIssueGaps` / `planFirstMessage` / `findPlanSessionByToken` /
|
|
26
|
+
`createPlanSession`;字典新增 `plan.*` / `err.plan*` / `note.plan*` / `config.planSessions`。
|
|
27
|
+
- Client:任务行按钮、失败横幅、`startPlan`(先查本地绑定 → 再让 host 按标记搜 → 最后才新建),
|
|
28
|
+
字典新增 `planButton` / `planBusy` / `planNoWorkspace` / `planNoPolicy` / `planFailed` /
|
|
29
|
+
`planCreated` / `planOpened` / `planNoSession` / `planIssueLine` / `planRules`(zh + en)。
|
|
30
|
+
- 测试:新增 `test/dsh-jira-plan.mjs`(离线 24 项,真 `index.js` + 真 `client.js`,Jira / remote /
|
|
31
|
+
workspace / agents / settings 全是桩):建在绑定的工作区、`/plan` 先于第一条消息、首条消息带标记与
|
|
32
|
+
「只汇报 / 不明确就中断」两条规则、二次点击不新建、按标记找回、缺口清单、参数报错、面板按钮与
|
|
33
|
+
`on` 状态。
|
|
34
|
+
- **删掉一条计划对话**:已计划过的任务行在「计划」旁多一个 `×`,点了走基座的工作区归档
|
|
35
|
+
(`remote.workspace.archiveSession`,与侧栏右键「归档」同一条通道)并清掉绑定;这一行回到未计划状态,
|
|
36
|
+
再点「计划」是新建一条。host 路由 `POST /api/jira-work-overview/plan` 新增 `drop` 动作。
|
|
37
|
+
- 计划要求的第 5 条:列完任务后必须用 `ask_user_question` 收尾(「按这份计划执行 / 我要修改计划」),
|
|
38
|
+
确认只需点一下,不用打字。
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- **「×」报 `归档计划对话失败:no workspaces service` / `这个 profile 没有提供工作区归档通道`**:两处都取错了门。
|
|
43
|
+
`ctx.get('workspaces')` 拿不到东西——注册表在服务树上的名字是 `workspaceRegistry`(`dsh-workspace` 的
|
|
44
|
+
`super(ctx, "workspaceRegistry")`);遥控命名空间也不是 `workspaces` 而是 **`workspace`**
|
|
45
|
+
(`workspaceController` 的 `super(ctx, "workspaceController", { namespace: "workspace" })`,端点键
|
|
46
|
+
`workspace/archiveSession`)。现在走 `remote.workspace.archiveSession({ sessionId, stopActivity: true })`,
|
|
47
|
+
现在依次试三道门面:`remote.workspace.archiveSession` → **工作区注册表本体** `workspaceRegistry.archiveSession`
|
|
48
|
+
(宿主的 `Connection` 根本没有 `call`,面板那套遥控又常常不暴露 `workspace` 命名空间——注册表本体才是
|
|
49
|
+
真机上唯一稳定的一挡)→ `connection.call('workspace/archiveSession', …)`。三道都没有才报「没有归档通道」。
|
|
50
|
+
- 删掉计划对话后再点「计划」会打开那条已归档的会话:面板取绑定时带 `force: true`,
|
|
51
|
+
host 只回映射、不再翻会话日志,另在 host 现建的路径上也带 `skipToken: true`。
|
|
52
|
+
- **「计划」建会话改走 `sessions` 会话服务,不再直连 `remote.session`**:插件没在 `ctx.inject` 里声明
|
|
53
|
+
`remote`,真机上一点就抛 `cannot get property "remote.session" without inject`。现在用基座客户端常驻的
|
|
54
|
+
`sessions.create({ workspaceId })` 建会话,再用 `sessions.using(id, …)` 拿会话对象、依次 `command('/plan')`
|
|
55
|
+
与 `prompt([…], 'queue', …, requestId)`(与聊天框同一条路:CATALOG 立刻更新、新会话可当场落位)。
|
|
56
|
+
- **「计划」不再要求 profile 里装 plan 模式插件**:点在没装 `@deepseek-ai/dsh-plan-mode`(或其 `section`
|
|
57
|
+
为空)的 profile 上会直接报「这个 profile 没有配置 plan 模式的工作方式」。现在口径按
|
|
58
|
+
settings 覆盖 → 面板宿主配置视图 → 靴子数据里的 profile 行依次取;都没有时由第一条消息自带一份
|
|
59
|
+
「只做规划、只列修改任务、敲定后再执行」的兜底口径,按钮照常建会话。
|
|
60
|
+
- 「计划」首条消息的 `policy` 参数此前三处调用都没传,即使装了 plan 模式也一直走兜底文案。
|
|
61
|
+
- `test/dsh-jira-status.mjs` 定位「筛选」按钮时会拿到同一行新加的「按迭代 / 按 epic」切换按钮
|
|
62
|
+
(都是 `jmw-filterbtn`),改按 `aria-label` 认。
|
|
63
|
+
- **从属关系视图:epic / 父任务,不靠画布。** 面板原先只有「项目 tab × sprint」一条线;现在每行额外带一行
|
|
64
|
+
`↳ epic APP-123 · 标题`(子任务没有 epic 时显示 `↳ 父任务 APP-123`),点一下跳到那条任务(在当前列表里
|
|
65
|
+
就滚过去并切到「全部项目」,不在就新窗口打开 Jira)。标题栏右侧的 **按迭代 / 按 epic** 开关把同一批数据
|
|
66
|
+
换一条线分组:按 Epic Link 归组,**横跨多个项目的组**在组头标「N 个项目」;两种视图共用同一套虚拟列表、
|
|
67
|
+
折叠状态与计数,切换不重拉、不丢滚动。没挂关联的行不占额外高度;站点没有 epic 字段时静默退到
|
|
68
|
+
「无 epic」一组(不报错、不弹提示)。
|
|
69
|
+
- Host:`resolveEpicField`(按 `schema.custom` 认 `gh-epic-link` / `gh-epic-label`,再按「名字含 epic 且
|
|
70
|
+
类型 any」兜底,实例缓存;`/rest/api/3/field` 失败就当没有)、`epicOf`(兼容 `{key,summary}` / 纯键串 /
|
|
71
|
+
只有 id 三种形状)、`groupByEpic`(组名优先用 epic 摘要,`gh-epic-link` 只给键串时退回键);
|
|
72
|
+
`buildItemJson` 增 `parentKey` / `parentSummary` / `epicKey` / `epicSummary`(`parent` 保留兼容),
|
|
73
|
+
列表与单条 issue 查询都带上 epic 字段,载荷增 `epics`。
|
|
74
|
+
- **顺带修掉一个真站点的坑**:同一个站点可能同时有 `gh-epic-label`(恒空)和 `gh-epic-link`(带键串),
|
|
75
|
+
字段表里 label 排在前面;按数组顺序 `find` 会选中恒空的那个,epic 视图永远只有「无 epic」一组。
|
|
76
|
+
现在按 schema 的**优先级**找(link 优先),`test/dsh-jira-epic.mjs` 钉死这个顺序。
|
|
77
|
+
- Client:`groupMode` 快照、`buildGroups(data, project, mode)`、折叠键带维度前缀(两种视图的 `none` 组
|
|
78
|
+
不串折叠)、行内关联行、组头项目数徽标、分段控件;字典新增 `groupBySprint` / `groupByEpic` /
|
|
79
|
+
`epicNone` / `epicProjects` / `relParent` / `relEpic` / `relOpen`(zh + en)。
|
|
80
|
+
- 测试:新增 `test/dsh-jira-epic.mjs`(离线 21 项:字段解析优先级、三种字段形状、分组与跨项目计数);
|
|
81
|
+
`test/dsh-jira-visual.mjs` 新增 L 段(分段控件、关联行、epic 优先、跨项目徽标、两种视图共用数据);
|
|
82
|
+
`test/dsh-jira-json.mjs` 增 `epics` 载荷形状断言。
|
|
83
|
+
|
|
84
|
+
- **面板搜索,行为对齐 Jira 自己的搜索框。** 标题右侧新增放大镜:点开后**在原位向左展开**输入框(宽度过渡),
|
|
85
|
+
失焦或 Esc 收回按钮,回车搜 **整站**(不只指派给我的)——
|
|
86
|
+
关键词走 Jira 的 `text ~ "…"`(摘要 / 描述 / 评论),输入 issue key 或粘贴 `/browse/APP-123` 链接则直接
|
|
87
|
+
`key = "…"` 定位。命中结果沿用面板原有的 sprint 分组 / 项目 tab / 状态筛选 / 准确总数,所以每一行都能看到
|
|
88
|
+
它属于哪个迭代;`×` 清空回到「我的工作」。没回车的草稿在收起后保留,执行搜索后输入框清空、结果保留。
|
|
89
|
+
输入框是半透明毛玻璃
|
|
90
|
+
(借用 DSH 菜单的 `--dsw-menu-surface-fill` / `--dsw-menu-backdrop-filter`,深浅色自动适配),
|
|
91
|
+
聚焦时蓝色描边 + 光晕,放大镜画在框内左侧。收起时先缩宽、最后才淡出,输入框常驻到动画结束,
|
|
92
|
+
所以看到的是「缩回按钮」而不是整块瞬间消失。命令面同时支持
|
|
93
|
+
`/jira --search=<文本>`(搜索词可带空格,按 token 一直吃到下一个 `--` 开关)。
|
|
94
|
+
- `test/dsh-jira-search.mjs`(离线,21 项断言:全文 / key / browse URL、JQL 转义、`--status` 组合、
|
|
95
|
+
`approximate-count` 的 `AND project = …`、空搜索回落)与 `test/dsh-jira-visual.mjs` 新增 K 段
|
|
96
|
+
(放大镜 → 输入 → 回车 → 按迭代分组 → 清除 / Esc)。
|
|
97
|
+
- **README 截图补上这一版的新功能**:`docs/images/` 新增 `panel-search`(面板里搜「结算」/ `checkout`,命中按迭代分组)、
|
|
98
|
+
`panel-epic`(按 epic 分组、跨项目组头)与 `panel-plan`(`☰ 计划` 的已绑定 / 未绑定两种状态),中英各一套;
|
|
99
|
+
`panel` / `panel-watch` 也重出——图上现在带 `↳ epic …` 从属行。出图脚本 `test/dsh-jira-shot.mjs` 走真实交互
|
|
100
|
+
(点放大镜 → 输入 → 回车并断言命令面收到 `--search=`;点「按 epic」并断言三个组头),截图前还会用无头 Chrome
|
|
101
|
+
**按真 CSS 量一遍行高**再重排,组头与带从属关系的行因此落在浏览器里的真实位置。
|
|
102
|
+
|
|
103
|
+
## [0.15.1] - 2026-11-19
|
|
104
|
+
|
|
105
|
+
### Fixed
|
|
106
|
+
|
|
107
|
+
- **四条 `/api` 路由在真宿主里根本没注册 —— 配置页「读取令牌状态失败:HTTP 404」的根因。** 插件在 `apply()`
|
|
108
|
+
里同步 `ctx.get('connection')` 取 Fetch 注册表;而 `client-connection` 的 `apply` 是异步的(先建 BrowserAuth
|
|
109
|
+
的密钥),同一个加载批里它还没 provide,`ctx.get` 只返回 `undefined`,之后也不会有人再补 —— 角标状态 / 状态流转 /
|
|
110
|
+
令牌配置 / 配置写入四条路由就这样静默丢掉(Host 侧只剩三行「这个 profile 没有 connection.fetch 服务」的 note,
|
|
111
|
+
浏览器侧 `GET /api/jira-work-overview/credential` 直接 404)。现在四条路由统一走 `ctx.inject(['connection'], …)`,
|
|
112
|
+
等服务就绪再注册(服务重建时会重跑);没有 `ctx.inject` 的老宿主 / 离线测试桩仍退回同步读取。
|
|
113
|
+
- `test/dsh-jira-credential.mjs` 的宿主桩改成真宿主的时序:加载时 `ctx.get('connection')` 返回 `undefined`,
|
|
114
|
+
只有 `inject` 回调能看到它;回调执行后必须凑满 4 条路由,否则打印 `FAIL` 并以 1 退出。这条回归以前是
|
|
115
|
+
「离线测试全绿、真机路由全 404」。
|
|
116
|
+
|
|
9
117
|
## [0.15.0] - 2026-11-19
|
|
10
118
|
|
|
11
119
|
改状态变轻了(不再为一行变化重拉整个列表),也不会再被自己的操作通知一次;面板的失败提示按类型说话。
|
package/README.md
CHANGED
|
@@ -14,9 +14,11 @@ Show **your** Jira work items — with their real workflow status — inside [De
|
|
|
14
14
|
|
|
15
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
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 **in place** — only that row and the counts are updated, the list is not re-fetched.
|
|
17
|
+
- **Epic / parent relations, without a canvas** — every row carries its place in Jira's own hierarchy: a `↳ epic APP-123 · <title>` line (or `↳ parent APP-123` for sub-tasks without an epic), clickable to jump to that issue. A **按迭代 / 按 epic** switch in the header re-groups the same list by Epic Link instead of sprint, and a group that spans several projects is labelled with its project count — so "which epic is this across projects" is one glance, with no free-form graph to maintain. Both views share the same virtualization, collapse state and totals; a site without an epic field silently falls back to the "no epic" group, and rows without any relation take no extra height.
|
|
18
|
+
- **Search, Jira-style** — the magnifier in the panel header opens a search row. Enter searches **all of Jira** (summary / description / comments, via Jira's own `text ~` operator), not just your issues; an issue key or a pasted `/browse/APP-123` link jumps straight to that issue. Results reuse the same sprint grouping, project tabs, status filter and accurate total, so a hit shows which sprint it belongs to; `×` clears back to your work.
|
|
17
19
|
- **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
20
|
- **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.
|
|
21
|
+
- **One slash command** — `/jira [--json] [--limit=<n>|0] [--lang=<tag>] [--search=<text>] [open|sprint|all | <issue key> | <JQL>]`; it renders in the command surface, so it costs no model tokens.
|
|
20
22
|
- **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
23
|
- **Bilingual UI** — follows the DSH language setting (`设置 → 通用 → 语言`), live; Jira-returned text (summaries, status names, labels) is always shown verbatim.
|
|
22
24
|
|
|
@@ -33,7 +35,7 @@ Show **your** Jira work items — with their real workflow status — inside [De
|
|
|
33
35
|
DSH installs plugins from an **installation spec** — anything `pnpm add` accepts (registry package name, git URL, tarball, absolute path). Pick one:
|
|
34
36
|
|
|
35
37
|
```bash
|
|
36
|
-
# 1) from the npm registry (published since 0.14.0; pin a version with @0.
|
|
38
|
+
# 1) from the npm registry (published since 0.14.0; pin a version with @0.16.0)
|
|
37
39
|
plugin_manager install_bundle(target="dsh-jira-work-overview")
|
|
38
40
|
|
|
39
41
|
# 2) straight from GitHub (no npm publishing needed)
|
|
@@ -80,12 +82,38 @@ Prefer files? Add an override row to your profile's `cordis.patch.yml` (this is
|
|
|
80
82
|
### Panel
|
|
81
83
|
|
|
82
84
|
- **Project tabs** (with `‹ ›` scrolling) filter by issue-key prefix; **status filter** is single-select, defaults to "all statuses".
|
|
85
|
+
- **Search**: the header magnifier expands in place into a field that slides out to the left; type a keyword or an issue key and press **Enter**. The query runs against all of Jira (not only your issues); matches are grouped by sprint like your own list, with the same project tabs / status filter / total. Losing focus (or **Esc**) collapses the field back to the button and keeps an unsubmitted draft; a submitted query clears the field and keeps the results, and `×` clears the search to return to your work.
|
|
86
|
+
|
|
87
|
+
<img src="docs/images/panel-search.png" width="1040" alt="A search for 'checkout' inside the panel: the header field is open, the subtitle reads 'Search: checkout 4 items', and the hits are grouped by sprint with their epic line and the same filters as the work list">
|
|
83
88
|
- The header shows the **accurate total** for the current project + status, straight from Jira's `approximate-count`.
|
|
84
89
|
- 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
90
|
- The list is **virtualized**: thousands of rows scroll smoothly because only the visible ones are in the DOM.
|
|
91
|
+
- **Plan at the end of a row** (the `☰ 计划` chip) opens a *planning* conversation for that issue in the
|
|
92
|
+
workspace the project is linked to: the new session switches to plan mode, receives the issue key, title, status and link, and is told
|
|
93
|
+
to report **only the list of changes it intends to make** — no explanations, no analysis. You approve or amend
|
|
94
|
+
the plan in that conversation, and nothing is executed before you do. If the issue is too thin to plan (no
|
|
95
|
+
description, no parent and no links), the session stops instead of guessing and tells you the Jira issue is
|
|
96
|
+
unclear. One issue maps to one planning session: once bound the chip is highlighted, clicking it reopens the
|
|
97
|
+
existing conversation (the binding lives in the volatile `planSessions` config as `ISSUE<TAB>sessionId`, and a
|
|
98
|
+
lost binding is recovered from the `JIRA_PLAN_SESSION:<KEY>` marker in the session's first message). The button
|
|
99
|
+
reports what is missing when the project has no linked workspace; if the profile ships
|
|
100
|
+
`deepseek-ai/dsh-plan-mode`, its `section` is the planning policy, and without it the first message carries a
|
|
101
|
+
built-in one ("plan only, list the changes, execute once the user agrees").
|
|
102
|
+
A planned row also carries a `×`: it archives that conversation through DSH's own workspace archive
|
|
103
|
+
(`remote.workspace.archiveSession`, same path as the sidebar's *Archive`) and clears the binding, so the row is
|
|
104
|
+
unplanned again and the next click starts a fresh session. Archiving keeps the log — a mis-click is
|
|
105
|
+
recoverable from the archive.
|
|
106
|
+
|
|
107
|
+
<img src="docs/images/panel-plan.png" width="1040" alt="Rows with the '☰ Plan' chip: the two planned rows near the top are outlined because they are bound to a planning conversation, the rest are not">
|
|
86
108
|
|
|
87
109
|
<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
110
|
|
|
111
|
+
### Epic view
|
|
112
|
+
|
|
113
|
+
The **By sprint / By epic** switch in the header re-groups the same list. Each group is an Epic Link (or "No epic"), a group that spans several projects is labelled with its project count, and every row keeps its `↳ epic APP-123` line — one level of Jira's own hierarchy, no free-form graph to maintain.
|
|
114
|
+
|
|
115
|
+
<img src="docs/images/panel-epic.png" width="1040" alt="The same list grouped by epic: three groups, one of them spanning two projects, with each row's epic line underneath">
|
|
116
|
+
|
|
89
117
|
### Slash command
|
|
90
118
|
|
|
91
119
|
```
|
|
@@ -93,6 +121,7 @@ Prefer files? Add an override row to your profile's `cordis.patch.yml` (this is
|
|
|
93
121
|
/jira --json # same, as JSON (used by the panel)
|
|
94
122
|
/jira --limit=200 # cap this call (0 = unlimited)
|
|
95
123
|
/jira --status="IN QA" # server-side status filter
|
|
124
|
+
/jira --search="login error" # full-text search across all of Jira (or an issue key)
|
|
96
125
|
/jira APP-4051 # one issue in full
|
|
97
126
|
/jira project = APP AND duedate is not EMPTY
|
|
98
127
|
```
|
|
@@ -152,6 +181,7 @@ The plugin's own copy follows the DSH language setting; English and Chinese ship
|
|
|
152
181
|
| `Cannot reach https://… (…): ECONNRESET` / `HTTP 000` | your machine cannot reach Jira right now (VPN/proxy/network), not a plugin bug |
|
|
153
182
|
| "No matching work items" with no error row | the query returned nothing — widen the status filter or the project tab |
|
|
154
183
|
| footer says "live watch unavailable" | the Electron shell did not expose a fetch transport; the panel/badge degrade, tools still work |
|
|
184
|
+
| configure dialog says "Reading the token state failed: HTTP 404" | the plugin's `/api` routes were not registered (the host loaded the plugin before its connection service existed) — reload the plugin; a fixed build registers them once the service is up |
|
|
155
185
|
| footer says "live watch disconnected" | transient transport error; it retries with backoff |
|
|
156
186
|
| token rejected when saving | the email + token pair is wrong, or the token has no Jira access |
|
|
157
187
|
| panel says "No Jira token yet" | nothing is configured yet: click **Configure** and paste an API token (or set `JIRA_API_TOKEN`) |
|
|
@@ -191,7 +221,7 @@ ELECTRON_RUN_AS_NODE=1 "$BIN" test/dsh-jira-status.mjs # real Jira (skips i
|
|
|
191
221
|
ELECTRON_RUN_AS_NODE=1 "$BIN" test/dsh-jira-shot.mjs # regenerate docs/images (headless Chrome, fake data)
|
|
192
222
|
```
|
|
193
223
|
|
|
194
|
-
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.
|
|
224
|
+
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-plan|panel-watch|panel-search|panel-epic|sidebar-entry` or `--out <dir>`; it prints `SKIP:` and exits 0 when no Chrome is installed.
|
|
195
225
|
|
|
196
226
|
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.
|
|
197
227
|
|
package/README.zh.md
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
DSH 用**安装 spec** 装插件 —— 凡是 `pnpm add` 能吃的写法都行(registry 包名、git 地址、tarball、绝对路径)。选一个:
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
# 1) 从 npm 装(0.14.0 起已发布;要钉版本就在后面写 @0.
|
|
22
|
+
# 1) 从 npm 装(0.14.0 起已发布;要钉版本就在后面写 @0.16.0)
|
|
23
23
|
plugin_manager install_bundle(target="dsh-jira-work-overview")
|
|
24
24
|
|
|
25
25
|
# 2) 直接从 GitHub 装(不需要 npm 发布)
|
|
@@ -46,6 +46,7 @@ plugin_manager install_bundle(target="/absolute/path/to/dsh-jira-work-overview")
|
|
|
46
46
|
/jira --json [以上任一种] 同一份数据换成 JSON(左侧栏面板用的就是这个)
|
|
47
47
|
/jira --limit=0 这次查询取多少条(0 = 不限制,一直翻页到没有下一页为止;正数 10–5000;安全上限 5000 条 / 50 页 / 30s)
|
|
48
48
|
/jira --status=IN QA 只看这一个工作流状态(空间允许,状态名要带引号时把引号去掉)
|
|
49
|
+
/jira --search=登录报错 整站全文搜索(摘要 / 描述 / 评论),也可以直接给 issue key
|
|
49
50
|
/jira --lang=en 这次输出用哪种语言(zh / en,不改配置)
|
|
50
51
|
```
|
|
51
52
|
|
|
@@ -70,6 +71,15 @@ all : assignee = currentUser() ORDER BY updated DESC
|
|
|
70
71
|
浮层里第一行是**项目 tab** + 右侧的**状态筛选**与「展开全部 / 折叠全部」,
|
|
71
72
|
标题下面是「共 N 项」,右上角可刷新,点背板或按 Esc 关闭。
|
|
72
73
|
|
|
74
|
+
**搜索(和 Jira 搜索框一致)**:点标题右侧的放大镜,它在**原位向左展开**成输入框(带宽度过渡),输入关键词或 issue key 后**回车**。
|
|
75
|
+
关键词走 Jira 自己的 `text ~` 全文搜索,范围是**整站**(不只指派给我的,摘要 / 描述 / 评论都会命中);
|
|
76
|
+
输入 issue key 或粘贴 `/browse/APP-123` 链接则直接定位那一条。搜索命中同样按迭代分组,
|
|
77
|
+
项目 tab / 状态筛选 / 准确总数都照常可用,所以一眼能看出命中项属于哪个迭代。
|
|
78
|
+
输入框**失焦(或按 Esc)就收回按钮**:没回车的草稿下次展开还在;回车执行后输入框清空、结果保留;
|
|
79
|
+
`×` 清空搜索并回到「我的工作」。
|
|
80
|
+
|
|
81
|
+
<img src="docs/images/panel-search.zh.png" width="1040" alt="面板里搜索「结算」:标题栏输入框展开着,副标题显示「搜索:结算 共 4 项」,命中按迭代分组,行下带 epic 从属关系">
|
|
82
|
+
|
|
73
83
|
<img src="docs/images/panel-watch.zh.png" width="1040" alt="实时变更横幅与展开的状态流转下拉(待办 / 进行中 / IN QA / 已完成)">
|
|
74
84
|
|
|
75
85
|
**查询范围固定为全部**(`assignee = currentUser()`,含已完成 / 已关闭):原来的「未完成 / 全部」分段控件已按用户
|
|
@@ -85,6 +95,31 @@ all : assignee = currentUser() ORDER BY updated DESC
|
|
|
85
95
|
不会出现「慢请求晚到、把新列表盖回旧范围」的闪烁;等待期间旧列表留在原位并压暗到 55%(`.jmw-body.pending`),
|
|
86
96
|
新数据到达时原子替换。注意 `abort()` 只能中断「等结果」,Host 侧已经发出的 Jira 查询无法撤回。
|
|
87
97
|
|
|
98
|
+
**任务行末尾的「计划」按钮**:在**该项目绑定的工作区**里新建一条会话,先用 plan 模式做任务规划,
|
|
99
|
+
再由你在对话里敲定或修改。第一条消息只要求它「按点列出将要执行的修改任务」,不写解释、背景或分析;
|
|
100
|
+
计划由你确认后才执行。这张卡信息不全(没标题 / 没描述 / 没父任务与关联)时,它会**中断**并提示
|
|
101
|
+
「Jira 任务不明确,无法进行任务」,同时列出缺什么,不会硬猜着往下做。
|
|
102
|
+
|
|
103
|
+
建会话用的是 DSH 自己的会话服务(`sessions.create`),所以新会话会立刻出现在侧栏、并当场切到主视图;
|
|
104
|
+
`/plan` 与首条消息都按聊天框同一条路发(命令先、消息后),计划对话里的节奏和你在聊天框里开一条新会话一样。
|
|
105
|
+
一条任务**只对应一条**计划对话:已经计划过的任务按钮标成 `on`,再点只打开原来那条,不会又开一条。
|
|
106
|
+
绑定存在插件的 volatile 配置 `planSessions` 里(一行一条 `ISSUE<TAB>sessionId`);即使换了浏览器、
|
|
107
|
+
清过配置,HOST 也会按计划对话首条消息里的 `JIRA_PLAN_SESSION:<KEY>` 标记翻会话日志把它找回来。
|
|
108
|
+
项目没绑工作区(工作区右键 →「关联 Jira 项目…」)时,按钮会直接提示原因,不会建出半成品会话。
|
|
109
|
+
profile 里装了 `deepseek-ai/dsh-plan-mode` 就用它的 `section` 当规划口径;没装也不影响使用——
|
|
110
|
+
首条消息会自带一份「只做规划、只列修改任务、敲定后再执行」的兜底口径。
|
|
111
|
+
|
|
112
|
+
<img src="docs/images/panel-plan.zh.png" width="1040" alt="任务行末尾的「☰ 计划」徽标:上面两行已计划、被框起来,其余行未计划">
|
|
113
|
+
|
|
114
|
+
**删掉一条计划对话**:已计划过的任务行在「计划」旁边多一个 `×`,点它就调基座的工作区归档
|
|
115
|
+
(依次尝试 `remote.workspace.archiveSession` / 工作区注册表 `workspaceRegistry.archiveSession` / `connection.call('workspace/archiveSession')`,与侧栏右键「归档」是同一处状态)把那条会话收进归档区,同时清掉绑定;
|
|
116
|
+
归档后这一行回到未计划状态,再点「计划」是新建一条。归档不删日志,误删可以从归档区恢复。
|
|
117
|
+
|
|
118
|
+
**按 epic 分组**:标题栏的 **按迭代 / 按 epic** 开关把同一批数据换一条线分组——按 Epic Link 归组,横跨多个项目的组在组头标出「N 个项目」,
|
|
119
|
+
每行下面仍带自己的 `↳ epic APP-123`,等于不画图也能看到一个层级。
|
|
120
|
+
|
|
121
|
+
<img src="docs/images/panel-epic.zh.png" width="1040" alt="同一列表按 epic 分组:三组,其中一组横跨两个项目,每行下面带 epic 从属关系行">
|
|
122
|
+
|
|
88
123
|
**列表按 sprint(迭代)分组,每一组可折叠 / 展开**:
|
|
89
124
|
|
|
90
125
|
- 排序:**按 sprint id 从新到旧**,「无迭代」永远垫底。刻意**不**按 Jira 的 sprint 状态(active/future)
|
|
@@ -103,6 +138,12 @@ all : assignee = currentUser() ORDER BY updated DESC
|
|
|
103
138
|
拿不到名次(旧载荷,或站点没暴露这个接口)才退回按名字判断 `Highest` / `High`。
|
|
104
139
|
- 行:状态点(待办 / 进行中 / 已完成三色)+ 可点开的 issue key + 摘要 + 状态徽标 + 优先级徽标 + 到期
|
|
105
140
|
(逾期标红;没有到期日就显示更新时间)。
|
|
141
|
+
- **从属关系(epic / 父任务)——不靠画布也能看出「非线性关联」**:每行下面带一行
|
|
142
|
+
`↳ epic APP-123 · 标题`(子任务没有 epic 时是 `↳ 父任务 APP-123`),点一下就跳到那条任务(在当前列表里
|
|
143
|
+
就滚过去,不在就打开 Jira)。标题栏的 **按迭代 / 按 epic** 开关把同一批数据换一条线分组:
|
|
144
|
+
按 Epic Link 归组,横跨多个项目的组会在组头标出「N 个项目」。两种视图共用同一套虚拟列表、折叠状态
|
|
145
|
+
与计数,所以切换不重拉、不丢滚动;站点没有 epic 字段时静默退到「无 epic」一组,没有任何关联的行
|
|
146
|
+
不占额外高度。
|
|
106
147
|
- **改状态**:点一行的状态徽标(`状态 ▾`)会在该行下面展开一串可选状态——**这不是随便写状态名,
|
|
107
148
|
而是 Jira 工作流此刻允许的流转**,由 Host 现查 `GET /issue/{key}/transitions` 得到;当前状态带 ✓ 且不可点。
|
|
108
149
|
点一个就写入,成功后顶部出现绿色提示 `APP-4051 已改为 IN QA`,**列表只在本地更新这一行**(状态徽标、状态点、
|
|
@@ -413,8 +454,10 @@ ELECTRON_RUN_AS_NODE=1 "$BIN" test/dsh-jira-shot.mjs # 重新生成 docs
|
|
|
413
454
|
|
|
414
455
|
`test/dsh-jira-shot.mjs` 出的图和这套离线脚本同源:**真 `client.js` 组件 + 真插件 CSS + 固定的一套虚构 APP/OPS 工作项**,
|
|
415
456
|
序列化成静态 HTML 后交给无头 Chrome 截图,所以图上不会出现任何真实站点、账号或 issue。
|
|
416
|
-
|
|
417
|
-
|
|
457
|
+
每条 issue 都带 epic(`APP-300` / `OPS-60`)或父任务,所以图上的 `↳ epic …` 行一定在场;
|
|
458
|
+
出图前会在无头 Chrome 里**按真 CSS 量一遍行高**再重排,组头与带 `↳` 的行因此落在浏览器里的真实位置。
|
|
459
|
+
参数:`--lang en,zh`(默认两个都出)、`--theme dark`(默认浅色,深色加 `-dark` 后缀)、
|
|
460
|
+
`--only panel|panel-plan|panel-watch|panel-search|panel-epic|sidebar-entry`、`--out <目录>`;找不到 Chrome 时打印 `SKIP:` 并以 0 退出。
|
|
418
461
|
|
|
419
462
|
约定与坑:
|
|
420
463
|
|