dsh-task-ledger 0.0.53 → 0.0.55

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/dist/client.js CHANGED
@@ -177,7 +177,7 @@ window.__ModuleLoader__.load({
177
177
  if (needle === "") return true;
178
178
  return parts.some((part) => part?.toLowerCase().includes(needle) === true);
179
179
  }
180
- /** 「我的」判定:owner = 该工作区的当前 git 身份,且状态是 doing / blocked(与 host 统计同口径)。 */
180
+ /** 「我的」判定:owner = 该工作区的当前 git 身份,且状态是进行中(blocked 是旧数据,照收;与 host 同口径)。 */
181
181
  function isMine(task, board) {
182
182
  if (board === null) return false;
183
183
  const identity = board.identities[task.workspace.id] ?? null;
@@ -207,10 +207,10 @@ window.__ModuleLoader__.load({
207
207
  if (status === "all") return true;
208
208
  if (status === "active") return task.status === "doing" || task.status === "blocked";
209
209
  if (status === "open") return task.status === "open";
210
- if (status === "blocked") return task.status === "blocked";
210
+ if (status === "overdue") return task.overdue === true;
211
211
  return task.stale === true;
212
212
  }
213
- /** 组内排序:别人的 doing/blocked 在前、待认领在后;各自按创建 / 开始时间倒序。 */
213
+ /** 组内排序:别人的进行中在前、待认领在后;各自按创建 / 开始时间倒序。 */
214
214
  function inGroupOrder(a, b) {
215
215
  if (a.kind !== "task" || b.kind !== "task") return 0;
216
216
  const rank = (task) => task.status === "open" ? 1 : 0;
@@ -234,7 +234,7 @@ window.__ModuleLoader__.load({
234
234
  total: 0,
235
235
  doing: 0,
236
236
  open: 0,
237
- blocked: 0,
237
+ overdue: 0,
238
238
  stale: 0
239
239
  }
240
240
  };
@@ -243,7 +243,7 @@ window.__ModuleLoader__.load({
243
243
  total: allTasks.length,
244
244
  doing: allTasks.filter((task) => task.status === "doing").length,
245
245
  open: allTasks.filter((task) => task.status === "open").length,
246
- blocked: allTasks.filter((task) => task.status === "blocked").length,
246
+ overdue: allTasks.filter((task) => task.overdue === true).length,
247
247
  stale: allTasks.filter((task) => task.stale === true).length
248
248
  };
249
249
  const mineRows = board.tasks.filter((task) => isMine(task, board)).filter((task) => query.workspace === "" || task.workspace.id === query.workspace).filter((task) => hitKeyword(query.keyword, [
@@ -278,7 +278,7 @@ window.__ModuleLoader__.load({
278
278
  workspaceId,
279
279
  title: entry.title,
280
280
  doingCount: entry.rows.filter((row) => row.kind === "task" && row.task.status === "doing").length,
281
- blockedCount: entry.rows.filter((row) => row.kind === "task" && row.task.status === "blocked").length,
281
+ overdueCount: entry.rows.filter((row) => row.kind === "task" && row.task.overdue === true).length,
282
282
  staleCount: entry.rows.filter((row) => row.kind === "task" && row.task.stale === true).length,
283
283
  openCount: entry.rows.filter((row) => row.kind === "task" && row.task.status === "open").length,
284
284
  total: entry.rows.length,
@@ -1096,11 +1096,11 @@ body[data-ds-dark-theme]{
1096
1096
  const title = row.record.workpackage ?? row.record.summary;
1097
1097
  return title !== void 0 && title !== "" ? title : row.record.src ?? "—";
1098
1098
  }
1099
- /** 状态语义(异常优先:stale 盖过 blocked)。 */
1099
+ /** 状态语义(异常优先:stale 盖过 blocked;blocked 是 host 按 7 天算出来的,不是状态)。 */
1100
1100
  function toneOf(row) {
1101
1101
  if (row.kind !== "task") return "closed";
1102
1102
  if (row.task.stale === true) return "stale";
1103
- if (row.task.status === "blocked") return "blocked";
1103
+ if (row.task.overdue === true) return "blocked";
1104
1104
  if (row.task.status === "open") return "open";
1105
1105
  return "doing";
1106
1106
  }
@@ -1374,11 +1374,11 @@ body[data-ds-dark-theme]{
1374
1374
  }, state.refreshing ? t("refreshing") : t("refresh")))), tab === "stats" ? (0, react.createElement)("div", { style: hintStyle }, t("statsPlaceholder")) : (0, react.createElement)("div", null, stats === void 0 ? null : (0, react.createElement)("div", {
1375
1375
  className: "dtl-stats",
1376
1376
  style: statsRowStyle
1377
- }, (0, react.createElement)("div", { className: "dtl-stats__cards" }, card("statMyActive", stats.myActive, t("statMyActiveHint", { n: stats.myBlocked })), card("statOpen", stats.open, t("statOpenHint", { n: days(stats.oldestOpenDays) })), card("statDoing", stats.doing, t("statDoingHint", { n: stats.doing - stats.myActive + stats.myBlocked })), (0, react.createElement)(StatCard, {
1377
+ }, (0, react.createElement)("div", { className: "dtl-stats__cards" }, card("statMyActive", stats.myActive, t("statMyActiveHint", { n: stats.myOverdue })), card("statOpen", stats.open, t("statOpenHint", { n: days(stats.oldestOpenDays) })), card("statDoing", stats.doing, t("statDoingHint", { n: stats.doing - stats.myActive })), (0, react.createElement)(StatCard, {
1378
1378
  label: t("statBlockedStale"),
1379
- value: stats.blocked + stats.stale,
1379
+ value: stats.overdue + stats.stale,
1380
1380
  hint: t("statBlockedSplit", {
1381
- blocked: stats.blocked,
1381
+ blocked: stats.overdue,
1382
1382
  stale: stats.stale
1383
1383
  }),
1384
1384
  title: t("statStaleTitle", { n: stats.staleDays }),
@@ -1512,9 +1512,9 @@ body[data-ds-dark-theme]{
1512
1512
  badge: orZero(view.allCounts.open)
1513
1513
  },
1514
1514
  {
1515
- value: "blocked",
1515
+ value: "overdue",
1516
1516
  label: t("statusBlocked"),
1517
- badge: orZero(view.allCounts.blocked)
1517
+ badge: orZero(view.allCounts.overdue)
1518
1518
  },
1519
1519
  {
1520
1520
  value: "stale",
@@ -1572,7 +1572,7 @@ body[data-ds-dark-theme]{
1572
1572
  t("groupTotal", { n: group.total }),
1573
1573
  t("groupOpen", { n: group.openCount }),
1574
1574
  t("groupDoing", { n: group.doingCount }),
1575
- ...group.blockedCount > 0 ? [t("groupBlocked", { n: group.blockedCount })] : [],
1575
+ ...group.overdueCount > 0 ? [t("groupBlocked", { n: group.overdueCount })] : [],
1576
1576
  ...group.staleCount > 0 ? [t("groupStale", { n: group.staleCount })] : []
1577
1577
  ].join(" | ");
1578
1578
  return (0, react.createElement)("div", { className: "dtl-group" }, (0, react.createElement)("button", {
@@ -1845,7 +1845,7 @@ body[data-ds-dark-theme]{
1845
1845
  * 定位用宿主变量 `--dsh-frame-overlay-top`(标题栏净空 + 20px),**不写死 top 值**;
1846
1846
  * 浮层默认 `pointer-events:none`、子元素自动恢复 ⇒ 自绘条目不挡下方应用。
1847
1847
  *
1848
- * 角标 = 我名下 `doing` + `blocked` 计数(host 统计真值,SSE 已否 ⇒ 取自同一份快照,>0 才画);
1848
+ * 角标 = 我名下进行中计数(host 统计真值,SSE 已否 ⇒ 取自同一份快照,>0 才画);
1849
1849
  * 0→n 跳变时一次脉冲动画,不自动消失。宿主**无**通知 API ⇒ 「通知」就是这个角标。
1850
1850
  */
1851
1851
  function OverlayEntry(props) {