@wrongstack/webui 0.107.2 → 0.119.1

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/dist/index.js CHANGED
@@ -907,12 +907,18 @@ function parseGoalState(raw) {
907
907
  return {
908
908
  goal: raw.goal,
909
909
  refinedGoal: typeof raw.refinedGoal === "string" ? raw.refinedGoal : void 0,
910
- goalState: ["active", "paused", "completed", "failed"].includes(raw.goalState) ? raw.goalState : "active",
910
+ goalState: ["active", "paused", "completed", "failed", "abandoned"].includes(raw.goalState) ? raw.goalState : "active",
911
911
  iterations: typeof raw.iterations === "number" ? raw.iterations : 0,
912
912
  progress: typeof raw.progress === "number" ? raw.progress : 0,
913
913
  progressNote: typeof raw.progressNote === "string" ? raw.progressNote : void 0,
914
- progressTrend: ["up", "down", "stable"].includes(raw.progressTrend) ? raw.progressTrend : void 0,
915
- deliverables: Array.isArray(raw.deliverables) ? raw.deliverables : void 0,
914
+ progressTrend: raw.progressTrend === "accelerating" ? "up" : raw.progressTrend === "stalling" ? "down" : raw.progressTrend === "steady" ? "stable" : void 0,
915
+ deliverables: Array.isArray(raw.deliverables) ? raw.deliverables.map(
916
+ (d, i) => typeof d === "string" ? {
917
+ id: `d${i}`,
918
+ text: d,
919
+ status: /^\[[x✓]\]|✅|\(done\)/i.test(d) ? "done" : "pending"
920
+ } : d
921
+ ) : void 0,
916
922
  journal: Array.isArray(raw.journal) ? raw.journal : void 0,
917
923
  lastTask: typeof raw.lastTask === "string" ? raw.lastTask : void 0,
918
924
  lastStatus: typeof raw.lastStatus === "string" ? raw.lastStatus : void 0
@@ -7530,6 +7536,11 @@ var STATE_CONFIG = {
7530
7536
  color: "text-red-600 dark:text-red-400",
7531
7537
  bg: "bg-red-100 dark:bg-red-900/40",
7532
7538
  label: "Failed"
7539
+ },
7540
+ abandoned: {
7541
+ color: "text-stone-600 dark:text-stone-400",
7542
+ bg: "bg-stone-100 dark:bg-stone-900/40",
7543
+ label: "Abandoned"
7533
7544
  }
7534
7545
  };
7535
7546
  function GoalPanel({ goal, className }) {
@@ -7543,9 +7554,9 @@ function GoalPanel({ goal, className }) {
7543
7554
  return () => clearInterval(timer);
7544
7555
  }, []);
7545
7556
  if (!goal) return null;
7546
- if (goal.goalState === "completed" || goal.goalState === "failed") return null;
7557
+ if (goal.goalState === "completed" || goal.goalState === "failed" || goal.goalState === "abandoned") return null;
7547
7558
  useEffect20(() => {
7548
- if (!goal || goal.goalState === "completed" || goal.goalState === "failed") {
7559
+ if (!goal || goal.goalState === "completed" || goal.goalState === "failed" || goal.goalState === "abandoned") {
7549
7560
  setCollapsed(true);
7550
7561
  }
7551
7562
  }, [goal]);
@@ -7626,7 +7637,7 @@ function GoalPanel({ goal, className }) {
7626
7637
  totalDeliverables
7627
7638
  ] })
7628
7639
  ] }),
7629
- /* @__PURE__ */ jsx39("ul", { className: "space-y-0.5", children: goal.deliverables.map((d) => /* @__PURE__ */ jsxs36("li", { className: "flex items-start gap-1.5 text-[11px]", children: [
7640
+ /* @__PURE__ */ jsx39("ul", { className: "space-y-0.5", children: goal.deliverables?.map((d) => /* @__PURE__ */ jsxs36("li", { className: "flex items-start gap-1.5 text-[11px]", children: [
7630
7641
  d.status === "done" ? /* @__PURE__ */ jsx39(CheckCircle27, { className: "h-3 w-3 text-emerald-500 mt-0.5 shrink-0" }) : /* @__PURE__ */ jsx39(Circle3, { className: "h-3 w-3 text-muted-foreground/50 mt-0.5 shrink-0" }),
7631
7642
  /* @__PURE__ */ jsx39(
7632
7643
  "span",