dsh-task-ledger 0.0.122 → 0.0.123

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
@@ -53310,6 +53310,20 @@ window.__ModuleLoader__.load({
53310
53310
  };
53311
53311
  }
53312
53312
  /**
53313
+ * 单人台账:**执行人下拉的候选**(各工作区花名册合并去重,与 `ownerGroups` 同一份)里
53314
+ * 只有 ≤ 1 个人 ⇒ 行内人名 / 创建人 / 执行人下拉 / 「只看我的」全部隐藏(用户 2026-10-29:
53315
+ * 「只有一个人,明显就是他自己在用」)。
53316
+ *
53317
+ * 只看名册这一份:任务上的 owner / creator 不参与判断 —— 旧任务里留着的别人的 uuid
53318
+ * 不该把整板拽回多人形态;某工作区名册读挂也不拦住(那时下拉本来也没人可选)。
53319
+ */
53320
+ function isSoloLedger(board) {
53321
+ if (board === null) return false;
53322
+ const uuids = /* @__PURE__ */ new Set();
53323
+ for (const ws of board.workspaceOwners) for (const owner of ws.owners) if (owner.uuid !== "") uuids.add(owner.uuid);
53324
+ return uuids.size <= 1;
53325
+ }
53326
+ /**
53313
53327
  * 执行人下拉的分组(核心 Picker 原生支持 groups)。
53314
53328
  * 跨工作区合并去重:同一 uuid 出现在 ≥2 个工作区 ⇒ 归「通用人员」组(置顶);
53315
53329
  * 只出现在一个工作区 ⇒ 归该工作区分组。空工作区(名册读挂)自然不出现。
@@ -54038,6 +54052,7 @@ body[data-ds-dark-theme]{
54038
54052
  }
54039
54053
  function TaskRowView(props) {
54040
54054
  const { t, row } = props;
54055
+ const solo = props.solo === true;
54041
54056
  const tone = toneOf(row);
54042
54057
  const tags = row.task.tags ?? [];
54043
54058
  const created = row.task.created ?? null;
@@ -54051,7 +54066,8 @@ body[data-ds-dark-theme]{
54051
54066
  const detailTip = (which) => {
54052
54067
  const { task } = row;
54053
54068
  const owner = displayName(task.owner_name, task.owner);
54054
- const who = owner === "" ? t("ownerUnclaimed") : `@${owner}`;
54069
+ const who = solo ? "" : owner === "" ? t("ownerUnclaimed") : `@${owner}`;
54070
+ const tip = (text) => solo ? text.replace(/^\n/, "") : text;
54055
54071
  const started = stamp(task.started ?? task.created);
54056
54072
  const updated = stamp(task.updated ?? task.started ?? task.created);
54057
54073
  if (which === "open") return t("tipOpen", { created: stamp(task.created) });
@@ -54059,23 +54075,23 @@ body[data-ds-dark-theme]{
54059
54075
  created: stamp(task.created),
54060
54076
  d: dayText(task.waitingDays)
54061
54077
  });
54062
- if (which === "doing") return t("tipDoing", {
54078
+ if (which === "doing") return tip(t("tipDoing", {
54063
54079
  who,
54064
54080
  started,
54065
54081
  updated
54066
- });
54067
- if (which === "overdue") return t("tipOverdue", {
54082
+ }));
54083
+ if (which === "overdue") return tip(t("tipOverdue", {
54068
54084
  who,
54069
54085
  started,
54070
54086
  updated,
54071
54087
  d: dayText(task.ageDays)
54072
- });
54073
- return t("tipStale", {
54088
+ }));
54089
+ return tip(t("tipStale", {
54074
54090
  who,
54075
54091
  started,
54076
54092
  updated,
54077
54093
  d: dayText(task.idleDays)
54078
- });
54094
+ }));
54079
54095
  };
54080
54096
  const actions = resolveActions(row.task);
54081
54097
  const viewButton = (0, react$1.createElement)(Tip, {
@@ -54135,12 +54151,12 @@ body[data-ds-dark-theme]{
54135
54151
  const titleLine = (0, react$1.createElement)("div", { className: "dtl-taskrow__l1" }, (0, react$1.createElement)("span", {
54136
54152
  className: "dtl-taskrow__title dtl-ellipsis",
54137
54153
  title: titleOf(row)
54138
- }, titleOf(row)), creatorAge === null || creatorName === "" ? null : (0, react$1.createElement)("span", { className: "dtl-taskrow__stamp" }, `[@${creatorName} ${t("fieldCreatorStamp", { age: creatorAge })}]`), ...alarmTags);
54154
+ }, titleOf(row)), creatorAge === null || creatorName === "" ? null : (0, react$1.createElement)("span", { className: "dtl-taskrow__stamp" }, solo ? `[${t("fieldCreatorStamp", { age: creatorAge })}]` : `[@${creatorName} ${t("fieldCreatorStamp", { age: creatorAge })}]`), ...alarmTags);
54139
54155
  const whenRaw = row.task.updated ?? row.task.started ?? row.task.created;
54140
54156
  const metaText = `${t("whenSubmitted", { time: whenRaw === null || whenRaw === void 0 || Number.isNaN(Date.parse(whenRaw)) ? t("timeUnknown") : formatDateTime(whenRaw).slice(5) })} 丨 ${whenRaw === null || whenRaw === void 0 ? t("timeUnknown") : formatRelative(whenRaw, t)}`;
54141
54157
  const ownerName = displayName(row.task.owner_name, row.task.owner);
54142
54158
  const ownerUuid = (row.task.owner ?? "").trim();
54143
- const whoNode = row.task.status === "open" || ownerUuid === "" ? null : (0, react$1.createElement)(Button, {
54159
+ const whoNode = solo || row.task.status === "open" || ownerUuid === "" ? null : (0, react$1.createElement)(Button, {
54144
54160
  variant: "link",
54145
54161
  size: "sm",
54146
54162
  maxWidth: 180,
@@ -54399,6 +54415,8 @@ body[data-ds-dark-theme]{
54399
54415
  const board = state.board;
54400
54416
  const view = (0, react$1.useMemo)(() => selectView(state), [state]);
54401
54417
  const degraded = board?.degraded ?? [];
54418
+ /** 单人台账:执行人相关界面(下拉 / 人名 / 「只看我的」)全隐藏(用户 2026-10-29)。 */
54419
+ const solo = isSoloLedger(board);
54402
54420
  const degradedSig = degraded.map((item) => `${item.workspaceId}|${item.op}|${item.message}`).join("\n");
