@parallelworks/tandem-web 0.171.1 → 0.171.3

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.
Files changed (171) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +5 -2
  2. package/_virtual/_virtual_i18n/es/common.js +5 -2
  3. package/_virtual/_virtual_i18n/ja/common.js +5 -2
  4. package/_virtual/_virtual_i18n/ko/common.js +5 -2
  5. package/_virtual/_virtual_i18n/zh/common.js +5 -2
  6. package/components/AccessGrants.js +6 -6
  7. package/components/ActivityTimeline.js +60 -60
  8. package/components/ActorAvatar.js +4 -4
  9. package/components/ActorLink.js +34 -0
  10. package/components/AgentWork.js +494 -494
  11. package/components/AppLauncher.js +7 -7
  12. package/components/AreaLink.js +13 -13
  13. package/components/AreaTiles.js +13 -13
  14. package/components/AreaWork.js +22 -22
  15. package/components/Attachments.js +73 -69
  16. package/components/BlockHandle.js +3 -3
  17. package/components/BugRotation.js +8 -8
  18. package/components/CodeHostSettings.js +121 -87
  19. package/components/CollabEditor.js +13 -13
  20. package/components/CommandPalette.js +206 -206
  21. package/components/CustomFields.js +95 -95
  22. package/components/CustomerRequests.js +11 -11
  23. package/components/DashboardPanel.js +201 -164
  24. package/components/DateChip.js +21 -21
  25. package/components/DocHistory.js +14 -14
  26. package/components/DocIcon.js +4 -4
  27. package/components/DocIconPicker.js +4 -4
  28. package/components/DocLinkPicker.js +22 -22
  29. package/components/DocLook.js +16 -16
  30. package/components/DocProperties.js +81 -81
  31. package/components/DocTable.js +53 -53
  32. package/components/DocsTree.js +179 -179
  33. package/components/Editor.js +69 -69
  34. package/components/FavoritesNav.js +78 -78
  35. package/components/GitHub.js +87 -87
  36. package/components/Graph.js +14 -14
  37. package/components/HostActions.js +21 -21
  38. package/components/HostPanel.js +6 -6
  39. package/components/HoverCards.js +74 -74
  40. package/components/IssueBoard.js +13 -10
  41. package/components/IssueBreakdown.js +31 -31
  42. package/components/IssueCode.js +19 -19
  43. package/components/IssueEvent.js +97 -92
  44. package/components/IssueFilters.js +39 -39
  45. package/components/IssueGroup.js +16 -16
  46. package/components/IssueImport.js +13 -13
  47. package/components/IssueInsights.js +20 -20
  48. package/components/IssueListBlock.js +81 -81
  49. package/components/IssueRelations.js +34 -34
  50. package/components/IssueRow.js +31 -31
  51. package/components/IssueSentry.js +36 -34
  52. package/components/IssueTemplates.js +23 -23
  53. package/components/IssueTypes.js +40 -40
  54. package/components/MarkdownTransfer.js +10 -10
  55. package/components/MentionPicker.js +19 -19
  56. package/components/NewIssueDialog.js +53 -53
  57. package/components/NewProjectDialog.js +82 -82
  58. package/components/PersonActivity.js +13 -13
  59. package/components/PersonHoverCard.js +44 -44
  60. package/components/Planning.js +16 -16
  61. package/components/Reports.js +8 -8
  62. package/components/SettingsNav.js +15 -15
  63. package/components/ShareDialog.js +8 -8
  64. package/components/SharedViewer.js +23 -23
  65. package/components/SlashMenu.js +26 -26
  66. package/components/SubPages.js +10 -10
  67. package/components/TeamForm.js +9 -9
  68. package/components/TeamRepositories.js +21 -21
  69. package/components/TeamWorkflow.js +6 -6
  70. package/components/UnlinkedMentions.js +29 -29
  71. package/components/Updates.js +8 -8
  72. package/components/Widgets.js +99 -97
  73. package/components/WorkCounts.js +12 -12
  74. package/components/cycleCrumb.js +8 -8
  75. package/components/editorPlugins.js +101 -101
  76. package/components/settings.js +6 -6
  77. package/components/video.js +7 -7
  78. package/hostedApp.js +24 -24
  79. package/index.js +18 -18
  80. package/lib/assignees.js +3 -3
  81. package/lib/attachments.js +12 -12
  82. package/lib/boardMove.js +27 -27
  83. package/lib/collab.js +1 -1
  84. package/lib/docs.js +115 -115
  85. package/lib/githubLink.js +7 -7
  86. package/lib/issueList.js +51 -51
  87. package/lib/issueMenu.js +117 -117
  88. package/lib/knowledge.js +134 -134
  89. package/lib/live.js +38 -38
  90. package/lib/notifications.js +47 -47
  91. package/lib/triageSeen.js +2 -2
  92. package/lib/views.js +31 -31
  93. package/package.json +24 -24
  94. package/pages/area.js +64 -64
  95. package/pages/areas.js +199 -199
  96. package/pages/decisions.js +51 -51
  97. package/pages/issues.js +120 -120
  98. package/pages/projects.js +238 -238
  99. package/pages/triage.js +202 -212
  100. package/routes/_workspace/agents/_slug2.js +127 -127
  101. package/routes/_workspace/agents/index2.js +22 -22
  102. package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
  103. package/routes/_workspace/dashboards/index2.js +34 -34
  104. package/routes/_workspace/docs/_doc2.js +267 -267
  105. package/routes/_workspace/docs/space2._space.js +31 -31
  106. package/routes/_workspace/docs2.js +4 -4
  107. package/routes/_workspace/graph2.js +11 -11
  108. package/routes/_workspace/graph3.js +11 -11
  109. package/routes/_workspace/issues/_identifier2.js +519 -522
  110. package/routes/_workspace/issues/index.js +13 -13
  111. package/routes/_workspace/knowledge/_term2.js +148 -146
  112. package/routes/_workspace/knowledge/_term3.js +4 -4
  113. package/routes/_workspace/knowledge/index.js +12 -12
  114. package/routes/_workspace/knowledge/index2.js +117 -115
  115. package/routes/_workspace/measures2.js +8 -8
  116. package/routes/_workspace/measures3.js +29 -29
  117. package/routes/_workspace/notifications2.js +263 -263
  118. package/routes/_workspace/people/_username.js +10 -10
  119. package/routes/_workspace/people/_username2.js +41 -41
  120. package/routes/_workspace/projects/_projectId3.js +303 -303
  121. package/routes/_workspace/projects/_projectId4.js +4 -4
  122. package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
  123. package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
  124. package/routes/_workspace/projects/index.js +8 -8
  125. package/routes/_workspace/settings/account2.js +8 -8
  126. package/routes/_workspace/settings/audit-log2.js +8 -8
  127. package/routes/_workspace/settings/audit-log3.js +155 -155
  128. package/routes/_workspace/settings/connections2.js +4 -4
  129. package/routes/_workspace/settings/fields2.js +5 -5
  130. package/routes/_workspace/settings/github2.js +11 -11
  131. package/routes/_workspace/settings/gitlab2.js +5 -5
  132. package/routes/_workspace/settings/groups2.js +52 -52
  133. package/routes/_workspace/settings/import2.js +39 -39
  134. package/routes/_workspace/settings/index2.js +5 -5
  135. package/routes/_workspace/settings/intercom2.js +11 -11
  136. package/routes/_workspace/settings/labels2.js +33 -33
  137. package/routes/_workspace/settings/members2.js +81 -81
  138. package/routes/_workspace/settings/notifications2.js +46 -46
  139. package/routes/_workspace/settings/parallelworks2.js +20 -20
  140. package/routes/_workspace/settings/roles2.js +41 -41
  141. package/routes/_workspace/settings/runners2.js +15 -15
  142. package/routes/_workspace/settings/sentry2.js +15 -15
  143. package/routes/_workspace/settings/sessions2.js +9 -9
  144. package/routes/_workspace/settings/sessions3.js +4 -4
  145. package/routes/_workspace/settings/slack2.js +12 -12
  146. package/routes/_workspace/settings/sso2.js +37 -37
  147. package/routes/_workspace/settings/sso3.js +7 -7
  148. package/routes/_workspace/settings/teams2.js +29 -29
  149. package/routes/_workspace/settings/tokens2.js +32 -32
  150. package/routes/_workspace/settings/tokens3.js +4 -4
  151. package/routes/_workspace/settings/webhooks2.js +41 -41
  152. package/routes/_workspace/settings/zendesk2.js +11 -11
  153. package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
  154. package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
  155. package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
  156. package/routes/_workspace/teams/_key/issues.js +10 -10
  157. package/routes/_workspace/teams/_key/projects.js +6 -6
  158. package/routes/_workspace/teams/_key/settings2.js +396 -396
  159. package/routes/_workspace2.js +308 -308
  160. package/routes/_workspace3.js +8 -8
  161. package/routes/device2.js +4 -4
  162. package/routes/device3.js +4 -4
  163. package/routes/docs/_tag/_endpoint2.js +3 -3
  164. package/routes/docs/_tag/index2.js +3 -3
  165. package/routes/docs/route2.js +7 -7
  166. package/routes/index2.js +5 -5
  167. package/routes/login2.js +10 -10
  168. package/routes/new2.js +12 -12
  169. package/routes/new3.js +5 -5
  170. package/routes/request2._token.js +6 -6
  171. package/routes/share2._secret.js +4 -4
