nx-kv 0.68.3 → 0.69.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.
Files changed (138) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/package.json +1 -1
  3. package/src/core/attachmentdb/query.ts +10 -1
  4. package/src/core/attachmentdb/resources.ts +4 -16
  5. package/src/core/db/bootstrap.ts +4 -3
  6. package/src/core/db/import-json/links.ts +2 -2
  7. package/src/core/db/import-json/repos.ts +3 -24
  8. package/src/core/db/import-json/tasks.ts +92 -7
  9. package/src/core/db/import-json.ts +1 -2
  10. package/src/core/db/migrations/index.ts +6 -0
  11. package/src/core/db/migrations/v16-data.ts +167 -0
  12. package/src/core/db/migrations/v16.sql +15 -0
  13. package/src/core/db/migrations/v17-data.ts +110 -0
  14. package/src/core/db/migrations/v17.sql +112 -0
  15. package/src/core/db/repo-match.ts +52 -0
  16. package/src/core/db/seed-templates.ts +46 -11
  17. package/src/core/db/verify.ts +2 -2
  18. package/src/core/db/version.ts +5 -1
  19. package/src/modules/claim/groupctx.ts +1 -1
  20. package/src/modules/claim/host.ts +5 -5
  21. package/src/modules/goals/plugins/timegoal-task-store.ts +1 -1
  22. package/src/modules/localtask/actions/_manifest.generated.ts +3 -0
  23. package/src/modules/localtask/actions/localtask-boardtasks.ts +39 -39
  24. package/src/modules/localtask/actions/localtask-reopen.ts +5 -0
  25. package/src/modules/localtask/actions/localtask-sync-queues.ts +35 -0
  26. package/src/modules/localtask/actions/localtask-tasks.ts +3 -2
  27. package/src/modules/localtask/actions/localtask-update.ts +6 -0
  28. package/src/modules/localtask/infra/repo/goals.ts +2 -2
  29. package/src/modules/localtask/infra/repo/links.ts +1 -1
  30. package/src/modules/localtask/infra/repo/rows.ts +16 -0
  31. package/src/modules/localtask/infra/repo/tasks.ts +45 -41
  32. package/src/modules/localtask/infra/repo/topics.ts +61 -4
  33. package/src/modules/localtask/lifecycle/add.ts +15 -23
  34. package/src/modules/localtask/lifecycle/task-lifecycle.ts +7 -7
  35. package/src/modules/localtask/lifecycle/task-ops.ts +22 -11
  36. package/src/modules/localtask/lifecycle/task-view.ts +17 -11
  37. package/src/modules/localtask/lifecycle/topics.ts +79 -3
  38. package/src/modules/localtask/lifecycle/update.ts +28 -29
  39. package/src/modules/localtask/ops/attach-resource.ts +3 -4
  40. package/src/modules/localtask/ops/attach.ts +2 -2
  41. package/src/modules/localtask/ops/board-target.ts +8 -28
  42. package/src/modules/repos/actions/board-add.ts +5 -1
  43. package/src/modules/repos/actions/board-assign.ts +5 -1
  44. package/src/modules/repos/actions/board-remove.ts +5 -1
  45. package/src/modules/repos/actions/repo-add.ts +5 -1
  46. package/src/modules/repos/actions/repo-update.ts +5 -1
  47. package/src/modules/repos/boards/transfer.ts +3 -2
  48. package/src/modules/repos/orchestrate.ts +17 -0
  49. package/src/modules/repos/transfer/export.ts +24 -18
  50. package/src/modules/templates/actions/template-update.ts +1 -1
  51. package/src/modules/templates/service.ts +3 -0
  52. package/src/web/frontend/api/cli-tree.json +16 -1
  53. package/src/web/frontend/api/client.generated.ts +11 -3
  54. package/src/web/frontend/components/Introduction/style.css +1 -1
  55. package/src/web/frontend/components/layout/vsc-crumbs-model.ts +16 -8
  56. package/src/web/frontend/components/layout/vsc-crumbs.css +9 -16
  57. package/src/web/frontend/components/layout/vsc-crumbs.tsx +63 -57
  58. package/src/web/frontend/components/md/panes/live-block.tsx +3 -11
  59. package/src/web/frontend/components/md/panes/md-panes-keys.ts +1 -2
  60. package/src/web/frontend/components/md/panes/md-panes.tsx +2 -4
  61. package/src/web/frontend/components/popup/index.tsx +17 -3
  62. package/src/web/frontend/components/popup/style.css +9 -0
  63. package/src/web/frontend/components/sidebar/model.ts +2 -2
  64. package/src/web/frontend/components/tool-acts/modules.ts +1 -0
  65. package/src/web/frontend/modules/md/doc-store.ts +6 -0
  66. package/src/web/frontend/modules/md/md-blocks.ts +4 -43
  67. package/src/web/frontend/modules/md/md-parse.ts +2 -5
  68. package/src/web/frontend/modules/md/md-render.ts +2 -2
  69. package/src/web/frontend/modules/md/styles/docs.css +1 -1
  70. package/src/web/frontend/modules/prompts/template-preview.ts +5 -6
  71. package/src/web/frontend/page/dag/index.tsx +6 -5
  72. package/src/web/frontend/page/dir/task-actions.ts +16 -13
  73. package/src/web/frontend/page/dir/task-beside.ts +10 -20
  74. package/src/web/frontend/page/dir/task-board-section.tsx +3 -5
  75. package/src/web/frontend/page/dir/task-derived-ctx.ts +10 -5
  76. package/src/web/frontend/page/dir/task-utils.ts +9 -1
  77. package/src/web/frontend/page/dir/task.tsx +4 -4
  78. package/src/web/frontend/page/group/index.tsx +8 -8
  79. package/src/web/frontend/page/progress/index.tsx +7 -11
  80. package/src/web/frontend/page/repos/api.ts +5 -0
  81. package/src/web/frontend/page/repos/index.tsx +12 -1
  82. package/src/web/frontend/page/templates/index.tsx +9 -0
  83. package/src/web/frontend/page/templates/template-list.tsx +2 -1
  84. package/src/web/frontend/styles/base.css +1 -1
  85. package/src/web/frontend/styles/bindings.css +1 -1
  86. package/src/web/public/assets/app-context-DPFYOrgE.js +1 -0
  87. package/src/web/public/assets/{bar-DEY9q8mI.js → bar-I4qGaKTO.js} +1 -1
  88. package/src/web/public/assets/board-view-jt8QixVg.js +1 -0
  89. package/src/web/public/assets/{button-BRGGaUcY.js → button-VP4pjVsx.js} +1 -1
  90. package/src/web/public/assets/{composer-launch-DEHhs8k_.js → composer-launch-BL344XZg.js} +1 -1
  91. package/src/web/public/assets/composer-panel-D0ojgf7z.js +1 -0
  92. package/src/web/public/assets/dag-BY0lf-Nl.js +1 -0
  93. package/src/web/public/assets/{dir-C8HhVpFz.js → dir-BNHyviHQ.js} +1 -1
  94. package/src/web/public/assets/{doc-DgYKv2wo.css → doc-Ka-2V5jn.css} +1 -1
  95. package/src/web/public/assets/doc-wmc4swmo.js +6 -0
  96. package/src/web/public/assets/group-BSQ9_Gjs.js +1 -0
  97. package/src/web/public/assets/index-D2P-v30u.js +3 -0
  98. package/src/web/public/assets/{index-CUnLXQWJ.css → index-DHLeXl42.css} +1 -1
  99. package/src/web/public/assets/md-history-D0bYVPZY.js +47 -0
  100. package/src/web/public/assets/md-parse-BjzYV8n7.js +6 -0
  101. package/src/web/public/assets/{member-picker-BJ-Ucm-9.js → member-picker-BtWykPer.js} +1 -1
  102. package/src/web/public/assets/{popup-BdVXUaJk.js → popup-DLfU1TXG.js} +1 -1
  103. package/src/web/public/assets/{popup-CHK8uSG4.css → popup-DzBICcYS.css} +1 -1
  104. package/src/web/public/assets/progress-CQAvP9-n.js +3 -0
  105. package/src/web/public/assets/{refs-Cb9pmVsb.js → refs-Cf4ZbAra.js} +1 -1
  106. package/src/web/public/assets/{reopen-text-C3dnqygC.js → reopen-text-D0eQ2XAC.js} +1 -1
  107. package/src/web/public/assets/repo-form-modal-BahZhXq3.js +1 -0
  108. package/src/web/public/assets/repos-C2cZtRFo.js +12 -0
  109. package/src/web/public/assets/{route-crumb-DvXzznKm.js → route-crumb-DS76cmRK.js} +1 -1
  110. package/src/web/public/assets/{settings-BiqKrd8o.js → settings-C_VmzG7F.js} +1 -1
  111. package/src/web/public/assets/task-C4Sqe4vT.js +14 -0
  112. package/src/web/public/assets/{task-j7fMfJUp.css → task-Dcd2eA8B.css} +1 -1
  113. package/src/web/public/assets/task-ops-SFagO-OC.js +2 -0
  114. package/src/web/public/assets/task-utils-Y-j-zi8J.js +1 -0
  115. package/src/web/public/assets/template-preview-EM3OQ1Rc.js +1 -0
  116. package/src/web/public/assets/templates-B8jnGSAl.js +10 -0
  117. package/src/web/public/assets/{tool-bar-CAMqYt5j.js → tool-bar-NHeX0Kmo.js} +2 -2
  118. package/src/web/public/assets/use-rail-drag-CtZxisjE.js +1 -0
  119. package/src/web/public/index.html +15 -15
  120. package/src/shared/frontmatter.ts +0 -107
  121. package/src/web/public/assets/app-context-KCsdqNTq.js +0 -1
  122. package/src/web/public/assets/board-view-C8OQhkyi.js +0 -1
  123. package/src/web/public/assets/composer-panel-Cke_nbex.js +0 -1
  124. package/src/web/public/assets/dag-BvkJhdpX.js +0 -1
  125. package/src/web/public/assets/doc-R8KHVCxp.js +0 -6
  126. package/src/web/public/assets/group-d9wqo1pL.js +0 -1
  127. package/src/web/public/assets/index-DqTSNBzX.js +0 -3
  128. package/src/web/public/assets/md-history-BR2jLhFQ.js +0 -47
  129. package/src/web/public/assets/progress-CLSIX544.js +0 -3
  130. package/src/web/public/assets/repo-form-modal-awEPCcJK.js +0 -1
  131. package/src/web/public/assets/repos-CIgKjolu.js +0 -12
  132. package/src/web/public/assets/task-C664y4Vd.js +0 -14
  133. package/src/web/public/assets/task-ops-D8L16-TP.js +0 -2
  134. package/src/web/public/assets/task-status-Cjsm0xF7.js +0 -7
  135. package/src/web/public/assets/task-utils-Dh33OFKe.js +0 -1
  136. package/src/web/public/assets/template-preview-CjQ-ucPt.js +0 -1
  137. package/src/web/public/assets/templates-BZ1EM7W4.js +0 -10
  138. package/src/web/public/assets/use-rail-drag-C3GpkThI.js +0 -1