54403
54421
  const shownDegraded = (0, react$1.useRef)("");
54404
54422
  (0, react$1.useEffect)(() => {
@@ -54478,7 +54496,7 @@ body[data-ds-dark-theme]{
54478
54496
  style: statsRowStyle
54479
54497
  }, (0, react$1.createElement)("div", { className: "dtl-stats__cards" }, card("statMyActive", view.myActive, [view.myOverdue > 0 ? t("statMyOverdueHint", { n: view.myOverdue }) : null, view.myStale > 0 ? t("statMyStaleHint", { n: view.myStale }) : null].filter((part) => part !== null).join(" | "), void 0, "mine"), card("statDoing", view.doing, view.doing - view.myActive > 0 ? t("statDoingHint", { n: view.doing - view.myActive }) : t("statDoingAllMine"), void 0, "doing"), card("statOpen", view.open, view.oldestOpenDays === null ? "" : t("statOpenHint", { n: view.oldestOpenDays }), void 0, "open"), card("statBacklog", view.backlog, share(view.backlog, view.open, "statBacklogHint"), t("statBacklogTitle", { n: view.backlogDays }), "backlog"), card("statOverdue", view.overdue, share(view.overdue, view.doing, "statOverdueHint"), t("statOverdueTitle", { n: view.overdueDays }), "overdue"), card("statStale", view.stale, share(view.stale, view.doing, "statStaleHint"), t("statStaleTitle", { n: view.staleDays }), "stale"), weekCard("statWeekDone", view.weekDone, view.weekFrom, view.weekTo), weekCard("statLastWeekDone", view.lastWeekDone, view.lastWeekFrom, view.lastWeekTo)), (0, react$1.createElement)(TrendChart, {
54480
54498
  trend: payload.trend,
54481
- me: Object.values(payload.identities).find((uuid) => uuid !== null) ?? null,
54499
+ me: solo ? null : Object.values(payload.identities).find((uuid) => uuid !== null) ?? null,
54482
54500
  t
54483
54501
  }));
54484
54502
  };
@@ -54508,7 +54526,7 @@ body[data-ds-dark-theme]{
54508
54526
  onChange: (next) => {
54509
54527
  setQuery({ workspace: next });
54510
54528
  }
54511
- })), (0, react$1.createElement)("div", { style: { flex: "none" } }, (0, react$1.createElement)(Select, {
54529
+ })), solo ? null : (0, react$1.createElement)("div", { style: { flex: "none" } }, (0, react$1.createElement)(Select, {
54512
54530
  searchable: true,
54513
54531
  size: "lg",
54514
54532
  minWidth: SELECT_MIN_WIDTH,
@@ -54559,8 +54577,8 @@ body[data-ds-dark-theme]{
54559
54577
  onClick: onBack
54560
54578
  }, `← ${t("backToConversation")}`), (0, react$1.createElement)("div", { style: titleStyle }, t("panelTitle"), (0, react$1.createElement)("span", {
54561
54579
  style: buildTagStyle,
54562
- title: `v0.0.122 · 261029-154907-512`
54563
- }, `v0.0.122 261029-154907-512`))), (0, react$1.createElement)(Button, {
54580
+ title: `v0.0.122 · 261029-164707-786`
54581
+ }, `v0.0.122 261029-164707-786`))), (0, react$1.createElement)(Button, {
54564
54582
  variant: "outline",
54565
54583
  size: "lg",
54566
54584
  icon: (0, react$1.createElement)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, { size: 16 }),
@@ -54589,6 +54607,7 @@ body[data-ds-dark-theme]{
54589
54607
  key: row.key,
54590
54608
  t,
54591
54609
  row,
54610
+ solo,
54592
54611
  onView: handleView
54593
54612
  }))), view.rows.length > LIST_LIMIT ? (0, react$1.createElement)("div", { style: limitHintStyle }, t("listLimitHint", { n: LIST_LIMIT })) : null)));
54594
54613
  }