@tenonhq/dovetail-dashboard 0.0.15 → 0.0.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenonhq/dovetail-dashboard",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "Update Set Dashboard for Dovetail",
5
5
  "main": "server.js",
6
6
  "scripts": {
@@ -641,3 +641,49 @@
641
641
  white-space: nowrap;
642
642
  }
643
643
  .cp-pr-badge:hover { background: rgba(100,140,190,0.25); color: var(--text); }
644
+
645
+ /* ─── Resume button in plan detail header ──────────────────────────────────── */
646
+ .cp-resume-btn {
647
+ display: inline-flex;
648
+ align-items: center;
649
+ padding: 3px 10px;
650
+ border-radius: 4px;
651
+ font-size: 12px;
652
+ font-family: inherit;
653
+ font-weight: 600;
654
+ letter-spacing: 0.02em;
655
+ background: rgba(74, 140, 92, 0.15);
656
+ color: #92d3a4;
657
+ border: 1px solid rgba(74, 140, 92, 0.4);
658
+ cursor: pointer;
659
+ white-space: nowrap;
660
+ transition: background 0.15s, color 0.15s;
661
+ }
662
+ .cp-resume-btn:hover {
663
+ background: rgba(74, 140, 92, 0.28);
664
+ color: var(--text);
665
+ }
666
+
667
+ /* ─── Toast notification ────────────────────────────────────────────────────── */
668
+ .cp-toast {
669
+ position: fixed;
670
+ bottom: 20px;
671
+ right: 20px;
672
+ background: var(--card-bg);
673
+ border: 1px solid rgba(74, 140, 92, 0.5);
674
+ border-left: 3px solid #4a8c5c;
675
+ color: #92d3a4;
676
+ padding: 9px 16px;
677
+ border-radius: 4px;
678
+ font-size: 13px;
679
+ font-family: inherit;
680
+ z-index: 9999;
681
+ opacity: 0;
682
+ transform: translateY(6px);
683
+ transition: opacity 0.2s, transform 0.2s;
684
+ pointer-events: none;
685
+ }
686
+ .cp-toast--visible {
687
+ opacity: 1;
688
+ transform: translateY(0);
689
+ }
@@ -66,6 +66,18 @@
66
66
  setTimeout(function () { el.remove(); }, 4000);
67
67
  }
68
68
 
69
+ function showToast(msg) {
70
+ var el = document.createElement("div");
71
+ el.className = "cp-toast";
72
+ el.textContent = msg;
73
+ document.body.appendChild(el);
74
+ setTimeout(function () { el.classList.add("cp-toast--visible"); }, 10);
75
+ setTimeout(function () {
76
+ el.classList.remove("cp-toast--visible");
77
+ setTimeout(function () { el.remove(); }, 300);
78
+ }, 2200);
79
+ }
80
+
69
81
  function renderMarkdown(md, target) {
70
82
  if (!window.marked || !window.DOMPurify) {
71
83
  target.textContent = md;
@@ -273,6 +285,28 @@
273
285
  els.detailStamp.insertAdjacentElement("afterend", prBadge);
274
286
  }
275
287
 
288
+ var existingResumeBtn = document.getElementById("cp-resume-btn");
289
+ if (existingResumeBtn) existingResumeBtn.remove();
290
+ var resumeBtn = document.createElement("button");
291
+ resumeBtn.id = "cp-resume-btn";
292
+ resumeBtn.className = "cp-resume-btn";
293
+ resumeBtn.textContent = "Resume";
294
+ resumeBtn.title = "Copy /resume command to clipboard";
295
+ resumeBtn.addEventListener("click", function () {
296
+ var cmd = "/resume " + plan.slug;
297
+ var finish = function () { showToast("Copied! Paste into Claude."); };
298
+ if (navigator.clipboard && navigator.clipboard.writeText) {
299
+ navigator.clipboard.writeText(cmd).then(finish).catch(function () {
300
+ fallbackCopy(cmd);
301
+ finish();
302
+ });
303
+ } else {
304
+ fallbackCopy(cmd);
305
+ finish();
306
+ }
307
+ });
308
+ els.detailStatus.insertAdjacentElement("afterend", resumeBtn);
309
+
276
310
  if (plan.content_html) {
277
311
  els.planPanel.innerHTML = window.DOMPurify
278
312
  ? window.DOMPurify.sanitize(plan.content_html)