@@ -88,7 +88,10 @@ const deriveKeyOf = (r: RepoEntry): string => service.deriveKey(r);
88
88
  export async function repoExport({ repoKeys, boardKeys, includeUnassigned = true }: RepoExportOptions = {}): Promise<ExportLayout> {
89
89
  const s: Store = await service.loadStore();
90
90
  const warnings: string[] = [];
91
- const keyOf = new Map<string, string>(s.repos.map((r): [string, string] => [r.id, service.deriveKey(r)]));
91
+ // 每行的 key 按行现算(deriveKey 只读行自身)。**不能用行 id 建 Map 索引**:
92
+ // id 来自 ext.legacy_id,自动登记/新登记的行没有它 → 多行 id 同时是 '',
93
+ // Map 互相覆盖会让所有无 id 行拿到同一条 key(#200 发版被 smoke 抓到的真 bug)。
94
+ const keyOfRow = deriveKeyOf;
92
95
  // 看板用**冻结 key**(库里落库的那个;改名过的组不随名字漂)
93
96
  const boardKeyOf = new Map<string, string>(s.boards.map((b): [string, string] => [b.id, service.storedBoardKey(b)]));
94
97
 
@@ -99,29 +102,32 @@ export async function repoExport({ repoKeys, boardKeys, includeUnassigned = true
99
102
  const memberKeysOf = (b: BoardEntry) => service.boardRepoKeys(b, s);
100
103
  const inAnyBoard = new Set(s.boards.flatMap(memberKeysOf));
101
104
  const selectedBoards = s.boards.filter((b) => wantBoard(boardKeyOf.get(b.id)!));
102
- // 选中的仓库 = 直接指定的 + 选中看板的成员 + (可选)未分组仓库
103
- const selectedIds = new Set<string>();
104
- for (const r of s.repos) {
105
- if (!wantRepo(keyOf.get(r.id)!)) continue;
106
- if (repoKeys?.length) selectedIds.add(r.id);
107
- }
105
+ // 选中的仓库 = 直接指定的 + 选中看板的成员 + (可选)未分组仓库。
106
+ // 用**数组下标**做选中标记:行 id 可能缺省(见上),不能当唯一键。
107
+ const selected = new Set<number>();
108
+ s.repos.forEach((r, idx) => {
109
+ if (wantRepo(keyOfRow(r))) selected.add(idx);
110
+ });
108
111
  for (const b of selectedBoards) {
109
112
  for (const k of memberKeysOf(b)) {
110
- const hit = s.repos.find((r) => deriveKeyOf(r) === k);
111
- if (hit) selectedIds.add(hit.id);
113
+ s.repos.forEach((r, idx) => {
114
+ if (deriveKeyOf(r) === k) selected.add(idx);
115
+ });
112
116
  }
113
117
  }
114
118
  if (includeUnassigned && !repoKeys?.length && !boardKeys?.length) {
115
- for (const r of s.repos) if (!inAnyBoard.has(deriveKeyOf(r))) selectedIds.add(r.id);
119
+ s.repos.forEach((r, idx) => {
120
+ if (!inAnyBoard.has(deriveKeyOf(r))) selected.add(idx);
121
+ });
116
122
  }
117
123
 
118
124
  const repos: ExportRepoEntry[] = [];
119
- for (const r of s.repos) {
120
- if (!selectedIds.has(r.id)) continue;
121
- const k = keyOf.get(r.id);
125
+ s.repos.forEach((r, idx) => {
126
+ if (!selected.has(idx)) return;
127
+ const k = keyOfRow(r);
122
128
  if (!k) {
123
129
  warnings.push(`仓库「${r.name}」没有可用的 key —— 已跳过(先 repo key refresh 或 repo key set)`);
124
- continue;
130
+ return;
125
131
  }
126
132
  const entry: ExportRepoEntry = {
127
133
  key: k,
@@ -148,7 +154,7 @@ export async function repoExport({ repoKeys, boardKeys, includeUnassigned = true
148
154
  warnings.push(`开发仓库「${r.name}」没有远程地址 —— 导入端只能按 key 登记,无法 clone`);
149
155
  }
150
156
  repos.push(entry);
151
- }
157
+ });
152
158
 
153
159
  const boardsOut: ExportBoardEntry[] = selectedBoards.map((b) => {
154
160
  const entry: ExportBoardEntry = {
@@ -188,9 +194,9 @@ export async function repoExport({ repoKeys, boardKeys, includeUnassigned = true
188
194
  const bkey = boardKeyOf.get(b.id);
189
195
  if (!bkey || !wantBoard(bkey)) continue;
190
196
  for (const l of Array.isArray(b.refs) ? b.refs : []) {
191
- const r = s.repos.find((x) => keyOf.get(x.id) === l.id);
197
+ const r = s.repos.find((x) => keyOfRow(x) === l.id);
192
198
  if (!r) continue;
193
- const rk = keyOf.get(r.id);
199
+ const rk = keyOfRow(r);
194
200
  if (!rk || !selectedKeySet.has(rk)) continue;
195
201
  let hit = links.find((x) => x.ref === rk);
196
202
  if (!hit) {
@@ -203,7 +209,7 @@ export async function repoExport({ repoKeys, boardKeys, includeUnassigned = true
203
209
  // 仓库级直接绑定:dev 的 linked({kind:'ref'})→ to 里追加 {repo}
204
210
  for (const d of s.repos) {
205
211
  if ((d.type || 'dev') === 'ref') continue;
206
- const dk = keyOf.get(d.id);
212
+ const dk = keyOfRow(d);
207
213
  if (!dk || !selectedKeySet.has(dk)) continue;
208
214
  for (const l of Array.isArray(d.linked) ? d.linked : []) {
209
215
  if (!l || l.kind !== 'ref') continue;
@@ -24,7 +24,7 @@ export class TemplateUpdateAction extends ActionBase<typeof input> {
24
24
  id: 'template.update',
25
25
  cli: ['template', 'update'],
26
26
  http: ['PATCH', '/api/templates/:id'],
27
- summary: '编辑任务模板(--name 改名 / --body 改正文 / --scope 改可见域,只改传入项;多行正文用 --body-file;内置模板的正文也可改)',
27
+ summary: '编辑任务模板(--name 改名 / --body 改正文 / --scope 改可见域,只改传入项;多行正文用 --body-file;内置模板不可改,出厂正文随版本升级自动覆盖)',
28
28
  args: ['id'],
29
29
  input,
30
30
  render: (d: any) => `已更新模板「${d.template.name}」(${d.template.id})`,
@@ -331,6 +331,9 @@ export async function updateTemplate({ id, name: rawName, body: rawBody, bodyFil
331
331
  return repo.txw((conn) => {
332
332
  const row = repo.templates.getRow(want, conn);
333
333
  if (!row) throw notFound(`没有 id 为 ${want} 的模板(template list 可查)`);
334
+ // #195:内置模板不允许修改——出厂正文由 seed 统一覆盖升级(INSERT ... DO UPDATE)。
335
+ // 放开通改会出现「用户改过的 builtin 下次开库又被覆盖」的错觉,索性从入口挡住。
336
+ if (row.builtin) throw badInput('内置模板不可修改(出厂正文随版本升级自动覆盖);要定制请新建一条自己的模板');
334
337
  const patch: any = {};
335
338
  if (rawName !== undefined) patch.name = normalizeName(rawName);
336
339
  if (bodyIn !== undefined) patch.body = normalizeBody(bodyIn);
@@ -1514,6 +1514,21 @@
1514
1514
  },
1515
1515
  "children": []
1516
1516
  },
1517
+ {
1518
+ "name": "sync-queues",
1519
+ "path": [
1520
+ "localtask",
1521
+ "sync-queues"
1522
+ ],
1523
+ "action": {
1524
+ "id": "localtask.sync-queues",
1525
+ "module": "localtask",
1526
+ "summary": "补齐仓库 / 组缺的队列 topic(幂等,只补不删)——仓库管理页的「刷新队列」与编排后自动刷新走它",
1527
+ "usage": "localtask sync-queues",
1528
+ "http": "POST /api/localtask/queues/sync"
1529
+ },
1530
+ "children": []
1531
+ },
1517
1532
  {
1518
1533
  "name": "task",
1519
1534
  "path": [
@@ -1766,7 +1781,7 @@
1766
1781
  "action": {
1767
1782
  "id": "template.update",
1768
1783
  "module": "templates",
1769
- "summary": "编辑任务模板(--name 改名 / --body 改正文 / --scope 改可见域,只改传入项;多行正文用 --body-file;内置模板的正文也可改)",
1784
+ "summary": "编辑任务模板(--name 改名 / --body 改正文 / --scope 改可见域,只改传入项;多行正文用 --body-file;内置模板不可改,出厂正文随版本升级自动覆盖)",
1770
1785
  "usage": "template update",
1771
1786
  "http": "PATCH /api/templates/:id"
1772
1787
  },
@@ -83,6 +83,7 @@ import type {
83
83
  LocaltaskReopenAction,
84
84
  LocaltaskReorderAction,
85
85
  LocaltaskShowAction,
86
+ LocaltaskSyncQueuesAction,
86
87
  LocaltaskTaskRestoreAction,
87
88
  LocaltaskTasksAction,
88
89
  LocaltaskTimegoalLogAction,
@@ -344,6 +345,8 @@ export interface ApiClient {
344
345
  reorder(input: z.input<InstanceType<typeof LocaltaskReorderAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof LocaltaskReorderAction>['run']>>>;
345
346
  /** 查看单条任务(按 --id,定位到 --cwd 主题或 --key);正文引用附件时带附件清单与本地路径(自动下载跟随本机设置) */
346
347
  show(input: z.input<InstanceType<typeof LocaltaskShowAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof LocaltaskShowAction>['run']>>>;
348
+ /** 补齐仓库 / 组缺的队列 topic(幂等,只补不删)——仓库管理页的「刷新队列」与编排后自动刷新走它 */
349
+ syncQueues(): Promise<Awaited<ReturnType<InstanceType<typeof LocaltaskSyncQueuesAction>['run']>>>;
347
350
  /** 恢复一条被删除(软删除)的任务(撤销删除) */
348
351
  restore(input: z.input<InstanceType<typeof LocaltaskTaskRestoreAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof LocaltaskTaskRestoreAction>['run']>>>;
349
352
  /** 看一个主题的任务清单(按 --key 或 --cwd 定位):--q 关键字过滤、--limit 只取最新 N 条(时间倒序);只回列表字段(含各时间戳/轮次/总结),不含正文 */
@@ -372,7 +375,7 @@ export interface ApiClient {
372
375
  templateRemove(input: z.input<InstanceType<typeof TemplateRemoveAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof TemplateRemoveAction>['run']>>>;
373
376
  /** 调整任务模板顺序(--ids a,b,c 按新序落库 sort_order;未列出的模板保持原位) */
374
377
  templateReorder(input: z.input<InstanceType<typeof TemplateReorderAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof TemplateReorderAction>['run']>>>;
375
- /** 编辑任务模板(--name 改名 / --body 改正文 / --scope 改可见域,只改传入项;多行正文用 --body-file;内置模板的正文也可改) */
378
+ /** 编辑任务模板(--name 改名 / --body 改正文 / --scope 改可见域,只改传入项;多行正文用 --body-file;内置模板不可改,出厂正文随版本升级自动覆盖) */
376
379
  templateUpdate(input: z.input<InstanceType<typeof TemplateUpdateAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof TemplateUpdateAction>['run']>>>;
377
380
  /** 时间运算 + 原文回显 prompt + 写入一次状态日志;每次必须提供当前现状 --summary */
378
381
  timegoalCheck(input: z.input<InstanceType<typeof TimegoalCheckAction>['_input']>): Promise<Awaited<ReturnType<InstanceType<typeof TimegoalCheckAction>['run']>>>;
@@ -1085,7 +1088,7 @@ export function createApiClient(transport: Transport): ApiClient {
1085
1088
  async reopen(input: z.input<InstanceType<typeof LocaltaskReopenAction>['_input']>) {
1086
1089
  const inp = input ?? ({} as z.input<InstanceType<typeof LocaltaskReopenAction>['_input']>);
1087
1090
  const path = `/api/localtasks/reopen`;
1088
- const body = { "id": inp["id"], "cwd": inp["cwd"], "key": inp["key"], "text": inp["text"], "kind": inp["kind"], "quote": inp["quote"], "feedback": inp["feedback"], "feedbackHeading": inp["feedbackHeading"], "feedbackBold": inp["feedbackBold"] };
1091
+ const body = { "id": inp["id"], "cwd": inp["cwd"], "key": inp["key"], "text": inp["text"], "kind": inp["kind"], "quote": inp["quote"], "feedback": inp["feedback"], "feedbackHeading": inp["feedbackHeading"], "feedbackBold": inp["feedbackBold"], "project": inp["project"], "board": inp["board"] };
1089
1092
  return (await transport.request("POST", path, body)) as Awaited<ReturnType<InstanceType<typeof LocaltaskReopenAction>['run']>>;
1090
1093
  },
1091
1094
  // action: localtask.reorder
@@ -1107,6 +1110,11 @@ export function createApiClient(transport: Transport): ApiClient {
1107
1110
  if (query) path += path.includes('?') ? '&' + query : '?' + query;
1108
1111
  return (await transport.request("GET", path)) as Awaited<ReturnType<InstanceType<typeof LocaltaskShowAction>['run']>>;
1109
1112
  },
1113
+ // action: localtask.sync-queues
1114
+ async syncQueues() {
1115
+ const path = `/api/localtask/queues/sync`;
1116
+ return (await transport.request("POST", path, undefined)) as Awaited<ReturnType<InstanceType<typeof LocaltaskSyncQueuesAction>['run']>>;
1117
+ },
1110
1118
  // action: localtask.task.restore
1111
1119
  async restore(input: z.input<InstanceType<typeof LocaltaskTaskRestoreAction>['_input']>) {
1112
1120
  const inp = input ?? ({} as z.input<InstanceType<typeof LocaltaskTaskRestoreAction>['_input']>);
@@ -1165,7 +1173,7 @@ export function createApiClient(transport: Transport): ApiClient {
1165
1173
  async localtaskUpdate(input: z.input<InstanceType<typeof LocaltaskUpdateAction>['_input']>) {
1166
1174
  const inp = input ?? ({} as z.input<InstanceType<typeof LocaltaskUpdateAction>['_input']>);
1167
1175
  const path = `/api/localtasks/item`;
1168
- const body = { "id": inp["id"], "text": inp["text"], "cwd": inp["cwd"], "key": inp["key"], "duration": inp["duration"], "goal-prompt": inp["goal-prompt"], "goalPrompt": inp["goalPrompt"], "clear-goal": inp["clear-goal"], "clearGoal": inp["clearGoal"], "block-by": inp["block-by"], "blockBy": inp["blockBy"], "clear-block-by": inp["clear-block-by"], "clearBlockBy": inp["clearBlockBy"], "gate": inp["gate"] };
1176
+ const body = { "id": inp["id"], "text": inp["text"], "cwd": inp["cwd"], "key": inp["key"], "duration": inp["duration"], "goal-prompt": inp["goal-prompt"], "goalPrompt": inp["goalPrompt"], "clear-goal": inp["clear-goal"], "clearGoal": inp["clearGoal"], "block-by": inp["block-by"], "blockBy": inp["blockBy"], "clear-block-by": inp["clear-block-by"], "clearBlockBy": inp["clearBlockBy"], "gate": inp["gate"], "project": inp["project"], "board": inp["board"] };
1169
1177
  return (await transport.request("PATCH", path, body)) as Awaited<ReturnType<InstanceType<typeof LocaltaskUpdateAction>['run']>>;
1170
1178
  },
1171
1179
  // action: localtask.get
@@ -3,7 +3,7 @@
3
3
  .nx-intro{
4
4
  border:1px solid var(--line,#E4E2DC);
5
5
  border-radius:8px;
6
- background:#FBFAF8;
6
+ background:#f9f8f7;
7
7
  margin:0 0 12px;
8
8
  }
9
9
  .nx-intro-head{
@@ -21,11 +21,13 @@ const findGroupTaskBridge = findGroupTask as unknown as (
21
21
  taskId: string | number,
22
22
  ) => { board?: BoardRow | null; topic?: LocalTopic | null; taskRow?: LocalTask | null };
23
23
 
24
- /** 同级下拉的一项:hash 直跳;nsId 特殊(先切侧栏命名空间再落它的首个成员页)。 */
24
+ /** 同级下拉的一项:hash 直跳;nsId 特殊(先切侧栏命名空间再落它的首个成员页)。
25
+ taskId = 任务段下拉的任务条目(#261:hover 双按钮用——复制该任务路径 / 旁路预览)。 */
25
26
  export interface VscSibling {
26
27
  label: string;
27
28
  hash: string;
28
29
  nsId?: string;
30
+ taskId?: string;
29
31
  note?: string;
30
32
  }
31
33
 
@@ -195,6 +197,7 @@ export function vscTrailOf(
195
197
  taskSiblings.push({
196
198
  label: '#' + String(t.id) + statusNote(t),
197
199
  hash: anchor + '?task=' + encodeURIComponent(String(t.id)),
200
+ taskId: String(t.id),
198
201
  });
199
202
  }
200
203
  }
@@ -219,14 +222,19 @@ export function vscTrailOf(
219
222
  };
220
223
  }
221
224
 
222
- /** 复制内容(#254 偏好两态)。draft 无任务号:两种偏好都退回原始路径。 */
223
- export function copyPayloadOf(trail: VscTrail, style: 'raw' | 'prompt' | undefined): string {
224
- const base = trail.cwd || trail.dirName;
225
- const raw = base + (trail.taskId ? ' #' + trail.taskId : ' (draft)');
226
- if (style !== 'prompt' || !trail.taskId) return raw;
225
+ /** 单个任务的复制载荷(#261:下拉任务条目 hover 复制用;draft 无任务号退回原始路径)。 */
226
+ export function taskCopyPayload(cwd: string, dirName: string, taskId: string, style: 'raw' | 'prompt' | undefined): string {
227
+ const base = cwd || dirName;
228
+ if (!taskId) return base + ' (draft)';
229
+ if (style !== 'prompt') return base + ' #' + taskId;
227
230
  return [
228
- `任务 #${trail.taskId} 在队列「${trail.dirName}」(cwd:${base})`,
229
- `查看:nx-kv localtask show --id ${trail.taskId} --cwd "${base}" --json`,
231
+ `任务 #${taskId} 在队列「${dirName}」(cwd:${base})`,
232
+ `查看:nx-kv localtask show --id ${taskId} --cwd "${base}" --json`,
230
233
  `领取处理:nx-kv localtask get --cwd "${base}" --json`,
231
234
  ].join('\n');
232
235
  }
236
+
237
+ /** 复制内容(#254 偏好两态)——当前任务即 trail 上的 taskCopyPayload。 */
238
+ export function copyPayloadOf(trail: VscTrail, style: 'raw' | 'prompt' | undefined): string {
239
+ return taskCopyPayload(trail.cwd, trail.dirName, trail.taskId, style);
240
+ }
@@ -54,33 +54,26 @@
54
54
  color: var(--ink, #16181c);
55
55
  font-weight: 600;
56
56
  }
57
- /* 任务段 hover 的两个 icon btn(#259:复制路径 + 预览原文)——平时隐身,
58
- 悬浮任务段(或键盘聚焦其按钮)才亮 */
59
- .vsc-acts {
60
- flex: none;
61
- display: inline-flex;
62
- align-items: center;
63
- gap: 1px;
64
- opacity: 0;
65
- transition: opacity 0.12s;
66
- }
67
- .vsc-crumb.is-cur:hover .vsc-acts,
68
- .vsc-acts:focus-within {
69
- opacity: 1;
70
- }
57
+ /* 复制钮:悬浮整行(或键盘聚焦)才亮——复制当前任务的路径 + 任务号(偏好两态) */
71
58
  .vsc-copy {
72
59
  flex: none;
73
60
  border: 0;
74
61
  background: none;
75
62
  cursor: pointer;
76
63
  color: var(--mid, #838a93);
77
- width: 22px;
78
- height: 22px;
64
+ width: 24px;
65
+ height: 24px;
79
66
  border-radius: 6px;
80
67
  display: inline-flex;
81
68
  align-items: center;
82
69
  justify-content: center;
83
70
  padding: 0;
71
+ opacity: 0;
72
+ transition: opacity 0.12s;
73
+ }
74
+ .vsc-crumbs:hover .vsc-copy,
75
+ .vsc-copy:focus-visible {
76
+ opacity: 1;
84
77
  }
85
78
  .vsc-copy:hover {
86
79
  background: var(--soft, #f1f0ec);
@@ -1,6 +1,7 @@
1
- // VS Code 式面包屑(任务页顶条,#254/#259):段间「>」分隔、点段弹同级下拉(定宽 150、
2
- // 超高容器内滚);悬浮任务段亮出**两个** icon btn——复制(路径复制偏好两态)与预览
3
- // (打开旁路原文子侧边栏,onPreview 由宿主任务页给)。
1
+ // VS Code 式面包屑(任务页顶条,#254/#259/#261):段间「>」分隔、点段弹同级下拉
2
+ // (定宽 150、超高容器内滚、贴视口夹取);悬浮整行亮出**复制**钮(路径复制偏好两态);
3
+ // 下拉里的**任务条目** hover 亮出双操作——复制该任务路径 + 预览(旁路打开该任务原文,
4
+ // onPreviewTask 由宿主任务页给)。#261 明确:双按钮在下拉条目上,不在当前任务段上。
4
5
  // 旧 RouteBreadcrumb([ 目录 / #N ] 方括号式)继续服务其余页面;任务页只换这条。
5
6
  import { useMemo, useState } from 'react';
6
7
  import { useApp } from '../../app-context.jsx';
@@ -8,8 +9,8 @@ import { PopMenu } from '../popup/index.jsx';
8
9
  import type { PopMenuItem } from '../popup/index.jsx';
9
10
  import { Icon } from '../icons.jsx';
10
11
  import { useToast } from '../toast/index.jsx';
11
- import { copyPayloadOf, nsFirstTargetOf, vscTrailOf } from './vsc-crumbs-model.js';
12
- import type { VscSegment, VscSibling } from './vsc-crumbs-model.js';
12
+ import { copyPayloadOf, nsFirstTargetOf, taskCopyPayload, vscTrailOf } from './vsc-crumbs-model.js';
13
+ import type { VscSegment, VscSibling, VscTrail } from './vsc-crumbs-model.js';
13
14
  import './vsc-crumbs.css';
14
15
 
15
16
  interface MenuState {
@@ -19,11 +20,11 @@ interface MenuState {
19
20
  items: Array<PopMenuItem | string>;
20
21
  }
21
22
 
22
- export default function VscCrumbs({ onPreview }: { onPreview?: (() => void) | null } = {}) {
23
+ export default function VscCrumbs({ onPreviewTask }: { onPreviewTask?: ((taskId: string) => void) | null } = {}) {
23
24
  const app = useApp();
24
25
  const toast = useToast();
25
26
  const [menu, setMenu] = useState<MenuState | null>(null);
26
- const trail = useMemo(
27
+ const trail: VscTrail | null = useMemo(
27
28
  () => vscTrailOf(app.route, app.rows || [], app.repoData || {}, app.prefs || {}),
28
29
  [app.route, app.rows, app.repoData, app.prefs]
29
30
  );
@@ -31,6 +32,15 @@ export default function VscCrumbs({ onPreview }: { onPreview?: (() => void) | nu
31
32
 
32
33
  const style = app.prefs && app.prefs.copyPathStyle === 'prompt' ? 'prompt' : 'raw';
33
34
 
35
+ const copyText = async (text: string, what: string) => {
36
+ try {
37
+ await navigator.clipboard.writeText(text);
38
+ toast(what);
39
+ } catch {
40
+ toast('复制失败:剪贴板不可用');
41
+ }
42
+ };
43
+
34
44
  const openSiblings = (seg: VscSegment, e: { clientX: number; clientY: number }) => {
35
45
  if (!seg.siblings.length) return;
36
46
  setMenu({
@@ -52,20 +62,33 @@ export default function VscCrumbs({ onPreview }: { onPreview?: (() => void) | nu
52
62
  }
53
63
  if (s.hash && app.onNavigate) app.onNavigate(s.hash);
54
64
  },
65
+ // #261 验收:下拉任务条目 hover 出双操作——复制该任务路径 + 预览该任务原文
66
+ hoverActions:
67
+ s.taskId && seg.kind === 'task' ? (
68
+ <>
69
+ <span
70
+ role="button"
71
+ title={style === 'prompt' ? '复制该任务的访问提示词' : '复制该任务的路径 + 任务号'}
72
+ onClick={() =>
73
+ copyText(
74
+ taskCopyPayload(trail.cwd, trail.dirName, s.taskId || '', style),
75
+ style === 'prompt' ? '已复制访问提示词' : '已复制路径'
76
+ )
77
+ }
78
+ >
79
+ <Icon name="copy" size={12} />
80
+ </span>
81
+ {onPreviewTask && (
82
+ <span role="button" title="预览原文(旁路打开)" onClick={() => onPreviewTask(s.taskId || '')}>
83
+ <Icon name="eye" size={12} />
84
+ </span>
85
+ )}
86
+ </>
87
+ ) : undefined,
55
88
  })),
56
89
  });
57
90
  };
58
91
 
59
- const copy = async () => {
60
- const text = copyPayloadOf(trail, style);
61
- try {
62
- await navigator.clipboard.writeText(text);
63
- toast(style === 'prompt' ? '已复制访问提示词' : '已复制路径');
64
- } catch {
65
- toast('复制失败:剪贴板不可用');
66
- }
67
- };
68
-
69
92
  const copyTitle =
70
93
  style === 'prompt'
71
94
  ? '复制访问提示词(CLI 指令 + 引导)——设置 → 偏好可切换为原始路径'
@@ -74,47 +97,30 @@ export default function VscCrumbs({ onPreview }: { onPreview?: (() => void) | nu
74
97
  return (
75
98
  <div className="vsc-crumbs">
76
99
  <nav className="vsc-crumbs-path" aria-label="当前位置">
77
- {trail.segments.map((seg, i) => {
78
- const isCur = i === trail.segments.length - 1;
79
- return (
80
- <span key={seg.kind} className={'vsc-crumb' + (isCur ? ' is-cur' : '')}>
81
- {i > 0 && (
82
- <span className="vsc-sep" aria-hidden>
83
- &gt;
84
- </span>
85
- )}
86
- <button
87
- type="button"
88
- className="vsc-crumb-t"
89
- disabled={!seg.siblings.length}
90
- title={seg.siblings.length ? `显示「${seg.label}」的同级` : seg.label}
91
- onClick={(e) => openSiblings(seg, e)}
92
- >
93
- {seg.label}
94
- </button>
95
- {/* #259 验收:任务段 hover 出两个 icon btn——复制路径 + 预览原文(旁路子侧边栏) */}
96
- {isCur && (
97
- <span className="vsc-acts">
98
- <button type="button" className="vsc-copy" title={copyTitle} aria-label={copyTitle} onClick={copy}>
99
- <Icon name="copy" size={13} />
100
- </button>
101
- {onPreview && (
102
- <button
103
- type="button"
104
- className="vsc-copy"
105
- title="预览原文(旁路打开)"
106
- aria-label="预览原文"
107
- onClick={onPreview}
108
- >
109
- <Icon name="eye" size={13} />
110
- </button>
111
- )}
112
- </span>
113
- )}
114
- </span>
115
- );
116
- })}
100
+ {trail.segments.map((seg, i) => (
101
+ <span key={seg.kind} className={'vsc-crumb' + (i === trail.segments.length - 1 ? ' is-cur' : '')}>
102
+ {i > 0 && (
103
+ <span className="vsc-sep" aria-hidden>
104
+ &gt;
105
+ </span>
106
+ )}
107
+ <button
108
+ type="button"
109
+ className="vsc-crumb-t"
110
+ disabled={!seg.siblings.length}
111
+ title={seg.siblings.length ? `显示「${seg.label}」的同级` : seg.label}
112
+ onClick={(e) => openSiblings(seg, e)}
113
+ >
114
+ {seg.label}
115
+ </button>
116
+ </span>
117
+ ))}
117
118
  </nav>
119
+ {/* #254:悬浮整行亮出复制钮(当前任务的路径 + 任务号,按偏好两态) */}
120
+ <button type="button" className="vsc-copy" title={copyTitle} aria-label={copyTitle}
121
+ onClick={() => copyText(copyPayloadOf(trail, style), style === 'prompt' ? '已复制访问提示词' : '已复制路径')}>
122
+ <Icon name="copy" size={13} />
123
+ </button>
118
124
  {menu && <PopMenu x={menu.x} y={menu.y} width={menu.width} items={menu.items} onClose={() => setMenu(null)} />}
119
125
  </div>
120
126
  );
@@ -8,7 +8,7 @@ import type {
8
8
  ReactNode,
9
9
  } from 'react';
10
10
  import { filesFromDataTransfer, runFormat } from '../../../modules/md/md-edit-ops.js';
11
- import { isEmptyBlock, isFrontmatterBlock, normalizeBlockText } from '../../../modules/md/md-parse.js';
11
+ import { isEmptyBlock, normalizeBlockText } from '../../../modules/md/md-parse.js';
12
12
  import { autoSize, blockHtml, blockKind } from './md-panes-helpers.js';
13
13
  import type { PendingSel } from './md-panes-helpers.js';
14
14
  import type { Attachment } from '../attachments/attach-common.js';
@@ -56,14 +56,8 @@ export default function LiveBlock({
56
56
  }: LiveBlockProps) {
57
57
  const taRef = useRef<HTMLTextAreaElement | null>(null);
58
58
  const display = normalizeBlockText(text);
59
- // frontmatter 块**整体不渲染**(#149):#113 起视图态已渲染为空,但块本身还在——
60
- // 点它/聚焦它仍会开出裸 YAML 编辑框(组草稿首块的 `---\nboard:…\n---` 让人莫名,
61
- // 用户原话「删除这个frontmatter」)。归属语义有页头「归属项目」下拉编辑,
62
- // 源码模式仍可见可改;这里只动渲染层——块数组里 FM 必须保留(commit 按块列表
63
- // 整表回写正文,滤掉会把组语义删没),data-i 坐标也不变(ack 定位轨/块选区共用)。
64
- // ⚠️ 早退必须放在所有 hooks 之后(Rules of Hooks)。
65
- const isFm = isFrontmatterBlock(display);
66
- const html = isFm ? '' : blockHtml(display, attachments);
59
+ // #197:正文不再有 frontmatter 头(归属在库内关联)——FM 块渲染分支已删。
60
+ const html = blockHtml(display, attachments);
67
61
  const kind = blockKind(display);
68
62
 
69
63
  useLayoutEffect(() => {
@@ -95,8 +89,6 @@ export default function LiveBlock({
95
89
  }
96
90
  }, [focused, text, index, pendingSelRef, pendingFormatRef, onTaReady, onChange]);
97
91
 
98
- if (isFm) return null;
99
-
100
92
  // 拖拽落点指示(拖拽排序时由父组件的列表级 dragover 算出)
101
93
  const dropCls = dropEdge ? ` is-drop-${dropEdge}` : '';
102
94
 
@@ -10,7 +10,6 @@ import {
10
10
  } from '../../../modules/md/md-edit-ops.js';
11
11
  import {
12
12
  isEmptyBlock,
13
- isFrontmatterBlock,
14
13
  normalizeBlockText,
15
14
  } from '../../../modules/md/md-parse.js';
16
15
  import type { EditOpResult, PendingSel } from './md-panes-helpers.js';
@@ -75,8 +74,8 @@ export function handleBackspaceStart(ctx: LiveKeyCtx) {
75
74
  }
76
75
  if (
77
76
  ta.selectionStart === 0 && ta.selectionEnd === 0
77
+ // #197:FM 块已不存在,不再需要排除
78
78
  && i > 0 && !slashRef.current
79
- && !isFrontmatterBlock(normalizeBlockText(blocks[i - 1] ?? ''))
80
79
  ) {
81
80
  e.preventDefault();
82
81
  setSlashBoth(null);
@@ -56,7 +56,7 @@ import {
56
56
  runFormat,
57
57
  toggleNthTodo,
58
58
  } from '../../../modules/md/md-edit-ops.js';
59
- import { isFrontmatterBlock, normalizeBlockText } from '../../../modules/md/md-parse.js';
59
+ import { normalizeBlockText } from '../../../modules/md/md-parse.js';
60
60
  import type { Attachment } from '../attachments/attach-common.js';
61
61
 
62
62
  export { MdPanes, ModeSeg } from './md-panes-root.jsx';
@@ -326,13 +326,11 @@ function LivePreview({
326
326
  if (e.key === 'Backspace' && handleBareListEscape(ctx)) return;
327
327
 
328
328
  // Delete 在块尾(无选区、非末块):把下一块并进来,光标落接缝——
329
- // Backspace 并上块的镜像(Notion 行为)。FM 块同理不许被并:
330
- // 合并会把下一块的 `---` 撕碎成普通文本。
329
+ // Backspace 并上块的镜像(Notion 行为)。#197:FM 块已不存在,不再需要排除。
331
330
  if (
332
331
  e.key === 'Delete'
333
332
  && ta.selectionStart === val.length && ta.selectionEnd === val.length
334
333
  && i < blocks.length - 1 && !slashRef.current
335
- && !isFrontmatterBlock(normalizeBlockText(blocks[i + 1] ?? ''))
336
334
  ) {
337
335
  e.preventDefault();
338
336
  setSlashBoth(null);
@@ -202,7 +202,14 @@ export function useDialog(): DialogApi {
202
202
  /** 坐标菜单的一项(`'sep'` 是分隔线)。 */
203
203
  export type PopMenuItem =
204
204
  | 'sep'
205
- | { label: ReactNode; icon?: string; danger?: boolean; onClick?: () => void };
205
+ | {
206
+ label: ReactNode;
207
+ icon?: string;
208
+ danger?: boolean;
209
+ onClick?: () => void;
210
+ /** #261:hover 该项时亮出的行尾操作(如图标按钮);点击不会触发整行 onClick */
211
+ hoverActions?: ReactNode;
212
+ };
206
213
 
207
214
  /** PopMenu 入参。 */
208
215
  export interface PopMenuProps {
@@ -266,10 +273,12 @@ export function PopMenu({ x, y, items, onClose, width }: PopMenuProps) {
266
273
  }
267
274
  }, []);
268
275
 
269
- // 视口内夹取:靠右/靠下时不溢出(坐标缺省按 0,避免 Math.min(undefined) 得 NaN)
276
+ // 视口内夹取:top 不低于视口顶 8px、且至少给菜单留 ~160px 可视(#261:
277
+ // 旧公式 innerHeight − 40 − items×30 在长清单下算出负数,整块菜单被顶出视口上方。
278
+ // 超高内容现在由 .pp-menu 的 max-height + 内部滚动兜底,定位只需保证可见。)
270
279
  const style: CSSProperties = {
271
280
  left: Math.min(x ?? 0, window.innerWidth - 190),
272
- top: Math.min(y ?? 0, window.innerHeight - 40 - items.length * 30),
281
+ top: Math.min(Math.max(y ?? 0, 8), Math.max(8, window.innerHeight - 160)),
273
282
  ...(width ? { width, minWidth: width } : {}),
274
283
  };
275
284
 
@@ -288,6 +297,11 @@ export function PopMenu({ x, y, items, onClose, width }: PopMenuProps) {
288
297
  >
289
298
  {it.icon ? <Icon name={it.icon} /> : null}
290
299
  {it.label}
300
+ {it.hoverActions ? (
301
+ <span className="pp-menu-acts" onClick={(e) => e.stopPropagation()}>
302
+ {it.hoverActions}
303
+ </span>
304
+ ) : null}
291
305
  </button>
292
306
  )
293
307
  )}
@@ -60,9 +60,18 @@
60
60
  .pp-menu-item {
61
61
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 9px; border-radius: 5px;
62
62
  font-family: inherit; font-size: 12.5px; text-align: left; border: 0; background: none; cursor: pointer; color: var(--ink);
63
+ /* #261:定宽下拉(150px)里长标签截断不换行,行尾 hover 操作靠右 */
64
+ white-space: nowrap; overflow: hidden;
63
65
  }
64
66
  .pp-menu-item:hover { background: var(--soft); }
65
67
  .pp-menu-item.danger { color: var(--danger); }
68
+ /* #261:行尾 hover 操作(如图标按钮)——hover 该项才亮,点击不冒泡到整行 */
69
+ .pp-menu-acts { display: none; flex: none; margin-left: auto; gap: 2px; align-items: center; }
70
+ .pp-menu-item:hover .pp-menu-acts { display: inline-flex; }
71
+ .pp-menu-acts > * { display: inline-flex; align-items: center; justify-content: center;
72
+ width: 20px; height: 20px; border: 0; border-radius: 5px; background: none; cursor: pointer;
73
+ color: var(--mid, #838A93); padding: 0; }
74
+ .pp-menu-acts > *:hover { background: rgba(20, 22, 26, 0.08); color: var(--ink, #16181C); }
66
75
  /* 菜单项图标(#144 起 RowMenuItem 支持 icon):图标说类别、文字说动作 */
67
76
  .pp-menu-item-ico { display: inline-flex; flex: none; color: var(--mid); }
68
77
  .pp-menu-item:hover .pp-menu-item-ico,
@@ -9,7 +9,6 @@
9
9
  // 侧边栏只保留**纯 UI 偏好**:排序、隐藏、折叠——它们是显示态,不是数据。
10
10
  //
11
11
  // 「可见序 = 渲染序」是键盘导航的前提:↑↓ 走的就是这份扁平序。
12
- import { stripFrontmatter } from '../../modules/md/md-parse.js';
13
12
  import { projectPending, isPendingRow, taskInBoard } from '../../modules/board/board-view.js';
14
13
  import type { BoardRow, LocalTask, LocalTopic, Prefs, RepoRow } from '../../types.js';
15
14
 
@@ -412,7 +411,8 @@ export function rKey(row: SideRow): string {
412
411
 
413
412
  /** 任务正文抽一行标题(给侧栏子行用);带 frontmatter 的任务先剥掉再取 */
414
413
  export function taskLabel(t: LocalTask | null | undefined): string {
415
- const text = stripFrontmatter(String(t?.text || ''));
414
+ // #197:正文无 frontmatter 头
415
+ const text = String(t?.text || '');
416
416
  const m = text.match(/^#\s+(.+)$/m);
417
417
  if (m && m[1]) return m[1].trim().slice(0, 40);
418
418
  const line = text.split('\n').find((l) => l.trim());
@@ -99,6 +99,7 @@ export const DOC_MODULES: ToolModule[] = [
99
99
  // 次级动作默认收进更多,可在编排里拖上工具栏/调顺序)。
100
100
  export const REPOS_MODULES: ToolModule[] = [
101
101
  { id: 'add', label: '登记仓库', icon: 'plus', section: 'primary', noHide: true },
102
+ { id: 'queues', label: '刷新队列', icon: 'refresh', section: 'bar' },
102
103
  { id: 'more', label: '更多', icon: 'dots', section: 'bar', noHide: true },
103
104
  { id: 'boards', label: '分组管理', icon: 'board', section: 'more', menuGroup: 'manage' },
104
105
  { id: 'refs', label: '参考仓库管理', icon: 'repo-ref', section: 'more', menuGroup: 'manage' },