jt-workspace-dashboard 0.1.12 → 0.1.14-stable
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/README.md +4 -1
- package/dist/dashboard.js +29 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,7 +30,9 @@ Publishing uses npm trusted publishing, linked to `.github/workflows/publish.yml
|
|
|
30
30
|
calendar: { ids: ["primary"], hide: ["Time Blocking"] }, // or false
|
|
31
31
|
updateTask: "trig_…",
|
|
32
32
|
notes: { dataSource: "collection id", minSteps: 3 }, // automatic Notion notes pages (or all: true)
|
|
33
|
-
features: { handoff: false, meetingAsks: false, showFollowUp: false, chatLink: false }
|
|
33
|
+
features: { handoff: false, meetingAsks: false, showFollowUp: false, chatLink: false, kickoff: false },
|
|
34
|
+
kickoffKind: "treatment", // optional: word used in the default kickoff prompt
|
|
35
|
+
kickoffPrompt: "…{title}…{links}…" // optional: custom kickoff prompt ({title} {links} {figma} {notion} {todoist} {kind})
|
|
34
36
|
}
|
|
35
37
|
]
|
|
36
38
|
}
|
|
@@ -68,6 +70,7 @@ Waiting on: Jon
|
|
|
68
70
|
Link: https://… main source (Slack thread, Gmail, Fathom call)
|
|
69
71
|
Figma: https://…
|
|
70
72
|
Notion: https://… project notes / longer docs (shows a Notes chip)
|
|
73
|
+
Airtable: https://… spec record, e.g. the Tactus Treatments table (shows a Spec chip)
|
|
71
74
|
Chat: https://claude.ai/chat/…
|
|
72
75
|
Meeting: Jeremy-Tactus UX for Ask tasks: the meeting title it belongs to
|
|
73
76
|
One or two lines of note.
|
package/dist/dashboard.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
const BASE_LABELS = Object.assign({today: "In progress", ready: "Paused", waiting: "Waiting", later: "Later", handoff: "Handoff", meeting: "Ask", question: "Question"}, CFG.labels || {});
|
|
9
9
|
let LABELS = BASE_LABELS; // per workspace: BASE_LABELS + workspace.labels
|
|
10
10
|
const OWNER_NAME = String(CFG.ownerName || "").slice(0, 40);
|
|
11
|
-
const VERSION = "0.1.
|
|
11
|
+
const VERSION = "0.1.14-stable";
|
|
12
12
|
|
|
13
13
|
/* ---------- page skeleton ---------- */
|
|
14
14
|
document.title = CFG.title || "Dashboard";
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
link: SVG('<path d="M7 9a3 3 0 0 0 4.2 0l2-2a3 3 0 0 0-4.2-4.2l-.6.6M9 7a3 3 0 0 0-4.2 0l-2 2a3 3 0 0 0 4.2 4.2l.6-.6"/>'),
|
|
29
29
|
todo: SVG('<rect x="2.5" y="2.5" width="11" height="11" rx="2.5"/><path d="M5.5 8l1.8 1.8L10.5 6"/>'),
|
|
30
30
|
notes: SVG('<path d="M4 2.5h6l2.5 2.5v8.5H4z"/><path d="M6.5 7h4M6.5 9.5h4"/>'),
|
|
31
|
+
spec: SVG('<rect x="2.5" y="2.5" width="11" height="11" rx="1.5"/><path d="M2.5 6.5h11M2.5 10h11M6.5 6.5v7"/>'),
|
|
31
32
|
cal: SVG('<rect x="2.5" y="3.5" width="11" height="10" rx="2"/><path d="M2.5 6.5h11M5.5 2v3M10.5 2v3"/>')
|
|
32
33
|
};
|
|
33
34
|
const CHEV = '<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';
|
|
@@ -140,7 +141,7 @@
|
|
|
140
141
|
try { return JSON.parse(txt); } catch(_){ const m = txt.match(/\{[\s\S]*\}/); try { return m ? JSON.parse(m[0]) : {}; } catch(_){ return {}; } }
|
|
141
142
|
};
|
|
142
143
|
const td = (tool, input) => mcp.callTool(CFG.todoistServer || "Todoist", tool, input, {cache: false});
|
|
143
|
-
const KEYLINE = /^(Waiting on|Link|Figma|Notion|Chat|Meeting):[ \t]*(.*)$/;
|
|
144
|
+
const KEYLINE = /^(Waiting on|Link|Figma|Notion|Airtable|Chat|Meeting):[ \t]*(.*)$/;
|
|
144
145
|
function splitDesc(desc){
|
|
145
146
|
const [head, ctx = ""] = String(desc || "").split(/^Context:[ \t]*$/m);
|
|
146
147
|
const keys = {}, rest = [];
|
|
@@ -177,7 +178,7 @@
|
|
|
177
178
|
return {id: t.id, title: t.content, description: String(t.description || ""), labels, section, order: orderMap[t.id] ?? (i + 1), projectId: t.projectId,
|
|
178
179
|
note, log, subtasks, questions, _server: subtasks.concat(questions).map(x => ({id: x.id, d: x.d})),
|
|
179
180
|
waitingOn: keys["Waiting on"] || "", url: safeUrl(keys.Link) || "https://app.todoist.com/app/task/" + t.id, todoistUrl: "https://app.todoist.com/app/task/" + t.id,
|
|
180
|
-
figma: safeUrl(keys.Figma), notion: safeUrl(keys.Notion), chat: safeUrl(keys.Chat), meeting: keys.Meeting || "", due, overdue, newAt: Date.parse(t.addedAt) || 0, seenAt: seenMap[t.id] || 0};
|
|
181
|
+
figma: safeUrl(keys.Figma), notion: safeUrl(keys.Notion), airtable: safeUrl(keys.Airtable), chat: safeUrl(keys.Chat), meeting: keys.Meeting || "", due, overdue, newAt: Date.parse(t.addedAt) || 0, seenAt: seenMap[t.id] || 0};
|
|
181
182
|
}
|
|
182
183
|
function projectIds(){ const t = WS.todoist || {}; return [].concat(t.projectIds || [], t.projectId || []).filter(Boolean); }
|
|
183
184
|
let loadSeq = 0;
|
|
@@ -359,11 +360,34 @@
|
|
|
359
360
|
const f = safeUrl(it.figma), c = safeUrl(it.chat);
|
|
360
361
|
if(f) pill(f, o.compact ? "" : "Figma", ICON.figma, "Figma");
|
|
361
362
|
const nn = safeUrl(it.notion); if(nn) pill(nn, o.compact ? "" : "Notes", ICON.notes, "Notion notes");
|
|
363
|
+
const at = safeUrl(it.airtable); if(at) pill(at, o.compact ? "" : "Spec", ICON.spec, "Airtable spec");
|
|
362
364
|
if(c){ pill(c, o.compact ? "" : "Chat", ICON.chat, "Claude chat"); const a = row.lastChild; a.onclick = e => { e.preventDefault(); e.stopPropagation(); openChat(c); }; }
|
|
363
365
|
const subs = it.subtasks || [];
|
|
364
366
|
if(subs.length){ const n = el("span", "chip"); n.innerHTML = ICON.todo; n.append(document.createTextNode(subs.filter(x => x && x.d).length + "/" + subs.length)); n.title = "To-dos done"; row.append(n); }
|
|
365
367
|
return row.childNodes.length ? row : null;
|
|
366
368
|
}
|
|
369
|
+
// "Kick off" on new To do items that don't have a chat yet: opens a new Claude chat with a kickoff prompt.
|
|
370
|
+
const DEFAULT_KICKOFF = "Let's kick off the design of {title}.\n{links}\nStart by looking at what's on the Figma page and in the notes, then give me: a short summary of the {kind} (goal, steps, levels), open questions to ask the team, and a plan for Round 1.";
|
|
371
|
+
function kickoffPrompt(it){
|
|
372
|
+
const links = [["Figma page", it.figma], ["Spec (Airtable)", it.airtable], ["Notes", it.notion], ["Source", it.url !== it.todoistUrl ? it.url : null], ["Todoist task", it.todoistUrl]]
|
|
373
|
+
.filter(x => safeUrl(x[1])).map(x => x[0] + ": " + x[1]).join("\n");
|
|
374
|
+
const note = (priorityOf(it.note) ? priorityOf(it.note).rest : it.note) || "";
|
|
375
|
+
return String(WS.kickoffPrompt || DEFAULT_KICKOFF).replace(/\{title\}/g, it.title || "").replace(/\{links\}/g, links + (note ? "\n" + note : ""))
|
|
376
|
+
.replace(/\{kind\}/g, WS.kickoffKind || "project").replace(/\{figma\}/g, it.figma || "").replace(/\{notion\}/g, it.notion || "").replace(/\{todoist\}/g, it.todoistUrl || "");
|
|
377
|
+
}
|
|
378
|
+
function kickoffEl(it, section){
|
|
379
|
+
if(!feat("kickoff") || section !== "upcoming" || it.chat) return null;
|
|
380
|
+
const wrap = el("div", "kick-wrap");
|
|
381
|
+
const b = el("button", "go", "Kick off"); b.type = "button"; b.title = "Opens a new Claude chat with a prompt to start the design";
|
|
382
|
+
b.onclick = async e => {
|
|
383
|
+
e.stopPropagation();
|
|
384
|
+
const msg = kickoffPrompt(it); let copied = false, opened = false;
|
|
385
|
+
try { await navigator.clipboard.writeText(msg); copied = true; } catch(_){}
|
|
386
|
+
try { const w = window.open("https://claude.ai/new?q=" + encodeURIComponent(msg), "_blank"); if(w){ try { w.opener = null; } catch(_){} opened = true; } } catch(_){}
|
|
387
|
+
toast(opened ? "New chat opened with the kickoff prompt." + (copied ? " It's also copied, in case the chat box is empty." : "") : copied ? "Kickoff prompt copied. Paste it into a new chat." : "Couldn't open a chat here. Prompt: " + msg.replace(/\n/g, " "));
|
|
388
|
+
};
|
|
389
|
+
wrap.append(b); return wrap;
|
|
390
|
+
}
|
|
367
391
|
function handoffEl(it, section){
|
|
368
392
|
if(!feat("handoff") || section !== "handoff") return null;
|
|
369
393
|
const wrap = el("div", "kick-wrap");
|
|
@@ -474,7 +498,7 @@
|
|
|
474
498
|
const log = (it.log || []).filter(x => x && x.t);
|
|
475
499
|
if(log.length){ const ulC = el("ul", "bullets"); log.forEach(x => ulC.append(el("li", null, x.t))); fold(it.id + ":log", "Context", ulC); }
|
|
476
500
|
if(folds.childNodes.length) li.append(folds);
|
|
477
|
-
const ho = handoffEl(it, section); if(ho) li.append(ho);
|
|
501
|
+
const ho = handoffEl(it, section) || kickoffEl(it, section); if(ho) li.append(ho);
|
|
478
502
|
return li;
|
|
479
503
|
}
|
|
480
504
|
|
|
@@ -537,7 +561,7 @@
|
|
|
537
561
|
if(canWrite) head.append(moreMenu(it, menuOpts(it, sec, head)));
|
|
538
562
|
li.append(head);
|
|
539
563
|
const chips = chipRow(it, {compact: true, who: sec === "waiting"}); if(chips) li.append(chips);
|
|
540
|
-
const hh = handoffEl(it, sec); if(hh) li.append(hh);
|
|
564
|
+
const hh = handoffEl(it, sec) || kickoffEl(it, sec); if(hh) li.append(hh);
|
|
541
565
|
li.addEventListener("click", e => { if(e.target.closest("a,button,input,select,.menu-wrap,.wait-input")) return; openDrawer(it.id); });
|
|
542
566
|
li.addEventListener("dragstart", e => { kDrag = it.id; li.classList.add("dragging"); try { e.dataTransfer.setData("text/plain", it.id); } catch(_){} e.dataTransfer.effectAllowed = "move"; });
|
|
543
567
|
li.addEventListener("dragend", () => { kDrag = null; li.classList.remove("dragging"); board.querySelectorAll("ul.over").forEach(u => u.classList.remove("over")); });
|
package/package.json
CHANGED