@nextop-os/workspace-issue-manager 0.0.28 → 0.0.29

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.
@@ -23,7 +23,7 @@ import {
23
23
  resolveIssueManagerTopicDeleteErrorMessage,
24
24
  toContextRefInput,
25
25
  toIssueManagerWorkspaceFileLinkInput
26
- } from "./chunk-I7SVY3KV.js";
26
+ } from "./chunk-DRWYHOZ2.js";
27
27
  import {
28
28
  appendIssueManagerWorkspaceFileLinksToContent,
29
29
  clampIssueManagerSidebarWidth,
@@ -34,7 +34,7 @@ import {
34
34
  issueManagerSidebarMinWidth,
35
35
  normalizeIssueManagerContent,
36
36
  shouldAutoCollapseIssueManagerSidebar
37
- } from "./chunk-SUCZIXKI.js";
37
+ } from "./chunk-YN5NYKAA.js";
38
38
 
39
39
  // src/ui/react/internal/shell/IssueManagerNodeState.ts
40
40
  import { useEffect, useEffectEvent, useState } from "react";
@@ -85,25 +85,26 @@ function createIssueManagerKeyedReplayEventHub(input) {
85
85
  };
86
86
  }
87
87
  var issueManagerTopicHeaderStateHub = createIssueManagerKeyedReplayEventHub({
88
- getKey: (detail) => detail.nodeId
88
+ getKey: issueManagerNodeScopeKey
89
89
  });
90
90
  var issueManagerTopicSelectionHub = createIssueManagerKeyedEventHub({
91
- getKey: (detail) => detail.nodeId
91
+ getKey: issueManagerNodeScopeKey
92
92
  });
93
93
  var issueManagerTopicCreateHub = createIssueManagerKeyedEventHub({
94
- getKey: (detail) => detail.nodeId
94
+ getKey: issueManagerNodeScopeKey
95
95
  });
96
96
  var issueManagerTopicDeleteHub = createIssueManagerKeyedEventHub({
97
- getKey: (detail) => detail.nodeId
97
+ getKey: issueManagerNodeScopeKey
98
98
  });
99
99
  var issueManagerTopicUpdateHub = createIssueManagerKeyedEventHub({
100
- getKey: (detail) => detail.nodeId
100
+ getKey: issueManagerNodeScopeKey
101
101
  });
102
102
  function resolveIssueManagerTopicHeaderState(input) {
103
- return issueManagerTopicHeaderStateHub.get(input.nodeId) ?? {
103
+ return issueManagerTopicHeaderStateHub.get(issueManagerNodeScopeKey(input)) ?? {
104
104
  activeTopicId: input.activeTopicId,
105
105
  nodeId: input.nodeId,
106
- topics: []
106
+ topics: [],
107
+ workspaceId: input.workspaceId
107
108
  };
108
109
  }
109
110
  function dispatchIssueManagerTaskListCollapsed(input) {
@@ -142,7 +143,7 @@ function useIssueManagerTaskListCollapsedSync(input) {
142
143
  }
143
144
  const handleTaskListCollapsedChange = (event) => {
144
145
  const detail = event.detail;
145
- if (detail?.nodeId !== input.nodeId) {
146
+ if (detail?.nodeId !== input.nodeId || detail.workspaceId !== input.workspaceId) {
146
147
  return;
147
148
  }
148
149
  onCollapsedChange(detail.collapsed);
@@ -157,7 +158,7 @@ function useIssueManagerTaskListCollapsedSync(input) {
157
158
  handleTaskListCollapsedChange
158
159
  );
159
160
  };
160
- }, [input.nodeId, onCollapsedChange]);
161
+ }, [input.nodeId, input.workspaceId, onCollapsedChange]);
161
162
  }
162
163
  function useIssueManagerTopicHeaderStateSync(input) {
163
164
  const [state, setState] = useState(
@@ -165,18 +166,18 @@ function useIssueManagerTopicHeaderStateSync(input) {
165
166
  );
166
167
  useEffect(() => {
167
168
  setState(
168
- (current) => current.activeTopicId === input.activeTopicId && current.nodeId === input.nodeId && current.topics === resolveIssueManagerTopicHeaderState(input).topics ? current : resolveIssueManagerTopicHeaderState(input)
169
+ (current) => current.activeTopicId === input.activeTopicId && current.nodeId === input.nodeId && current.workspaceId === input.workspaceId && current.topics === resolveIssueManagerTopicHeaderState(input).topics ? current : resolveIssueManagerTopicHeaderState(input)
169
170
  );
170
- }, [input.activeTopicId, input.nodeId]);
171
+ }, [input.activeTopicId, input.nodeId, input.workspaceId]);
171
172
  useEffect(() => {
172
173
  const handleTopicHeaderStateChange = (detail) => {
173
174
  setState(detail);
174
175
  };
175
176
  return issueManagerTopicHeaderStateHub.subscribe(
176
- input.nodeId,
177
+ issueManagerNodeScopeKey(input),
177
178
  handleTopicHeaderStateChange
178
179
  );
179
- }, [input.nodeId]);
180
+ }, [input.nodeId, input.workspaceId]);
180
181
  return state;
181
182
  }
182
183
  function useIssueManagerTopicHeaderCommandSync(input) {
@@ -198,19 +199,19 @@ function useIssueManagerTopicHeaderCommandSync(input) {
198
199
  onUpdateTopic(detail.input);
199
200
  };
200
201
  const unsubscribeSelection = issueManagerTopicSelectionHub.subscribe(
201
- input.nodeId,
202
+ issueManagerNodeScopeKey(input),
202
203
  handleTopicSelection
203
204
  );
204
205
  const unsubscribeCreate = issueManagerTopicCreateHub.subscribe(
205
- input.nodeId,
206
+ issueManagerNodeScopeKey(input),
206
207
  handleTopicCreate
207
208
  );
208
209
  const unsubscribeDelete = issueManagerTopicDeleteHub.subscribe(
209
- input.nodeId,
210
+ issueManagerNodeScopeKey(input),
210
211
  handleTopicDelete
211
212
  );
212
213
  const unsubscribeUpdate = issueManagerTopicUpdateHub.subscribe(
213
- input.nodeId,
214
+ issueManagerNodeScopeKey(input),
214
215
  handleTopicUpdate
215
216
  );
216
217
  return () => {
@@ -221,6 +222,7 @@ function useIssueManagerTopicHeaderCommandSync(input) {
221
222
  };
222
223
  }, [
223
224
  input.nodeId,
225
+ input.workspaceId,
224
226
  onCreateTopic,
225
227
  onDeleteTopic,
226
228
  onSelectTopic,
@@ -236,7 +238,8 @@ function useIssueManagerNodeHeaderView(input) {
236
238
  }, [input.isSidebarCollapsed]);
237
239
  useIssueManagerTaskListCollapsedSync({
238
240
  nodeId: input.nodeId,
239
- onCollapsedChange: setManualCollapsed
241
+ onCollapsedChange: setManualCollapsed,
242
+ workspaceId: input.workspaceId
240
243
  });
241
244
  const effectiveCollapsed = input.isSidebarAutoCollapsed || manualCollapsed;
242
245
  return {
@@ -247,6 +250,9 @@ function useIssueManagerNodeHeaderView(input) {
247
250
  }
248
251
  };
249
252
  }
