nx-kv 0.28.0 → 0.32.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 +198 -0
- package/README.md +15 -1
- package/assets/kv-get/SKILL.md +3 -1
- package/assets/kv-get/references/localget.md +4 -3
- package/assets/kv-get/references/timegoal.md +2 -1
- package/assets/kv-get/references/wait-workflow.md +44 -14
- package/assets/kv-get/references/waitloop.md +6 -4
- package/bin/cli.mjs +18 -1
- package/package.json +7 -4
- package/src/core/atomic-file.js +45 -0
- package/src/core/attachmentdb.js +726 -0
- package/src/core/attachstore.js +123 -80
- package/src/core/config.js +83 -13
- package/src/core/db/bootstrap.js +424 -0
- package/src/core/db/driver.js +234 -0
- package/src/core/db/errors.js +144 -0
- package/src/core/db/import-json.js +1224 -0
- package/src/core/db/index.js +122 -0
- package/src/core/db/migrations/index.js +103 -0
- package/src/core/db/migrations/v1.sql +850 -0
- package/src/core/db/migrations/v2-data.js +149 -0
- package/src/core/db/migrations/v2.sql +89 -0
- package/src/core/db/migrator.js +203 -0
- package/src/core/db/quiet.js +19 -0
- package/src/core/db/seed-templates.js +265 -0
- package/src/core/db/settings.js +54 -0
- package/src/core/db/time.js +96 -0
- package/src/core/db/tx.js +188 -0
- package/src/core/db/verify.js +295 -0
- package/src/core/db/version.js +59 -0
- package/src/core/errors.js +7 -0
- package/src/core/instruction-template.js +129 -94
- package/src/core/keys.js +21 -20
- package/src/core/localatt.js +76 -57
- package/src/core/paths.js +39 -2
- package/src/core/topic-key.js +43 -0
- package/src/core/workflow/project.js +3 -2
- package/src/core/workflow/readiness.js +13 -6
- package/src/core/workflow/types.js +6 -5
- package/src/modules/db/index.js +54 -0
- package/src/modules/db/service.js +273 -0
- package/src/modules/docs/brief.js +11 -1
- package/src/modules/docs/index.js +292 -7
- package/src/modules/docs/knowledge.js +8 -1
- package/src/modules/docs/paths.js +2 -1
- package/src/modules/docs/refs.js +1 -1
- package/src/modules/docs/store.js +19 -1
- package/src/modules/file/index.js +20 -0
- package/src/modules/file/service.js +68 -0
- package/src/modules/localtask/deletion.js +14 -10
- package/src/modules/localtask/events.js +16 -7
- package/src/modules/localtask/index.js +161 -81
- package/src/modules/localtask/move-prims.js +68 -38
- package/src/modules/localtask/move.js +1 -1
- package/src/modules/localtask/panel-presence.js +5 -5
- package/src/modules/localtask/paths.js +16 -18
- package/src/modules/localtask/repo/goals.js +154 -0
- package/src/modules/localtask/repo/index.js +42 -0
- package/src/modules/localtask/repo/links.js +136 -0
- package/src/modules/localtask/repo/open.js +71 -0
- package/src/modules/localtask/repo/presence.js +117 -0
- package/src/modules/localtask/repo/rows.js +157 -0
- package/src/modules/localtask/repo/settings.js +384 -0
- package/src/modules/localtask/repo/snapshot.js +154 -0
- package/src/modules/localtask/repo/tasks.js +333 -0
- package/src/modules/localtask/repo/topics.js +293 -0
- package/src/modules/localtask/service.js +15 -0
- package/src/modules/localtask/store/index.js +8 -9
- package/src/modules/localtask/store/topic-adapter.js +8 -43
- package/src/modules/localtask/store-io.js +19 -161
- package/src/modules/localtask/task-lifecycle.js +216 -148
- package/src/modules/localtask/task-ops.js +195 -114
- package/src/modules/localtask/task-remove.js +151 -79
- package/src/modules/localtask/task-templates.js +41 -62
- package/src/modules/localtask/task-view.js +165 -151
- package/src/modules/localtask/topics.js +89 -80
- package/src/modules/localtask/waiters.js +6 -14
- package/src/modules/localtask/waiting.js +31 -44
- package/src/modules/repos/boards.js +44 -14
- package/src/modules/repos/index.js +28 -2
- package/src/modules/repos/keys.js +2 -1
- package/src/modules/repos/ref.js +6 -6
- package/src/modules/repos/repo/index.js +53 -0
- package/src/modules/repos/repo/open.js +84 -0
- package/src/modules/repos/repo/refs.js +165 -0
- package/src/modules/repos/repo/repos.js +177 -0
- package/src/modules/repos/repo/rows.js +174 -0
- package/src/modules/repos/service.js +375 -130
- package/src/modules/repos/transfer.js +43 -14
- package/src/modules/tasktool/attach.js +732 -86
- package/src/modules/tasktool/delivery-template.js +50 -64
- package/src/modules/tasktool/get.js +6 -27
- package/src/modules/tasktool/groupctx.js +5 -2
- package/src/modules/tasktool/plugins/timegoal-store.js +476 -363
- package/src/modules/tasktool/plugins/waitgoal-config.js +1 -1
- package/src/modules/tasktool/preview.js +28 -34
- package/src/modules/tasktool/system-blocks.js +78 -0
- package/src/modules/tasktool/wait.js +113 -125
- package/src/modules/templates/index.js +19 -4
- package/src/modules/templates/repo/index.js +16 -0
- package/src/modules/templates/repo/open.js +65 -0
- package/src/modules/templates/repo/templates.js +133 -0
- package/src/modules/templates/service.js +130 -119
- package/src/runtime/registry.js +2 -1
- package/src/shared/prompt-blocks.js +307 -0
- package/src/shared/repo-key.js +57 -0
- package/src/shared/task-status.js +105 -0
- package/src/web/frontend/App.jsx +78 -45
- package/src/web/frontend/components/Introduction/docs-modal.jsx +306 -0
- package/src/web/frontend/components/Introduction/index.jsx +23 -72
- package/src/web/frontend/components/Introduction/style.css +35 -28
- package/src/web/frontend/components/board/member-picker.jsx +13 -3
- package/src/web/frontend/components/button/index.jsx +91 -0
- package/src/web/frontend/components/button/style.css +45 -0
- package/src/web/frontend/components/doc/doc-head.jsx +110 -0
- package/src/web/frontend/components/layout/breadcrumb.jsx +24 -13
- package/src/web/frontend/components/layout/crumbs.js +22 -0
- package/src/web/frontend/components/layout/route-crumb.jsx +2 -2
- package/src/web/frontend/components/md/attach-area.jsx +307 -0
- package/src/web/frontend/components/md/attach-common.js +95 -0
- package/src/web/frontend/components/md/attach-modal.jsx +387 -0
- package/src/web/frontend/components/md/attach-picker.jsx +274 -0
- package/src/web/frontend/components/md/composer-launch.js +68 -0
- package/src/web/frontend/components/md/composer-panel.jsx +167 -0
- package/src/web/frontend/components/md/md-panes.jsx +337 -46
- package/src/web/frontend/components/md/sel-menu.jsx +37 -210
- package/src/web/frontend/components/md/task-chain.jsx +2 -5
- package/src/web/frontend/components/md/tool-bar.jsx +75 -40
- package/src/web/frontend/components/repos/desc-modal.jsx +1 -1
- package/src/web/frontend/components/repos/transfer-panel.jsx +4 -0
- package/src/web/frontend/components/sidebar/index.jsx +5 -16
- package/src/web/frontend/components/sidebar/panel.jsx +2 -0
- package/src/web/frontend/components/sidebar/task-children.jsx +11 -1
- package/src/web/frontend/modules/board/board-view.js +31 -13
- package/src/web/frontend/modules/md/attach-mention.js +48 -0
- package/src/web/frontend/modules/md/md-edit-ops.js +24 -0
- package/src/web/frontend/modules/md/md-parse.js +40 -10
- package/src/web/frontend/modules/md/style.css +283 -39
- package/src/web/frontend/modules/md/use-templates.js +3 -1
- package/src/web/frontend/modules/prompts/placeholders.js +0 -13
- package/src/web/frontend/modules/prompts/prompt-editor.jsx +12 -111
- package/src/web/frontend/modules/prompts/style.css +0 -14
- package/src/web/frontend/page/dag/index.jsx +3 -1
- package/src/web/frontend/page/dir/deleted-panel.jsx +63 -0
- package/src/web/frontend/page/dir/index.jsx +137 -4
- package/src/web/frontend/page/dir/landing.jsx +136 -8
- package/src/web/frontend/page/dir/task.jsx +153 -83
- package/src/web/frontend/page/doc/index.jsx +150 -19
- package/src/web/frontend/page/group/index.jsx +39 -2
- package/src/web/frontend/page/overview/index.jsx +11 -5
- package/src/web/frontend/page/refs/index.jsx +122 -0
- package/src/web/frontend/page/refs/style.css +41 -0
- package/src/web/frontend/page/repos/index.jsx +565 -161
- package/src/web/frontend/page/settings/index.jsx +133 -105
- package/src/web/frontend/page/settings/prompt-templates-section.jsx +622 -0
- package/src/web/frontend/page/settings/style.css +161 -12
- package/src/web/frontend/page/settings/task-templates-section.jsx +120 -0
- package/src/web/frontend/page/templates/index.jsx +8 -34
- package/src/web/frontend/panels.jsx +24 -0
- package/src/web/frontend/route-map.js +67 -0
- package/src/web/frontend/style-v2.css +45 -19
- package/src/web/frontend/style.css +443 -15
- package/src/web/frontend/workspace/areas.js +3 -0
- package/src/web/frontend/workspace.js +148 -17
- package/src/web/public/assets/Introduction-BcPrmROW.css +1 -0
- package/src/web/public/assets/Introduction-MAkTZvUX.js +1 -0
- package/src/web/public/assets/{attach-v8BxRJ7p.js → attach-Bw0necIf.js} +1 -1
- package/src/web/public/assets/{cloud-DMotpyNl.js → cloud-CG_hgVn9.js} +3 -3
- package/src/web/public/assets/composer-launch-q1uPzWGo.js +1 -0
- package/src/web/public/assets/composer-panel-S2d6A3fG.js +1 -0
- package/src/web/public/assets/dag-CwY66RrZ.js +1 -0
- package/src/web/public/assets/dir-B_ySdQT1.js +5 -0
- package/src/web/public/assets/group-6sWouRDt.js +1 -0
- package/src/web/public/assets/index-DKncYqtS.js +54 -0
- package/src/web/public/assets/index-DO7b1M3E.css +1 -0
- package/src/web/public/assets/{md-edit-ops-BIXUZ5BM.js → md-edit-ops-ZwnwtEax.js} +10 -10
- package/src/web/public/assets/md-history-BxbOQtPI.js +1 -0
- package/src/web/public/assets/md-panes-Cso2NHbG.js +7 -0
- package/src/web/public/assets/member-picker-BpB9ZpWx.js +1 -0
- package/src/web/public/assets/overview-Bo8ivqRU.js +1 -0
- package/src/web/public/assets/{progress-DRI-n9Gb.js → progress-DPkGjn0P.js} +3 -3
- package/src/web/public/assets/refs-CY4i7PoC.css +1 -0
- package/src/web/public/assets/refs-CskU6rI7.js +1 -0
- package/src/web/public/assets/repos-B_tskNGw.js +9 -0
- package/src/web/public/assets/route-crumb-BZ6ffDRj.js +1 -0
- package/src/web/public/assets/settings-BMTd_p9Y.js +7 -0
- package/src/web/public/assets/settings-qCi-niJC.css +1 -0
- package/src/web/public/assets/task-Cs-9RNQn.js +7 -0
- package/src/web/public/assets/task-status-Bgo2Nfiw.js +1 -0
- package/src/web/public/assets/template-editor-CRxfV218.js +1 -0
- package/src/web/public/assets/templates-Apc3JKXa.js +2 -0
- package/src/web/public/assets/{upload-F3aoeT7X.js → upload-C83Bwy06.js} +1 -1
- package/src/web/public/index.html +4 -3
- package/src/core/json-store.js +0 -219
- package/src/web/frontend/modules/prompts/template-slots.jsx +0 -87
- package/src/web/frontend/page/settings/prompts-section.jsx +0 -531
- package/src/web/public/assets/Introduction-9gBNccF6.js +0 -1
- package/src/web/public/assets/Introduction-B4k08SH9.css +0 -1
- package/src/web/public/assets/dag-B9_B7rnK.js +0 -1
- package/src/web/public/assets/dir-DdMpgTHK.js +0 -3
- package/src/web/public/assets/group-BF2tfUqG.js +0 -1
- package/src/web/public/assets/index-BbAo8n1E.js +0 -50
- package/src/web/public/assets/index-DUxHMjZA.css +0 -1
- package/src/web/public/assets/md-history-DunAB9Pp.js +0 -5
- package/src/web/public/assets/member-picker-CD66NFHl.js +0 -1
- package/src/web/public/assets/overview-_Xza9umy.js +0 -1
- package/src/web/public/assets/repos-BfbPRMJ0.js +0 -10
- package/src/web/public/assets/route-crumb-BHjAXhIY.js +0 -1
- package/src/web/public/assets/settings-CVOnFmxp.js +0 -12
- package/src/web/public/assets/settings-knWtG9Kc.css +0 -1
- package/src/web/public/assets/task-Nw-0PEB4.js +0 -7
- package/src/web/public/assets/template-slots-UVa4FnPn.css +0 -1
- package/src/web/public/assets/template-slots-bXUEg7EO.js +0 -1
- package/src/web/public/assets/templates-cWbR2cCh.js +0 -2
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* 划选浮层:格式条 + 「评论 / 复制」。
|
|
3
|
+
*
|
|
4
|
+
* #104:原先这里还带一套「撰写中」形态(浮层里直接展开一个 textarea 写评论
|
|
5
|
+
* 或反馈)——用户口径是「评论和反馈不该是输入框弹窗,要新开一个 md 编辑
|
|
6
|
+
* 页面」,所以撰写态整体移走(见 components/md/composer-panel.jsx)。这里只
|
|
7
|
+
* 留**动作条**:格式按钮 / 复制 / 评论(点评论 → 打开那块 md 编辑面板)。
|
|
8
|
+
*/
|
|
4
9
|
|
|
5
10
|
const FMT = [
|
|
6
11
|
{ op: 'bold', label: 'B', title: '粗体', cls: 'b' },
|
|
@@ -9,117 +14,20 @@ const FMT = [
|
|
|
9
14
|
{ op: 'link', label: '链', title: '链接', cls: 'link' },
|
|
10
15
|
];
|
|
11
16
|
|
|
12
|
-
function clipboardFiles(e) {
|
|
13
|
-
const out = [];
|
|
14
|
-
const cd = e.clipboardData;
|
|
15
|
-
if (!cd) return out;
|
|
16
|
-
if (cd.files?.length) {
|
|
17
|
-
for (const f of cd.files) out.push(f);
|
|
18
|
-
}
|
|
19
|
-
if (!out.length && cd.items?.length) {
|
|
20
|
-
for (const it of cd.items) {
|
|
21
|
-
if (it.kind === 'file') {
|
|
22
|
-
const f = it.getAsFile();
|
|
23
|
-
if (f) out.push(f);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return out;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
17
|
export default function SelMenu({
|
|
31
18
|
at,
|
|
32
19
|
onFormat,
|
|
33
|
-
onComment,
|
|
34
20
|
onCopy,
|
|
35
21
|
onCompose,
|
|
36
|
-
onClose,
|
|
37
22
|
}) {
|
|
38
|
-
const [composing, setComposing] = useState(false);
|
|
39
|
-
const [draft, setDraft] = useState('');
|
|
40
|
-
const [pendingAtt, setPendingAtt] = useState({ items: [], inserts: '' });
|
|
41
|
-
const [busy, setBusy] = useState(false);
|
|
42
|
-
const taRef = useRef(null);
|
|
43
|
-
const fileRef = useRef(null);
|
|
44
|
-
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
setComposing(!!at?.comment);
|
|
47
|
-
setDraft('');
|
|
48
|
-
setPendingAtt({ items: [], inserts: '' });
|
|
49
|
-
}, [at?.text, at?.x, at?.y, at?.comment, at?.mode]);
|
|
50
|
-
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
if (!composing) return undefined;
|
|
53
|
-
const id = requestAnimationFrame(() => taRef.current?.focus());
|
|
54
|
-
return () => cancelAnimationFrame(id);
|
|
55
|
-
}, [composing]);
|
|
56
|
-
|
|
57
23
|
if (!at) return null;
|
|
58
24
|
const kind = at.kind || 'task';
|
|
59
25
|
const showFmt = kind === 'format' || kind === 'both';
|
|
60
|
-
const quote = String(at.text || '');
|
|
61
|
-
const quoteShort = quote.length > 72 ? `${quote.slice(0, 72)}…` : quote;
|
|
62
|
-
const isFeedback = at.mode === 'feedback' || at.mode === 'redo';
|
|
63
|
-
const cap = isFeedback ? '反馈:写下要改的地方(将新开任务)' : '划线评论(回写本任务)';
|
|
64
|
-
const canSubmit = !!draft.trim() || pendingAtt.items.length > 0;
|
|
65
|
-
|
|
66
|
-
const startCompose = () => {
|
|
67
|
-
setComposing(true);
|
|
68
|
-
onCompose?.();
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
const cancelCompose = () => {
|
|
72
|
-
setComposing(false);
|
|
73
|
-
setDraft('');
|
|
74
|
-
setPendingAtt({ items: [], inserts: '' });
|
|
75
|
-
onClose?.();
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
const submit = () => {
|
|
79
|
-
if (!canSubmit || busy) return;
|
|
80
|
-
onComment?.({
|
|
81
|
-
text: draft.trim(),
|
|
82
|
-
attachments: pendingAtt.items,
|
|
83
|
-
inserts: pendingAtt.inserts,
|
|
84
|
-
mode: isFeedback ? 'feedback' : 'comment',
|
|
85
|
-
quote,
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
const pickFiles = async (fileList) => {
|
|
90
|
-
if (!fileList?.length) return;
|
|
91
|
-
setBusy(true);
|
|
92
|
-
try {
|
|
93
|
-
const { items, imageInserts, fileInserts } = await filesToAttachments(fileList);
|
|
94
|
-
const inserts = [...(imageInserts || []), ...(fileInserts || [])].join('');
|
|
95
|
-
setPendingAtt((prev) => ({
|
|
96
|
-
items: [...prev.items, ...items],
|
|
97
|
-
inserts: `${prev.inserts}${inserts}`,
|
|
98
|
-
}));
|
|
99
|
-
} finally {
|
|
100
|
-
setBusy(false);
|
|
101
|
-
if (fileRef.current) fileRef.current.value = '';
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
const onPaste = (e) => {
|
|
106
|
-
const files = clipboardFiles(e);
|
|
107
|
-
if (!files.length) return; // 纯文本走默认粘贴
|
|
108
|
-
e.preventDefault();
|
|
109
|
-
pickFiles(files);
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
const onDrop = (e) => {
|
|
113
|
-
e.preventDefault();
|
|
114
|
-
e.stopPropagation();
|
|
115
|
-
const files = [...(e.dataTransfer?.files || [])];
|
|
116
|
-
if (files.length) pickFiles(files);
|
|
117
|
-
};
|
|
118
26
|
|
|
119
27
|
return (
|
|
120
28
|
<div
|
|
121
29
|
id="mdw-sel-menu"
|
|
122
|
-
className={`mdw-sel-menu open kind-${
|
|
30
|
+
className={`mdw-sel-menu open kind-${kind}`}
|
|
123
31
|
style={{ left: at.x, top: at.y }}
|
|
124
32
|
role="menu"
|
|
125
33
|
onMouseDown={(e) => {
|
|
@@ -127,122 +35,41 @@ export default function SelMenu({
|
|
|
127
35
|
e.preventDefault();
|
|
128
36
|
}}
|
|
129
37
|
>
|
|
130
|
-
{
|
|
131
|
-
<div
|
|
132
|
-
|
|
133
|
-
onDragOver={(e) => {
|
|
134
|
-
e.preventDefault();
|
|
135
|
-
e.stopPropagation();
|
|
136
|
-
}}
|
|
137
|
-
onDrop={onDrop}
|
|
138
|
-
>
|
|
139
|
-
<div className="mdw-sel-comment-cap">{cap}</div>
|
|
140
|
-
{quote ? (
|
|
141
|
-
<div className="mdw-sel-quote" title={quote}>{quoteShort}</div>
|
|
142
|
-
) : null}
|
|
143
|
-
<textarea
|
|
144
|
-
ref={taRef}
|
|
145
|
-
className="mdw-sel-comment-ta"
|
|
146
|
-
rows={3}
|
|
147
|
-
value={draft}
|
|
148
|
-
placeholder={isFeedback ? '写下反馈…可粘贴/拖入图片' : '对此处提出问题…可粘贴/拖入图片'}
|
|
149
|
-
aria-label={isFeedback ? '反馈文本' : '评论文本'}
|
|
150
|
-
onChange={(e) => setDraft(e.target.value)}
|
|
151
|
-
onPaste={onPaste}
|
|
152
|
-
onKeyDown={(e) => {
|
|
153
|
-
if (e.key === 'Escape') {
|
|
154
|
-
e.preventDefault();
|
|
155
|
-
e.stopPropagation();
|
|
156
|
-
cancelCompose();
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {
|
|
160
|
-
e.preventDefault();
|
|
161
|
-
submit();
|
|
162
|
-
}
|
|
163
|
-
}}
|
|
164
|
-
/>
|
|
165
|
-
{pendingAtt.items.length ? (
|
|
166
|
-
<div className="mdw-sel-att-list">
|
|
167
|
-
{pendingAtt.items.map((a) => (
|
|
168
|
-
<span key={a.id} className="mdw-sel-att-chip" title={a.name}>
|
|
169
|
-
{a.type === 'image' ? '🖼' : '📎'} {a.name}
|
|
170
|
-
</span>
|
|
171
|
-
))}
|
|
172
|
-
</div>
|
|
173
|
-
) : null}
|
|
174
|
-
<div className="mdw-sel-comment-acts">
|
|
175
|
-
<input
|
|
176
|
-
ref={fileRef}
|
|
177
|
-
type="file"
|
|
178
|
-
multiple
|
|
179
|
-
hidden
|
|
180
|
-
accept="image/*,*/*"
|
|
181
|
-
onChange={(e) => pickFiles(e.target.files)}
|
|
182
|
-
/>
|
|
183
|
-
<button
|
|
184
|
-
type="button"
|
|
185
|
-
className="ghost"
|
|
186
|
-
disabled={busy}
|
|
187
|
-
title="添加图片或附件(也可粘贴/拖入)"
|
|
188
|
-
onClick={() => fileRef.current?.click()}
|
|
189
|
-
>
|
|
190
|
-
{busy ? '上传中…' : '附件'}
|
|
191
|
-
</button>
|
|
192
|
-
<span className="grow" />
|
|
193
|
-
<button type="button" className="ghost" onClick={cancelCompose}>
|
|
194
|
-
取消
|
|
195
|
-
</button>
|
|
38
|
+
{showFmt ? (
|
|
39
|
+
<div className="mdw-sel-fmt" role="group" aria-label="选区格式">
|
|
40
|
+
{FMT.map((f) => (
|
|
196
41
|
<button
|
|
42
|
+
key={f.op}
|
|
197
43
|
type="button"
|
|
198
|
-
className=
|
|
199
|
-
|
|
200
|
-
onClick={
|
|
44
|
+
className={`mdw-sel-fmt-btn ${f.cls}`}
|
|
45
|
+
title={f.title}
|
|
46
|
+
onClick={() => onFormat?.(f.op)}
|
|
201
47
|
>
|
|
202
|
-
{
|
|
48
|
+
{f.label}
|
|
203
49
|
</button>
|
|
204
|
-
|
|
205
|
-
<
|
|
50
|
+
))}
|
|
51
|
+
<span className="mdw-sel-sep" aria-hidden />
|
|
52
|
+
<button type="button" className="mdw-sel-fmt-btn" title="复制" onClick={onCopy}>
|
|
53
|
+
复制
|
|
54
|
+
</button>
|
|
55
|
+
<span className="mdw-sel-sep" aria-hidden />
|
|
56
|
+
<button
|
|
57
|
+
type="button"
|
|
58
|
+
className="mdw-sel-fmt-btn comment"
|
|
59
|
+
title="评论 → 打开 md 编辑面板"
|
|
60
|
+
onClick={() => onCompose?.()}
|
|
61
|
+
>
|
|
62
|
+
评论
|
|
63
|
+
</button>
|
|
206
64
|
</div>
|
|
207
65
|
) : (
|
|
208
66
|
<>
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
className={`mdw-sel-fmt-btn ${f.cls}`}
|
|
216
|
-
title={f.title}
|
|
217
|
-
onClick={() => onFormat?.(f.op)}
|
|
218
|
-
>
|
|
219
|
-
{f.label}
|
|
220
|
-
</button>
|
|
221
|
-
))}
|
|
222
|
-
<span className="mdw-sel-sep" aria-hidden />
|
|
223
|
-
<button type="button" className="mdw-sel-fmt-btn" title="复制" onClick={onCopy}>
|
|
224
|
-
复制
|
|
225
|
-
</button>
|
|
226
|
-
<span className="mdw-sel-sep" aria-hidden />
|
|
227
|
-
<button
|
|
228
|
-
type="button"
|
|
229
|
-
className="mdw-sel-fmt-btn comment"
|
|
230
|
-
title="划线评论 → 回写本任务"
|
|
231
|
-
onClick={startCompose}
|
|
232
|
-
>
|
|
233
|
-
评论
|
|
234
|
-
</button>
|
|
235
|
-
</div>
|
|
236
|
-
) : (
|
|
237
|
-
<>
|
|
238
|
-
<div className="cap">选区</div>
|
|
239
|
-
<button type="button" onClick={startCompose}>
|
|
240
|
-
评论
|
|
241
|
-
</button>
|
|
242
|
-
<div className="sep" />
|
|
243
|
-
<button type="button" onClick={onCopy}>复制选区</button>
|
|
244
|
-
</>
|
|
245
|
-
)}
|
|
67
|
+
<div className="cap">选区</div>
|
|
68
|
+
<button type="button" onClick={() => onCompose?.()}>
|
|
69
|
+
评论
|
|
70
|
+
</button>
|
|
71
|
+
<div className="sep" />
|
|
72
|
+
<button type="button" onClick={onCopy}>复制选区</button>
|
|
246
73
|
</>
|
|
247
74
|
)}
|
|
248
75
|
</div>
|
|
@@ -15,11 +15,8 @@ function ChainList({ nodes = [], onOpenNode }) {
|
|
|
15
15
|
return (
|
|
16
16
|
<ol className="mdw-chain-list" aria-label="任务链节点">
|
|
17
17
|
{nodes.map((n, i) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
: n.historyId != null
|
|
21
|
-
? `h-${n.historyId}`
|
|
22
|
-
: `t-${n.dirKey || ''}-${n.taskId ?? i}`;
|
|
18
|
+
// T04:节点 = 链上每一轮的任务(seq 做唯一 key);不再有 history 事件层
|
|
19
|
+
const key = n.current ? 'current' : `t-${n.dirKey || ''}-${n.id ?? n.taskId ?? i}`;
|
|
23
20
|
const lab = KIND_LAB[n.kind] || n.kind || '?';
|
|
24
21
|
const title = n.excerpt || n.feedback || lab;
|
|
25
22
|
const meta = [
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// MD
|
|
1
|
+
// MD 工作台工具区:头部只留「时间目标勋章 | 新任务 · 提交 · 更多」。
|
|
2
2
|
// #78:头部按钮过多——次级动作一律收进「更多」菜单(含进程/原文/快捷键);
|
|
3
3
|
// MD 格式不再占头部(划选浮条 + 行首 / 命令 + Ctrl/⌘B 等快捷键已覆盖);
|
|
4
4
|
// 时间目标设置同样在「更多」里,外部只以勋章回显(goalBadge,点击展开菜单)。
|
|
5
|
+
// #47:撤掉「阅读」模式;源码模式偶尔用,入口也收进「更多」——菜单按 编辑/任务/查看 分层。
|
|
5
6
|
import { useEffect, useRef, useState } from 'react';
|
|
6
7
|
import { createPortal } from 'react-dom';
|
|
7
|
-
import { ModeSeg } from './md-panes.jsx';
|
|
8
8
|
|
|
9
|
-
function useMenu() {
|
|
9
|
+
export function useMenu() {
|
|
10
10
|
const [open, setOpen] = useState(false);
|
|
11
11
|
// pos:菜单锚点屏幕坐标(portal 到 body 后按 fixed 定位,
|
|
12
12
|
// 否则会掉进工具栏 overflow:hidden 里被整条裁掉)
|
|
@@ -26,7 +26,7 @@ function useMenu() {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
// 菜单统一 portal 到 body:工具栏行 overflow:hidden,行内 absolute 定位会被裁
|
|
29
|
-
function MenuPortal({ menu, className = '', style, children }) {
|
|
29
|
+
export function MenuPortal({ menu, className = '', style, children }) {
|
|
30
30
|
if (!menu.open) return null;
|
|
31
31
|
return createPortal(
|
|
32
32
|
<div
|
|
@@ -43,7 +43,7 @@ function MenuPortal({ menu, className = '', style, children }) {
|
|
|
43
43
|
|
|
44
44
|
// 触钮点击:记录锚点矩形(菜单贴其正下方),再翻转开合。
|
|
45
45
|
// align='right' 时锚右边线(靠视口右缘的按钮,左锚会把菜单顶出屏)
|
|
46
|
-
function openMenuAt(menu, e, align = 'left') {
|
|
46
|
+
export function openMenuAt(menu, e, align = 'left') {
|
|
47
47
|
const r = e.currentTarget.getBoundingClientRect();
|
|
48
48
|
const top = r.bottom + 4;
|
|
49
49
|
menu.setPos(align === 'left'
|
|
@@ -65,6 +65,7 @@ export default function ToolBar({
|
|
|
65
65
|
onAtt,
|
|
66
66
|
onImport,
|
|
67
67
|
onClone,
|
|
68
|
+
onFork,
|
|
68
69
|
onMark,
|
|
69
70
|
onDraft,
|
|
70
71
|
onDelete,
|
|
@@ -82,32 +83,60 @@ export default function ToolBar({
|
|
|
82
83
|
}, [mode]);
|
|
83
84
|
|
|
84
85
|
// 「更多」收拢一切次级动作(#78):头部只留 新任务 / 提交为任务。
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
86
|
+
// #47:按「编辑 / 任务 / 查看」三层分组——同一类动作排在一起,组间有标题与分隔线,
|
|
87
|
+
// 十几条平铺的菜单没人能扫完。
|
|
88
|
+
const modeItem = onMode && {
|
|
89
|
+
id: 'mode',
|
|
90
|
+
label: mode === 'edit' ? '返回实时预览' : '源码模式',
|
|
91
|
+
hint: mode === 'edit' ? '当前' : '',
|
|
92
|
+
run: () => onMode(mode === 'edit' ? 'split' : 'edit'),
|
|
93
|
+
};
|
|
94
|
+
const menuGroups = [
|
|
95
|
+
{
|
|
96
|
+
id: 'edit',
|
|
97
|
+
label: '编辑',
|
|
98
|
+
items: [
|
|
99
|
+
modeItem,
|
|
100
|
+
// #76:附件入口放进「更多」,预览态也能找到
|
|
101
|
+
onImg && { id: 'img', label: '插入图片', run: onImg },
|
|
102
|
+
onAtt && { id: 'att', label: '添加附件', run: onAtt },
|
|
103
|
+
mode !== 'split' && { id: 'import', label: '导入', run: onImport },
|
|
104
|
+
mode !== 'split' && { id: 'draft', label: '存草稿', run: onDraft },
|
|
105
|
+
].filter(Boolean),
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: 'task',
|
|
109
|
+
label: '任务',
|
|
110
|
+
items: [
|
|
111
|
+
// #77:任务链进「更多」弹窗入口(置顶,别埋在删除旁边)
|
|
112
|
+
onChain && { id: 'chain', label: '任务链', run: onChain },
|
|
113
|
+
// 克隆(#70):内容快速复制成新任务,不建派生链(与评论/反馈的链式派生区分)
|
|
114
|
+
onClone && { id: 'clone', label: '克隆任务', run: onClone },
|
|
115
|
+
// Fork(#67):同样复制正文,但挂到源任务链下——评论/反馈链不丢
|
|
116
|
+
onFork && { id: 'fork', label: 'Fork 任务', run: onFork },
|
|
117
|
+
showMark && { id: 'mark', label: '评论', run: onMark },
|
|
118
|
+
onDelete && { id: 'delete', label: '删除', run: onDelete, danger: true },
|
|
119
|
+
].filter(Boolean),
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: 'view',
|
|
123
|
+
label: '查看',
|
|
124
|
+
items: [
|
|
125
|
+
// 预览:**看 agent 到底会收到什么**(任务 #65)。不是「预览渲染效果」,
|
|
126
|
+
// 而是把交付链路(组上下文 / 收尾指令 / check 指令 / 附件 / ack / 持续 get)
|
|
127
|
+
// 拼出来的原文摆出来——模板可配之后,这是唯一可信的观测口。
|
|
128
|
+
onPreview && { id: 'preview', label: '预览提示词', run: onPreview },
|
|
129
|
+
{ id: 'overview', label: '总览', run: onOverview },
|
|
130
|
+
{ id: 'prog', label: '进程', run: onProg },
|
|
131
|
+
onSource && { id: 'source', label: '原文', run: onSource },
|
|
132
|
+
onShortcuts && { id: 'shortcuts', label: '快捷键', run: onShortcuts },
|
|
133
|
+
].filter(Boolean),
|
|
134
|
+
},
|
|
135
|
+
].filter((g) => g.items.length);
|
|
106
136
|
|
|
107
137
|
return (
|
|
108
138
|
<div className="mdw-toolbar">
|
|
109
139
|
<div className="mdw-toolbar-left">
|
|
110
|
-
<ModeSeg mode={mode} onChange={onMode} />
|
|
111
140
|
{/* 时间目标勋章(#78):设了目标才出现;点击同样展开「更多」菜单去改 */}
|
|
112
141
|
{goalBadge && (
|
|
113
142
|
<button
|
|
@@ -143,19 +172,25 @@ export default function ToolBar({
|
|
|
143
172
|
{/* 时间目标编辑区(#78)摆菜单顶部:点输入不关菜单(useMenu 判定在 menuRef 内) */}
|
|
144
173
|
{goalMenu}
|
|
145
174
|
{goalMenu && <div className="mdw-fmt-menu-sep" role="separator" />}
|
|
146
|
-
{
|
|
147
|
-
<
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
175
|
+
{menuGroups.map((g) => (
|
|
176
|
+
<div className="mdw-fmt-menu-group" role="group" aria-label={g.label} key={g.id}>
|
|
177
|
+
<div className="mdw-fmt-menu-cap">{g.label}</div>
|
|
178
|
+
{g.items.map((a) => (
|
|
179
|
+
<button
|
|
180
|
+
key={a.id}
|
|
181
|
+
type="button"
|
|
182
|
+
role="menuitem"
|
|
183
|
+
className={'mdw-fmt-menu-item' + (a.danger ? ' danger' : '')}
|
|
184
|
+
onClick={() => {
|
|
185
|
+
a.run?.();
|
|
186
|
+
actMore.setOpen(false);
|
|
187
|
+
}}
|
|
188
|
+
>
|
|
189
|
+
{a.label}
|
|
190
|
+
{a.hint ? <span className="hint">{a.hint}</span> : null}
|
|
191
|
+
</button>
|
|
192
|
+
))}
|
|
193
|
+
</div>
|
|
159
194
|
))}
|
|
160
195
|
</MenuPortal>
|
|
161
196
|
</div>
|
|
@@ -228,7 +228,7 @@ export default function DescModal({ repo, board, onClose, onSaved, onOpenTab })
|
|
|
228
228
|
{doc ? (
|
|
229
229
|
<div className="rpd-body">
|
|
230
230
|
<MdPanes
|
|
231
|
-
mode={writable ? mode : '
|
|
231
|
+
mode={writable ? mode : 'read'}
|
|
232
232
|
title={doc.title}
|
|
233
233
|
body={doc.body}
|
|
234
234
|
previewHtml={previewHtml}
|
|
@@ -284,6 +284,10 @@ export default function TransferPanel({ onClose, onChanged, repos, boards }) {
|
|
|
284
284
|
<textarea className="rp-full-input" rows={7} spellCheck="false"
|
|
285
285
|
placeholder="粘贴布局 JSON,或选一个 .json 文件"
|
|
286
286
|
value={impText} onChange={(e) => { setImpText(e.target.value); setDiff(null); }} />
|
|
287
|
+
<div className="form-hint">
|
|
288
|
+
每个仓库的 key 必须有:文件里已写 key 就直接用;只写了远程地址就按 host/owner/repo 归一化;
|
|
289
|
+
两样都没有会在差异检查阶段直接报错(不会按名字猜 key)。要改 key 就改上面的 JSON 再检查。
|
|
290
|
+
</div>
|
|
287
291
|
<div className="form-acts">
|
|
288
292
|
<button className="btn" disabled={!impText.trim() || busy} onClick={doDiff}>差异检查</button>
|
|
289
293
|
</div>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// 侧边栏(应用壳的左栏):品牌区 + 搜索 + 树(全局池恒顶 → 看板 → 仓库)+ 底部入口。
|
|
2
|
-
//
|
|
3
|
-
//
|
|
2
|
+
// **全局动作集中在品牌区**(顶栏已删):设置(齿轮气泡,含重置布局与偏好开关)。
|
|
3
|
+
// 布局撤销/重做已整体下线(#96):模型管理回退普通 state,不再保留入口。
|
|
4
|
+
// 收起成窄轨时保留设置入口(见 panel.jsx)。
|
|
4
5
|
// 拖拽编排 = 三段式落点(drag.js);可见序 = 渲染序,键盘导航走同一份扁平序。
|
|
5
6
|
//
|
|
6
7
|
// **数据源**:仓库登记 + 看板(真实数据,见 model.js)。侧边栏不持有自己的分组体系,
|
|
@@ -29,7 +30,7 @@ export default function Sidebar({
|
|
|
29
30
|
refreshRepos, // 仓库/看板刷新(登记、归属变更后)
|
|
30
31
|
onCollapse, // 收起成窄轨(工作区面板:改 tabset weight)
|
|
31
32
|
onClose, // 完全关闭(左缘只剩半圆弧把手,点把手展开)
|
|
32
|
-
shell, // 全局动作:{
|
|
33
|
+
shell, // 全局动作:{resetLayout, openSettings}
|
|
33
34
|
}) {
|
|
34
35
|
const toast = useToast();
|
|
35
36
|
const { dialog, node: dialogNode } = useDialog();
|
|
@@ -200,23 +201,11 @@ export default function Sidebar({
|
|
|
200
201
|
return (
|
|
201
202
|
<aside id="side">
|
|
202
203
|
<div className="shead">
|
|
203
|
-
{/* 品牌区 = 旧顶栏的家当:logo +
|
|
204
|
+
{/* 品牌区 = 旧顶栏的家当:logo + 标题 + 设置/收起/关闭 */}
|
|
204
205
|
<div className="brandrow">
|
|
205
206
|
<span className="nx-logo" aria-hidden>nx</span>
|
|
206
207
|
<span className="nx-title">nx-kv</span>
|
|
207
208
|
<span className="grow" />
|
|
208
|
-
<button
|
|
209
|
-
className="iconbtn undo" title="撤销上一次布局操作" aria-label="撤销上一次布局操作"
|
|
210
|
-
disabled={!shell || !shell.canUndo} onClick={shell && shell.undo}
|
|
211
|
-
>
|
|
212
|
-
↶
|
|
213
|
-
</button>
|
|
214
|
-
<button
|
|
215
|
-
className="iconbtn redo" title="重做" aria-label="重做"
|
|
216
|
-
disabled={!shell || !shell.canRedo} onClick={shell && shell.redo}
|
|
217
|
-
>
|
|
218
|
-
↷
|
|
219
|
-
</button>
|
|
220
209
|
<button
|
|
221
210
|
className="iconbtn" title="设置(浮动面板)" aria-label="设置"
|
|
222
211
|
onClick={() => shell && shell.openSettings()}
|
|
@@ -145,6 +145,8 @@ export default function SidebarPanel() {
|
|
|
145
145
|
<span className="nx-rail-label">目录</span>
|
|
146
146
|
</button>
|
|
147
147
|
<div className="nx-rail-acts">
|
|
148
|
+
{/* 布局撤销/恢复已下线(#96);窄轨保留关闭与设置入口——
|
|
149
|
+
「收起侧栏 = 摸不到设置」与齿轮同一类缺口,全局动作收口在侧栏。 */}
|
|
148
150
|
<button
|
|
149
151
|
className="nx-rail-act" title="关闭目录(完全隐藏,左缘把手可展开)" aria-label="关闭目录"
|
|
150
152
|
onClick={close}
|
|
@@ -15,6 +15,16 @@ import { useToast } from '../toast/index.jsx';
|
|
|
15
15
|
import { taskLabel } from './model.js';
|
|
16
16
|
import { ensureQueueAndGo } from './queue-nav.js';
|
|
17
17
|
import { sortTasksForDisplay, isGroupTask } from '../../modules/board/board-view.js';
|
|
18
|
+
|
|
19
|
+
// 任务行的单字状态徽标(侧栏太窄,只放一个字):
|
|
20
|
+
// 完 = done(交付完成)/ 跑 = claimed 或从云端迁入 / 档 = cancelled / 等 = pending
|
|
21
|
+
// 词表见 src/shared/task-status.js(这里只做展示取舍,不做状态判断)。
|
|
22
|
+
function taskStatusShort(t) {
|
|
23
|
+
if (t.status === 'done') return '完';
|
|
24
|
+
if (t.status === 'claimed') return '跑';
|
|
25
|
+
if (t.status === 'cancelled') return '档';
|
|
26
|
+
return t.from ? '跑' : '等';
|
|
27
|
+
}
|
|
18
28
|
import Pager, { usePager } from '../pager.jsx';
|
|
19
29
|
|
|
20
30
|
const PAGE_SIZE = 12; // 每页条数(与旧 limit 同值,但不再截断——有翻页出口)
|
|
@@ -52,7 +62,7 @@ export default function TaskChildren({ row, onNavigate, refreshLocal, limit = PA
|
|
|
52
62
|
<span className="gico"><Icon name="list" size={12} /></span>
|
|
53
63
|
<span className="nm">{taskLabel(t)}</span>
|
|
54
64
|
<span className="cnt">
|
|
55
|
-
{
|
|
65
|
+
{taskStatusShort(t)}
|
|
56
66
|
</span>
|
|
57
67
|
</button>
|
|
58
68
|
))}
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
// 与后端的共同约定只有 `__GLOBAL__` 这一个字符串(见 localtask service 的 GLOBAL_KEY),
|
|
9
9
|
// 由 tests/unit/registry.test.mjs 的边界断言与 shared/ 层共同守住。
|
|
10
10
|
|
|
11
|
+
// 任务状态词表与谓词:前后端共用同一份实现(src/shared/task-status.js)。
|
|
12
|
+
// 以前这里抄了一份「排除法」的 isPendingRow,与后端各写一遍迟早分叉。
|
|
13
|
+
import { isPending } from '../../../../shared/task-status.js';
|
|
14
|
+
|
|
11
15
|
// 全局任务池(共享池)的固定标识 —— 与 localtask service 的 GLOBAL_KEY 一致。
|
|
12
16
|
export const GLOBAL_KEY = '__GLOBAL__';
|
|
13
17
|
export const GLOBAL_NAME = '全局任务';
|
|
@@ -69,14 +73,16 @@ export function withGlobalRow(rows) {
|
|
|
69
73
|
export function splitQueueTasks(tasks = []) {
|
|
70
74
|
const list = Array.isArray(tasks) ? tasks : [];
|
|
71
75
|
return {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
// 四桶与任务状态词表一一对应(src/shared/task-status.js):
|
|
77
|
+
// pending 待领取 / claimed 已领取(在干)/ done 已交付 / cancelled 已取消(终态留档)
|
|
78
|
+
pending: list.filter((t) => t.status === 'pending' && !t.deletedAt && !t.migratedTo),
|
|
79
|
+
claimed: list.filter((t) => t.status === 'claimed' && !t.deletedAt).slice().reverse(),
|
|
80
|
+
done: list.filter((t) => t.status === 'done' && !t.deletedAt).slice().reverse(),
|
|
81
|
+
cancelled: list.filter((t) => t.status === 'cancelled' && !t.deletedAt).slice().reverse(),
|
|
76
82
|
deleted: list.filter((t) => !!t.deletedAt).slice().reverse(),
|
|
77
83
|
// 迁出记录(tombstone):原条目留在队列里但已不算待领取,看板渲染成
|
|
78
84
|
// 虚线灰卡「已迁移 → …」,可跳转/移除/撤销。保持队列原序(正序)。
|
|
79
|
-
migrated: list.filter((t) => !!t.migratedTo && !t.deletedAt
|
|
85
|
+
migrated: list.filter((t) => !!t.migratedTo && !t.deletedAt),
|
|
80
86
|
};
|
|
81
87
|
}
|
|
82
88
|
|
|
@@ -98,19 +104,28 @@ export function splitQueueTasks(tasks = []) {
|
|
|
98
104
|
export function sortTasksForDisplay(tasks = []) {
|
|
99
105
|
const list = Array.isArray(tasks) ? tasks : [];
|
|
100
106
|
const pending = [];
|
|
101
|
-
const
|
|
102
|
-
const
|
|
107
|
+
const claimed = [];
|
|
108
|
+
const done = [];
|
|
109
|
+
const cancelled = [];
|
|
103
110
|
const migrated = [];
|
|
104
111
|
const deleted = [];
|
|
105
112
|
for (const t of list) {
|
|
106
113
|
if (t.deletedAt) deleted.push(t);
|
|
107
|
-
else if (t.status === '
|
|
108
|
-
else if (t.status === '
|
|
114
|
+
else if (t.status === 'claimed') claimed.push(t);
|
|
115
|
+
else if (t.status === 'done') done.push(t);
|
|
116
|
+
else if (t.status === 'cancelled') cancelled.push(t);
|
|
109
117
|
else if (t.migratedTo) migrated.push(t);
|
|
110
118
|
else pending.push(t);
|
|
111
119
|
}
|
|
112
|
-
//
|
|
113
|
-
return [
|
|
120
|
+
// 终态(已交付 / 已取消)沉在历史区(与迁出记录同层),删除记录垫底
|
|
121
|
+
return [
|
|
122
|
+
...pending,
|
|
123
|
+
...claimed.reverse(),
|
|
124
|
+
...migrated,
|
|
125
|
+
...done.reverse(),
|
|
126
|
+
...cancelled.reverse(),
|
|
127
|
+
...deleted.reverse(),
|
|
128
|
+
];
|
|
114
129
|
}
|
|
115
130
|
|
|
116
131
|
// ─── 两种走向(任务 #85)─────────────────────────────────────────────
|
|
@@ -124,9 +139,12 @@ export function isGroupTask(t) {
|
|
|
124
139
|
return !!(t && t.boardMark);
|
|
125
140
|
}
|
|
126
141
|
|
|
127
|
-
/**
|
|
142
|
+
/**
|
|
143
|
+
* 服务端 isPending(shared/task-status.js)的前端同款。
|
|
144
|
+
* 现在直接调同一份实现 —— 以前前后端各写一遍排除法,两边迟早分叉。
|
|
145
|
+
*/
|
|
128
146
|
export function isPendingRow(t) {
|
|
129
|
-
return t
|
|
147
|
+
return isPending(t);
|
|
130
148
|
}
|
|
131
149
|
|
|
132
150
|
/** 项目走向视图的任务清单:组任务剔除、软删除不进(与各列表页的基底过滤同口径) */
|