jt-workspace-dashboard 0.1.12 → 0.1.13
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 +3 -1
- package/dist/dashboard.js +25 -3
- 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
|
}
|
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.13";
|
|
12
12
|
|
|
13
13
|
/* ---------- page skeleton ---------- */
|
|
14
14
|
document.title = CFG.title || "Dashboard";
|
|
@@ -364,6 +364,28 @@
|
|
|
364
364
|
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
365
|
return row.childNodes.length ? row : null;
|
|
366
366
|
}
|
|
367
|
+
// "Kick off" on new To do items that don't have a chat yet: opens a new Claude chat with a kickoff prompt.
|
|
368
|
+
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.";
|
|
369
|
+
function kickoffPrompt(it){
|
|
370
|
+
const links = [["Figma page", it.figma], ["Notes", it.notion], ["Source", it.url !== it.todoistUrl ? it.url : null], ["Todoist task", it.todoistUrl]]
|
|
371
|
+
.filter(x => safeUrl(x[1])).map(x => x[0] + ": " + x[1]).join("\n");
|
|
372
|
+
const note = (priorityOf(it.note) ? priorityOf(it.note).rest : it.note) || "";
|
|
373
|
+
return String(WS.kickoffPrompt || DEFAULT_KICKOFF).replace(/\{title\}/g, it.title || "").replace(/\{links\}/g, links + (note ? "\n" + note : ""))
|
|
374
|
+
.replace(/\{kind\}/g, WS.kickoffKind || "project").replace(/\{figma\}/g, it.figma || "").replace(/\{notion\}/g, it.notion || "").replace(/\{todoist\}/g, it.todoistUrl || "");
|
|
375
|
+
}
|
|
376
|
+
function kickoffEl(it, section){
|
|
377
|
+
if(!feat("kickoff") || section !== "upcoming" || it.chat) return null;
|
|
378
|
+
const wrap = el("div", "kick-wrap");
|
|
379
|
+
const b = el("button", "go", "Kick off"); b.type = "button"; b.title = "Opens a new Claude chat with a prompt to start the design";
|
|
380
|
+
b.onclick = async e => {
|
|
381
|
+
e.stopPropagation();
|
|
382
|
+
const msg = kickoffPrompt(it); let copied = false, opened = false;
|
|
383
|
+
try { await navigator.clipboard.writeText(msg); copied = true; } catch(_){}
|
|
384
|
+
try { const w = window.open("https://claude.ai/new?q=" + encodeURIComponent(msg), "_blank"); if(w){ try { w.opener = null; } catch(_){} opened = true; } } catch(_){}
|
|
385
|
+
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, " "));
|
|
386
|
+
};
|
|
387
|
+
wrap.append(b); return wrap;
|
|
388
|
+
}
|
|
367
389
|
function handoffEl(it, section){
|
|
368
390
|
if(!feat("handoff") || section !== "handoff") return null;
|
|
369
391
|
const wrap = el("div", "kick-wrap");
|
|
@@ -474,7 +496,7 @@
|
|
|
474
496
|
const log = (it.log || []).filter(x => x && x.t);
|
|
475
497
|
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
498
|
if(folds.childNodes.length) li.append(folds);
|
|
477
|
-
const ho = handoffEl(it, section); if(ho) li.append(ho);
|
|
499
|
+
const ho = handoffEl(it, section) || kickoffEl(it, section); if(ho) li.append(ho);
|
|
478
500
|
return li;
|
|
479
501
|
}
|
|
480
502
|
|
|
@@ -537,7 +559,7 @@
|
|
|
537
559
|
if(canWrite) head.append(moreMenu(it, menuOpts(it, sec, head)));
|
|
538
560
|
li.append(head);
|
|
539
561
|
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);
|
|
562
|
+
const hh = handoffEl(it, sec) || kickoffEl(it, sec); if(hh) li.append(hh);
|
|
541
563
|
li.addEventListener("click", e => { if(e.target.closest("a,button,input,select,.menu-wrap,.wait-input")) return; openDrawer(it.id); });
|
|
542
564
|
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
565
|
li.addEventListener("dragend", () => { kDrag = null; li.classList.remove("dragging"); board.querySelectorAll("ul.over").forEach(u => u.classList.remove("over")); });
|
package/package.json
CHANGED