253
+ function issueManagerNodeScopeKey(input) {
254
+ return `${input.workspaceId}\0${input.nodeId}`;
255
+ }
250
256
  function resolveIssueManagerSelectedIssue(input) {
251
257
  if (!input.selectedIssueId) {
252
258
  return null;
@@ -272,10 +278,31 @@ import {
272
278
  } from "@nextop-os/workspace-file-reference/react";
273
279
 
274
280
  // src/ui/react/internal/controller/useIssueManagerController.ts
275
- import { useMemo as useMemo2 } from "react";
281
+ import { useEffect as useEffect3, useMemo as useMemo2, useState as useState2 } from "react";
276
282
 
277
283
  // src/ui/react/internal/controller/IssueManagerControllerCapabilities.ts
278
- var issueManagerProviderOptions = ["codex"];
284
+ var defaultIssueManagerAgentProviderOptions = [
285
+ {
286
+ label: "Codex",
287
+ provider: "codex"
288
+ }
289
+ ];
290
+ function resolveIssueManagerAgentProviderOptions(feature) {
291
+ if (!feature.agentProviderOptions) {
292
+ return defaultIssueManagerAgentProviderOptions;
293
+ }
294
+ const configuredOptions = feature.agentProviderOptions.getOptions();
295
+ const normalizedOptions = configuredOptions.map((option) => {
296
+ const disabledReason = option.disabledReason?.trim();
297
+ return {
298
+ ...option.disabled === true ? { disabled: true } : {},
299
+ ...disabledReason ? { disabledReason } : {},
300
+ label: option.label.trim() || option.provider.trim(),
301
+ provider: option.provider.trim()
302
+ };
303
+ }).filter((option) => option.provider && option.label);
304
+ return normalizedOptions;
305
+ }
279
306
  function resolveIssueManagerControllerCapabilities(feature) {
280
307
  return {
281
308
  canSelectExecutionDirectory: typeof feature.executionDirectoryPicker?.selectDirectory === "function",
@@ -560,17 +587,82 @@ function createIssueManagerInsertReferencesPlan(input) {
560
587
 
561
588
  // src/services/internal/run/controllerRunCommands.ts
562
589
  async function executeIssueManagerRunTask(input) {
563
- const result = await input.feature.agentRunner.runTask({
564
- ...input.executionDirectory?.trim() ? { executionDirectory: input.executionDirectory.trim() } : {},
565
- issue: input.issue,
566
- provider: input.provider,
567
- ...input.task ? { task: input.task } : {},
590
+ const agentSessionId = createIssueManagerAgentSessionId();
591
+ const run = await input.feature.backend.createRun({
592
+ agentProvider: input.provider,
593
+ agentSessionId,
594
+ issueId: input.issue.issueId,
595
+ ...input.task ? { taskId: input.task.taskId } : {},
596
+ workspaceId: input.workspaceId
597
+ });
598
+ let result;
599
+ try {
600
+ result = await input.feature.agentRunner.runTask({
601
+ agentSessionId,
602
+ run,
603
+ ...input.executionDirectory?.trim() ? { executionDirectory: input.executionDirectory.trim() } : {},
604
+ issue: input.issue,
605
+ provider: input.provider,
606
+ ...input.task ? { task: input.task } : {},
607
+ workspaceId: input.workspaceId
608
+ });
609
+ } catch (error) {
610
+ await input.feature.backend.completeRun({
611
+ errorMessage: errorMessageFromUnknown(error),
612
+ issueId: input.issue.issueId,
613
+ outputs: [],
614
+ runId: run.runId,
615
+ status: "failed",
616
+ ...input.task ? { taskId: input.task.taskId } : {},
617
+ workspaceId: input.workspaceId
618
+ });
619
+ throw error;
620
+ }
621
+ const completed = await input.feature.backend.completeRun({
622
+ errorMessage: result.errorMessage,
623
+ issueId: input.issue.issueId,
624
+ outputs: result.outputs ?? [],
625
+ runId: run.runId,
626
+ status: result.status,
627
+ summary: result.summary,
628
+ ...input.task ? { taskId: input.task.taskId } : {},
568
629
  workspaceId: input.workspaceId
569
630
  });
570
631
  return {
571
- status: result.status
632
+ status: completed.run.status
572
633
  };
573
634
  }
635
+ function createIssueManagerAgentSessionId() {
636
+ const randomUUID = globalThis.crypto?.randomUUID?.();
637
+ if (randomUUID) {
638
+ return randomUUID;
639
+ }
640
+ const bytes = new Uint8Array(16);
641
+ const crypto = globalThis.crypto;
642
+ if (crypto?.getRandomValues) {
643
+ crypto.getRandomValues(bytes);
644
+ } else {
645
+ for (let index = 0; index < bytes.length; index += 1) {
646
+ bytes[index] = Math.floor(Math.random() * 256);
647
+ }
648
+ }
649
+ bytes[6] = (bytes[6] ?? 0) & 15 | 64;
650
+ bytes[8] = (bytes[8] ?? 0) & 63 | 128;
651
+ const hex = Array.from(
652
+ bytes,
653
+ (byte) => byte.toString(16).padStart(2, "0")
654
+ ).join("");
655
+ return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
656
+ }
657
+ function errorMessageFromUnknown(error) {
658
+ if (error instanceof Error) {
659
+ return error.message;
660
+ }
661
+ if (typeof error === "string") {
662
+ return error;
663
+ }
664
+ return String(error);
665
+ }
574
666
 
575
667
  // src/services/internal/save/controllerSaveCommands.ts
576
668
  async function executeIssueManagerSaveIssue(input) {
@@ -1438,6 +1530,15 @@ function useIssueManagerController({
1438
1530
  () => resolveIssueManagerControllerCapabilities(feature),
1439
1531
  [feature]
1440
1532
  );
1533
+ const [providerOptions, setProviderOptions] = useState2(
1534
+ () => resolveIssueManagerAgentProviderOptions(feature)
1535
+ );
1536
+ useEffect3(() => {
1537
+ setProviderOptions(resolveIssueManagerAgentProviderOptions(feature));
1538
+ return feature.agentProviderOptions?.subscribe?.(() => {
1539
+ setProviderOptions(resolveIssueManagerAgentProviderOptions(feature));
1540
+ });
1541
+ }, [feature]);
1441
1542
  const actions = createIssueManagerControllerActionsBridge({
1442
1543
  controllerSession,
1443
1544
  copy,
@@ -1524,7 +1625,7 @@ function useIssueManagerController({
1524
1625
  isRunningTask,
1525
1626
  nodeState,
1526
1627
  notification,
1527
- providerOptions: issueManagerProviderOptions,
1628
+ providerOptions,
1528
1629
  listExecutionDirectoryProjects: () => feature.executionDirectoryPicker?.listUserProjects?.() ?? Promise.resolve({ projects: [] }),
1529
1630
  referenceTarget,
1530
1631
  selectTopic(topicId) {
@@ -1578,7 +1679,8 @@ function useIssueManagerNodeView({
1578
1679
  nodeId,
1579
1680
  onCollapsedChange: (collapsed) => {
1580
1681
  controller.setTaskListCollapsed(collapsed);
1581
- }
1682
+ },
1683
+ workspaceId
1582
1684
  });
1583
1685
  const selectedIssue = resolveIssueManagerSelectedIssue({
1584
1686
  issueDetail: controller.issueDetail.value?.issue ?? null,
@@ -1622,18 +1724,23 @@ import {
1622
1724
 
1623
1725
  // src/ui/IssueManagerNode.tsx
1624
1726
  import {
1625
- useEffect as useEffect10
1727
+ useEffect as useEffect11
1626
1728
  } from "react";
1627
1729
  import { Button as Button12, PanelIcon, cn as cn11 } from "@nextop-os/ui-system";
1628
1730
  import { WorkspaceFileReferencePicker } from "@nextop-os/workspace-file-reference/ui";
1629
1731
 
1630
1732
  // src/ui/internal/shell/IssueManagerShell.tsx
1631
- import { useEffect as useEffect8, useState as useState9 } from "react";
1733
+ import { useEffect as useEffect9, useState as useState10 } from "react";
1632
1734
  import { Button as Button10, FileCreateIcon as FileCreateIcon4, cn as cn9 } from "@nextop-os/ui-system";
1633
1735
 
1634
1736
  // src/ui/internal/shell/IssueManagerPanels.tsx
1635
- import { useState as useState5 } from "react";
1636
- import { Badge as Badge2, Button as Button4, ConfirmationDialog } from "@nextop-os/ui-system";
1737
+ import { useState as useState6 } from "react";
1738
+ import {
1739
+ Badge as Badge2,
1740
+ Button as Button4,
1741
+ ConfirmationDialog,
1742
+ ScrollArea as ScrollArea2
1743
+ } from "@nextop-os/ui-system";
1637
1744
 
1638
1745
  // src/ui/internal/status/IssueManagerStatusBadge.ts
1639
1746
  function issueManagerStatusBadgeVariant(status) {
@@ -1728,20 +1835,23 @@ function IssueManagerDetailTextSection({
1728
1835
  meta,
1729
1836
  tone = "muted"
1730
1837
  }) {
1838
+ const bodyText = stripIssueManagerDescriptionTerminalPunctuation(body);
1839
+ const metaText = meta ? stripIssueManagerDescriptionTerminalPunctuation(meta) : null;
1840
+ const bodyClassName = cn(
1841
+ "max-w-full whitespace-normal break-words text-[14px] leading-5 [overflow-wrap:anywhere]",
1842
+ isPlaceholder ? "font-normal text-[var(--text-secondary)]" : tone === "destructive" ? "font-semibold text-[var(--state-danger)]" : "font-semibold text-[var(--text-primary)]"
1843
+ );
1844
+ if (isPlaceholder) {
1845
+ return /* @__PURE__ */ jsxs2("section", { className: "grid gap-2.5", children: [
1846
+ /* @__PURE__ */ jsx2("h3", { className: "text-sm font-semibold text-[var(--text-primary)]", children: label }),
1847
+ /* @__PURE__ */ jsx2("p", { className: bodyClassName, children: bodyText })
1848
+ ] });
1849
+ }
1731
1850
  return /* @__PURE__ */ jsxs2("section", { className: "grid gap-2.5", children: [
1732
1851
  /* @__PURE__ */ jsx2("h3", { className: "text-sm font-semibold text-[var(--text-primary)]", children: label }),
1733
- /* @__PURE__ */ jsxs2("div", { className: "rounded-[12px] border border-[var(--line-2)] px-4 py-3", children: [
1734
- /* @__PURE__ */ jsx2(
1735
- "p",
1736
- {
1737
- className: cn(
1738
- "truncate text-[14px] leading-5",
1739
- isPlaceholder ? "font-normal text-[var(--text-secondary)]" : tone === "destructive" ? "font-semibold text-[var(--state-danger)]" : "font-semibold text-[var(--text-primary)]"
1740
- ),
1741
- children: stripIssueManagerDescriptionTerminalPunctuation(body)
1742
- }
1743
- ),
1744
- meta ? /* @__PURE__ */ jsx2("p", { className: "mt-1 truncate text-xs font-normal text-[var(--text-secondary)]", children: stripIssueManagerDescriptionTerminalPunctuation(meta) }) : null
1852
+ /* @__PURE__ */ jsxs2("div", { className: "min-w-0 rounded-[12px] border border-[var(--line-2)] px-4 py-3", children: [
1853
+ /* @__PURE__ */ jsx2("p", { className: bodyClassName, children: bodyText }),
1854
+ metaText ? /* @__PURE__ */ jsx2("p", { className: "mt-1 truncate text-xs font-normal text-[var(--text-secondary)]", children: metaText }) : null
1745
1855
  ] })
1746
1856
  ] });
1747
1857
  }
@@ -1752,10 +1862,10 @@ function IssueManagerOutputSection({
1752
1862
  }) {
1753
1863
  return /* @__PURE__ */ jsxs2("section", { className: "grid gap-2.5", children: [
1754
1864
  /* @__PURE__ */ jsx2("h3", { className: "text-sm font-semibold text-[var(--text-primary)]", children: copy.t("labels.executionOutputs") }),
1755
- outputs.length === 0 ? /* @__PURE__ */ jsx2("p", { className: "text-sm font-normal leading-6 text-[var(--text-secondary)]", children: copy.t("messages.noExecutionOutputs") }) : /* @__PURE__ */ jsx2("div", { className: "grid gap-2", children: outputs.map((output) => /* @__PURE__ */ jsxs2(
1865
+ outputs.length === 0 ? /* @__PURE__ */ jsx2("p", { className: "text-sm font-normal leading-6 text-[var(--text-secondary)]", children: copy.t("messages.noExecutionOutputs") }) : /* @__PURE__ */ jsx2("div", { className: "overflow-hidden rounded-[12px] border border-[var(--line-2)] bg-transparent", children: outputs.map((output) => /* @__PURE__ */ jsxs2(
1756
1866
  "button",
1757
1867
  {
1758
- className: "flex items-start justify-between gap-4 rounded-xl border border-border/65 px-4 py-3 text-left transition-colors hover:bg-transparency-hover",
1868
+ className: "flex w-full items-start justify-between gap-4 border-b border-[var(--line-2)] px-4 py-3 text-left transition-colors last:border-b-0 hover:bg-transparency-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/25 focus-visible:ring-inset",
1759
1869
  type: "button",
1760
1870
  onClick: () => {
1761
1871
  void onOpen({
@@ -1791,11 +1901,11 @@ function IssueManagerSubtaskSection({
1791
1901
  copy.t("actions.add")
1792
1902
  ] })
1793
1903
  ] }),
1794
- tasks.length === 0 ? /* @__PURE__ */ jsx2("p", { className: "text-sm font-normal leading-6 text-[var(--text-secondary)]", children: copy.t("messages.noSubtasksForIssue") }) : /* @__PURE__ */ jsx2("div", { className: "overflow-hidden rounded-lg border border-border/70 bg-transparent", children: tasks.map((task) => /* @__PURE__ */ jsxs2(
1904
+ tasks.length === 0 ? /* @__PURE__ */ jsx2("p", { className: "text-sm font-normal leading-6 text-[var(--text-secondary)]", children: copy.t("messages.noSubtasksForIssue") }) : /* @__PURE__ */ jsx2("div", { className: "overflow-hidden rounded-lg border border-[var(--line-2)] bg-transparent", children: tasks.map((task) => /* @__PURE__ */ jsxs2(
1795
1905
  "button",
1796
1906
  {
1797
1907
  className: cn(
1798
- "flex w-full items-start justify-between gap-4 border-b border-border/70 px-4 py-3 text-left transition-colors last:border-b-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/25 focus-visible:ring-inset",
1908
+ "flex w-full items-start justify-between gap-4 border-b border-[var(--line-2)] px-4 py-3 text-left transition-colors last:border-b-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/25 focus-visible:ring-inset",
1799
1909
  selectedTaskId === task.taskId ? "bg-transparency-actived" : "bg-transparent hover:bg-transparency-hover"
1800
1910
  ),
1801
1911
  type: "button",
@@ -1806,7 +1916,7 @@ function IssueManagerSubtaskSection({
1806
1916
  /* @__PURE__ */ jsx2("span", { className: "truncate text-sm font-semibold text-[var(--text-primary)]", children: task.title }),
1807
1917
  /* @__PURE__ */ jsx2(Badge, { variant: issueManagerStatusBadgeVariant(task.status), children: resolveIssueManagerStatusLabel(copy, task.status) })
1808
1918
  ] }),
1809
- /* @__PURE__ */ jsx2("p", { className: "mt-2 line-clamp-2 text-sm font-normal leading-6 text-[var(--text-secondary)]", children: summarizeIssueManagerContent(
1919
+ /* @__PURE__ */ jsx2("p", { className: "mt-2 line-clamp-2 text-[12px] font-normal leading-[1.5] text-[var(--text-secondary)]", children: summarizeIssueManagerContent(
1810
1920
  task.content,
1811
1921
  copy.t("messages.taskContentEmpty")
1812
1922
  ) })
@@ -1822,7 +1932,7 @@ function IssueManagerSubtaskSection({
1822
1932
  }
1823
1933
 
1824
1934
  // src/ui/internal/content/IssueManagerDescriptionSection.tsx
1825
- import { useEffect as useEffect3, useRef, useState as useState2 } from "react";
1935
+ import { useEffect as useEffect4, useRef, useState as useState3 } from "react";
1826
1936
  import { RichTextReadonlyContent } from "@nextop-os/ui-rich-text/editor";
1827
1937
  import { cn as cn2 } from "@nextop-os/ui-system";
1828
1938
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
@@ -1835,10 +1945,10 @@ function IssueManagerDescriptionSection({
1835
1945
  variant = "card"
1836
1946
  }) {
1837
1947
  const contentRef = useRef(null);
1838
- const [isOverflowing, setIsOverflowing] = useState2(false);
1948
+ const [isOverflowing, setIsOverflowing] = useState3(false);
1839
1949
  const normalizedContent = normalizeIssueManagerContent(content).trim();
1840
1950
  const displayContent = stripIssueManagerDescriptionTerminalPunctuation(normalizedContent);
1841
- useEffect3(() => {
1951
+ useEffect4(() => {
1842
1952
  if (variant === "plain") {
1843
1953
  setIsOverflowing(false);
1844
1954
  return;
@@ -1939,7 +2049,7 @@ function IssueManagerDescriptionContent({
1939
2049
  }
1940
2050
 
1941
2051
  // src/ui/internal/content/IssueManagerRichTextTextarea.tsx
1942
- import { useEffect as useEffect4, useMemo as useMemo3, useRef as useRef2, useState as useState3 } from "react";
2052
+ import { useEffect as useEffect5, useMemo as useMemo3, useRef as useRef2, useState as useState4 } from "react";
1943
2053
  import { RichTextAtEditor } from "@nextop-os/ui-rich-text/editor";
1944
2054
  import { Button as Button3, LinkIcon, cn as cn3 } from "@nextop-os/ui-system";
1945
2055
  import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
@@ -1958,10 +2068,10 @@ function IssueManagerRichTextTextarea({
1958
2068
  [controller, surface]
1959
2069
  );
1960
2070
  const showReferenceAction = controller.canReferenceWorkspaceFiles;
1961
- const [focusSignal, setFocusSignal] = useState3(0);
2071
+ const [focusSignal, setFocusSignal] = useState4(0);
1962
2072
  const previousValueRef = useRef2(value);
1963
2073
  const wasAddingReferenceRef = useRef2(false);
1964
- useEffect4(() => {
2074
+ useEffect5(() => {
1965
2075
  const isAddingReference = controller.referenceTarget?.mode === "insert" && controller.referenceTarget.parentKind === surface;
1966
2076
  if (wasAddingReferenceRef.current && !isAddingReference && value !== previousValueRef.current) {
1967
2077
  setFocusSignal((current) => current + 1);
@@ -2016,30 +2126,109 @@ function IssueManagerRichTextTextarea({
2016
2126
 
2017
2127
  // src/ui/internal/shell/IssueManagerDraftTitleInput.tsx
2018
2128
  import {
2019
- useEffect as useEffect5,
2020
- useState as useState4
2129
+ useEffect as useEffect6,
2130
+ useLayoutEffect,
2131
+ useRef as useRef3,
2132
+ useState as useState5
2021
2133
  } from "react";
2022
2134
  import { Input } from "@nextop-os/ui-system";
2135
+
2136
+ // src/ui/internal/shell/IssueManagerDraftTitleInputState.ts
2137
+ function resolveIssueManagerDraftTitleSync(input) {
2138
+ if (input.isComposing) {
2139
+ return {
2140
+ pendingCommit: input.pendingCommit,
2141
+ shouldSyncLocalValue: false,
2142
+ value: input.localValue
2143
+ };
2144
+ }
2145
+ if (input.pendingCommit !== null) {
2146
+ if (input.value === input.pendingCommit.committedValue) {
2147
+ return {
2148
+ pendingCommit: null,
2149
+ shouldSyncLocalValue: input.localValue !== input.value,
2150
+ value: input.value
2151
+ };
2152
+ }
2153
+ if (input.localValue === input.pendingCommit.committedValue && input.value === input.pendingCommit.previousValue) {
2154
+ return {
2155
+ pendingCommit: input.pendingCommit,
2156
+ shouldSyncLocalValue: false,
2157
+ value: input.localValue
2158
+ };
2159
+ }
2160
+ }
2161
+ return {
2162
+ pendingCommit: null,
2163
+ shouldSyncLocalValue: input.localValue !== input.value,
2164
+ value: input.value
2165
+ };
2166
+ }
2167
+
2168
+ // src/ui/internal/shell/IssueManagerDraftTitleInput.tsx
2023
2169
  import { jsx as jsx5 } from "react/jsx-runtime";
2024
2170
  function IssueManagerDraftTitleInput({
2025
2171
  onChange,
2026
2172
  placeholder,
2027
2173
  value
2028
2174
  }) {
2029
- const [localValue, setLocalValue] = useState4(value);
2030
- const [isComposing, setIsComposing] = useState4(false);
2031
- useEffect5(() => {
2032
- if (!isComposing) {
2033
- setLocalValue(value);
2175
+ const inputRef = useRef3(null);
2176
+ const pendingSelectionRef = useRef3(null);
2177
+ const pendingCommitRef = useRef3(
2178
+ null
2179
+ );
2180
+ const [localValue, setLocalValue] = useState5(value);
2181
+ const [isComposing, setIsComposing] = useState5(false);
2182
+ useEffect6(() => {
2183
+ const syncResult = resolveIssueManagerDraftTitleSync({
2184
+ isComposing,
2185
+ localValue,
2186
+ pendingCommit: pendingCommitRef.current,
2187
+ value
2188
+ });
2189
+ pendingCommitRef.current = syncResult.pendingCommit;
2190
+ if (syncResult.shouldSyncLocalValue) {
2191
+ setLocalValue(syncResult.value);
2034
2192
  }
2035
- }, [isComposing, value]);
2193
+ }, [isComposing, localValue, value]);
2194
+ useLayoutEffect(() => {
2195
+ const input = inputRef.current;
2196
+ const selection = pendingSelectionRef.current;
2197
+ if (!input || !selection || document.activeElement !== input) {
2198
+ return;
2199
+ }
2200
+ pendingSelectionRef.current = null;
2201
+ const maxPosition = input.value.length;
2202
+ input.setSelectionRange(
2203
+ Math.min(selection.start, maxPosition),
2204
+ Math.min(selection.end, maxPosition),
2205
+ selection.direction
2206
+ );
2207
+ }, [localValue, value]);
2208
+ const rememberSelection = (input) => {
2209
+ const start = input.selectionStart;
2210
+ const end = input.selectionEnd;
2211
+ if (start === null || end === null) {
2212
+ return;
2213
+ }
2214
+ pendingSelectionRef.current = {
2215
+ direction: input.selectionDirection ?? "none",
2216
+ end,
2217
+ start
2218
+ };
2219
+ };
2036
2220
  const commitValue = (nextValue) => {
2221
+ pendingCommitRef.current = {
2222
+ committedValue: nextValue,
2223
+ previousValue: value
2224
+ };
2037
2225
  setLocalValue(nextValue);
2038
2226
  onChange(nextValue);
2039
2227
  };
2040
2228
  return /* @__PURE__ */ jsx5(
2041
2229
  Input,
2042
2230
  {
2231
+ ref: inputRef,
2043
2232
  placeholder,
2044
2233
  variant: "md",
2045
2234
  value: localValue,
@@ -2048,12 +2237,15 @@ function IssueManagerDraftTitleInput({
2048
2237
  },
2049
2238
  onChange: (event) => {
2050
2239
  const nextValue = event.currentTarget.value;
2051
- setLocalValue(nextValue);
2240
+ rememberSelection(event.currentTarget);
2052
2241
  if (!isComposing) {
2053
- onChange(nextValue);
2242
+ commitValue(nextValue);
2243
+ return;
2054
2244
  }
2245
+ setLocalValue(nextValue);
2055
2246
  },
2056
2247
  onCompositionEnd: (event) => {
2248
+ rememberSelection(event.currentTarget);
2057
2249
  setIsComposing(false);
2058
2250
  commitValue(event.currentTarget.value);
2059
2251
  },
@@ -2088,11 +2280,11 @@ function IssueManagerIssuePane({
2088
2280
  const selectedTask = selectedTaskId ? (controller.taskDetail.value?.task?.taskId === selectedTaskId ? controller.taskDetail.value.task : tasks.find((task) => task.taskId === selectedTaskId)) ?? null : null;
2089
2281
  const latestRun = selectedTask ? controller.taskDetail.value?.latestRun ?? controller.taskDetail.value?.recentRuns[0] ?? null : controller.issueDetail.value?.latestRun ?? controller.issueDetail.value?.recentRuns[0] ?? null;
2090
2282
  const latestOutputs = selectedTask ? controller.taskDetail.value?.latestOutputs ?? [] : controller.issueDetail.value?.latestOutputs ?? [];
2091
- const [deleteDialogOpen, setDeleteDialogOpen] = useState5(false);
2092
- const [deleteBusy, setDeleteBusy] = useState5(false);
2283
+ const [deleteDialogOpen, setDeleteDialogOpen] = useState6(false);
2284
+ const [deleteBusy, setDeleteBusy] = useState6(false);
2093
2285
  if (isCreatingIssue || isEditingIssue) {
2094
2286
  return /* @__PURE__ */ jsxs5("div", { className: "flex h-full min-h-0 flex-col overflow-hidden", children: [
2095
- /* @__PURE__ */ jsx6("div", { className: "flex min-h-0 flex-1 flex-col gap-[14px] overflow-y-auto px-7 py-8", children: /* @__PURE__ */ jsxs5("div", { className: "flex w-full min-w-0 flex-col gap-3", children: [
2287
+ /* @__PURE__ */ jsx6(ScrollArea2, { className: "min-h-0 flex-1 [&_[data-orientation=vertical][data-slot=scroll-area-scrollbar]]:opacity-100 [&_[data-slot=scroll-area-viewport]]:overscroll-contain", children: /* @__PURE__ */ jsx6("div", { className: "flex min-h-full flex-col gap-[14px] px-7 py-8", children: /* @__PURE__ */ jsxs5("div", { className: "flex w-full min-w-0 flex-col gap-3", children: [
2096
2288
  /* @__PURE__ */ jsx6(
2097
2289
  "div",
2098
2290
  {
@@ -2104,7 +2296,7 @@ function IssueManagerIssuePane({
2104
2296
  /* @__PURE__ */ jsxs5(
2105
2297
  "label",
2106
2298
  {
2107
- className: `flex w-full min-w-0 flex-col gap-2 text-sm font-semibold text-[var(--text-primary)] ${issueManagerEditorRiseInClassName} ${issueManagerEditorRiseInDelay1ClassName}`,
2299
+ className: `flex w-full min-w-0 flex-col gap-2 text-sm font-semibold text-[var(--text-secondary)] ${issueManagerEditorRiseInClassName} ${issueManagerEditorRiseInDelay1ClassName}`,
2108
2300
  children: [
2109
2301
  /* @__PURE__ */ jsx6("span", { className: "leading-5", children: copy.t("labels.title") }),
2110
2302
  /* @__PURE__ */ jsx6(
@@ -2121,7 +2313,7 @@ function IssueManagerIssuePane({
2121
2313
  /* @__PURE__ */ jsxs5(
2122
2314
  "div",
2123
2315
  {
2124
- className: `flex min-h-0 w-full min-w-0 flex-col gap-2 text-sm font-semibold text-[var(--text-primary)] ${issueManagerEditorRiseInClassName} ${issueManagerEditorRiseInDelay2ClassName}`,
2316
+ className: `flex min-h-0 w-full min-w-0 flex-col gap-2 text-sm font-semibold text-[var(--text-secondary)] ${issueManagerEditorRiseInClassName} ${issueManagerEditorRiseInDelay2ClassName}`,
2125
2317
  children: [
2126
2318
  /* @__PURE__ */ jsx6("span", { className: "leading-5", children: copy.t("labels.content") }),
2127
2319
  /* @__PURE__ */ jsx6(
@@ -2139,7 +2331,7 @@ function IssueManagerIssuePane({
2139
2331
  }
2140
2332
  )
2141
2333
  ] })
2142
- ] }) }),
2334
+ ] }) }) }),
2143
2335
  /* @__PURE__ */ jsx6(
2144
2336
  "div",
2145
2337
  {
@@ -2173,7 +2365,7 @@ function IssueManagerIssuePane({
2173
2365
  if (!selectedIssue) {
2174
2366
  return /* @__PURE__ */ jsx6("div", { className: "h-full min-h-0" });
2175
2367
  }
2176
- return /* @__PURE__ */ jsx6("div", { className: "flex h-full min-h-0 flex-col overflow-hidden", children: /* @__PURE__ */ jsx6("div", { className: "min-h-0 flex-1 overflow-y-auto px-8 py-7", children: controller.issueDetail.isLoading && controller.issueDetail.value === null ? /* @__PURE__ */ jsx6(IssueManagerPaneLoadingState, {}) : /* @__PURE__ */ jsxs5("div", { className: "flex w-full min-w-0 flex-col gap-9", children: [
2368
+ return /* @__PURE__ */ jsx6("div", { className: "flex h-full min-h-0 flex-col overflow-hidden", children: /* @__PURE__ */ jsx6(ScrollArea2, { className: "min-h-0 flex-1 [&_[data-orientation=vertical][data-slot=scroll-area-scrollbar]]:opacity-100 [&_[data-slot=scroll-area-viewport]]:overscroll-contain", children: /* @__PURE__ */ jsx6("div", { className: "px-8 py-7", children: controller.issueDetail.isLoading && controller.issueDetail.value === null ? /* @__PURE__ */ jsx6(IssueManagerPaneLoadingState, {}) : /* @__PURE__ */ jsxs5("div", { className: "flex w-full min-w-0 flex-col gap-9", children: [
2177
2369
  /* @__PURE__ */ jsxs5("header", { className: "grid gap-3", children: [
2178
2370
  /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-between gap-6", children: [
2179
2371
  /* @__PURE__ */ jsx6("h2", { className: "line-clamp-2 text-base font-semibold leading-6 text-[var(--text-primary)]", children: selectedIssue.title }),
@@ -2199,11 +2391,13 @@ function IssueManagerIssuePane({
2199
2391
  )
2200
2392
  ] })
2201
2393
  ] }),
2202
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-2 text-sm font-normal text-[var(--text-secondary)]", children: [
2394
+ /* @__PURE__ */ jsxs5("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-2 text-[12px] font-normal leading-[1.3] text-[var(--text-secondary)]", children: [
2203
2395
  /* @__PURE__ */ jsx6(
2204
2396
  Badge2,
2205
2397
  {
2206
- variant: issueManagerStatusBadgeVariant(selectedIssue.status),
2398
+ variant: issueManagerStatusBadgeVariant(
2399
+ selectedIssue.status
2400
+ ),
2207
2401
  children: resolveIssueManagerStatusLabel(copy, selectedIssue.status)
2208
2402
  }
2209
2403
  ),
@@ -2214,7 +2408,7 @@ function IssueManagerIssuePane({
2214
2408
  className: "h-4 w-px shrink-0 bg-[var(--line-2)]"
2215
2409
  }
2216
2410
  ),
2217
- /* @__PURE__ */ jsxs5("span", { children: [
2411
+ /* @__PURE__ */ jsxs5("span", { className: "text-[12px] font-normal leading-[1.3]", children: [
2218
2412
  copy.t("labels.creator"),
2219
2413
  " ",
2220
2414
  resolveIssueManagerCreatorLabel(selectedIssue)
@@ -2226,7 +2420,7 @@ function IssueManagerIssuePane({
2226
2420
  className: "h-4 w-px shrink-0 bg-[var(--line-2)]"
2227
2421
  }
2228
2422
  ),
2229
- /* @__PURE__ */ jsxs5("span", { children: [
2423
+ /* @__PURE__ */ jsxs5("span", { className: "text-[12px] font-normal leading-[1.3]", children: [
2230
2424
  copy.t("labels.createdAt"),
2231
2425
  " ",
2232
2426
  formatIssueManagerTimestamp(selectedIssue.createdAtUnix) || "-"
@@ -2293,14 +2487,14 @@ function IssueManagerIssuePane({
2293
2487
  tasks
2294
2488
  }
2295
2489
  )
2296
- ] }) }) });
2490
+ ] }) }) }) });
2297
2491
  }
2298
2492
 
2299
2493
  // src/ui/internal/shell/IssueManagerBottomBar.tsx
2300
2494
  import { Button as Button6, cn as cn5 } from "@nextop-os/ui-system";
2301
2495
 
2302
2496
  // src/ui/internal/task/IssueManagerRunSections.tsx
2303
- import { useEffect as useEffect6, useState as useState6 } from "react";
2497
+ import { useEffect as useEffect7, useState as useState7 } from "react";
2304
2498
  import {
2305
2499
  Badge as Badge3,
2306
2500
  AgentSessionsIcon,
@@ -2321,26 +2515,24 @@ import {
2321
2515
  import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
2322
2516
  var executionDirectoryMenuItemClassName = "min-h-7 overflow-hidden rounded-md py-1 pr-7 pl-2.5 text-[13px] font-normal leading-[1.2] text-[var(--text-primary)]";
2323
2517
  var executionDirectoryMenuItemCheckClassName = "pointer-events-none absolute right-2 top-1/2 shrink-0 -translate-y-1/2";
2518
+ var providerMenuItemClassName = "min-h-8 overflow-hidden rounded-md py-1.5 pr-7 pl-2.5 text-[13px] font-normal leading-[1.2] text-[var(--text-primary)]";
2519
+ var providerMenuItemCheckClassName = "pointer-events-none absolute right-2 top-1/2 shrink-0 -translate-y-1/2";
2324
2520
  function IssueManagerRunActionTrigger({
2325
2521
  controller,
2326
2522
  disabled = false,
2327
2523
  triggerClassName,
2328
2524
  triggerVariant = "default"
2329
2525
  }) {
2330
- return /* @__PURE__ */ jsxs6(
2331
- Button5,
2526
+ return /* @__PURE__ */ jsx7(
2527
+ IssueManagerProviderActionMenu,
2332
2528
  {
2333
- className: cn4("min-w-0", triggerClassName),
2529
+ controller,
2334
2530
  disabled: controller.isRunningTask || disabled,
2335
- size: triggerVariant === "button" ? "dialog" : "default",
2336
- type: "button",
2337
- onClick: () => {
2338
- void controller.runTask();
2339
- },
2340
- children: [
2341
- /* @__PURE__ */ jsx7(AgentSessionsIcon, { size: 16 }),
2342
- /* @__PURE__ */ jsx7("span", { className: "truncate", children: controller.copy.t("actions.askAgentToRun") })
2343
- ]
2531
+ icon: /* @__PURE__ */ jsx7(AgentSessionsIcon, { size: 16 }),
2532
+ label: controller.copy.t("actions.askAgentToRun"),
2533
+ triggerClassName,
2534
+ triggerVariant,
2535
+ onSelectProvider: (provider) => controller.runTask(provider)
2344
2536
  }
2345
2537
  );
2346
2538
  }
@@ -2350,35 +2542,92 @@ function IssueManagerBreakdownActionTrigger({
2350
2542
  triggerClassName,
2351
2543
  triggerVariant = "default"
2352
2544
  }) {
2353
- return /* @__PURE__ */ jsxs6(
2354
- Button5,
2545
+ return /* @__PURE__ */ jsx7(
2546
+ IssueManagerProviderActionMenu,
2355
2547
  {
2356
- className: cn4("min-w-0", triggerClassName),
2548
+ controller,
2357
2549
  disabled,
2358
- size: triggerVariant === "button" ? "dialog" : "default",
2359
- type: "button",
2360
- variant: "secondary",
2361
- onClick: () => {
2362
- void controller.startTaskBreakdown();
2363
- },
2364
- children: [
2365
- /* @__PURE__ */ jsx7(IssueIcon, { size: 16 }),
2366
- /* @__PURE__ */ jsx7("span", { className: "truncate", children: controller.copy.t("actions.askAgentToBreakdown") })
2367
- ]
2550
+ icon: /* @__PURE__ */ jsx7(IssueIcon, { size: 16 }),
2551
+ label: controller.copy.t("actions.askAgentToBreakdown"),
2552
+ triggerClassName,
2553
+ triggerVariant,
2554
+ triggerButtonVariant: "secondary",
2555
+ onSelectProvider: (provider) => controller.startTaskBreakdown(provider)
2368
2556
  }
2369
2557
  );
2370
2558
  }
2559
+ function IssueManagerProviderActionMenu({
2560
+ controller,
2561
+ disabled,
2562
+ icon,
2563
+ label,
2564
+ onSelectProvider,
2565
+ triggerButtonVariant,
2566
+ triggerClassName,
2567
+ triggerVariant
2568
+ }) {
2569
+ const providerOptions = controller.providerOptions;
2570
+ const selectedProvider = controller.nodeState.selectedAgentProvider.trim();
2571
+ return /* @__PURE__ */ jsxs6(DropdownMenu, { children: [
2572
+ /* @__PURE__ */ jsx7(DropdownMenuTrigger, { asChild: true, disabled, children: /* @__PURE__ */ jsxs6(
2573
+ Button5,
2574
+ {
2575
+ className: cn4("min-w-0", triggerClassName),
2576
+ disabled,
2577
+ size: triggerVariant === "button" ? "dialog" : "default",
2578
+ type: "button",
2579
+ variant: triggerButtonVariant,
2580
+ children: [
2581
+ icon,
2582
+ /* @__PURE__ */ jsx7("span", { className: "truncate", children: label }),
2583
+ /* @__PURE__ */ jsx7(ChevronDownIcon, { className: "shrink-0", size: 14 })
2584
+ ]
2585
+ }
2586
+ ) }),
2587
+ /* @__PURE__ */ jsx7(
2588
+ DropdownMenuContent,
2589
+ {
2590
+ align: "end",
2591
+ className: "w-[220px] min-w-[220px]",
2592
+ style: { zIndex: "var(--z-panel-popover)" },
2593
+ children: providerOptions.length === 0 ? /* @__PURE__ */ jsx7(DropdownMenuItem, { className: providerMenuItemClassName, disabled: true, children: controller.copy.t("messages.noAgentProviders") }) : providerOptions.map((option) => /* @__PURE__ */ jsx7(
2594
+ DropdownMenuItem,
2595
+ {
2596
+ className: providerMenuItemClassName,
2597
+ disabled: option.disabled === true,
2598
+ title: option.disabledReason,
2599
+ onSelect: () => {
2600
+ void onSelectProvider(option.provider);
2601
+ },
2602
+ children: /* @__PURE__ */ jsxs6("span", { className: "flex min-w-0 flex-1 items-center gap-2 pr-1", children: [
2603
+ /* @__PURE__ */ jsx7(AgentSessionsIcon, { "aria-hidden": true, size: 15 }),
2604
+ /* @__PURE__ */ jsx7("span", { className: "min-w-0 flex-1 truncate", children: option.label }),
2605
+ option.provider === selectedProvider ? /* @__PURE__ */ jsx7(
2606
+ CheckIcon,
2607
+ {
2608
+ className: providerMenuItemCheckClassName,
2609
+ size: 15
2610
+ }
2611
+ ) : null
2612
+ ] })
2613
+ },
2614
+ option.provider
2615
+ ))
2616
+ }
2617
+ )
2618
+ ] });
2619
+ }
2371
2620
  function IssueManagerExecutionDirectoryTrigger({
2372
2621
  className,
2373
2622
  controller,
2374
2623
  disabled = false
2375
2624
  }) {
2376
- const [projects, setProjects] = useState6([]);
2377
- const [isLoading, setIsLoading] = useState6(false);
2625
+ const [projects, setProjects] = useState7([]);
2626
+ const [isLoading, setIsLoading] = useState7(false);
2378
2627
  const selectedPath = controller.nodeState.selectedExecutionDirectory?.trim() ?? "";
2379
2628
  const selectedProject = projects.find((project) => project.path === selectedPath) ?? null;
2380
2629
  const triggerLabel = selectedProject ? selectedProject.label : selectedPath ? controller.copy.t("labels.customExecutionDirectory") : controller.copy.t("labels.noProject");
2381
- useEffect6(() => {
2630
+ useEffect7(() => {
2382
2631
  let canceled = false;
2383
2632
  setIsLoading(true);
2384
2633
  void controller.listExecutionDirectoryProjects().then((response) => {
@@ -2444,14 +2693,7 @@ function IssueManagerExecutionDirectoryTrigger({
2444
2693
  },
2445
2694
  children: /* @__PURE__ */ jsxs6("span", { className: "flex min-w-0 flex-1 items-center gap-2 pr-1", children: [
2446
2695
  /* @__PURE__ */ jsx7(FolderIcon, { "aria-hidden": true, size: 15 }),
2447
- /* @__PURE__ */ jsxs6("span", { className: "min-w-0 flex-1 truncate", children: [
2448
- /* @__PURE__ */ jsx7("span", { children: controller.copy.t("labels.customExecutionDirectory") }),
2449
- /* @__PURE__ */ jsxs6("span", { className: "text-[var(--text-secondary)]", children: [
2450
- " ",
2451
- "/ ",
2452
- selectedPath
2453
- ] })
2454
- ] }),
2696
+ /* @__PURE__ */ jsx7("span", { className: "min-w-0 flex-1 truncate", children: controller.copy.t("labels.customExecutionDirectory") }),
2455
2697
  /* @__PURE__ */ jsx7(
2456
2698
  CheckIcon,
2457
2699
  {
@@ -2471,14 +2713,7 @@ function IssueManagerExecutionDirectoryTrigger({
2471
2713
  },
2472
2714
  children: /* @__PURE__ */ jsxs6("span", { className: "flex min-w-0 flex-1 items-center gap-2 pr-1", children: [
2473
2715
  /* @__PURE__ */ jsx7(FolderIcon, { "aria-hidden": true, size: 15 }),
2474
- /* @__PURE__ */ jsxs6("span", { className: "min-w-0 flex-1 truncate", children: [
2475
- /* @__PURE__ */ jsx7("span", { children: project.label }),
2476
- /* @__PURE__ */ jsxs6("span", { className: "text-[var(--text-secondary)]", children: [
2477
- " ",
2478
- "/ ",
2479
- project.path
2480
- ] })
2481
- ] }),
2716
+ /* @__PURE__ */ jsx7("span", { className: "min-w-0 flex-1 truncate", children: project.label }),
2482
2717
  project.path === selectedPath ? /* @__PURE__ */ jsx7(
2483
2718
  CheckIcon,
2484
2719
  {
@@ -2634,7 +2869,7 @@ import {
2634
2869
  CloseIcon,
2635
2870
  FileCreateIcon as FileCreateIcon3,
2636
2871
  Input as Input2,
2637
- ScrollArea as ScrollArea2,
2872
+ ScrollArea as ScrollArea3,
2638
2873
  UnderlineTabs,
2639
2874
  cn as cn6
2640
2875
  } from "@nextop-os/ui-system";
@@ -2783,7 +3018,7 @@ function IssueManagerSidebarBody({
2783
3018
  onSelectIssue
2784
3019
  }) {
2785
3020
  return /* @__PURE__ */ jsx10(
2786
- ScrollArea2,
3021
+ ScrollArea3,
2787
3022
  {
2788
3023
  className: cn6("min-h-0", isNarrowLayout ? "flex-none" : "h-full flex-1"),
2789
3024
  children: /* @__PURE__ */ jsx10(
@@ -2949,7 +3184,7 @@ function IssueManagerSidebarItem({
2949
3184
  ),
2950
3185
  /* @__PURE__ */ jsxs8("div", { className: "min-w-0 space-y-2", children: [
2951
3186
  /* @__PURE__ */ jsx10("p", { className: "pr-28 text-[12px] leading-[1.55] text-[var(--text-secondary)]", children: formatIssueManagerDate(issue.updatedAtUnix ?? issue.createdAtUnix) }),
2952
- /* @__PURE__ */ jsx10("p", { className: "line-clamp-4 text-[14px] font-semibold leading-[1.35rem] text-[var(--text-primary)]", children: issue.title })
3187
+ /* @__PURE__ */ jsx10("p", { className: "line-clamp-4 text-[14px] font-medium leading-[1.35rem] text-[var(--text-primary)]", children: issue.title })
2953
3188
  ] }),
2954
3189
  /* @__PURE__ */ jsx10("div", { className: "mt-2 text-[12px] leading-[1.55] text-[var(--text-secondary)]", children: copy.t("labels.taskCount", { count: issue.taskCount ?? 0 }) })
2955
3190
  ]
@@ -3171,7 +3406,7 @@ function IssueManagerTaskComposerPane({
3171
3406
  /* @__PURE__ */ jsxs10(
3172
3407
  "label",
3173
3408
  {
3174
- className: `flex w-full min-w-0 flex-col gap-2 text-sm font-semibold text-[var(--text-primary)] ${issueManagerEditorRiseInClassName} ${issueManagerEditorRiseInDelay1ClassName}`,
3409
+ className: `flex w-full min-w-0 flex-col gap-2 text-sm font-semibold text-[var(--text-secondary)] ${issueManagerEditorRiseInClassName} ${issueManagerEditorRiseInDelay1ClassName}`,
3175
3410
  children: [
3176
3411
  /* @__PURE__ */ jsx12("span", { className: "leading-5", children: copy.t("labels.title") }),
3177
3412
  /* @__PURE__ */ jsx12(
@@ -3188,7 +3423,7 @@ function IssueManagerTaskComposerPane({
3188
3423
  /* @__PURE__ */ jsxs10(
3189
3424
  "div",
3190
3425
  {
3191
- className: `flex min-h-0 w-full min-w-0 flex-col gap-2 text-sm font-semibold text-[var(--text-primary)] ${issueManagerEditorRiseInClassName} ${issueManagerEditorRiseInDelay2ClassName}`,
3426
+ className: `flex min-h-0 w-full min-w-0 flex-col gap-2 text-sm font-semibold text-[var(--text-secondary)] ${issueManagerEditorRiseInClassName} ${issueManagerEditorRiseInDelay2ClassName}`,
3192
3427
  children: [
3193
3428
  /* @__PURE__ */ jsx12("span", { className: "leading-5", children: copy.t("labels.requirementDescription") }),
3194
3429
  /* @__PURE__ */ jsx12(
@@ -3239,10 +3474,10 @@ function IssueManagerTaskComposerPane({
3239
3474
  }
3240
3475
 
3241
3476
  // src/ui/internal/shell/IssueManagerTaskDrawer.tsx
3242
- import { ScrollArea as ScrollArea3, cn as cn8 } from "@nextop-os/ui-system";
3477
+ import { ScrollArea as ScrollArea4, cn as cn8 } from "@nextop-os/ui-system";
3243
3478
 
3244
3479
  // src/ui/internal/shell/IssueManagerTaskDrawerSections.tsx
3245
- import { useState as useState7 } from "react";
3480
+ import { useState as useState8 } from "react";
3246
3481
  import { Badge as Badge5, Button as Button9, ConfirmationDialog as ConfirmationDialog2 } from "@nextop-os/ui-system";
3247
3482
 
3248
3483
  // src/ui/internal/shell/IssueManagerTaskDrawerState.ts
@@ -3278,8 +3513,8 @@ function IssueManagerTaskDrawerHeader({
3278
3513
  view
3279
3514
  }) {
3280
3515
  const copy = controller.copy;
3281
- const [deleteDialogOpen, setDeleteDialogOpen] = useState7(false);
3282
- const [deleteBusy, setDeleteBusy] = useState7(false);
3516
+ const [deleteDialogOpen, setDeleteDialogOpen] = useState8(false);
3517
+ const [deleteBusy, setDeleteBusy] = useState8(false);
3283
3518
  return /* @__PURE__ */ jsxs11(Fragment, { children: [
3284
3519
  /* @__PURE__ */ jsxs11("div", { className: "grid gap-3 px-6 py-7", children: [
3285
3520
  /* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between gap-6", children: [
@@ -3306,7 +3541,7 @@ function IssueManagerTaskDrawerHeader({
3306
3541
  )
3307
3542
  ] }) : null })
3308
3543
  ] }),
3309
- view.showTaskMetadata && selectedTask ? /* @__PURE__ */ jsxs11("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-2 text-sm font-normal text-[var(--text-secondary)]", children: [
3544
+ view.showTaskMetadata && selectedTask ? /* @__PURE__ */ jsxs11("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-2 text-[12px] font-normal leading-[1.3] text-[var(--text-secondary)]", children: [
3310
3545
  /* @__PURE__ */ jsx13(
3311
3546
  Badge5,
3312
3547
  {
@@ -3321,7 +3556,7 @@ function IssueManagerTaskDrawerHeader({
3321
3556
  className: "h-4 w-px shrink-0 bg-[var(--line-2)]"
3322
3557
  }
3323
3558
  ),
3324
- /* @__PURE__ */ jsxs11("span", { children: [
3559
+ /* @__PURE__ */ jsxs11("span", { className: "text-[12px] font-normal leading-[1.3]", children: [
3325
3560
  copy.t("labels.creator"),
3326
3561
  " ",
3327
3562
  resolveTaskCreatorLabel(selectedTask)
@@ -3333,7 +3568,7 @@ function IssueManagerTaskDrawerHeader({
3333
3568
  className: "h-4 w-px shrink-0 bg-[var(--line-2)]"
3334
3569
  }
3335
3570
  ),
3336
- /* @__PURE__ */ jsxs11("span", { children: [
3571
+ /* @__PURE__ */ jsxs11("span", { className: "text-[12px] font-normal leading-[1.3]", children: [
3337
3572
  copy.t("labels.createdAt"),
3338
3573
  " ",
3339
3574
  formatIssueManagerTimestamp(selectedTask.createdAtUnix) || "-"
@@ -3407,7 +3642,7 @@ function IssueManagerTaskDrawerEditBody({
3407
3642
  /* @__PURE__ */ jsxs11(
3408
3643
  "label",
3409
3644
  {
3410
- className: `flex w-full min-w-0 flex-col gap-2 text-sm font-semibold text-[var(--text-primary)] ${issueManagerEditorRiseInClassName} ${issueManagerEditorRiseInDelay1ClassName}`,
3645
+ className: `flex w-full min-w-0 flex-col gap-2 text-sm font-semibold text-[var(--text-secondary)] ${issueManagerEditorRiseInClassName} ${issueManagerEditorRiseInDelay1ClassName}`,
3411
3646
  children: [
3412
3647
  /* @__PURE__ */ jsx13("span", { className: "leading-5", children: copy.t("labels.title") }),
3413
3648
  /* @__PURE__ */ jsx13(
@@ -3424,7 +3659,7 @@ function IssueManagerTaskDrawerEditBody({
3424
3659
  /* @__PURE__ */ jsxs11(
3425
3660
  "div",
3426
3661
  {
3427
- className: `flex min-h-0 w-full min-w-0 flex-col gap-2 text-sm font-semibold text-[var(--text-primary)] ${issueManagerEditorRiseInClassName} ${issueManagerEditorRiseInDelay2ClassName}`,
3662
+ className: `flex min-h-0 w-full min-w-0 flex-col gap-2 text-sm font-semibold text-[var(--text-secondary)] ${issueManagerEditorRiseInClassName} ${issueManagerEditorRiseInDelay2ClassName}`,
3428
3663
  children: [
3429
3664
  /* @__PURE__ */ jsx13("span", { className: "leading-5", children: copy.t("labels.content") }),
3430
3665
  /* @__PURE__ */ jsx13(
@@ -3605,7 +3840,7 @@ function IssueManagerTaskDrawer({
3605
3840
  view
3606
3841
  }
3607
3842
  ),
3608
- /* @__PURE__ */ jsx14(ScrollArea3, { className: "min-h-0 flex-1 [&_[data-slot=scroll-area-viewport]]:overscroll-contain", children: /* @__PURE__ */ jsx14(
3843
+ /* @__PURE__ */ jsx14(ScrollArea4, { className: "min-h-0 flex-1 [&_[data-slot=scroll-area-viewport]]:overscroll-contain", children: /* @__PURE__ */ jsx14(
3609
3844
  "div",
3610
3845
  {
3611
3846
  className: cn8(
@@ -3640,27 +3875,27 @@ function IssueManagerTaskDrawer({
3640
3875
 
3641
3876
  // src/ui/internal/shell/useIssueManagerShellView.ts
3642
3877
  import {
3643
- useEffect as useEffect7,
3878
+ useEffect as useEffect8,
3644
3879
  useEffectEvent as useEffectEvent2,
3645
- useRef as useRef3,
3646
- useState as useState8
3880
+ useRef as useRef4,
3881
+ useState as useState9
3647
3882
  } from "react";
3648
3883
  function useIssueManagerShellView({
3649
3884
  controller,
3650
3885
  selectedIssue,
3651
3886
  selectedTask
3652
3887
  }) {
3653
- const layoutRef = useRef3(null);
3654
- const resizeRef = useRef3(null);
3655
- const [sidebarWidth, setSidebarWidth] = useState8(
3888
+ const layoutRef = useRef4(null);
3889
+ const resizeRef = useRef4(null);
3890
+ const [sidebarWidth, setSidebarWidth] = useState9(
3656
3891
  issueManagerSidebarDefaultWidth
3657
3892
  );
3658
- const [isNarrowLayout, setIsNarrowLayout] = useState8(false);
3893
+ const [isNarrowLayout, setIsNarrowLayout] = useState9(false);
3659
3894
  const dismissNotification = useEffectEvent2(() => {
3660
3895
  controller.dismissNotification();
3661
3896
  });
3662
3897
  const floatingNotice = controller.floatingNotice;
3663
- useEffect7(() => {
3898
+ useEffect8(() => {
3664
3899
  const publishLayout = () => {
3665
3900
  const width = layoutRef.current?.getBoundingClientRect().width ?? 0;
3666
3901
  if (!width) {
@@ -3683,7 +3918,7 @@ function useIssueManagerShellView({
3683
3918
  window.removeEventListener("resize", publishLayout);
3684
3919
  };
3685
3920
  }, []);
3686
- useEffect7(() => {
3921
+ useEffect8(() => {
3687
3922
  if (!floatingNotice) {
3688
3923
  return void 0;
3689
3924
  }
@@ -3808,9 +4043,9 @@ function IssueManagerShell({
3808
4043
  selectedIssue,
3809
4044
  selectedTask
3810
4045
  });
3811
- const [renderedTaskDrawerTask, setRenderedTaskDrawerTask] = useState9(selectedTask);
3812
- const [isTaskDrawerClosing, setIsTaskDrawerClosing] = useState9(false);
3813
- useEffect8(() => {
4046
+ const [renderedTaskDrawerTask, setRenderedTaskDrawerTask] = useState10(selectedTask);
4047
+ const [isTaskDrawerClosing, setIsTaskDrawerClosing] = useState10(false);
4048
+ useEffect9(() => {
3814
4049
  if (shellView.content.isTaskDrawerOpen) {
3815
4050
  setRenderedTaskDrawerTask(selectedTask);
3816
4051
  setIsTaskDrawerClosing(false);
@@ -3937,8 +4172,8 @@ function IssueManagerShellEmptyState({
3937
4172
  }) {
3938
4173
  return /* @__PURE__ */ jsx15("div", { className: "flex h-full min-h-[320px] items-center justify-center px-10 py-10", children: /* @__PURE__ */ jsxs13("div", { className: "grid max-w-[420px] justify-items-center gap-2 text-center", children: [
3939
4174
  emptyIllustration ?? null,
3940
- /* @__PURE__ */ jsx15("h2", { className: "text-lg font-semibold leading-[1.35] text-[var(--text-primary)]", children: controller.copy.t("messages.noIssues") }),
3941
- /* @__PURE__ */ jsx15("p", { className: "max-w-[420px] text-base leading-[1.3] text-[var(--text-secondary)]", children: controller.copy.t("emptyState") }),
4175
+ /* @__PURE__ */ jsx15("h2", { className: "text-[14px] font-semibold leading-5 text-[var(--text-primary)]", children: controller.copy.t("messages.noIssues") }),
4176
+ /* @__PURE__ */ jsx15("p", { className: "max-w-[420px] text-[14px] leading-5 text-[var(--text-secondary)]", children: controller.copy.t("emptyState") }),
3942
4177
  /* @__PURE__ */ jsxs13(
3943
4178
  Button10,
3944
4179
  {
@@ -3955,9 +4190,9 @@ function IssueManagerShellEmptyState({
3955
4190
  }
3956
4191
 
3957
4192
  // src/ui/internal/shell/IssueManagerTopicSelector.tsx
3958
- import { useEffect as useEffect9, useState as useState10 } from "react";
4193
+ import { useEffect as useEffect10, useState as useState11 } from "react";
3959
4194
  import {
3960
- AddIcon,
4195
+ BareIconButton,
3961
4196
  Button as Button11,
3962
4197
  CheckIcon as CheckIcon2,
3963
4198
  ChevronDownIcon as ChevronDownIcon2,
@@ -3974,13 +4209,17 @@ import {
3974
4209
  DropdownMenuSeparator as DropdownMenuSeparator2,
3975
4210
  DropdownMenuTrigger as DropdownMenuTrigger2,
3976
4211
  EditIcon,
4212
+ FileCreateIcon as FileCreateIcon5,
3977
4213
  Input as Input3,
3978
4214
  MoreHorizontalIcon,
4215
+ PinFilledIcon,
3979
4216
  PinIcon,
3980
4217
  Textarea,
3981
4218
  cn as cn10
3982
4219
  } from "@nextop-os/ui-system";
3983
4220
  import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
4221
+ var topicSelectorMenuItemClassName = "min-h-7 overflow-hidden rounded-md py-1 text-[13px] font-normal leading-[1.2] text-[var(--text-primary)]";
4222
+ var topicSelectorRowItemClassName = "min-w-0 flex-1 bg-transparent pr-2 pl-1 hover:bg-transparent focus:bg-transparent data-[highlighted]:bg-transparent";
3984
4223
  function IssueManagerTopicSelector({
3985
4224
  activeTopicId,
3986
4225
  className,
@@ -3991,11 +4230,11 @@ function IssueManagerTopicSelector({
3991
4230
  onUpdateTopic,
3992
4231
  topics
3993
4232
  }) {
3994
- const [dialogMode, setDialogMode] = useState10(null);
3995
- const [deleteTopic, setDeleteTopic] = useState10(
4233
+ const [dialogMode, setDialogMode] = useState11(null);
4234
+ const [deleteTopic, setDeleteTopic] = useState11(
3996
4235
  null
3997
4236
  );
3998
- const [menuOpen, setMenuOpen] = useState10(false);
4237
+ const [menuOpen, setMenuOpen] = useState11(false);
3999
4238
  const activeTopic = topics.find((topic) => topic.topicId === activeTopicId);
4000
4239
  const openTopicDialog = (mode) => {
4001
4240
  setMenuOpen(false);
@@ -4008,29 +4247,32 @@ function IssueManagerTopicSelector({
4008
4247
  {
4009
4248
  "aria-label": copy.t("labels.topic"),
4010
4249
  className: cn10(
4011
- "h-8 max-w-[220px] min-w-[128px] justify-between gap-2 rounded-md border border-[var(--border-1)] bg-transparent px-2.5 text-[13px] font-normal shadow-none hover:bg-transparent focus-visible:ring-0",
4250
+ "max-w-[220px] gap-1 rounded-md border-0 bg-transparent text-sm font-normal shadow-none hover:bg-transparent focus:bg-transparent focus-visible:border-0 focus-visible:bg-transparent focus-visible:ring-0 active:bg-transparent aria-expanded:bg-transparent [&[data-state=open]>svg]:rotate-180",
4012
4251
  className
4013
4252
  ),
4253
+ size: "sm",
4014
4254
  type: "button",
4015
4255
  variant: "ghost",
4016
4256
  children: [
4017
4257
  /* @__PURE__ */ jsx16("span", { className: "min-w-0 truncate", children: activeTopic?.title ?? copy.t("labels.topic") }),
4018
- /* @__PURE__ */ jsx16(ChevronDownIcon2, { className: "size-4 shrink-0 text-[var(--text-tertiary)]" })
4258
+ /* @__PURE__ */ jsx16(ChevronDownIcon2, { className: "size-4 shrink-0 text-[var(--text-tertiary)] transition-transform duration-200" })
4019
4259
  ]
4020
4260
  }
4021
4261
  ) }),
4022
- /* @__PURE__ */ jsxs14(DropdownMenuContent2, { align: "start", className: "min-w-72", children: [
4262
+ /* @__PURE__ */ jsxs14(DropdownMenuContent2, { align: "start", className: "w-[200px] px-1", children: [
4023
4263
  topics.map((topic) => {
4024
4264
  const isPinned = (topic.pinnedAtUnix ?? 0) > 0;
4025
4265
  const isActive = topic.topicId === activeTopicId;
4026
4266
  const pinLabel = isPinned ? copy.t("actions.unpinTopic") : copy.t("actions.pinTopic");
4027
- return /* @__PURE__ */ jsx16("div", { className: "min-w-0", children: /* @__PURE__ */ jsxs14("div", { className: "relative flex min-h-8 min-w-0 items-center gap-1 rounded-sm pr-1 pl-1 hover:bg-[var(--transparency-block)]", children: [
4267
+ return /* @__PURE__ */ jsx16("div", { className: "min-w-0", children: /* @__PURE__ */ jsxs14("div", { className: "group/topic-row relative flex min-h-7 min-w-0 items-center gap-0.5 rounded-md pr-0.5 pl-0.5 hover:bg-[var(--transparency-block)] focus-within:bg-[var(--transparency-block)]", children: [
4028
4268
  /* @__PURE__ */ jsxs14(
4029
- "button",
4269
+ DropdownMenuItem2,
4030
4270
  {
4031
- className: "flex h-8 min-w-0 flex-1 cursor-pointer items-center gap-2 rounded-sm pr-2 pl-1 text-left text-sm outline-none",
4032
- type: "button",
4033
- onClick: () => {
4271
+ className: cn10(
4272
+ topicSelectorMenuItemClassName,
4273
+ topicSelectorRowItemClassName
4274
+ ),
4275
+ onSelect: () => {
4034
4276
  setMenuOpen(false);
4035
4277
  onSelectTopic(topic.topicId);
4036
4278
  },
@@ -4044,17 +4286,15 @@ function IssueManagerTopicSelector({
4044
4286
  }
4045
4287
  ),
4046
4288
  /* @__PURE__ */ jsx16(
4047
- Button11,
4289
+ BareIconButton,
4048
4290
  {
4049
4291
  "aria-label": pinLabel,
4050
4292
  className: cn10(
4051
- "shrink-0 text-[var(--text-tertiary)] hover:text-[var(--text-primary)]",
4293
+ "pointer-events-none shrink-0 opacity-0 text-[var(--text-tertiary)] transition-opacity duration-150 group-hover/topic-row:pointer-events-auto group-hover/topic-row:opacity-100 group-focus-within/topic-row:pointer-events-auto group-focus-within/topic-row:opacity-100 hover:text-[var(--text-primary)]",
4052
4294
  isPinned && "text-[var(--text-primary)]"
4053
4295
  ),
4054
- size: "icon-xs",
4296
+ size: "md",
4055
4297
  title: pinLabel,
4056
- type: "button",
4057
- variant: "ghost",
4058
4298
  onClick: (event) => {
4059
4299
  event.preventDefault();
4060
4300
  event.stopPropagation();
@@ -4063,21 +4303,18 @@ function IssueManagerTopicSelector({
4063
4303
  topicId: topic.topicId
4064
4304
  });
4065
4305
  },
4066
- children: /* @__PURE__ */ jsx16(PinIcon, { className: "size-3.5" })
4306
+ children: isPinned ? /* @__PURE__ */ jsx16(PinFilledIcon, { className: "size-3.5" }) : /* @__PURE__ */ jsx16(PinIcon, { className: "size-3.5" })
4067
4307
  }
4068
4308
  ),
4069
4309
  /* @__PURE__ */ jsxs14(DropdownMenu2, { modal: false, children: [
4070
4310
  /* @__PURE__ */ jsx16(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ jsx16(
4071
- Button11,
4311
+ BareIconButton,
4072
4312
  {
4073
4313
  "aria-label": copy.t("actions.moreActions"),
4074
- className: "shrink-0 text-[var(--text-tertiary)] hover:text-[var(--text-primary)]",
4075
- size: "icon-xs",
4314
+ className: "pointer-events-none shrink-0 opacity-0 text-[var(--text-tertiary)] transition-opacity duration-150 group-hover/topic-row:pointer-events-auto group-hover/topic-row:opacity-100 group-focus-within/topic-row:pointer-events-auto group-focus-within/topic-row:opacity-100 hover:text-[var(--text-primary)]",
4315
+ size: "md",
4076
4316
  title: copy.t("actions.moreActions"),
4077
- type: "button",
4078
- variant: "ghost",
4079
4317
  onClick: (event) => {
4080
- event.preventDefault();
4081
4318
  event.stopPropagation();
4082
4319
  },
4083
4320
  children: /* @__PURE__ */ jsx16(MoreHorizontalIcon, { className: "size-3.5" })
@@ -4106,10 +4343,9 @@ function IssueManagerTopicSelector({
4106
4343
  ]
4107
4344
  }
4108
4345
  ),
4109
- /* @__PURE__ */ jsxs14(
4346
+ !topic.isDefault ? /* @__PURE__ */ jsxs14(
4110
4347
  DropdownMenuItem2,
4111
4348
  {
4112
- disabled: topic.isDefault,
4113
4349
  variant: "destructive",
4114
4350
  onSelect: (event) => {
4115
4351
  event.preventDefault();
@@ -4121,7 +4357,7 @@ function IssueManagerTopicSelector({
4121
4357
  /* @__PURE__ */ jsx16("span", { children: copy.t("actions.delete") })
4122
4358
  ]
4123
4359
  }
4124
- )
4360
+ ) : null
4125
4361
  ]
4126
4362
  }
4127
4363
  )
@@ -4130,31 +4366,26 @@ function IssueManagerTopicSelector({
4130
4366
  }),
4131
4367
  topics.length === 0 ? /* @__PURE__ */ jsx16("div", { className: "px-3 py-2 text-xs leading-4 text-[var(--text-tertiary)]", children: copy.t("messages.topicListEmpty") }) : null,
4132
4368
  /* @__PURE__ */ jsx16(DropdownMenuSeparator2, {}),
4133
- /* @__PURE__ */ jsx16("div", { className: "p-1", children: /* @__PURE__ */ jsxs14(
4134
- Button11,
4369
+ /* @__PURE__ */ jsxs14(
4370
+ DropdownMenuItem2,
4135
4371
  {
4136
- className: "w-full justify-start gap-2 px-2 text-left",
4137
- size: "sm",
4138
- type: "button",
4139
- variant: "ghost",
4140
- onClick: (event) => {
4141
- event.preventDefault();
4142
- event.stopPropagation();
4143
- },
4144
- onPointerDown: (event) => {
4372
+ className: cn10(
4373
+ topicSelectorMenuItemClassName,
4374
+ "justify-start gap-2 px-2 text-left"
4375
+ ),
4376
+ onSelect: (event) => {
4145
4377
  event.preventDefault();
4146
- event.stopPropagation();
4147
4378
  openTopicDialog({
4148
4379
  kind: "create",
4149
4380
  topic: null
4150
4381
  });
4151
4382
  },
4152
4383
  children: [
4153
- /* @__PURE__ */ jsx16(AddIcon, { className: "size-3.5" }),
4384
+ /* @__PURE__ */ jsx16(FileCreateIcon5, { className: "size-3.5" }),
4154
4385
  /* @__PURE__ */ jsx16("span", { className: "truncate", children: copy.t("actions.createTopic") })
4155
4386
  ]
4156
4387
  }
4157
- ) })
4388
+ )
4158
4389
  ] })
4159
4390
  ] }),
4160
4391
  /* @__PURE__ */ jsx16(
@@ -4205,9 +4436,9 @@ function IssueManagerTopicDialog({
4205
4436
  onUpdateTopic,
4206
4437
  open
4207
4438
  }) {
4208
- const [summaryDraft, setSummaryDraft] = useState10("");
4209
- const [titleDraft, setTitleDraft] = useState10("");
4210
- useEffect9(() => {
4439
+ const [summaryDraft, setSummaryDraft] = useState11("");
4440
+ const [titleDraft, setTitleDraft] = useState11("");
4441
+ useEffect10(() => {
4211
4442
  setTitleDraft(mode?.topic?.title ?? "");
4212
4443
  setSummaryDraft(mode?.topic?.summary ?? "");
4213
4444
  }, [mode]);
@@ -4232,10 +4463,10 @@ function IssueManagerTopicDialog({
4232
4463
  }
4233
4464
  onOpenChange(false);
4234
4465
  };
4235
- return /* @__PURE__ */ jsx16(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs14(DialogContent, { className: "sm:max-w-[420px]", children: [
4466
+ return /* @__PURE__ */ jsx16(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs14(DialogContent, { className: "sm:max-w-[480px]", children: [
4236
4467
  /* @__PURE__ */ jsx16(DialogHeader, { children: /* @__PURE__ */ jsx16(DialogTitle, { children: dialogTitle }) }),
4237
- /* @__PURE__ */ jsxs14("form", { className: "grid gap-3", onSubmit: submit, children: [
4238
- /* @__PURE__ */ jsxs14("label", { className: "grid gap-1.5", children: [
4468
+ /* @__PURE__ */ jsxs14("form", { className: "grid gap-4", onSubmit: submit, children: [
4469
+ /* @__PURE__ */ jsxs14("label", { className: "grid gap-2", children: [
4239
4470
  /* @__PURE__ */ jsx16("span", { className: "text-xs font-medium leading-4 text-[var(--text-secondary)]", children: copy.t("labels.topicTitle") }),
4240
4471
  /* @__PURE__ */ jsx16(
4241
4472
  Input3,
@@ -4247,7 +4478,7 @@ function IssueManagerTopicDialog({
4247
4478
  }
4248
4479
  )
4249
4480
  ] }),
4250
- /* @__PURE__ */ jsxs14("label", { className: "grid gap-1.5", children: [
4481
+ /* @__PURE__ */ jsxs14("label", { className: "grid gap-2", children: [
4251
4482
  /* @__PURE__ */ jsx16("span", { className: "text-xs font-medium leading-4 text-[var(--text-secondary)]", children: copy.t("labels.topicSummary") }),
4252
4483
  /* @__PURE__ */ jsx16(
4253
4484
  Textarea,
@@ -4297,13 +4528,19 @@ function IssueManagerNode({
4297
4528
  state,
4298
4529
  workspaceId
4299
4530
  });
4300
- useEffect10(() => {
4531
+ useEffect11(() => {
4301
4532
  dispatchIssueManagerTopicHeaderState({
4302
4533
  activeTopicId: controller.nodeState.activeTopicId ?? null,
4303
4534
  nodeId,
4304
- topics: controller.topics.value
4535
+ topics: controller.topics.value,
4536
+ workspaceId
4305
4537
  });
4306
- }, [controller.nodeState.activeTopicId, controller.topics.value, nodeId]);
4538
+ }, [
4539
+ controller.nodeState.activeTopicId,
4540
+ controller.topics.value,
4541
+ nodeId,
4542
+ workspaceId
4543
+ ]);
4307
4544
  useIssueManagerTopicHeaderCommandSync({
4308
4545
  nodeId,
4309
4546
  onCreateTopic: (topicInput) => {
@@ -4315,7 +4552,8 @@ function IssueManagerNode({
4315
4552
  onSelectTopic: controller.selectTopic,
4316
4553
  onUpdateTopic: (topicInput) => {
4317
4554
  void controller.updateTopic(topicInput);
4318
- }
4555
+ },
4556
+ workspaceId
4319
4557
  });
4320
4558
  return /* @__PURE__ */ jsxs15(
4321
4559
  "section",
@@ -4361,6 +4599,7 @@ function IssueManagerNodeHeader({
4361
4599
  nodeId,
4362
4600
  onToggleSidebar,
4363
4601
  title,
4602
+ workspaceId,
4364
4603
  ...headerProps
4365
4604
  }) {
4366
4605
  const { effectiveCollapsed, toggleLabel, toggleSidebar } = useIssueManagerNodeHeaderView({
@@ -4368,64 +4607,25 @@ function IssueManagerNodeHeader({
4368
4607
  isSidebarAutoCollapsed,
4369
4608
  isSidebarCollapsed,
4370
4609
  nodeId,
4371
- onToggleSidebar
4610
+ onToggleSidebar,
4611
+ workspaceId
4372
4612
  });
4373
4613
  const topicState = useIssueManagerTopicHeaderStateSync({
4374
4614
  activeTopicId,
4375
- nodeId
4615
+ nodeId,
4616
+ workspaceId
4376
4617
  });
4377
4618
  return /* @__PURE__ */ jsxs15(
4378
4619
  "header",
4379
4620
  {
4380
4621
  ...headerProps,
4381
4622
  className: cn11(
4382
- "flex h-full min-h-0 items-center justify-between gap-3 bg-[var(--background-panel)] px-2 pl-3",
4623
+ "relative flex h-full min-h-0 items-center justify-between gap-3 bg-[var(--background-panel)] px-2 pl-3",
4383
4624
  className
4384
4625
  ),
4385
4626
  children: [
4386
- /* @__PURE__ */ jsxs15("div", { className: "flex min-w-0 items-center gap-2", children: [
4627
+ /* @__PURE__ */ jsxs15("div", { className: "z-10 flex min-w-0 items-center gap-2", children: [
4387
4628
  /* @__PURE__ */ jsx17("span", { className: "min-w-0 truncate text-[13px] font-semibold leading-5 text-[var(--text-primary)]", children: title?.trim() || copy.t("title") }),
4388
- /* @__PURE__ */ jsx17(
4389
- "div",
4390
- {
4391
- className: "flex min-w-0 flex-none",
4392
- onDoubleClick: (event) => event.stopPropagation(),
4393
- onPointerDown: (event) => event.stopPropagation(),
4394
- children: /* @__PURE__ */ jsx17(
4395
- IssueManagerTopicSelector,
4396
- {
4397
- activeTopicId: topicState.activeTopicId,
4398
- className: "flex-none",
4399
- copy,
4400
- topics: topicState.topics,
4401
- onCreateTopic: (input) => {
4402
- dispatchIssueManagerTopicCreate({
4403
- input,
4404
- nodeId
4405
- });
4406
- },
4407
- onDeleteTopic: (topicId) => {
4408
- dispatchIssueManagerTopicDelete({
4409
- nodeId,
4410
- topicId
4411
- });
4412
- },
4413
- onSelectTopic: (topicId) => {
4414
- dispatchIssueManagerTopicSelection({
4415
- nodeId,
4416
- topicId
4417
- });
4418
- },
4419
- onUpdateTopic: (input) => {
4420
- dispatchIssueManagerTopicUpdate({
4421
- input,
4422
- nodeId
4423
- });
4424
- }
4425
- }
4426
- )
4427
- }
4428
- ),
4429
4629
  /* @__PURE__ */ jsx17(
4430
4630
  Button12,
4431
4631
  {
@@ -4447,10 +4647,55 @@ function IssueManagerNodeHeader({
4447
4647
  }
4448
4648
  )
4449
4649
  ] }),
4650
+ /* @__PURE__ */ jsx17("div", { className: "pointer-events-none absolute top-1/2 left-1/2 z-20 flex max-w-[220px] -translate-x-1/2 -translate-y-1/2 items-center justify-center", children: /* @__PURE__ */ jsx17(
4651
+ "div",
4652
+ {
4653
+ className: "pointer-events-auto flex min-w-0 flex-none",
4654
+ onDoubleClick: (event) => event.stopPropagation(),
4655
+ onPointerDown: (event) => event.stopPropagation(),
4656
+ children: /* @__PURE__ */ jsx17(
4657
+ IssueManagerTopicSelector,
4658
+ {
4659
+ activeTopicId: topicState.activeTopicId,
4660
+ className: "flex-none",
4661
+ copy,
4662
+ topics: topicState.topics,
4663
+ onCreateTopic: (input) => {
4664
+ dispatchIssueManagerTopicCreate({
4665
+ input,
4666
+ nodeId,
4667
+ workspaceId
4668
+ });
4669
+ },
4670
+ onDeleteTopic: (topicId) => {
4671
+ dispatchIssueManagerTopicDelete({
4672
+ nodeId,
4673
+ topicId,
4674
+ workspaceId
4675
+ });
4676
+ },
4677
+ onSelectTopic: (topicId) => {
4678
+ dispatchIssueManagerTopicSelection({
4679
+ nodeId,
4680
+ topicId,
4681
+ workspaceId
4682
+ });
4683
+ },
4684
+ onUpdateTopic: (input) => {
4685
+ dispatchIssueManagerTopicUpdate({
4686
+ input,
4687
+ nodeId,
4688
+ workspaceId
4689
+ });
4690
+ }
4691
+ }
4692
+ )
4693
+ }
4694
+ ) }),
4450
4695
  /* @__PURE__ */ jsx17(
4451
4696
  "div",
4452
4697
  {
4453
- className: "flex flex-none items-center gap-1",
4698
+ className: "z-10 flex flex-none items-center gap-1",
4454
4699
  onDoubleClick: (event) => event.stopPropagation(),
4455
4700
  onPointerDown: (event) => event.stopPropagation(),
4456
4701
  children: defaultActions
@@ -4466,4 +4711,4 @@ export {
4466
4711
  IssueManagerNode,
4467
4712
  IssueManagerNodeHeader
4468
4713
  };
4469
- //# sourceMappingURL=chunk-UT34M3FS.js.map
4714
+ //# sourceMappingURL=chunk-YTOMO5IO.js.map