@industry-theme/backlogmd-kanban-panel 1.0.31 → 1.0.32

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.
@@ -1 +1 @@
1
- {"version":3,"file":"TaskDetailPanel.d.ts","sourceRoot":"","sources":["../../src/panels/TaskDetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,KAAK,EAAE,mBAAmB,EAAqB,MAAM,UAAU,CAAC;AAuEvE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC;AA0ED;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAsR1D,CAAC"}
1
+ {"version":3,"file":"TaskDetailPanel.d.ts","sourceRoot":"","sources":["../../src/panels/TaskDetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAIhE,OAAO,KAAK,EAAE,mBAAmB,EAAqB,MAAM,UAAU,CAAC;AAiFvE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,MAAM,CAAC,EAAE,qBAAqB,CAAC;CAChC;AA0ED;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAwd1D,CAAC"}
@@ -3740,41 +3740,67 @@ const createLucideIcon = (iconName, iconNode) => {
3740
3740
  * This source code is licensed under the ISC license.
3741
3741
  * See the LICENSE file in the root directory of this source tree.
3742
3742
  */
3743
- const __iconNode$m = [
3743
+ const __iconNode$o = [
3744
+ ["path", { d: "M12 8V4H8", key: "hb8ula" }],
3745
+ ["rect", { width: "16", height: "12", x: "4", y: "8", rx: "2", key: "enze0r" }],
3746
+ ["path", { d: "M2 14h2", key: "vft8re" }],
3747
+ ["path", { d: "M20 14h2", key: "4cs60a" }],
3748
+ ["path", { d: "M15 13v2", key: "1xurst" }],
3749
+ ["path", { d: "M9 13v2", key: "rq6x2g" }]
3750
+ ];
3751
+ const Bot = createLucideIcon("bot", __iconNode$o);
3752
+ /**
3753
+ * @license lucide-react v0.552.0 - ISC
3754
+ *
3755
+ * This source code is licensed under the ISC license.
3756
+ * See the LICENSE file in the root directory of this source tree.
3757
+ */
3758
+ const __iconNode$n = [
3744
3759
  ["path", { d: "M8 2v4", key: "1cmpym" }],
3745
3760
  ["path", { d: "M16 2v4", key: "4m81vk" }],
3746
3761
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
3747
3762
  ["path", { d: "M3 10h18", key: "8toen8" }]
3748
3763
  ];
3749
- const Calendar = createLucideIcon("calendar", __iconNode$m);
3764
+ const Calendar = createLucideIcon("calendar", __iconNode$n);
3750
3765
  /**
3751
3766
  * @license lucide-react v0.552.0 - ISC
3752
3767
  *
3753
3768
  * This source code is licensed under the ISC license.
3754
3769
  * See the LICENSE file in the root directory of this source tree.
3755
3770
  */
3756
- const __iconNode$l = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
3757
- const Check = createLucideIcon("check", __iconNode$l);
3771
+ const __iconNode$m = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
3772
+ const Check = createLucideIcon("check", __iconNode$m);
3758
3773
  /**
3759
3774
  * @license lucide-react v0.552.0 - ISC
3760
3775
  *
3761
3776
  * This source code is licensed under the ISC license.
3762
3777
  * See the LICENSE file in the root directory of this source tree.
3763
3778
  */
3764
- const __iconNode$k = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
3765
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$k);
3779
+ const __iconNode$l = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
3780
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$l);
3766
3781
  /**
3767
3782
  * @license lucide-react v0.552.0 - ISC
3768
3783
  *
3769
3784
  * This source code is licensed under the ISC license.
3770
3785
  * See the LICENSE file in the root directory of this source tree.
3771
3786
  */
3772
- const __iconNode$j = [
3787
+ const __iconNode$k = [
3773
3788
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
3774
3789
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
3775
3790
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
3776
3791
  ];
3777
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$j);
3792
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$k);
3793
+ /**
3794
+ * @license lucide-react v0.552.0 - ISC
3795
+ *
3796
+ * This source code is licensed under the ISC license.
3797
+ * See the LICENSE file in the root directory of this source tree.
3798
+ */
3799
+ const __iconNode$j = [
3800
+ ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
3801
+ ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
3802
+ ];
3803
+ const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$j);
3778
3804
  /**
3779
3805
  * @license lucide-react v0.552.0 - ISC
3780
3806
  *
@@ -4070,6 +4096,7 @@ function parseTaskMarkdown(content2, filePath) {
4070
4096
  labels: frontmatter.labels || [],
4071
4097
  milestone: frontmatter.milestone,
4072
4098
  dependencies: frontmatter.dependencies || [],
4099
+ references: frontmatter.references || [],
4073
4100
  parentTaskId: frontmatter.parentTaskId,
4074
4101
  subtasks: frontmatter.subtasks,
4075
4102
  branch: frontmatter.branch,
@@ -4102,6 +4129,9 @@ function serializeTaskMarkdown(task) {
4102
4129
  if (task.dependencies && task.dependencies.length > 0) {
4103
4130
  lines.push(`dependencies: [${task.dependencies.join(", ")}]`);
4104
4131
  }
4132
+ if (task.references && task.references.length > 0) {
4133
+ lines.push(`references: [${task.references.join(", ")}]`);
4134
+ }
4105
4135
  if (task.parentTaskId) {
4106
4136
  lines.push(`parentTaskId: ${task.parentTaskId}`);
4107
4137
  }
@@ -4197,6 +4227,7 @@ function parseFrontmatter(raw2) {
4197
4227
  case "assignee":
4198
4228
  case "labels":
4199
4229
  case "dependencies":
4230
+ case "references":
4200
4231
  case "subtasks":
4201
4232
  result[key2] = parseArrayValue(value);
4202
4233
  break;
@@ -5469,6 +5500,7 @@ class Core {
5469
5500
  labels: input.labels || [],
5470
5501
  milestone: input.milestone,
5471
5502
  dependencies: input.dependencies || [],
5503
+ references: input.references || [],
5472
5504
  parentTaskId: input.parentTaskId,
5473
5505
  description: input.description,
5474
5506
  implementationPlan: input.implementationPlan,
@@ -5520,7 +5552,8 @@ class Core {
5520
5552
  implementationPlan: input.clearImplementationPlan ? void 0 : input.implementationPlan ?? existing.implementationPlan,
5521
5553
  implementationNotes: input.clearImplementationNotes ? void 0 : input.implementationNotes ?? existing.implementationNotes,
5522
5554
  ordinal: input.ordinal ?? existing.ordinal,
5523
- dependencies: input.dependencies ?? existing.dependencies
5555
+ dependencies: input.dependencies ?? existing.dependencies,
5556
+ references: input.references ?? existing.references ?? []
5524
5557
  };
5525
5558
  if (input.labels) {
5526
5559
  updated.labels = input.labels;
@@ -5547,6 +5580,15 @@ class Core {
5547
5580
  return !((_a = input.removeDependencies) == null ? void 0 : _a.includes(d));
5548
5581
  });
5549
5582
  }
5583
+ if (input.addReferences) {
5584
+ updated.references = [.../* @__PURE__ */ new Set([...updated.references || [], ...input.addReferences])];
5585
+ }
5586
+ if (input.removeReferences) {
5587
+ updated.references = (updated.references || []).filter((r2) => {
5588
+ var _a;
5589
+ return !((_a = input.removeReferences) == null ? void 0 : _a.includes(r2));
5590
+ });
5591
+ }
5550
5592
  if (input.acceptanceCriteria) {
5551
5593
  updated.acceptanceCriteriaItems = input.acceptanceCriteria.map((ac, i) => ({
5552
5594
  index: i + 1,
@@ -52871,13 +52913,41 @@ const MetadataRow = ({ icon, label, value }) => {
52871
52913
  );
52872
52914
  };
52873
52915
  const TaskDetailPanel = ({ context, actions, events: events2, config }) => {
52916
+ var _a;
52874
52917
  const { theme: theme2 } = useTheme();
52875
52918
  const [selectedTask, setSelectedTask] = useState(null);
52919
+ const [claudeAssignment, setClaudeAssignment] = useState({ status: "idle" });
52876
52920
  const { editable = false } = config ?? {};
52921
+ const repoCapabilities = context.getRepositorySlice("repoCapabilities");
52922
+ const hasClaudeWorkflow = ((_a = repoCapabilities == null ? void 0 : repoCapabilities.data) == null ? void 0 : _a.hasClaudeWorkflow) ?? false;
52923
+ const handleAssignToClaude = useCallback(() => {
52924
+ if (!events2 || !selectedTask) return;
52925
+ setClaudeAssignment({ status: "loading" });
52926
+ events2.emit({
52927
+ type: "task:assign-to-claude",
52928
+ source: "task-detail-panel",
52929
+ timestamp: Date.now(),
52930
+ payload: {
52931
+ taskId: selectedTask.id,
52932
+ task: {
52933
+ id: selectedTask.id,
52934
+ title: selectedTask.title,
52935
+ description: selectedTask.description,
52936
+ priority: selectedTask.priority,
52937
+ labels: selectedTask.labels,
52938
+ assignee: selectedTask.assignee,
52939
+ acceptanceCriteria: selectedTask.acceptanceCriteriaItems,
52940
+ implementationPlan: selectedTask.implementationPlan,
52941
+ rawContent: selectedTask.rawContent
52942
+ }
52943
+ }
52944
+ });
52945
+ }, [events2, selectedTask]);
52877
52946
  useEffect(() => {
52878
52947
  if (!events2) return;
52879
52948
  const handleTaskSelected = (event) => {
52880
52949
  setSelectedTask(event.payload.task);
52950
+ setClaudeAssignment({ status: "idle" });
52881
52951
  };
52882
52952
  const unsubscribe = events2.on("task:selected", handleTaskSelected);
52883
52953
  return () => {
@@ -52886,6 +52956,35 @@ const TaskDetailPanel = ({ context, actions, events: events2, config }) => {
52886
52956
  }
52887
52957
  };
52888
52958
  }, [events2]);
52959
+ useEffect(() => {
52960
+ if (!events2) return;
52961
+ const unsubscribers = [
52962
+ events2.on("task:assigned-to-claude", (event) => {
52963
+ const payload = event.payload;
52964
+ if (payload.taskId === (selectedTask == null ? void 0 : selectedTask.id)) {
52965
+ setClaudeAssignment({
52966
+ status: "success",
52967
+ issueNumber: payload.issueNumber,
52968
+ issueUrl: payload.issueUrl
52969
+ });
52970
+ }
52971
+ }),
52972
+ events2.on("task:assign-to-claude:error", (event) => {
52973
+ const payload = event.payload;
52974
+ if (payload.taskId === (selectedTask == null ? void 0 : selectedTask.id)) {
52975
+ setClaudeAssignment({
52976
+ status: "error",
52977
+ error: payload.error
52978
+ });
52979
+ }
52980
+ })
52981
+ ];
52982
+ return () => {
52983
+ unsubscribers.forEach((unsub) => {
52984
+ if (typeof unsub === "function") unsub();
52985
+ });
52986
+ };
52987
+ }, [events2, selectedTask == null ? void 0 : selectedTask.id]);
52889
52988
  const handleBack = () => {
52890
52989
  setSelectedTask(null);
52891
52990
  if (events2) {
@@ -52990,38 +53089,159 @@ const TaskDetailPanel = ({ context, actions, events: events2, config }) => {
52990
53089
  ),
52991
53090
  /* @__PURE__ */ jsx(StatusBadge, { status: selectedTask.status })
52992
53091
  ] }),
52993
- /* @__PURE__ */ jsx(
52994
- "button",
52995
- {
52996
- onClick: handleBack,
52997
- style: {
52998
- display: "flex",
52999
- alignItems: "center",
53000
- justifyContent: "center",
53001
- width: "32px",
53002
- height: "32px",
53003
- border: `1px solid ${theme2.colors.border}`,
53004
- borderRadius: theme2.radii[1],
53005
- background: theme2.colors.surface,
53006
- cursor: "pointer",
53007
- color: theme2.colors.textSecondary,
53008
- transition: "all 0.2s ease"
53009
- },
53010
- onMouseEnter: (e) => {
53011
- e.currentTarget.style.background = theme2.colors.backgroundSecondary;
53012
- e.currentTarget.style.color = theme2.colors.text;
53013
- },
53014
- onMouseLeave: (e) => {
53015
- e.currentTarget.style.background = theme2.colors.surface;
53016
- e.currentTarget.style.color = theme2.colors.textSecondary;
53017
- },
53018
- title: "Close",
53019
- children: /* @__PURE__ */ jsx(X, { size: 16 })
53020
- }
53021
- )
53092
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
53093
+ hasClaudeWorkflow && claudeAssignment.status === "idle" && /* @__PURE__ */ jsxs(
53094
+ "button",
53095
+ {
53096
+ onClick: handleAssignToClaude,
53097
+ style: {
53098
+ display: "flex",
53099
+ alignItems: "center",
53100
+ gap: "6px",
53101
+ padding: "6px 12px",
53102
+ border: `1px solid ${theme2.colors.primary}`,
53103
+ borderRadius: theme2.radii[1],
53104
+ background: "transparent",
53105
+ cursor: "pointer",
53106
+ color: theme2.colors.primary,
53107
+ fontSize: theme2.fontSizes[1],
53108
+ fontWeight: theme2.fontWeights.medium,
53109
+ transition: "all 0.2s ease"
53110
+ },
53111
+ onMouseEnter: (e) => {
53112
+ e.currentTarget.style.background = theme2.colors.primary;
53113
+ e.currentTarget.style.color = theme2.colors.background;
53114
+ },
53115
+ onMouseLeave: (e) => {
53116
+ e.currentTarget.style.background = "transparent";
53117
+ e.currentTarget.style.color = theme2.colors.primary;
53118
+ },
53119
+ title: "Assign to Claude",
53120
+ children: [
53121
+ /* @__PURE__ */ jsx(Bot, { size: 14 }),
53122
+ "Assign to Claude"
53123
+ ]
53124
+ }
53125
+ ),
53126
+ claudeAssignment.status === "loading" && /* @__PURE__ */ jsxs(
53127
+ "div",
53128
+ {
53129
+ style: {
53130
+ display: "flex",
53131
+ alignItems: "center",
53132
+ gap: "6px",
53133
+ padding: "6px 12px",
53134
+ color: theme2.colors.textSecondary,
53135
+ fontSize: theme2.fontSizes[1]
53136
+ },
53137
+ children: [
53138
+ /* @__PURE__ */ jsx(LoaderCircle, { size: 14, style: { animation: "spin 1s linear infinite" } }),
53139
+ "Assigning..."
53140
+ ]
53141
+ }
53142
+ ),
53143
+ claudeAssignment.status === "success" && /* @__PURE__ */ jsxs(
53144
+ "a",
53145
+ {
53146
+ href: claudeAssignment.issueUrl,
53147
+ target: "_blank",
53148
+ rel: "noopener noreferrer",
53149
+ style: {
53150
+ display: "flex",
53151
+ alignItems: "center",
53152
+ gap: "6px",
53153
+ padding: "6px 12px",
53154
+ border: `1px solid ${theme2.colors.success}`,
53155
+ borderRadius: theme2.radii[1],
53156
+ background: `${theme2.colors.success}15`,
53157
+ color: theme2.colors.success,
53158
+ fontSize: theme2.fontSizes[1],
53159
+ fontWeight: theme2.fontWeights.medium,
53160
+ textDecoration: "none",
53161
+ transition: "all 0.2s ease"
53162
+ },
53163
+ children: [
53164
+ /* @__PURE__ */ jsx(CircleCheckBig, { size: 14 }),
53165
+ "Issue #",
53166
+ claudeAssignment.issueNumber
53167
+ ]
53168
+ }
53169
+ ),
53170
+ claudeAssignment.status === "error" && /* @__PURE__ */ jsxs(
53171
+ "div",
53172
+ {
53173
+ style: {
53174
+ display: "flex",
53175
+ alignItems: "center",
53176
+ gap: "6px",
53177
+ padding: "6px 12px",
53178
+ border: `1px solid ${theme2.colors.error}`,
53179
+ borderRadius: theme2.radii[1],
53180
+ background: `${theme2.colors.error}15`,
53181
+ color: theme2.colors.error,
53182
+ fontSize: theme2.fontSizes[1]
53183
+ },
53184
+ title: claudeAssignment.error,
53185
+ children: [
53186
+ /* @__PURE__ */ jsx(CircleAlert, { size: 14 }),
53187
+ "Failed",
53188
+ /* @__PURE__ */ jsx(
53189
+ "button",
53190
+ {
53191
+ onClick: () => setClaudeAssignment({ status: "idle" }),
53192
+ style: {
53193
+ background: "none",
53194
+ border: "none",
53195
+ color: theme2.colors.error,
53196
+ cursor: "pointer",
53197
+ padding: "0 0 0 4px",
53198
+ fontSize: theme2.fontSizes[0],
53199
+ textDecoration: "underline"
53200
+ },
53201
+ children: "Retry"
53202
+ }
53203
+ )
53204
+ ]
53205
+ }
53206
+ ),
53207
+ /* @__PURE__ */ jsx(
53208
+ "button",
53209
+ {
53210
+ onClick: handleBack,
53211
+ style: {
53212
+ display: "flex",
53213
+ alignItems: "center",
53214
+ justifyContent: "center",
53215
+ width: "32px",
53216
+ height: "32px",
53217
+ border: `1px solid ${theme2.colors.border}`,
53218
+ borderRadius: theme2.radii[1],
53219
+ background: theme2.colors.surface,
53220
+ cursor: "pointer",
53221
+ color: theme2.colors.textSecondary,
53222
+ transition: "all 0.2s ease"
53223
+ },
53224
+ onMouseEnter: (e) => {
53225
+ e.currentTarget.style.background = theme2.colors.backgroundSecondary;
53226
+ e.currentTarget.style.color = theme2.colors.text;
53227
+ },
53228
+ onMouseLeave: (e) => {
53229
+ e.currentTarget.style.background = theme2.colors.surface;
53230
+ e.currentTarget.style.color = theme2.colors.textSecondary;
53231
+ },
53232
+ title: "Close",
53233
+ children: /* @__PURE__ */ jsx(X, { size: 16 })
53234
+ }
53235
+ )
53236
+ ] })
53022
53237
  ]
53023
53238
  }
53024
53239
  ),
53240
+ /* @__PURE__ */ jsx("style", { children: `
53241
+ @keyframes spin {
53242
+ to { transform: rotate(360deg); }
53243
+ }
53244
+ ` }),
53025
53245
  /* @__PURE__ */ jsx(
53026
53246
  "h1",
53027
53247
  {