package/pages/triage.js CHANGED
@@ -1,36 +1,33 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
- import { usePageTitle as n } from "../lib/pageTitle.js";
3
- import { Link as r, useNavigate as i } from "../lib/router.js";
4
- import { issueQuery as a, teamsQuery as o, triageVisitsQuery as s } from "../api/queries.js";
5
- import { triageQuery as c, useVisitTriage as l } from "../lib/triage.js";
6
- import { AddIcon as u, PriorityIcon as d, StatusIcon as f, TriageIcon as p, usePriorityNames as m } from "../components/icons.js";
7
- import { usePeople as h } from "../lib/people.js";
8
- import { useTime as g } from "../lib/time.js";
9
- import { EntityIcon as ee } from "../components/EntityIcon.js";
10
- import { useCanTriage as _ } from "../lib/roles.js";
11
- import { actorAvatar as v } from "../lib/avatar.js";
12
- import { Editor as y } from "../components/Editor.js";
13
- import { useShortcuts as b } from "../lib/shortcuts.js";
14
- import { ActorAvatar as x } from "../components/ActorAvatar.js";
15
- import { unseen as S } from "../lib/triageSeen.js";
16
- import { Avatar as C, Button as w, EmptyState as T, RelativeTime as E, buttonClasses as D, toast as O } from "@parallelworks/ui";
17
- import { useParams as te, useSearch as k } from "@tanstack/react-router";
18
- import { useCallback as A, useEffect as j, useRef as M, useState as N } from "react";
19
- import { useErrorMessage as P } from "@parallelworks/problem/react";
20
- import { useTranslations as F } from "use-intl";
21
- import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
22
- import { useMutation as z, useQuery as B, useQueryClient as V, useSuspenseQuery as H } from "@tanstack/react-query";
2
+ import { issueQuery as n, teamsQuery as r, triageVisitsQuery as i } from "../api/queries.js";
3
+ import { ActorAvatar as a } from "../components/ActorAvatar.js";
4
+ import { Editor as o } from "../components/Editor.js";
5
+ import { EntityIcon as s } from "../components/EntityIcon.js";
6
+ import { PriorityIcon as c, StatusIcon as l, TriageIcon as u, usePriorityNames as d } from "../components/icons.js";
7
+ import { actorAvatar as f } from "../lib/avatar.js";
8
+ import { usePageTitle as p } from "../lib/pageTitle.js";
9
+ import { usePeople as m } from "../lib/people.js";
10
+ import { useCanTriage as h } from "../lib/roles.js";
11
+ import { Link as g, useNavigate as _ } from "../lib/router.js";
12
+ import { useShortcuts as v } from "../lib/shortcuts.js";
13
+ import { useTime as y } from "../lib/time.js";
14
+ import { triageQuery as b, useVisitTriage as ee } from "../lib/triage.js";
15
+ import { hasOpened as x } from "../lib/triageSeen.js";
16
+ import { Avatar as S, Button as C, EmptyState as w, RelativeTime as T, Tooltip as E, buttonClasses as D, toast as O } from "@parallelworks/ui";
17
+ import { useParams as k, useSearch as A } from "@tanstack/react-router";
18
+ import { useCallback as j, useEffect as M, useRef as N, useState as P } from "react";
19
+ import { useErrorMessage as F } from "@parallelworks/problem/react";
20
+ import { useTranslations as I } from "use-intl";
21
+ import { Fragment as L, jsx as R, jsxs as z } from "react/jsx-runtime";
22
+ import { useMutation as te, useQuery as B, useQueryClient as V, useSuspenseQuery as H } from "@tanstack/react-query";
23
23
  // src/pages/triage.tsx
