@industry-theme/backlogmd-kanban-panel 1.0.30 → 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,5 +1,17 @@
1
1
  import React from 'react';
2
2
  import type { PanelComponentProps } from '../types';
3
+ /**
4
+ * Configuration options for TaskDetailPanel
5
+ */
6
+ export interface TaskDetailPanelConfig {
7
+ editable?: boolean;
8
+ }
9
+ /**
10
+ * Extended props for TaskDetailPanel that includes optional config
11
+ */
12
+ export interface TaskDetailPanelProps extends PanelComponentProps {
13
+ config?: TaskDetailPanelConfig;
14
+ }
3
15
  /**
4
16
  * TaskDetailPanel - A panel for viewing task details from Backlog.md
5
17
  *
@@ -10,5 +22,5 @@ import type { PanelComponentProps } from '../types';
10
22
  *
11
23
  * Listens for 'task:selected' events from other panels (e.g., KanbanPanel)
12
24
  */
13
- export declare const TaskDetailPanel: React.FC<PanelComponentProps>;
25
+ export declare const TaskDetailPanel: React.FC<TaskDetailPanelProps>;
14
26
  //# sourceMappingURL=TaskDetailPanel.d.ts.map
@@ -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;AA+IvE;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAkRzD,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"}
@@ -2,11 +2,12 @@ import React from 'react';
2
2
  import type { StoryObj } from '@storybook/react-vite';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: React.FC<import("@principal-ade/panel-framework-core").PanelComponentProps>;
5
+ component: React.FC<import("./TaskDetailPanel").TaskDetailPanelProps>;
6
6
  parameters: {
7
7
  layout: string;
8
8
  };
9
9
  decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
10
+ config?: import("./TaskDetailPanel").TaskDetailPanelConfig | undefined;
10
11
  context: import("@principal-ade/panel-framework-core").PanelContextValue;
11
12
  actions: import("@principal-ade/panel-framework-core").PanelActions;
12
13
  events: import("@principal-ade/panel-framework-core").PanelEventEmitter;
@@ -1 +1 @@
1
- {"version":3,"file":"TaskDetailPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/TaskDetailPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAW5D,QAAA,MAAM,IAAI;;;;;;;;;;;;CAkB8B,CAAC;AAEzC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAkFnC,eAAO,MAAM,UAAU,EAAE,KAaxB,CAAC;AAQF,eAAO,MAAM,gBAAgB,EAAE,KAoB9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KA6B9B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA4BzB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KA2B5B,CAAC"}
1
+ {"version":3,"file":"TaskDetailPanel.stories.d.ts","sourceRoot":"","sources":["../../src/panels/TaskDetailPanel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAW5D,QAAA,MAAM,IAAI;;;;;;;;;;;;;CAkB8B,CAAC;AAEzC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAkFnC,eAAO,MAAM,UAAU,EAAE,KAaxB,CAAC;AAQF,eAAO,MAAM,gBAAgB,EAAE,KAoB9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KA6B9B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA4BzB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KA2B5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"KanbanColumn.d.ts","sourceRoot":"","sources":["../../../../src/panels/kanban/components/KanbanColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,UAAU,iBAAiB;IACzB,mDAAmD;IACnD,QAAQ,EAAE,YAAY,CAAC;IACvB,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,sEAAsE;IACtE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iCAAiC;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAuKpD,CAAC"}
1
+ {"version":3,"file":"KanbanColumn.d.ts","sourceRoot":"","sources":["../../../../src/panels/kanban/components/KanbanColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,UAAU,iBAAiB;IACzB,mDAAmD;IACnD,QAAQ,EAAE,YAAY,CAAC;IACvB,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,4DAA4D;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,sEAAsE;IACtE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iCAAiC;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyKpD,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,
@@ -6354,7 +6396,7 @@ const KanbanColumn = ({
6354
6396
  transition: "background-color 0.2s ease, border 0.2s ease"
6355
6397
  },
6356
6398
  children: [
6357
- /* @__PURE__ */ jsxs(
6399
+ !fullWidth && /* @__PURE__ */ jsxs(
6358
6400
  "div",
6359
6401
  {
6360
6402
  style: {
@@ -49328,7 +49370,8 @@ var createIndustryMarkdownComponents = ({
49328
49370
  enableHtmlPopout,
49329
49371
  slideHeaderMarginTopOverride,
49330
49372
  index: index2,
49331
- repositoryInfo
49373
+ repositoryInfo,
49374
+ editable = false
49332
49375
  }) => {
49333
49376
  const getLuminance = (hex) => {
49334
49377
  const rgb = hex.replace("#", "").match(/.{2}/g);
@@ -49460,19 +49503,20 @@ var createIndustryMarkdownComponents = ({
49460
49503
  checked: isChecked,
49461
49504
  onChange: handleChange,
49462
49505
  onClick: (e) => e.stopPropagation(),
49506
+ disabled: !editable,
49463
49507
  style: {
49464
49508
  marginRight: theme2.space[2],
49465
49509
  marginTop: theme2.space[1],
49466
49510
  width: "16px",
49467
49511
  height: "16px",
49468
- cursor: "pointer"
49512
+ cursor: editable ? "pointer" : "default"
49469
49513
  },
49470
49514
  id
49471
49515
  }), /* @__PURE__ */ React2__default.createElement("label", {
49472
49516
  htmlFor: id,
49473
49517
  style: {
49474
49518
  flex: 1,
49475
- cursor: "pointer",
49519
+ cursor: editable ? "pointer" : "default",
49476
49520
  color: isChecked ? theme2.colors.textMuted : "inherit",
49477
49521
  lineHeight: theme2.lineHeights.relaxed
49478
49522
  }
@@ -50554,7 +50598,8 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
50554
50598
  maxScreenWidth: _maxScreenWidth,
50555
50599
  enableKeyboardScrolling = true,
50556
50600
  keyboardScrollConfig,
50557
- repositoryInfo
50601
+ repositoryInfo,
50602
+ editable = false
50558
50603
  }) {
50559
50604
  const slideRef = useRef(null);
50560
50605
  const scrollPositionsRef = useRef(/* @__PURE__ */ new Map());
@@ -50910,7 +50955,8 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
50910
50955
  enableHtmlPopout,
50911
50956
  slideHeaderMarginTopOverride,
50912
50957
  index: chunkIndex,
50913
- repositoryInfo
50958
+ repositoryInfo,
50959
+ editable
50914
50960
  });
50915
50961
  if (searchQuery) {
50916
50962
  return {
@@ -50943,7 +50989,8 @@ var IndustryMarkdownSlide = React2__default.memo(function IndustryMarkdownSlide2
50943
50989
  enableHtmlPopout,
50944
50990
  slideHeaderMarginTopOverride,
50945
50991
  repositoryInfo,
50946
- searchQuery
50992
+ searchQuery,
50993
+ editable
50947
50994
  ]);
50948
50995
  return /* @__PURE__ */ React2__default.createElement("div", {
50949
50996
  className: "markdown-slide",
@@ -52728,7 +52775,8 @@ var DocumentView = ({
52728
52775
  repositoryInfo,
52729
52776
  fontSizeScale,
52730
52777
  theme: theme2,
52731
- transparentBackground = false
52778
+ transparentBackground = false,
52779
+ editable = false
52732
52780
  }) => {
52733
52781
  const containerRef = useRef(null);
52734
52782
  const backgroundColor = transparentBackground ? "transparent" : theme2.colors.background;
@@ -52760,7 +52808,8 @@ var DocumentView = ({
52760
52808
  fontSizeScale,
52761
52809
  handlePromptCopy,
52762
52810
  repositoryInfo,
52763
- transparentBackground
52811
+ transparentBackground,
52812
+ editable
52764
52813
  })));
52765
52814
  };
52766
52815
  function getTaskBodyMarkdown(task, options = {}) {
@@ -52863,13 +52912,42 @@ const MetadataRow = ({ icon, label, value }) => {
52863
52912
  }
52864
52913
  );
52865
52914
  };
52866
- const TaskDetailPanel = ({ context, actions, events: events2 }) => {
52915
+ const TaskDetailPanel = ({ context, actions, events: events2, config }) => {
52916
+ var _a;
52867
52917
  const { theme: theme2 } = useTheme();
52868
52918
  const [selectedTask, setSelectedTask] = useState(null);
52919
+ const [claudeAssignment, setClaudeAssignment] = useState({ status: "idle" });
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]);
52869
52946
  useEffect(() => {
52870
52947
  if (!events2) return;
52871
52948
  const handleTaskSelected = (event) => {
52872
52949
  setSelectedTask(event.payload.task);
52950
+ setClaudeAssignment({ status: "idle" });
52873
52951
  };
52874
52952
  const unsubscribe = events2.on("task:selected", handleTaskSelected);
52875
52953
  return () => {
@@ -52878,6 +52956,35 @@ const TaskDetailPanel = ({ context, actions, events: events2 }) => {
52878
52956
  }
52879
52957
  };
52880
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]);
52881
52988
  const handleBack = () => {
52882
52989
  setSelectedTask(null);
52883
52990
  if (events2) {
@@ -52982,38 +53089,159 @@ const TaskDetailPanel = ({ context, actions, events: events2 }) => {
52982
53089
  ),
52983
53090
  /* @__PURE__ */ jsx(StatusBadge, { status: selectedTask.status })
52984
53091
  ] }),
52985
- /* @__PURE__ */ jsx(
52986
- "button",
52987
- {
52988
- onClick: handleBack,
52989
- style: {
52990
- display: "flex",
52991
- alignItems: "center",
52992
- justifyContent: "center",
52993
- width: "32px",
52994
- height: "32px",
52995
- border: `1px solid ${theme2.colors.border}`,
52996
- borderRadius: theme2.radii[1],
52997
- background: theme2.colors.surface,
52998
- cursor: "pointer",
52999
- color: theme2.colors.textSecondary,
53000
- transition: "all 0.2s ease"
53001
- },
53002
- onMouseEnter: (e) => {
53003
- e.currentTarget.style.background = theme2.colors.backgroundSecondary;
53004
- e.currentTarget.style.color = theme2.colors.text;
53005
- },
53006
- onMouseLeave: (e) => {
53007
- e.currentTarget.style.background = theme2.colors.surface;
53008
- e.currentTarget.style.color = theme2.colors.textSecondary;
53009
- },
53010
- title: "Close",
53011
- children: /* @__PURE__ */ jsx(X, { size: 16 })
53012
- }
53013
- )
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
+ ] })
53014
53237
  ]
53015
53238
  }
53016
53239
  ),
53240
+ /* @__PURE__ */ jsx("style", { children: `
53241
+ @keyframes spin {
53242
+ to { transform: rotate(360deg); }
53243
+ }
53244
+ ` }),
53017
53245
  /* @__PURE__ */ jsx(
53018
53246
  "h1",
53019
53247
  {
@@ -53119,7 +53347,8 @@ const TaskDetailPanel = ({ context, actions, events: events2 }) => {
53119
53347
  content: bodyMarkdown,
53120
53348
  theme: theme2,
53121
53349
  maxWidth: "100%",
53122
- transparentBackground: true
53350
+ transparentBackground: true,
53351
+ editable
53123
53352
  }
53124
53353
  ) : /* @__PURE__ */ jsx(
53125
53354
  "div",