24
24
  function U() {
25
- let r = F("triage"), { workspace: a, key: o } = te({ strict: !1 }), { issue: u } = k({ strict: !1 }), { data: d } = H(c(a, o));
26
- n(r("title"));
27
- let f = d.issues, m = P(), h = V(), [g, ee] = N(/* @__PURE__ */ new Set()), [_, v] = N(/* @__PURE__ */ new Set()), y = A((e, t) => {
28
- ee((n) => n.has(e) === t ? n : t ? new Set(n).add(e) : G(n, e));
29
- }, []), x = f.filter((e) => g.has(e.id)), C = x.filter((e) => _.has(e.id)), E = i(), D = f.findIndex((e) => e.identifier === u?.toUpperCase()), I = M(null), U = f[D], { data: K, isError: ie } = B(s(a)), ae = {
30
- data: K,
31
- failed: ie
32
- }, { mutate: q } = l(a), J = M(/* @__PURE__ */ new Set());
33
- j(() => {
25
+ let n = I("triage"), { workspace: r, key: a } = k({ strict: !1 }), { issue: o } = A({ strict: !1 }), { data: s } = H(b(r, a));
26
+ p(n("title"));
27
+ let c = s.issues, l = F(), d = V(), [f, m] = P(/* @__PURE__ */ new Set()), [h, g] = P(/* @__PURE__ */ new Set()), y = j((e, t) => {
28
+ m((n) => n.has(e) === t ? n : t ? new Set(n).add(e) : G(n, e));
29
+ }, []), S = c.filter((e) => f.has(e.id)), T = S.filter((e) => h.has(e.id)), E = _(), D = c.findIndex((e) => e.identifier === o?.toUpperCase()), L = N(null), U = c[D], { data: K } = B(i(r)), { mutate: q } = ee(r), J = N(/* @__PURE__ */ new Set());
30
+ M(() => {
34
31
  U && K && !K.includes(U.id) && !J.current.has(U.id) && (J.current.add(U.id), q({
35
32
  id: U.id,
36
33
  identifier: U.identifier
@@ -45,22 +42,22 @@ function U() {
45
42
  search: e ? { issue: e.identifier.toLowerCase() } : {},
46
43
  replace: !0
47
44
  }), X = (e) => {
48
- g.has(e.id) && v((t) => t.has(e.id) ? G(t, e.id) : new Set(t).add(e.id));
45
+ f.has(e.id) && g((t) => t.has(e.id) ? G(t, e.id) : new Set(t).add(e.id));
49
46
  }, Z = (e, t) => {
50
47
  let [n, r] = e < t ? [e, t] : [t, e];
51
- v(new Set(f.slice(n, r + 1).filter((e) => g.has(e.id)).map((e) => e.id)));
52
- }, oe = (e, t) => {
53
- let n = f[t];
54
- n && (e.metaKey || e.ctrlKey ? (e.preventDefault(), X(n), I.current = t) : e.shiftKey && (e.preventDefault(), Z(I.current ?? (D >= 0 ? D : t), t)));
48
+ g(new Set(c.slice(n, r + 1).filter((e) => f.has(e.id)).map((e) => e.id)));
49
+ }, ie = (e, t) => {
50
+ let n = c[t];
51
+ n && (e.metaKey || e.ctrlKey ? (e.preventDefault(), X(n), L.current = t) : e.shiftKey && (e.preventDefault(), Z(L.current ?? (D >= 0 ? D : t), t)));
55
52
  }, Q = (e, t) => {
56
- if (f.length === 0) return;
57
- let n = D < 0 ? 0 : Math.min(Math.max(D + e, 0), f.length - 1);
58
- t && ((I.current === null || _.size === 0) && (I.current = Math.max(D, 0)), Z(I.current, n)), Y(f[n]);
59
- }, se = (e) => {
60
- let t = f.findIndex((t) => t.id === e.id);
61
- e.id === U?.id && Y(f[t + 1] ?? f[t - 1]);
53
+ if (c.length === 0) return;
54
+ let n = D < 0 ? 0 : Math.min(Math.max(D + e, 0), c.length - 1);
55
+ t && ((L.current === null || h.size === 0) && (L.current = Math.max(D, 0)), Z(L.current, n)), Y(c[n]);
56
+ }, ae = (e) => {
57
+ let t = c.findIndex((t) => t.id === e.id);
58
+ e.id === U?.id && Y(c[t + 1] ?? c[t - 1]);
62
59
  };
63
- b({
60
+ v({
64
61
  j: () => Q(1, !1),
65
62
  k: () => Q(-1, !1),
66
63
  J: () => Q(1, !0),
@@ -68,134 +65,134 @@ function U() {
68
65
  ArrowDown: (e) => Q(1, e.shiftKey),
69
66
  ArrowUp: (e) => Q(-1, e.shiftKey),
70
67
  x: () => {
71
- U && (X(U), I.current = D);
68
+ U && (X(U), L.current = D);
72
69
  },
73
70
  Enter: () => U && E({
74
71
  to: "/$workspace/issues/$identifier",
75
72
  params: {
76
- workspace: a,
73
+ workspace: r,
77
74
  identifier: U.identifier
78
75
  }
79
76
  }),
80
- "Mod+a": () => v(new Set(f.map((e) => e.id))),
81
- "Shift+Mod+a": () => v(/* @__PURE__ */ new Set()),
82
- Escape: () => _.size > 0 ? v(/* @__PURE__ */ new Set()) : Y(void 0)
83
- }), j(() => {
77
+ "Mod+a": () => g(new Set(c.map((e) => e.id))),
78
+ "Shift+Mod+a": () => g(/* @__PURE__ */ new Set()),
79
+ Escape: () => h.size > 0 ? g(/* @__PURE__ */ new Set()) : Y(void 0)
80
+ }), M(() => {
84
81
  let e = U && document.getElementById(`triage-${U.id}`);
85
82
  e && (e.scrollIntoView({ block: "nearest" }), e.parentElement?.contains(document.activeElement) && e.querySelector("a")?.focus({ preventScroll: !0 }));
86
83
  }, [U]);
87
- let $ = z({
88
- mutationFn: async (n) => (await Promise.allSettled(C.map(async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
84
+ let $ = te({
85
+ mutationFn: async (n) => (await Promise.allSettled(T.map(async (i) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
89
86
  params: { path: {
90
- workspace: a,
91
- identifier: r.identifier
87
+ workspace: r,
88
+ identifier: i.identifier
92
89
  } },
93
90
  body: { decision: n }
94
91
  }))))).filter((e) => e.status === "rejected"),
95
92
  onSuccess: (e) => {
96
- if (U && _.has(U.id)) {
97
- let e = (e) => !_.has(e.id);
98
- Y(f.slice(D + 1).find(e) ?? f.slice(0, D).findLast(e));
93
+ if (U && h.has(U.id)) {
94
+ let e = (e) => !h.has(e.id);
95
+ Y(c.slice(D + 1).find(e) ?? c.slice(0, D).findLast(e));
99
96
  }
100
- v(/* @__PURE__ */ new Set());
97
+ g(/* @__PURE__ */ new Set());
101
98
  let t = e[0];
102
- t && O.error(r("bulkFailed", {
99
+ t && O.error(n("bulkFailed", {
103
100
  count: e.length,
104
- reason: m(t.reason)
101
+ reason: l(t.reason)
105
102
  }));
106
103
  },
107
- onSettled: () => h.invalidateQueries({ queryKey: [
104
+ onSettled: () => d.invalidateQueries({ queryKey: [
108
105
  "workspace",
109
- a,
106
+ r,
110
107
  "issues"
111
108
  ] })
112
109
  });
113
- return /* @__PURE__ */ R("div", {
110
+ return /* @__PURE__ */ z("div", {
114
111
  className: "flex h-full flex-col",
115
- children: [/* @__PURE__ */ R("header", {
112
+ children: [/* @__PURE__ */ z("header", {
116
113
  className: "flex h-12 shrink-0 items-center gap-3 border-b border-border px-4 md:px-5",
117
114
  children: [
118
- /* @__PURE__ */ L("h1", {
115
+ /* @__PURE__ */ R("h1", {
119
116
  className: "text-sm font-semibold",
120
- children: r("title")
117
+ children: n("title")
121
118
  }),
122
- /* @__PURE__ */ L("span", {
119
+ /* @__PURE__ */ R("span", {
123
120
  className: "text-xs text-muted-foreground tabular-nums",
124
- children: f.length
121
+ children: c.length
125
122
  }),
126
- C.length > 0 && /* @__PURE__ */ R("div", {
123
+ T.length > 0 && /* @__PURE__ */ z("div", {
127
124
  className: "ml-auto flex items-center gap-2",
128
125
  children: [
129
- /* @__PURE__ */ L("span", {
126
+ /* @__PURE__ */ R("span", {
130
127
  className: "text-xs font-medium text-human",
131
- children: r("selected", { count: C.length })
128
+ children: n("selected", { count: T.length })
132
129
  }),
133
- C.length < x.length && /* @__PURE__ */ L("button", {
130
+ T.length < S.length && /* @__PURE__ */ R("button", {
134
131
  type: "button",
135
- onClick: () => v(new Set(x.map((e) => e.id))),
132
+ onClick: () => g(new Set(S.map((e) => e.id))),
136
133
  className: "text-xs hover:underline",
137
- children: r("selectAll")
134
+ children: n("selectAll")
138
135
  }),
139
- /* @__PURE__ */ L("button", {
136
+ /* @__PURE__ */ R("button", {
140
137
  type: "button",
141
- onClick: () => v(/* @__PURE__ */ new Set()),
138
+ onClick: () => g(/* @__PURE__ */ new Set()),
142
139
  className: "text-xs hover:underline",
143
- children: r("clear")
140
+ children: n("clear")
144
141
  }),
145
- /* @__PURE__ */ L(w, {
142
+ /* @__PURE__ */ R(C, {
146
143
  variant: "outline",
147
144
  size: "sm",
148
- title: r("declineHelp"),
145
+ title: n("declineHelp"),
149
146
  loading: $.isPending && $.variables === "decline",
150
147
  disabled: $.isPending,
151
148
  onClick: () => $.mutate("decline"),
152
- children: r("declineCount", { count: C.length })
149
+ children: n("declineCount", { count: T.length })
153
150
  }),
154
- /* @__PURE__ */ L(w, {
151
+ /* @__PURE__ */ R(C, {
155
152
  variant: "primary",
156
153
  size: "sm",
157
- title: r("acceptHelp"),
154
+ title: n("acceptHelp"),
158
155
  loading: $.isPending && $.variables === "accept",
159
156
  disabled: $.isPending,
160
157
  onClick: () => $.mutate("accept"),
161
- children: r("acceptCount", { count: C.length })
158
+ children: n("acceptCount", { count: T.length })
162
159
  })
163
160
  ]
164
161
  })
165
162
  ]
166
- }), f.length === 0 ? /* @__PURE__ */ L("div", {
163
+ }), c.length === 0 ? /* @__PURE__ */ R("div", {
167
164
  className: "min-h-0 flex-1 overflow-y-auto p-6",
168
- children: /* @__PURE__ */ L(T, {
169
- icon: /* @__PURE__ */ L(p, {}),
170
- title: r("empty"),
171
- description: r("emptyDescription")
165
+ children: /* @__PURE__ */ R(w, {
166
+ icon: /* @__PURE__ */ R(u, {}),
167
+ title: n("empty"),
168
+ description: n("emptyDescription")
172
169
  })
173
- }) : /* @__PURE__ */ R("div", {
170
+ }) : /* @__PURE__ */ z("div", {
174
171
  className: "flex min-h-0 flex-1",
175
- children: [/* @__PURE__ */ L("ul", {
176
- "aria-label": r("title"),
172
+ children: [/* @__PURE__ */ R("ul", {
173
+ "aria-label": n("title"),
177
174
  className: W("min-h-0 min-w-0 flex-1 flex-col overflow-y-auto px-2 py-2 md:flex md:max-w-md md:border-r md:border-border", U ? "hidden" : "flex"),
178
- children: f.map((e, t) => /* @__PURE__ */ L(ne, {
179
- workspace: a,
175
+ children: c.map((e, t) => /* @__PURE__ */ R(ne, {
176
+ workspace: r,
180
177
  issue: e,
181
178
  onEligible: y,
182
- picked: _.has(e.id) && g.has(e.id),
179
+ picked: h.has(e.id) && f.has(e.id),
183
180
  current: t === D,
184
- unread: S(e.id, ae),
185
- onClick: (e) => oe(e, t)
181
+ opened: x(e.id, { data: K }),
182
+ onClick: (e) => ie(e, t)
186
183
  }, e.id))
187
- }), /* @__PURE__ */ L("div", {
184
+ }), /* @__PURE__ */ R("div", {
188
185
  className: W("min-w-0 flex-1 overflow-y-auto md:block", U ? "block" : "hidden"),
189
- children: U ? /* @__PURE__ */ L(re, {
190
- workspace: a,
186
+ children: U ? /* @__PURE__ */ R(re, {
187
+ workspace: r,
191
188
  issue: U,
192
189
  onBack: () => Y(void 0),
193
- onDecided: se
194
- }, U.id) : /* @__PURE__ */ L("div", {
190
+ onDecided: ae
191
+ }, U.id) : /* @__PURE__ */ R("div", {
195
192
  className: "px-6 py-24",
196
- children: /* @__PURE__ */ L(T, {
197
- title: r("noneSelected"),
198
- description: r("shortcuts")
193
+ children: /* @__PURE__ */ R(w, {
194
+ title: n("noneSelected"),
195
+ description: n("shortcuts")
199
196
  })
200
197
  })
201
198
  })]
@@ -207,70 +204,61 @@ function G(e, t) {
207
204
  let n = new Set(e);
208
205
  return n.delete(t), n;
209
206
  }
210
- function ne({ workspace: e, issue: t, onEligible: n, picked: i, current: a, unread: o, onClick: s }) {
211
- let c = F("triage"), { actorName: l, avatarOf: d } = h(e), p = _(e, t.teamId);
212
- j(() => n(t.id, p), [
207
+ function ne({ workspace: e, issue: t, onEligible: n, picked: r, current: i, opened: o, onClick: s }) {
208
+ let c = I("triage"), { actorName: u, avatarOf: d } = m(e), f = h(e, t.teamId);
209
+ M(() => n(t.id, f), [
213
210
  n,
214
211
  t.id,
215
- p
212
+ f
216
213
  ]);
217
- let m = t.creator;
218
- return /* @__PURE__ */ L("li", {
214
+ let p = t.creator;
215
+ return /* @__PURE__ */ R("li", {
219
216
  id: `triage-${t.id}`,
220
- "data-picked": i || void 0,
221
- children: /* @__PURE__ */ R(r, {
217
+ "data-picked": r || void 0,
218
+ children: /* @__PURE__ */ z(g, {
222
219
  to: ".",
223
220
  search: { issue: t.identifier.toLowerCase() },
224
221
  replace: !0,
225
222
  onClick: s,
226
- "aria-current": a || void 0,
227
- className: W("flex gap-3 px-2 py-2.5 select-none", i ? "bg-human-soft" : W("rounded-md", a ? "bg-muted" : "hover:bg-muted")),
223
+ "aria-current": i || void 0,
224
+ className: W("flex gap-3 px-2 py-2.5 select-none", r ? "bg-human-soft" : W("rounded-md", i ? "bg-muted" : "hover:bg-muted")),
228
225
  children: [
229
- /* @__PURE__ */ L("span", {
230
- className: "flex w-2 shrink-0 justify-center pt-2.5",
231
- children: o && /* @__PURE__ */ L("span", {
232
- role: "img",
233
- "aria-label": c("unseen"),
234
- className: "size-2 rounded-full bg-primary"
235
- })
236
- }),
237
- /* @__PURE__ */ L("span", {
238
- className: W("h-fit shrink-0 rounded-full", i && "ring-1 ring-human/40"),
239
- children: /* @__PURE__ */ L(x, {
240
- actor: m,
241
- name: l(m),
242
- src: d(m.kind, m.handle),
243
- badge: /* @__PURE__ */ L(u, {})
226
+ /* @__PURE__ */ R("span", {
227
+ className: W("h-fit shrink-0 rounded-full", r && "ring-1 ring-human/40"),
228
+ children: /* @__PURE__ */ R(a, {
229
+ actor: p,
230
+ name: u(p),
231
+ src: d(p.kind, p.handle)
244
232
  })
245
233
  }),
246
- /* @__PURE__ */ R("span", {
234
+ /* @__PURE__ */ z("span", {
247
235
  className: "min-w-0 flex-1",
248
- children: [/* @__PURE__ */ R("span", {
236
+ children: [/* @__PURE__ */ z("span", {
249
237
  className: "flex items-baseline gap-2 text-sm",
250
- children: [/* @__PURE__ */ L("span", {
251
- className: W("shrink-0 text-xs tabular-nums", o ? "font-medium text-foreground" : "text-muted-foreground"),
238
+ children: [/* @__PURE__ */ R("span", {
239
+ className: W("shrink-0 text-xs tabular-nums", o ? "text-muted-foreground" : "font-medium text-foreground"),
252
240
  children: t.identifier
253
- }), /* @__PURE__ */ L("span", {
254
- className: W("min-w-0 flex-1 truncate", o ? "font-medium text-foreground" : "text-muted-foreground"),
241
+ }), /* @__PURE__ */ R("span", {
242
+ className: W("min-w-0 flex-1 truncate", o ? "text-muted-foreground" : "font-medium text-foreground"),
255
243
  children: t.title
256
244
  })]
257
- }), /* @__PURE__ */ L("span", {
245
+ }), /* @__PURE__ */ R("span", {
258
246
  className: "mt-0.5 block truncate text-xs text-muted-foreground",
259
- children: c("from", { name: l(m) })
247
+ children: c("from", { name: u(p) })
260
248
  })]
261
249
  }),
262
- /* @__PURE__ */ R("span", {
250
+ /* @__PURE__ */ z("span", {
263
251
  className: "flex shrink-0 flex-col items-end gap-1 pt-0.5",
264
- children: [/* @__PURE__ */ R("span", {
252
+ children: [/* @__PURE__ */ z("span", {
265
253
  className: "flex h-4 items-center",
266
- children: [/* @__PURE__ */ L(f, {
254
+ children: [/* @__PURE__ */ R(l, {
267
255
  category: t.status.category,
268
256
  step: t.status.step
269
- }), /* @__PURE__ */ L("span", {
257
+ }), /* @__PURE__ */ R("span", {
270
258
  className: "sr-only",
271
259
  children: t.status.name
272
260
  })]
273
- }), /* @__PURE__ */ L(E, {
261
+ }), /* @__PURE__ */ R(T, {
274
262
  value: t.createdAt,
275
263
  format: "compact",
276
264
  exact: "medium",
@@ -281,152 +269,154 @@ function ne({ workspace: e, issue: t, onEligible: n, picked: i, current: a, unre
281
269
  })
282
270
  });
283
271
  }
284
- function re({ workspace: n, issue: i, onBack: s, onDecided: c }) {
285
- let l = F("triage"), u = g(), p = P(), b = V(), x = m(), { data: S } = H(o(n)), { data: T } = B(a(n, i.identifier)), E = T ?? i, { actorName: O, avatarOf: te } = h(n), k = S.find((e) => e.id === E.teamId), A = _(n, E.teamId), j = z({
286
- mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
272
+ function re({ workspace: i, issue: a, onBack: u, onDecided: p }) {
273
+ let _ = I("triage"), v = y(), b = F(), ee = V(), x = d(), { data: w } = H(r(i)), { data: T } = B(n(i, a.identifier)), O = T ?? a, { actorName: k, avatarOf: A } = m(i), j = w.find((e) => e.id === O.teamId), M = h(i, O.teamId), N = te({
274
+ mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
287
275
  params: { path: {
288
- workspace: n,
289
- identifier: E.identifier
276
+ workspace: i,
277
+ identifier: O.identifier
290
278
  } },
291
- body: { decision: r }
279
+ body: { decision: n }
292
280
  })),
293
281
  onSuccess: () => {
294
- c(i), b.invalidateQueries({ queryKey: [
282
+ p(a), ee.invalidateQueries({ queryKey: [
295
283
  "workspace",
296
- n,
284
+ i,
297
285
  "issues"
298
286
  ] });
299
287
  }
300
- }), M = E.creator;
301
- return /* @__PURE__ */ R("article", {
288
+ }), P = O.creator;
289
+ return /* @__PURE__ */ z("article", {
302
290
  className: "mx-auto w-full max-w-3xl px-4 py-5 md:px-8",
303
291
  children: [
304
- /* @__PURE__ */ L("button", {
292
+ /* @__PURE__ */ R("button", {
305
293
  type: "button",
306
- onClick: s,
294
+ onClick: u,
307
295
  className: "mb-3 text-xs text-muted-foreground hover:text-foreground md:hidden",
308
- children: l("back")
296
+ children: _("back")
309
297
  }),
310
- /* @__PURE__ */ R("p", {
298
+ /* @__PURE__ */ z("p", {
311
299
  className: "flex items-center gap-1.5 text-xs text-muted-foreground",
312
300
  children: [
313
- k && /* @__PURE__ */ L(ee, {
314
- icon: k.icon,
315
- name: k.name,
301
+ j && /* @__PURE__ */ R(s, {
302
+ icon: j.icon,
303
+ name: j.name,
316
304
  className: "size-3.5"
317
305
  }),
318
- /* @__PURE__ */ L("span", {
306
+ /* @__PURE__ */ R("span", {
319
307
  className: "tabular-nums",
320
- children: E.identifier
308
+ children: O.identifier
321
309
  }),
322
- /* @__PURE__ */ L("span", {
310
+ /* @__PURE__ */ R("span", {
323
311
  "aria-hidden": "true",
324
312
  children: "·"
325
313
  }),
326
- /* @__PURE__ */ L(C, {
327
- ...v(M.kind),
328
- name: O(M),
329
- src: te(M.kind, M.handle),
314
+ /* @__PURE__ */ R(S, {
315
+ ...f(P.kind),
316
+ name: k(P),
317
+ src: A(P.kind, P.handle),
330
318
  size: "xs"
331
319
  }),
332
- /* @__PURE__ */ L("span", {
320
+ /* @__PURE__ */ R("span", {
333
321
  className: "truncate",
334
- children: l("from", { name: O(M) })
322
+ children: _("from", { name: k(P) })
335
323
  }),
336
- /* @__PURE__ */ L("span", {
324
+ /* @__PURE__ */ R("span", {
337
325
  "aria-hidden": "true",
338
326
  children: "·"
339
327
  }),
340
- /* @__PURE__ */ L("time", {
341
- dateTime: E.createdAt,
342
- title: u.full(E.createdAt),
343
- children: u.relative(E.createdAt)
328
+ /* @__PURE__ */ R(E, {
329
+ content: v.full(O.createdAt),
330
+ children: /* @__PURE__ */ R("time", {
331
+ dateTime: O.createdAt,
332
+ children: v.relative(O.createdAt)
333
+ })
344
334
  })
345
335
  ]
346
336
  }),
347
- /* @__PURE__ */ L("h2", {
337
+ /* @__PURE__ */ R("h2", {
348
338
  className: "mt-1 text-xl font-semibold text-balance",
349
- children: /* @__PURE__ */ L(r, {
339
+ children: /* @__PURE__ */ R(g, {
350
340
  to: "/$workspace/issues/$identifier",
351
341
  params: {
352
- workspace: n,
353
- identifier: E.identifier
342
+ workspace: i,
343
+ identifier: O.identifier
354
344
  },
355
345
  className: "hover:underline",
356
- children: E.title
346
+ children: O.title
357
347
  })
358
348
  }),
359
- /* @__PURE__ */ R("div", {
349
+ /* @__PURE__ */ z("div", {
360
350
  className: "mt-4 flex flex-wrap items-center gap-2",
361
- children: [A && /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(w, {
351
+ children: [M && /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ R(C, {
362
352
  variant: "primary",
363
353
  size: "sm",
364
- title: l("acceptHelp"),
365
- loading: j.isPending && j.variables === "accept",
366
- disabled: j.isPending,
367
- onClick: () => j.mutate("accept"),
368
- children: l("accept")
369
- }), /* @__PURE__ */ L(w, {
354
+ title: _("acceptHelp"),
355
+ loading: N.isPending && N.variables === "accept",
356
+ disabled: N.isPending,
357
+ onClick: () => N.mutate("accept"),
358
+ children: _("accept")
359
+ }), /* @__PURE__ */ R(C, {
370
360
  variant: "outline",
371
361
  size: "sm",
372
- title: l("declineHelp"),
373
- loading: j.isPending && j.variables === "decline",
374
- disabled: j.isPending,
375
- onClick: () => j.mutate("decline"),
376
- children: l("decline")
377
- })] }), /* @__PURE__ */ L(r, {
362
+ title: _("declineHelp"),
363
+ loading: N.isPending && N.variables === "decline",
364
+ disabled: N.isPending,
365
+ onClick: () => N.mutate("decline"),
366
+ children: _("decline")
367
+ })] }), /* @__PURE__ */ R(g, {
378
368
  to: "/$workspace/issues/$identifier",
379
369
  params: {
380
- workspace: n,
381
- identifier: E.identifier
370
+ workspace: i,
371
+ identifier: O.identifier
382
372
  },
383
373
  className: D({
384
374
  size: "sm",
385
375
  variant: "ghost"
386
376
  }),
387
- children: l("openIssue")
377
+ children: _("openIssue")
388
378
  })]
389
379
  }),
390
- j.error && /* @__PURE__ */ L("p", {
380
+ N.error && /* @__PURE__ */ R("p", {
391
381
  className: "mt-2 text-xs text-danger",
392
- children: p(j.error)
382
+ children: b(N.error)
393
383
  }),
394
- /* @__PURE__ */ L("p", {
384
+ /* @__PURE__ */ R("p", {
395
385
  className: "mt-3 text-xs text-muted-foreground",
396
- children: l("duplicateHint")
386
+ children: _("duplicateHint")
397
387
  }),
398
- /* @__PURE__ */ R("div", {
388
+ /* @__PURE__ */ z("div", {
399
389
  className: "mt-5 flex flex-wrap items-center gap-x-4 gap-y-1 border-y border-border py-2.5 text-xs text-muted-foreground",
400
390
  children: [
401
- /* @__PURE__ */ R("span", {
391
+ /* @__PURE__ */ z("span", {
402
392
  className: "inline-flex items-center gap-1.5",
403
- children: [/* @__PURE__ */ L(f, {
404
- category: E.status.category,
405
- step: E.status.step
406
- }), E.status.name]
393
+ children: [/* @__PURE__ */ R(l, {
394
+ category: O.status.category,
395
+ step: O.status.step
396
+ }), O.status.name]
407
397
  }),
408
- /* @__PURE__ */ R("span", {
398
+ /* @__PURE__ */ z("span", {
409
399
  className: "inline-flex items-center gap-1.5",
410
- children: [/* @__PURE__ */ L(d, { priority: E.priority }), x[E.priority]]
400
+ children: [/* @__PURE__ */ R(c, { priority: O.priority }), x[O.priority]]
411
401
  }),
412
- E.labels.map((e) => /* @__PURE__ */ R("span", {
402
+ O.labels.map((e) => /* @__PURE__ */ z("span", {
413
403
  className: "inline-flex items-center gap-1.5",
414
- children: [/* @__PURE__ */ L("span", {
404
+ children: [/* @__PURE__ */ R("span", {
415
405
  className: "size-2 rounded-full",
416
406
  style: { background: e.color }
417
407
  }), e.name]
418
408
  }, e.id))
419
409
  ]
420
410
  }),
421
- E.body.trim() ? /* @__PURE__ */ L("div", {
411
+ O.body.trim() ? /* @__PURE__ */ R("div", {
422
412
  className: "mt-5 text-sm",
423
- children: /* @__PURE__ */ L(y, {
424
- value: E.body,
413
+ children: /* @__PURE__ */ R(o, {
414
+ value: O.body,
425
415
  editable: !1
426
416
  })
427
- }) : /* @__PURE__ */ L("p", {
417
+ }) : /* @__PURE__ */ R("p", {
428
418
  className: "mt-5 text-sm text-muted-foreground",
429
- children: l("noDescription")
419
+ children: _("noDescription")
430
420
  })
431
421
  ]
432
422
  });