@cnzgray/dsh-mattpocock-workflow 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js CHANGED
@@ -39,7 +39,7 @@ __export(index_exports, {
39
39
  inject: () => inject
40
40
  });
41
41
  module.exports = __toCommonJS(index_exports);
42
- var React46 = __toESM(require("react"), 1);
42
+ var React48 = __toESM(require("react"), 1);
43
43
 
44
44
  // src/client/agent-activity.ts
45
45
  var React = __toESM(require("react"), 1);
@@ -204,6 +204,18 @@ var zh = {
204
204
  "row.assigneesTitle": "\u5206\u914D\u4EBA\uFF1A{names}",
205
205
  "row.assigneesSeparator": ", ",
206
206
  "row.assigneesMoreTitle": "\u8FD8\u6709 {count} \u4E2A\u5206\u914D\u4EBA\uFF1A{names}",
207
+ "tickets.hover.labels": "\u6807\u7B7E",
208
+ "tickets.hover.author": "\u521B\u5EFA\u4EBA",
209
+ "tickets.hover.assignees": "\u5206\u914D\u4EBA",
210
+ "tickets.hover.created": "\u521B\u5EFA",
211
+ "tickets.hover.updated": "\u66F4\u65B0",
212
+ "tickets.hover.comments": "\u8BC4\u8BBA",
213
+ "tickets.hover.blockedLabel": "\u963B\u585E",
214
+ "tickets.hover.blocked": "{count} \u5F20",
215
+ "tickets.hover.blockedRefs": "{count} \u5F20\uFF1A{refs}",
216
+ "tickets.hover.parentLabel": "\u7236\u7EA7",
217
+ "tickets.hover.parentOutside": "{parent}\uFF08\u4E0D\u5728\u5F53\u524D\u5217\u8868\uFF09",
218
+ "tickets.hover.openHint": "\u70B9\u51FB\u884C\u6253\u5F00\u8BE6\u60C5",
207
219
  "tickets.more.loading": "\u6B63\u5728\u52A0\u8F7D\u66F4\u591A\u2026",
208
220
  "tickets.more.scroll": "\u7EE7\u7EED\u5411\u4E0B\u6EDA\u52A8\u52A0\u8F7D\u66F4\u591A",
209
221
  "tickets.more.failed": "\u52A0\u8F7D\u66F4\u591A\u5931\u8D25\uFF1A{message}",
@@ -297,6 +309,7 @@ var zh = {
297
309
  "relative.hours": "{count} \u5C0F\u65F6\u524D",
298
310
  "relative.days": "{count} \u5929\u524D",
299
311
  "ticket.avatar.label": "\u521B\u5EFA\u4EBA\uFF1A{name}",
312
+ "ticket.avatar.assigneeLabel": "\u5206\u914D\u4EBA\uFF1A{name}",
300
313
  "ticket.author.title": "{name}\uFF08@{login}\uFF09",
301
314
  "ticket.number.copyAria": "\u590D\u5236 #{number} \u7684\u94FE\u63A5",
302
315
  "ticket.number.copiedTitle": "\u5DF2\u590D\u5236\u94FE\u63A5",
@@ -395,6 +408,7 @@ var zh = {
395
408
  "env.remedy.noSession": "\u5F53\u524D\u6CA1\u6709\u53EF\u7528\u4F1A\u8BDD\uFF0C\u65E0\u6CD5\u586B\u5165\u8F93\u5165\u6846\uFF1B\u53EF\u4EE5\u590D\u5236\u63D0\u793A\u8BCD\u3002",
396
409
  "env.remedy.fillFailed": "\u586B\u5165\u5931\u8D25\uFF1A\u5F53\u524D\u4F1A\u8BDD\u4E0D\u53EF\u7528\u3002",
397
410
  "env.remedy.copyFailed": "\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u9009\u62E9{noun}\u3002",
411
+ "env.remedy.manualCopyAria": "\u624B\u52A8\u590D\u5236{noun}",
398
412
  "capability.category.host": "\u5BBF\u4E3B\u670D\u52A1",
399
413
  "capability.category.ui": "\u754C\u9762\u6269\u5C55\u70B9",
400
414
  "capability.state.present": "\u53EF\u7528",
@@ -691,6 +705,18 @@ var en = {
691
705
  "row.assigneesTitle": "Assignees: {names}",
692
706
  "row.assigneesSeparator": ", ",
693
707
  "row.assigneesMoreTitle": "{count} more assignees: {names}",
708
+ "tickets.hover.labels": "Labels",
709
+ "tickets.hover.author": "Author",
710
+ "tickets.hover.assignees": "Assignees",
711
+ "tickets.hover.created": "Created",
712
+ "tickets.hover.updated": "Updated",
713
+ "tickets.hover.comments": "Comments",
714
+ "tickets.hover.blockedLabel": "Blocked",
715
+ "tickets.hover.blocked": "{count} tickets",
716
+ "tickets.hover.blockedRefs": "{count} tickets: {refs}",
717
+ "tickets.hover.parentLabel": "Parent",
718
+ "tickets.hover.parentOutside": "{parent} (not in list)",
719
+ "tickets.hover.openHint": "Click the row to open details",
694
720
  "tickets.more.loading": "Loading more\u2026",
695
721
  "tickets.more.scroll": "Scroll down to load more",
696
722
  "tickets.more.failed": "Failed to load more: {message}",
@@ -784,6 +810,7 @@ var en = {
784
810
  "relative.hours": "{count} h ago",
785
811
  "relative.days": "{count} d ago",
786
812
  "ticket.avatar.label": "Created by {name}",
813
+ "ticket.avatar.assigneeLabel": "Assigned to {name}",
787
814
  "ticket.author.title": "{name} (@{login})",
788
815
  "ticket.number.copyAria": "Copy the link to #{number}",
789
816
  "ticket.number.copiedTitle": "Link copied",
@@ -882,6 +909,7 @@ var en = {
882
909
  "env.remedy.noSession": "No usable session; cannot fill the input. You can copy the prompt.",
883
910
  "env.remedy.fillFailed": "Fill failed: the current session is unavailable.",
884
911
  "env.remedy.copyFailed": "Copy failed; select the {noun} manually.",
912
+ "env.remedy.manualCopyAria": "Manually copy the {noun}",
885
913
  "capability.category.host": "Host service",
886
914
  "capability.category.ui": "UI extension",
887
915
  "capability.state.present": "Available",
@@ -1482,7 +1510,7 @@ function isSnapshotRefreshResultPayload(value) {
1482
1510
  return typeof value.version === "number" && typeof value.checkedAt === "number";
1483
1511
  }
1484
1512
  if (value.kind === "changes") {
1485
- return typeof value.version === "number" && typeof value.fetchedAt === "number" && Array.isArray(value.tickets) && value.tickets.every(hasTicketFilterFields) && isStringArray(value.removed) && typeof value.metrics === "object" && value.metrics !== null && (value.viewer === null || typeof value.viewer === "string") && typeof value.total === "number" && typeof value.loaded === "number" && typeof value.windowLimit === "number" && typeof value.blockersFinalized === "boolean";
1513
+ return typeof value.version === "number" && typeof value.fetchedAt === "number" && Array.isArray(value.tickets) && value.tickets.every(hasTicketSnapshotFields) && isStringArray(value.removed) && typeof value.metrics === "object" && value.metrics !== null && (value.viewer === null || typeof value.viewer === "string") && typeof value.total === "number" && typeof value.loaded === "number" && typeof value.windowLimit === "number" && typeof value.blockersFinalized === "boolean";
1486
1514
  }
1487
1515
  return false;
1488
1516
  }
@@ -1505,7 +1533,7 @@ function isWorkspaceSnapshot(value) {
1505
1533
  return false;
1506
1534
  }
1507
1535
  if (!("tickets" in value) || !Array.isArray(value.tickets)) return false;
1508
- if (!value.tickets.every(hasTicketFilterFields)) return false;
1536
+ if (!value.tickets.every(hasTicketSnapshotFields)) return false;
1509
1537
  if (!("metrics" in value) || typeof value.metrics !== "object" || value.metrics === null) {
1510
1538
  return false;
1511
1539
  }
@@ -1534,11 +1562,27 @@ function isSnapshotCacheInfo(value) {
1534
1562
  if (!("cleared" in value) || typeof value.cleared !== "number") return false;
1535
1563
  return true;
1536
1564
  }
1537
- function hasTicketFilterFields(value) {
1565
+ function hasTicketSnapshotFields(value) {
1538
1566
  if (typeof value !== "object" || value === null) return false;
1539
1567
  if (!("skillAction" in value) || !isSkillAction(value.skillAction)) return false;
1540
1568
  if (!("skillActionReason" in value) || !isActionReason(value.skillActionReason)) return false;
1541
- return "assignees" in value && isStringArray(value.assignees);
1569
+ if (!("assignees" in value)) return false;
1570
+ if (!Array.isArray(value.assignees) || !value.assignees.every(isTicketAuthor)) return false;
1571
+ if ("excerpt" in value && (typeof value.excerpt !== "string" || value.excerpt.length === 0)) {
1572
+ return false;
1573
+ }
1574
+ return !("commentCount" in value) || typeof value.commentCount === "number" && Number.isInteger(value.commentCount) && value.commentCount >= 0;
1575
+ }
1576
+ function isTicketAuthor(value) {
1577
+ if (typeof value !== "object" || value === null) return false;
1578
+ const author = value;
1579
+ if (typeof author.login !== "string" || author.login.length === 0) return false;
1580
+ for (const key of ["displayName", "avatarUrl"]) {
1581
+ if (!(key in author)) return false;
1582
+ const field = author[key];
1583
+ if (field !== null && typeof field !== "string") return false;
1584
+ }
1585
+ return true;
1542
1586
  }
1543
1587
  function isStringArray(value) {
1544
1588
  return Array.isArray(value) && value.every((item) => typeof item === "string");
@@ -1802,7 +1846,7 @@ function disposerOf(handle) {
1802
1846
  }
1803
1847
 
1804
1848
  // src/client/task-panel.tsx
1805
- var React45 = __toESM(require("react"), 1);
1849
+ var React47 = __toESM(require("react"), 1);
1806
1850
 
1807
1851
  // src/client/action-bar.tsx
1808
1852
  var React5 = __toESM(require("react"), 1);
@@ -2260,7 +2304,8 @@ var CHIP_STYLE = {
2260
2304
  color: COLORS.secondary,
2261
2305
  padding: "2px 10px",
2262
2306
  cursor: "pointer",
2263
- font: "inherit",
2307
+ // 只继承字体家族:font 简写会把选中态的 fontWeight 一起重置。
2308
+ fontFamily: "inherit",
2264
2309
  fontSize: 12,
2265
2310
  lineHeight: "20px",
2266
2311
  whiteSpace: "nowrap"
@@ -2381,6 +2426,7 @@ var EMPTY_STYLE = {
2381
2426
  color: COLORS.secondary
2382
2427
  };
2383
2428
  var LIST_STYLE = {
2429
+ position: "relative",
2384
2430
  display: "flex",
2385
2431
  flexDirection: "column",
2386
2432
  gap: 6,
@@ -2780,8 +2826,11 @@ var DETAIL_ROOT_STYLE = {
2780
2826
  var DETAIL_HEADER_STYLE = {
2781
2827
  position: "relative",
2782
2828
  display: "flex",
2829
+ // 窄侧栏里放不下全部动作时折到下一行;不折行会把整页撑宽,出现页面级横向滚动条。
2830
+ flexWrap: "wrap",
2783
2831
  alignItems: "center",
2784
- gap: 6,
2832
+ columnGap: 6,
2833
+ rowGap: 4,
2785
2834
  minWidth: 0,
2786
2835
  padding: "6px 8px 6px 6px",
2787
2836
  borderBottom: `1px solid ${COLORS.border}`
@@ -2821,6 +2870,7 @@ var DETAIL_REF_LINK_STYLE = {
2821
2870
  textUnderlineOffset: 2
2822
2871
  };
2823
2872
  var DETAIL_SCROLL_STYLE = {
2873
+ position: "relative",
2824
2874
  display: "flex",
2825
2875
  flexDirection: "column",
2826
2876
  gap: 14,
@@ -3353,6 +3403,28 @@ var ENV_REMEDY_NOTICE_STYLE = {
3353
3403
  color: COLORS.warn,
3354
3404
  fontSize: 12
3355
3405
  };
3406
+ var ENV_REMEDY_FAILURE_STYLE = {
3407
+ display: "flex",
3408
+ flexDirection: "column",
3409
+ alignItems: "stretch",
3410
+ gap: 6,
3411
+ width: "100%"
3412
+ };
3413
+ var ENV_REMEDY_MANUAL_COPY_STYLE = {
3414
+ boxSizing: "border-box",
3415
+ width: "100%",
3416
+ minHeight: "3.5em",
3417
+ padding: "6px 8px",
3418
+ border: `1px solid ${COLORS.borderStrong}`,
3419
+ borderRadius: 6,
3420
+ background: COLORS.surface,
3421
+ color: COLORS.text,
3422
+ fontFamily: "inherit",
3423
+ fontSize: 12,
3424
+ lineHeight: 1.5,
3425
+ resize: "vertical",
3426
+ userSelect: "text"
3427
+ };
3356
3428
  var ENV_STATUS_COLORS = {
3357
3429
  pass: COLORS.success,
3358
3430
  fail: COLORS.error,
@@ -3797,7 +3869,7 @@ function CopyButton(props) {
3797
3869
  const { t: t2 } = useI18n();
3798
3870
  const [state, setState] = React9.useState("idle");
3799
3871
  React9.useEffect(() => {
3800
- if (state === "idle") return void 0;
3872
+ if (state !== "copied") return void 0;
3801
3873
  const timer = window.setTimeout(() => {
3802
3874
  setState("idle");
3803
3875
  }, 1500);
@@ -3818,7 +3890,40 @@ function CopyButton(props) {
3818
3890
  style: BUTTON_STYLE
3819
3891
  },
3820
3892
  state === "copied" ? t2("common.copied") : props.label
3821
- ), state === "failed" ? /* @__PURE__ */ React9.createElement("span", { role: "status", "data-testid": `${props.testId}-failed`, style: ENV_REMEDY_NOTICE_STYLE }, t2("env.remedy.copyFailed", { noun: props.noun })) : null);
3893
+ ), state === "failed" ? /* @__PURE__ */ React9.createElement("div", { style: ENV_REMEDY_FAILURE_STYLE }, /* @__PURE__ */ React9.createElement(
3894
+ "span",
3895
+ {
3896
+ role: "status",
3897
+ "data-testid": `${props.testId}-failed`,
3898
+ style: ENV_REMEDY_NOTICE_STYLE
3899
+ },
3900
+ t2("env.remedy.copyFailed", { noun: props.noun })
3901
+ ), /* @__PURE__ */ React9.createElement(ManualCopyField, { text: props.text, noun: props.noun, testId: `${props.testId}-manual` })) : null);
3902
+ }
3903
+ function ManualCopyField(props) {
3904
+ const { t: t2 } = useI18n();
3905
+ const field = React9.useRef(null);
3906
+ React9.useEffect(() => {
3907
+ const node = field.current;
3908
+ if (node === null) return;
3909
+ node.focus();
3910
+ node.select();
3911
+ }, []);
3912
+ return /* @__PURE__ */ React9.createElement(
3913
+ "textarea",
3914
+ {
3915
+ ref: field,
3916
+ "data-testid": props.testId,
3917
+ readOnly: true,
3918
+ spellCheck: false,
3919
+ value: props.text,
3920
+ "aria-label": t2("env.remedy.manualCopyAria", { noun: props.noun }),
3921
+ onFocus: (event) => {
3922
+ event.currentTarget.select();
3923
+ },
3924
+ style: ENV_REMEDY_MANUAL_COPY_STYLE
3925
+ }
3926
+ );
3822
3927
  }
3823
3928
  async function copyText(text) {
3824
3929
  const { clipboard } = navigator;
@@ -5863,6 +5968,8 @@ function useNow(clock) {
5863
5968
 
5864
5969
  // src/client/snapshot-request.ts
5865
5970
  var React17 = __toESM(require("react"), 1);
5971
+ var AUTO_REFRESH_INTERVAL_MS = 6e4;
5972
+ var FOCUS_REFRESH_MIN_MS = 6e4;
5866
5973
  function snapshotRefreshNotice(snapshot, refreshError, t2) {
5867
5974
  if (refreshError !== null) return refreshError.message;
5868
5975
  const hostMessage = snapshot?.refreshError?.message;
@@ -5901,6 +6008,7 @@ function useSnapshotRequest(client, workspaceRoot, options) {
5901
6008
  const handledSignal = React17.useRef(signal);
5902
6009
  const [retry, setRetry] = React17.useState(0);
5903
6010
  const handledRetry = React17.useRef(0);
6011
+ const lastRequestAt = React17.useRef(0);
5904
6012
  const run = React17.useCallback(
5905
6013
  async (mode) => {
5906
6014
  if (mode === "auto" && inFlight.current > 0) {
@@ -5908,6 +6016,7 @@ function useSnapshotRequest(client, workspaceRoot, options) {
5908
6016
  return;
5909
6017
  }
5910
6018
  inFlight.current += 1;
6019
+ lastRequestAt.current = Date.now();
5911
6020
  try {
5912
6021
  const applied = await load(mode);
5913
6022
  if (applied !== null && applied.source === "live") autoRefreshed.current = false;
@@ -5942,17 +6051,11 @@ function useSnapshotRequest(client, workspaceRoot, options) {
5942
6051
  if (workspaceRoot === void 0) return;
5943
6052
  void run("auto");
5944
6053
  }, [signal, workspaceRoot, run]);
6054
+ usePeriodicRefresh(workspaceRoot, run, lastRequestAt);
5945
6055
  React17.useEffect(() => {
5946
6056
  queued.current = false;
5947
6057
  }, [workspaceRoot]);
5948
- const refresh = React17.useCallback(() => {
5949
- if (phase === "loading" || phase === "refreshing") return;
5950
- void run("refresh");
5951
- }, [phase, run]);
5952
- const refreshFull = React17.useCallback(() => {
5953
- if (phase === "loading" || phase === "refreshing") return;
5954
- void run("refresh-full");
5955
- }, [phase, run]);
6058
+ const { refresh, refreshFull } = useManualRefresh(phase, run);
5956
6059
  return {
5957
6060
  snapshot,
5958
6061
  error,
@@ -5965,6 +6068,44 @@ function useSnapshotRequest(client, workspaceRoot, options) {
5965
6068
  moreLoading
5966
6069
  };
5967
6070
  }
6071
+ function usePeriodicRefresh(workspaceRoot, run, lastRequestAt) {
6072
+ React17.useEffect(() => {
6073
+ if (workspaceRoot === void 0) return void 0;
6074
+ const timer = setInterval(() => {
6075
+ if (document.visibilityState === "hidden") return;
6076
+ void run("auto");
6077
+ }, AUTO_REFRESH_INTERVAL_MS);
6078
+ return () => {
6079
+ clearInterval(timer);
6080
+ };
6081
+ }, [workspaceRoot, run]);
6082
+ React17.useEffect(() => {
6083
+ if (workspaceRoot === void 0) return void 0;
6084
+ const onReturn = () => {
6085
+ if (document.visibilityState === "hidden") return;
6086
+ if (Date.now() - lastRequestAt.current < FOCUS_REFRESH_MIN_MS) return;
6087
+ void run("auto");
6088
+ };
6089
+ document.addEventListener("visibilitychange", onReturn);
6090
+ window.addEventListener("focus", onReturn);
6091
+ return () => {
6092
+ document.removeEventListener("visibilitychange", onReturn);
6093
+ window.removeEventListener("focus", onReturn);
6094
+ };
6095
+ }, [workspaceRoot, run, lastRequestAt]);
6096
+ }
6097
+ function useManualRefresh(phase, run) {
6098
+ const busy = phase === "loading" || phase === "refreshing";
6099
+ const refresh = React17.useCallback(() => {
6100
+ if (busy) return;
6101
+ void run("refresh");
6102
+ }, [busy, run]);
6103
+ const refreshFull = React17.useCallback(() => {
6104
+ if (busy) return;
6105
+ void run("refresh-full");
6106
+ }, [busy, run]);
6107
+ return { refresh, refreshFull };
6108
+ }
5968
6109
  function useSnapshotLoader(client, workspaceRoot, t2) {
5969
6110
  const [snapshot, setSnapshot] = React17.useState(null);
5970
6111
  const [error, setError] = React17.useState(null);
@@ -6874,6 +7015,19 @@ var React24 = __toESM(require("react"), 1);
6874
7015
 
6875
7016
  // src/client/ticket-visuals.tsx
6876
7017
  var React23 = __toESM(require("react"), 1);
7018
+ var STATUS_LABEL_KEYS = {
7019
+ ready: "status.ready",
7020
+ blocked: "status.blocked",
7021
+ closed: "status.closed",
7022
+ open: "status.open"
7023
+ };
7024
+ function TicketStatusBadge(props) {
7025
+ const { t: t2 } = useI18n();
7026
+ return /* @__PURE__ */ React23.createElement("span", { style: STATUS_BADGES[props.status] }, /* @__PURE__ */ React23.createElement("span", { style: STATUS_DOT_STYLE }), t2(STATUS_LABEL_KEYS[props.status]));
7027
+ }
7028
+ function extraLabelsOf(ticket) {
7029
+ return ticket.labels.filter((label) => label !== ticket.category);
7030
+ }
6877
7031
  function Avatar(props) {
6878
7032
  const size = props.size ?? 20;
6879
7033
  const tint = props.name === null ? COLORS.tertiary : `hsl(${String(hue(props.name))} 55% 48%)`;
@@ -11303,7 +11457,7 @@ function useTicketTreeSession() {
11303
11457
  }
11304
11458
 
11305
11459
  // src/client/tickets-view.tsx
11306
- var React44 = __toESM(require("react"), 1);
11460
+ var React46 = __toESM(require("react"), 1);
11307
11461
 
11308
11462
  // src/client/my-tickets-bar.tsx
11309
11463
  var React31 = __toESM(require("react"), 1);
@@ -11332,7 +11486,8 @@ var MY_FILTER_CHIP_STYLE = {
11332
11486
  color: COLORS.secondary,
11333
11487
  background: "transparent",
11334
11488
  cursor: "pointer",
11335
- font: "inherit",
11489
+ // 只继承字体家族:font 简写会把选中态的 fontWeight 一起重置。
11490
+ fontFamily: "inherit",
11336
11491
  fontSize: 12,
11337
11492
  lineHeight: "20px",
11338
11493
  whiteSpace: "nowrap"
@@ -11460,7 +11615,7 @@ function MineChip(props) {
11460
11615
  }
11461
11616
 
11462
11617
  // src/client/ticket-list.tsx
11463
- var React34 = __toESM(require("react"), 1);
11618
+ var React36 = __toESM(require("react"), 1);
11464
11619
 
11465
11620
  // src/client/author-text.ts
11466
11621
  function authorName(author) {
@@ -11565,6 +11720,12 @@ var AVATAR_COLORS = [
11565
11720
  "#953800",
11566
11721
  "#424a53"
11567
11722
  ];
11723
+ var AUTHOR_GROUP_STYLE = {
11724
+ display: "inline-flex",
11725
+ alignItems: "center",
11726
+ gap: 8,
11727
+ minWidth: 0
11728
+ };
11568
11729
  var AUTHOR_NAME_STYLE = {
11569
11730
  maxWidth: "12ch",
11570
11731
  overflow: "hidden",
@@ -11583,15 +11744,14 @@ var ROW_AGE_STYLE = {
11583
11744
  var ASSIGNEE_GROUP_STYLE = {
11584
11745
  display: "inline-flex",
11585
11746
  alignItems: "center",
11586
- gap: 4,
11747
+ gap: 6,
11587
11748
  minWidth: 0
11588
11749
  };
11589
- var ASSIGNEE_ICON_STYLE = {
11750
+ var ASSIGNEE_PERSON_STYLE = {
11590
11751
  display: "inline-flex",
11591
11752
  alignItems: "center",
11592
- flex: "none",
11593
- color: COLORS.tertiary,
11594
- lineHeight: "18px"
11753
+ gap: 3,
11754
+ minWidth: 0
11595
11755
  };
11596
11756
  var ASSIGNEE_NAME_STYLE = {
11597
11757
  color: COLORS.secondary,
@@ -11599,6 +11759,14 @@ var ASSIGNEE_NAME_STYLE = {
11599
11759
  lineHeight: "18px",
11600
11760
  whiteSpace: "nowrap"
11601
11761
  };
11762
+ var TICKET_EXCERPT_STYLE = {
11763
+ overflow: "hidden",
11764
+ textOverflow: "ellipsis",
11765
+ whiteSpace: "nowrap",
11766
+ color: COLORS.tertiary,
11767
+ fontSize: 11,
11768
+ lineHeight: "16px"
11769
+ };
11602
11770
  var ASSIGNEE_MORE_STYLE = {
11603
11771
  color: COLORS.tertiary,
11604
11772
  fontSize: 11,
@@ -11706,14 +11874,15 @@ function TicketAvatar(props) {
11706
11874
  const { t: t2 } = useI18n();
11707
11875
  const [failedSrc, setFailedSrc] = React32.useState(null);
11708
11876
  const { author } = props;
11709
- const label = t2("ticket.avatar.label", { name: authorName(author) });
11877
+ const testId = props.testId ?? "ticket-avatar";
11878
+ const label = props.role === "assignee" ? t2("ticket.avatar.assigneeLabel", { name: authorName(author) }) : t2("ticket.avatar.label", { name: authorName(author) });
11710
11879
  const hint = authorTitle(author, t2);
11711
11880
  const src = usableAvatarUrl(author.avatarUrl);
11712
11881
  if (src !== null && src !== failedSrc) {
11713
11882
  return /* @__PURE__ */ React32.createElement(
11714
11883
  "img",
11715
11884
  {
11716
- "data-testid": "ticket-avatar",
11885
+ "data-testid": testId,
11717
11886
  src,
11718
11887
  alt: label,
11719
11888
  "aria-label": label,
@@ -11728,7 +11897,7 @@ function TicketAvatar(props) {
11728
11897
  return /* @__PURE__ */ React32.createElement(
11729
11898
  "span",
11730
11899
  {
11731
- "data-testid": "ticket-avatar",
11900
+ "data-testid": testId,
11732
11901
  role: "img",
11733
11902
  "aria-label": label,
11734
11903
  title: hint,
@@ -11763,25 +11932,356 @@ function initialOf(login) {
11763
11932
  return first === void 0 ? "?" : first.toUpperCase();
11764
11933
  }
11765
11934
 
11766
- // src/client/ticket-number.tsx
11935
+ // src/client/ticket-hover-card.tsx
11767
11936
  var React33 = __toESM(require("react"), 1);
11937
+
11938
+ // src/client/hover-card-position.ts
11939
+ var HOVER_CARD_GAP = 6;
11940
+ var HOVER_CARD_MARGIN = 8;
11941
+ var HOVER_CARD_WIDTH = 360;
11942
+ function placeHoverCard(anchor, card, bounds) {
11943
+ const minTop = bounds.top + HOVER_CARD_MARGIN;
11944
+ const belowTop = anchor.top + anchor.height + HOVER_CARD_GAP;
11945
+ const aboveTop = anchor.top - HOVER_CARD_GAP - card.height;
11946
+ const bottomLimit = bounds.top + bounds.height - HOVER_CARD_MARGIN;
11947
+ let top;
11948
+ if (belowTop + card.height <= bottomLimit) {
11949
+ top = belowTop;
11950
+ } else if (aboveTop >= minTop) {
11951
+ top = aboveTop;
11952
+ } else {
11953
+ top = minTop;
11954
+ }
11955
+ const minLeft = bounds.left + HOVER_CARD_MARGIN;
11956
+ const maxLeft = bounds.left + bounds.width - HOVER_CARD_MARGIN - card.width;
11957
+ const left = maxLeft <= minLeft ? minLeft : Math.max(minLeft, Math.min(anchor.left, maxLeft));
11958
+ return { top, left };
11959
+ }
11960
+
11961
+ // src/client/ticket-hover-card-styles.ts
11962
+ var HOVER_CARD_STYLE = {
11963
+ position: "fixed",
11964
+ zIndex: 30,
11965
+ boxSizing: "border-box",
11966
+ overflowY: "auto",
11967
+ padding: "10px 12px 9px",
11968
+ border: `1px solid ${COLORS.border}`,
11969
+ borderRadius: 8,
11970
+ background: COLORS.surfaceRaised,
11971
+ boxShadow: "0 8px 24px rgba(0, 0, 0, 0.18)",
11972
+ color: COLORS.text,
11973
+ cursor: "default"
11974
+ };
11975
+ var HOVER_CARD_HEADER_STYLE = {
11976
+ display: "flex",
11977
+ alignItems: "center",
11978
+ flexWrap: "wrap",
11979
+ gap: 6,
11980
+ marginBottom: 6
11981
+ };
11982
+ var HOVER_CARD_REF_STYLE = {
11983
+ color: COLORS.tertiary,
11984
+ fontSize: 12,
11985
+ fontWeight: 500,
11986
+ fontVariantNumeric: "tabular-nums",
11987
+ overflowWrap: "anywhere"
11988
+ };
11989
+ var HOVER_CARD_TITLE_STYLE = {
11990
+ maxHeight: "2.9em",
11991
+ overflow: "hidden",
11992
+ marginBottom: 8,
11993
+ fontWeight: 600,
11994
+ lineHeight: "1.45",
11995
+ overflowWrap: "anywhere"
11996
+ };
11997
+ var HOVER_CARD_EXCERPT_STYLE = {
11998
+ maxHeight: 72,
11999
+ overflow: "hidden",
12000
+ marginBottom: 8,
12001
+ color: COLORS.secondary,
12002
+ fontSize: 12,
12003
+ lineHeight: "18px",
12004
+ overflowWrap: "anywhere"
12005
+ };
12006
+ var HOVER_CARD_GRID_STYLE = {
12007
+ display: "grid",
12008
+ gridTemplateColumns: "auto minmax(0, 1fr)",
12009
+ columnGap: 8,
12010
+ rowGap: 4,
12011
+ alignItems: "start",
12012
+ fontSize: 12,
12013
+ lineHeight: "18px"
12014
+ };
12015
+ var HOVER_CARD_LABEL_STYLE = {
12016
+ color: COLORS.tertiary,
12017
+ fontSize: 11,
12018
+ lineHeight: "18px",
12019
+ whiteSpace: "nowrap"
12020
+ };
12021
+ var HOVER_CARD_VALUE_STYLE = {
12022
+ color: COLORS.secondary,
12023
+ minWidth: 0,
12024
+ overflowWrap: "anywhere"
12025
+ };
12026
+ var HOVER_CARD_LABELS_STYLE = {
12027
+ display: "flex",
12028
+ flexWrap: "wrap",
12029
+ gap: 4,
12030
+ minWidth: 0
12031
+ };
12032
+ var HOVER_CARD_PEOPLE_STYLE = {
12033
+ display: "flex",
12034
+ flexWrap: "wrap",
12035
+ alignItems: "center",
12036
+ gap: "2px 8px",
12037
+ minWidth: 0
12038
+ };
12039
+ var HOVER_CARD_PERSON_STYLE = {
12040
+ display: "inline-flex",
12041
+ alignItems: "center",
12042
+ gap: 4,
12043
+ minWidth: 0
12044
+ };
12045
+ var HOVER_CARD_PERSON_NAME_STYLE = {
12046
+ color: COLORS.secondary,
12047
+ overflowWrap: "anywhere"
12048
+ };
12049
+ var HOVER_CARD_LOGIN_STYLE = {
12050
+ color: COLORS.tertiary,
12051
+ fontSize: 11
12052
+ };
12053
+ var HOVER_CARD_FOOTER_STYLE = {
12054
+ marginTop: 8,
12055
+ paddingTop: 6,
12056
+ borderTop: `1px solid ${COLORS.border}`,
12057
+ color: COLORS.tertiary,
12058
+ fontSize: 11,
12059
+ lineHeight: "16px"
12060
+ };
12061
+
12062
+ // src/client/ticket-hover-card.tsx
12063
+ function TicketHoverCard(props) {
12064
+ const { t: t2 } = useI18n();
12065
+ const cardRef = React33.useRef(null);
12066
+ const [position, setPosition] = React33.useState(null);
12067
+ const { ticket } = props;
12068
+ const width = Math.max(0, Math.min(HOVER_CARD_WIDTH, props.bounds.width - HOVER_CARD_MARGIN * 2));
12069
+ const maxHeight = Math.max(0, props.bounds.height - HOVER_CARD_MARGIN * 2);
12070
+ React33.useLayoutEffect(() => {
12071
+ const card = cardRef.current;
12072
+ if (card === null) return;
12073
+ const rect = card.getBoundingClientRect();
12074
+ setPosition(
12075
+ placeHoverCard(props.anchor, { width: rect.width, height: rect.height }, props.bounds)
12076
+ );
12077
+ }, [props.anchor, props.bounds, ticket.ref, ticket.updatedAt]);
12078
+ return /* @__PURE__ */ React33.createElement(
12079
+ "div",
12080
+ {
12081
+ ref: cardRef,
12082
+ "data-testid": "ticket-hover-card",
12083
+ "aria-hidden": "true",
12084
+ style: {
12085
+ ...HOVER_CARD_STYLE,
12086
+ width,
12087
+ maxHeight,
12088
+ top: position?.top ?? 0,
12089
+ left: position?.left ?? 0,
12090
+ visibility: position === null ? "hidden" : "visible"
12091
+ },
12092
+ onPointerEnter: props.onPointerEnter,
12093
+ onPointerLeave: props.onPointerLeave,
12094
+ onPointerDown: (event) => {
12095
+ event.stopPropagation();
12096
+ }
12097
+ },
12098
+ /* @__PURE__ */ React33.createElement(HoverHeader, { ticket }),
12099
+ /* @__PURE__ */ React33.createElement("div", { style: HOVER_CARD_TITLE_STYLE }, ticket.title),
12100
+ ticket.excerpt === void 0 ? null : /* @__PURE__ */ React33.createElement("div", { "data-testid": "hover-excerpt", style: HOVER_CARD_EXCERPT_STYLE }, ticket.excerpt),
12101
+ /* @__PURE__ */ React33.createElement(HoverDetails, { ticket, tickets: props.tickets, now: props.now }),
12102
+ /* @__PURE__ */ React33.createElement("div", { style: HOVER_CARD_FOOTER_STYLE }, t2("tickets.hover.openHint"))
12103
+ );
12104
+ }
12105
+ function HoverHeader(props) {
12106
+ const { ticket } = props;
12107
+ return /* @__PURE__ */ React33.createElement("div", { style: HOVER_CARD_HEADER_STYLE }, /* @__PURE__ */ React33.createElement("span", { "data-testid": "hover-ref", style: HOVER_CARD_REF_STYLE }, ticket.number === null ? ticket.ref : `#${String(ticket.number)}`), /* @__PURE__ */ React33.createElement(TicketStatusBadge, { status: ticket.status }), ticket.category === null ? null : /* @__PURE__ */ React33.createElement("span", { style: CATEGORY_BADGES[ticket.category] }, ticket.category));
12108
+ }
12109
+ function HoverDetails(props) {
12110
+ const { t: t2 } = useI18n();
12111
+ const { ticket } = props;
12112
+ const extraLabels = extraLabelsOf(ticket);
12113
+ const blockers = blockerItems(ticket, props.tickets);
12114
+ const parent = ticket.parent;
12115
+ const parentOutside = parent !== void 0 && !props.tickets.some((item) => item.ref === parent);
12116
+ return /* @__PURE__ */ React33.createElement("div", { style: HOVER_CARD_GRID_STYLE }, extraLabels.length === 0 ? null : /* @__PURE__ */ React33.createElement(HoverField, { label: t2("tickets.hover.labels"), valueStyle: HOVER_CARD_LABELS_STYLE }, extraLabels.map((label) => /* @__PURE__ */ React33.createElement("span", { key: label, "data-testid": "hover-label", style: LABEL_BADGE_STYLE }, label))), ticket.author === null ? null : /* @__PURE__ */ React33.createElement(HoverField, { label: t2("tickets.hover.author") }, /* @__PURE__ */ React33.createElement(PersonChip, { user: ticket.author, testId: "hover-author-avatar" })), ticket.assignees.length === 0 ? null : /* @__PURE__ */ React33.createElement(HoverField, { label: t2("tickets.hover.assignees"), valueStyle: HOVER_CARD_PEOPLE_STYLE }, ticket.assignees.map((user) => /* @__PURE__ */ React33.createElement(
12117
+ PersonChip,
12118
+ {
12119
+ key: user.login,
12120
+ user,
12121
+ role: "assignee",
12122
+ testId: "hover-assignee-avatar"
12123
+ }
12124
+ ))), /* @__PURE__ */ React33.createElement(HoverField, { label: t2("tickets.hover.created") }, timeText(ticket.createdAt, props.now, t2)), /* @__PURE__ */ React33.createElement(HoverField, { label: t2("tickets.hover.updated") }, timeText(ticket.updatedAt, props.now, t2)), ticket.commentCount === void 0 ? null : /* @__PURE__ */ React33.createElement(HoverField, { label: t2("tickets.hover.comments") }, /* @__PURE__ */ React33.createElement("span", { "data-testid": "hover-comments" }, String(ticket.commentCount))), ticket.openBlockers === 0 ? null : /* @__PURE__ */ React33.createElement(HoverField, { label: t2("tickets.hover.blockedLabel") }, blockers.length === 0 ? t2("tickets.hover.blocked", { count: ticket.openBlockers }) : t2("tickets.hover.blockedRefs", {
12125
+ count: blockers.length,
12126
+ refs: blockers.map((item) => item.ref).join(t2("common.listSeparator"))
12127
+ })), parent === void 0 ? null : /* @__PURE__ */ React33.createElement(HoverField, { label: t2("tickets.hover.parentLabel") }, parentOutside ? t2("tickets.hover.parentOutside", { parent }) : parent));
12128
+ }
12129
+ function HoverField(props) {
12130
+ return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("span", { style: HOVER_CARD_LABEL_STYLE }, props.label), /* @__PURE__ */ React33.createElement("span", { style: props.valueStyle ?? HOVER_CARD_VALUE_STYLE }, props.children));
12131
+ }
12132
+ function PersonChip(props) {
12133
+ return /* @__PURE__ */ React33.createElement("span", { style: HOVER_CARD_PERSON_STYLE }, /* @__PURE__ */ React33.createElement(TicketAvatar, { author: props.user, role: props.role, testId: props.testId }), /* @__PURE__ */ React33.createElement("span", { style: HOVER_CARD_PERSON_NAME_STYLE }, authorName(props.user)), props.user.displayName === null ? null : /* @__PURE__ */ React33.createElement("span", { style: HOVER_CARD_LOGIN_STYLE }, "@", props.user.login));
12134
+ }
12135
+ function timeText(value, now, t2) {
12136
+ const age = formatRelativeTime(value, now, t2);
12137
+ const absolute = formatTime(value);
12138
+ return age.length === 0 ? absolute : `${absolute}${t2("row.time.separator")}${age}`;
12139
+ }
12140
+
12141
+ // src/client/ticket-hover.ts
12142
+ var React34 = __toESM(require("react"), 1);
12143
+ var HOVER_OPEN_DELAY_MS = 350;
12144
+ var HOVER_CLOSE_DELAY_MS = 120;
12145
+ function clearTimer(timer) {
12146
+ if (timer.current === null) return;
12147
+ window.clearTimeout(timer.current);
12148
+ timer.current = null;
12149
+ }
12150
+ function hoverTargetOf(element) {
12151
+ const surface = element.closest('[data-hover="card"]');
12152
+ const rect = (surface ?? element).getBoundingClientRect();
12153
+ const panelRect = element.closest("[data-anvil-panel]")?.getBoundingClientRect();
12154
+ return {
12155
+ anchor: { top: rect.top, left: rect.left, width: rect.width, height: rect.height },
12156
+ bounds: panelRect === void 0 ? { top: 0, left: 0, width: window.innerWidth, height: window.innerHeight } : {
12157
+ top: panelRect.top,
12158
+ left: panelRect.left,
12159
+ width: panelRect.width,
12160
+ height: panelRect.height
12161
+ }
12162
+ };
12163
+ }
12164
+ function useTicketHover(tickets) {
12165
+ const [hovered, setHovered] = React34.useState(null);
12166
+ const listRef = React34.useRef(null);
12167
+ const openTimer = React34.useRef(null);
12168
+ const closeTimer = React34.useRef(null);
12169
+ const targetRef = React34.useRef(null);
12170
+ const close = React34.useCallback(() => {
12171
+ clearTimer(openTimer);
12172
+ clearTimer(closeTimer);
12173
+ targetRef.current = null;
12174
+ setHovered(null);
12175
+ }, []);
12176
+ const scheduleClose = React34.useCallback(() => {
12177
+ clearTimer(closeTimer);
12178
+ closeTimer.current = window.setTimeout(() => {
12179
+ closeTimer.current = null;
12180
+ targetRef.current = null;
12181
+ setHovered(null);
12182
+ }, HOVER_CLOSE_DELAY_MS);
12183
+ }, []);
12184
+ const open = React34.useCallback((ref, anchor, bounds) => {
12185
+ clearTimer(openTimer);
12186
+ clearTimer(closeTimer);
12187
+ if (targetRef.current !== null && targetRef.current !== ref) {
12188
+ targetRef.current = null;
12189
+ setHovered(null);
12190
+ }
12191
+ targetRef.current = ref;
12192
+ openTimer.current = window.setTimeout(() => {
12193
+ openTimer.current = null;
12194
+ setHovered({ ref, anchor, bounds });
12195
+ }, HOVER_OPEN_DELAY_MS);
12196
+ }, []);
12197
+ const leave = React34.useCallback(
12198
+ (ref) => {
12199
+ clearTimer(openTimer);
12200
+ if (targetRef.current === ref) scheduleClose();
12201
+ },
12202
+ [scheduleClose]
12203
+ );
12204
+ const enterCard = React34.useCallback(() => {
12205
+ clearTimer(closeTimer);
12206
+ }, []);
12207
+ const leaveCard = React34.useCallback(() => {
12208
+ scheduleClose();
12209
+ }, [scheduleClose]);
12210
+ React34.useEffect(
12211
+ () => () => {
12212
+ clearTimer(openTimer);
12213
+ clearTimer(closeTimer);
12214
+ },
12215
+ []
12216
+ );
12217
+ useDismissHover(hovered !== null, listRef, close);
12218
+ useCloseOnListChange(tickets, targetRef, close);
12219
+ return { hovered, listRef, open, leave, enterCard, leaveCard };
12220
+ }
12221
+ function useDismissHover(active, listRef, close) {
12222
+ React34.useEffect(() => {
12223
+ const list = listRef.current;
12224
+ if (list === null) return void 0;
12225
+ list.addEventListener("scroll", close, { passive: true });
12226
+ return () => {
12227
+ list.removeEventListener("scroll", close);
12228
+ };
12229
+ }, [listRef, close]);
12230
+ React34.useEffect(() => {
12231
+ if (!active) return void 0;
12232
+ const onResize = () => {
12233
+ close();
12234
+ };
12235
+ const onKeyDown = (event) => {
12236
+ if (event.key === "Escape") close();
12237
+ };
12238
+ const onPointerDown = () => {
12239
+ close();
12240
+ };
12241
+ const onBlur = () => {
12242
+ close();
12243
+ };
12244
+ window.addEventListener("resize", onResize);
12245
+ window.addEventListener("blur", onBlur);
12246
+ document.addEventListener("keydown", onKeyDown);
12247
+ document.addEventListener("pointerdown", onPointerDown);
12248
+ return () => {
12249
+ window.removeEventListener("resize", onResize);
12250
+ window.removeEventListener("blur", onBlur);
12251
+ document.removeEventListener("keydown", onKeyDown);
12252
+ document.removeEventListener("pointerdown", onPointerDown);
12253
+ };
12254
+ }, [active, close]);
12255
+ }
12256
+ function useCloseOnListChange(tickets, targetRef, close) {
12257
+ const refs = tickets.map((ticket) => ticket.ref).join("\n");
12258
+ const previous = React34.useRef(refs);
12259
+ React34.useEffect(() => {
12260
+ if (previous.current === refs) return;
12261
+ previous.current = refs;
12262
+ if (targetRef.current !== null) close();
12263
+ }, [refs, targetRef, close]);
12264
+ }
12265
+
12266
+ // src/client/ticket-number.tsx
12267
+ var React35 = __toESM(require("react"), 1);
11768
12268
  var REF_DISPLAY_LIMIT = 40;
11769
12269
  function TicketNumber(props) {
11770
12270
  const { ticket } = props;
11771
12271
  const url = ticket.url ?? null;
11772
12272
  if (url === null || ticket.number === null) {
11773
12273
  const display = refDisplay(ticket);
11774
- return /* @__PURE__ */ React33.createElement(
12274
+ return /* @__PURE__ */ React35.createElement(
11775
12275
  "span",
11776
12276
  {
11777
12277
  "data-testid": "ticket-ref",
11778
12278
  style: ticket.number === null ? LOCAL_REF_STYLE : NUMBER_BADGE_STYLE,
11779
12279
  ...display.full === void 0 ? {} : { title: display.full }
11780
12280
  },
11781
- ticket.number === null ? display.text : /* @__PURE__ */ React33.createElement(NumberText, { number: ticket.number })
12281
+ ticket.number === null ? display.text : /* @__PURE__ */ React35.createElement(NumberText, { number: ticket.number })
11782
12282
  );
11783
12283
  }
11784
- return /* @__PURE__ */ React33.createElement(CopyableNumber, { number: ticket.number, url });
12284
+ return /* @__PURE__ */ React35.createElement(CopyableNumber, { number: ticket.number, url });
11785
12285
  }
11786
12286
  function CopyableNumber(props) {
11787
12287
  const { t: t2 } = useI18n();
@@ -11789,7 +12289,7 @@ function CopyableNumber(props) {
11789
12289
  const copied = copy.status === "copied";
11790
12290
  const failed = copy.status === "failed";
11791
12291
  const color = copied ? COLORS.success : failed ? COLORS.error : void 0;
11792
- return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(
12292
+ return /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement(
11793
12293
  "button",
11794
12294
  {
11795
12295
  type: "button",
@@ -11804,11 +12304,11 @@ function CopyableNumber(props) {
11804
12304
  },
11805
12305
  style: color === void 0 ? NUMBER_BUTTON_STYLE : { ...NUMBER_BUTTON_STYLE, color }
11806
12306
  },
11807
- /* @__PURE__ */ React33.createElement(NumberText, { number: props.number, copied })
11808
- ), copied ? /* @__PURE__ */ React33.createElement("span", { role: "status", style: VISUALLY_HIDDEN_STYLE }, t2("ticket.number.copiedNotice")) : null);
12307
+ /* @__PURE__ */ React35.createElement(NumberText, { number: props.number, copied })
12308
+ ), copied ? /* @__PURE__ */ React35.createElement("span", { role: "status", style: VISUALLY_HIDDEN_STYLE }, t2("ticket.number.copiedNotice")) : null);
11809
12309
  }
11810
12310
  function NumberText(props) {
11811
- return /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement("span", { style: NUMBER_MARK_STYLE }, props.copied === true ? /* @__PURE__ */ React33.createElement(CheckIcon, null) : "#"), String(props.number));
12311
+ return /* @__PURE__ */ React35.createElement(React35.Fragment, null, /* @__PURE__ */ React35.createElement("span", { style: NUMBER_MARK_STYLE }, props.copied === true ? /* @__PURE__ */ React35.createElement(CheckIcon, null) : "#"), String(props.number));
11812
12312
  }
11813
12313
  function refDisplay(ticket) {
11814
12314
  if (ticket.ref.length <= REF_DISPLAY_LIMIT) return { text: ticket.ref };
@@ -11823,22 +12323,20 @@ function refDisplay(ticket) {
11823
12323
  // src/client/ticket-list.tsx
11824
12324
  var MAX_EXTRA_LABELS = 3;
11825
12325
  var MAX_ROW_ASSIGNEES = 2;
11826
- var STATUS_KEYS2 = {
11827
- ready: "status.ready",
11828
- blocked: "status.blocked",
11829
- closed: "status.closed",
11830
- open: "status.open"
11831
- };
11832
12326
  var ROWS_STYLE = {
11833
12327
  display: "flex",
11834
12328
  flexDirection: "column",
11835
12329
  gap: 6
11836
12330
  };
11837
12331
  function TicketList(props) {
12332
+ const renderedTickets = props.rows === void 0 ? props.tickets : props.rows.map((row) => row.ticket);
12333
+ const hover = useTicketHover(renderedTickets);
11838
12334
  if (props.tickets.length === 0) {
11839
- return /* @__PURE__ */ React34.createElement("div", { "data-testid": "empty", style: EMPTY_STYLE }, props.emptyText);
12335
+ return /* @__PURE__ */ React36.createElement("div", { "data-testid": "empty", style: EMPTY_STYLE }, props.emptyText);
11840
12336
  }
11841
- return /* @__PURE__ */ React34.createElement("div", { "data-testid": "ticket-scroll", style: LIST_STYLE }, /* @__PURE__ */ React34.createElement("div", { role: "list", "data-testid": "ticket-list", style: ROWS_STYLE }, props.rows === void 0 ? props.tickets.map((ticket) => /* @__PURE__ */ React34.createElement(
12337
+ const hovered = hover.hovered;
12338
+ const activeTicket = hovered === null ? void 0 : renderedTickets.find((ticket) => ticket.ref === hovered.ref);
12339
+ return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement("div", { ref: hover.listRef, "data-testid": "ticket-scroll", style: LIST_STYLE }, /* @__PURE__ */ React36.createElement("div", { role: "list", "data-testid": "ticket-list", style: ROWS_STYLE }, props.rows === void 0 ? props.tickets.map((ticket) => /* @__PURE__ */ React36.createElement(
11842
12340
  TicketRow,
11843
12341
  {
11844
12342
  key: ticket.ref,
@@ -11849,9 +12347,11 @@ function TicketList(props) {
11849
12347
  now: props.now,
11850
12348
  fields: props.fields,
11851
12349
  onPick: props.onPick,
11852
- onSkillAction: props.onSkillAction
12350
+ onSkillAction: props.onSkillAction,
12351
+ onHoverStart: hover.open,
12352
+ onHoverEnd: hover.leave
11853
12353
  }
11854
- )) : props.rows.map((row) => /* @__PURE__ */ React34.createElement(
12354
+ )) : props.rows.map((row) => /* @__PURE__ */ React36.createElement(
11855
12355
  TicketRow,
11856
12356
  {
11857
12357
  key: row.ticket.ref,
@@ -11864,14 +12364,28 @@ function TicketList(props) {
11864
12364
  fields: props.fields,
11865
12365
  onPick: props.onPick,
11866
12366
  onSkillAction: props.onSkillAction,
12367
+ onHoverStart: hover.open,
12368
+ onHoverEnd: hover.leave,
11867
12369
  ...props.onToggleTree === void 0 ? {} : { onToggleTree: props.onToggleTree }
11868
12370
  }
11869
- ))), props.footer);
12371
+ ))), props.footer), hovered === null || activeTicket === void 0 ? null : /* @__PURE__ */ React36.createElement(
12372
+ TicketHoverCard,
12373
+ {
12374
+ key: activeTicket.ref,
12375
+ ticket: activeTicket,
12376
+ tickets: renderedTickets,
12377
+ anchor: hovered.anchor,
12378
+ bounds: hovered.bounds,
12379
+ now: props.now,
12380
+ onPointerEnter: hover.enterCard,
12381
+ onPointerLeave: hover.leaveCard
12382
+ }
12383
+ ));
11870
12384
  }
11871
12385
  function TicketRow(props) {
11872
12386
  const { t: t2 } = useI18n();
11873
12387
  const { ticket } = props;
11874
- return /* @__PURE__ */ React34.createElement(
12388
+ return /* @__PURE__ */ React36.createElement(
11875
12389
  "div",
11876
12390
  {
11877
12391
  role: "listitem",
@@ -11885,16 +12399,25 @@ function TicketRow(props) {
11885
12399
  ...props.row === void 0 ? {} : { marginLeft: props.row.depth * TREE_INDENT }
11886
12400
  }
11887
12401
  },
11888
- /* @__PURE__ */ React34.createElement(
12402
+ /* @__PURE__ */ React36.createElement(
11889
12403
  "div",
11890
12404
  {
11891
12405
  "data-testid": "ticket-row",
11892
12406
  "data-ref": ticket.ref,
11893
12407
  "data-depth": props.row === void 0 ? void 0 : String(props.row.depth),
11894
12408
  "data-focused": props.focused ? "true" : void 0,
11895
- style: CARD_CONTENT_STYLE
12409
+ style: CARD_CONTENT_STYLE,
12410
+ onPointerEnter: (event) => {
12411
+ if (event.pointerType === "touch") return;
12412
+ const target = hoverTargetOf(event.currentTarget);
12413
+ props.onHoverStart(ticket.ref, target.anchor, target.bounds);
12414
+ },
12415
+ onPointerLeave: (event) => {
12416
+ if (event.pointerType === "touch") return;
12417
+ props.onHoverEnd(ticket.ref);
12418
+ }
11896
12419
  },
11897
- /* @__PURE__ */ React34.createElement(
12420
+ /* @__PURE__ */ React36.createElement(
11898
12421
  "button",
11899
12422
  {
11900
12423
  type: "button",
@@ -11903,7 +12426,7 @@ function TicketRow(props) {
11903
12426
  style: CARD_OPEN_STYLE
11904
12427
  }
11905
12428
  ),
11906
- /* @__PURE__ */ React34.createElement("span", { style: CARD_TITLE_STYLE }, props.row?.hasChildren === true ? /* @__PURE__ */ React34.createElement(
12429
+ /* @__PURE__ */ React36.createElement("span", { style: CARD_TITLE_STYLE }, props.row?.hasChildren === true ? /* @__PURE__ */ React36.createElement(
11907
12430
  "button",
11908
12431
  {
11909
12432
  type: "button",
@@ -11919,11 +12442,12 @@ function TicketRow(props) {
11919
12442
  },
11920
12443
  style: TREE_TOGGLE_STYLE
11921
12444
  },
11922
- /* @__PURE__ */ React34.createElement("span", { "aria-hidden": "true" }, props.row.expanded ? "\u25BE" : "\u25B8")
11923
- ) : null, /* @__PURE__ */ React34.createElement(TicketNumber, { ticket }), ticket.title),
11924
- /* @__PURE__ */ React34.createElement(MetaRow, { ticket, row: props.row, now: props.now, fields: props.fields })
12445
+ /* @__PURE__ */ React36.createElement("span", { "aria-hidden": "true" }, props.row.expanded ? "\u25BE" : "\u25B8")
12446
+ ) : null, /* @__PURE__ */ React36.createElement(TicketNumber, { ticket }), ticket.title),
12447
+ /* @__PURE__ */ React36.createElement(MetaRow, { ticket, row: props.row, now: props.now, fields: props.fields }),
12448
+ ticket.excerpt === void 0 ? null : /* @__PURE__ */ React36.createElement("span", { "data-testid": "ticket-excerpt", style: TICKET_EXCERPT_STYLE }, ticket.excerpt)
11925
12449
  ),
11926
- /* @__PURE__ */ React34.createElement(
12450
+ /* @__PURE__ */ React36.createElement(
11927
12451
  SkillActionBadge,
11928
12452
  {
11929
12453
  ticket,
@@ -11938,9 +12462,9 @@ function TicketRow(props) {
11938
12462
  function MetaRow(props) {
11939
12463
  const { t: t2 } = useI18n();
11940
12464
  const { ticket, row } = props;
11941
- const extra = ticket.labels.filter((label) => label !== ticket.category);
12465
+ const extra = extraLabelsOf(ticket);
11942
12466
  const { shown, hidden } = pickRowLabels(extra, MAX_EXTRA_LABELS);
11943
- return /* @__PURE__ */ React34.createElement("span", { style: CARD_META_STYLE }, /* @__PURE__ */ React34.createElement("span", { style: STATUS_BADGES[ticket.status] }, /* @__PURE__ */ React34.createElement("span", { style: STATUS_DOT_STYLE }), t2(STATUS_KEYS2[ticket.status])), ticket.category === null ? null : /* @__PURE__ */ React34.createElement("span", { style: CATEGORY_BADGES[ticket.category] }, ticket.category), row?.hasChildren === true ? /* @__PURE__ */ React34.createElement("span", { "data-testid": "tree-child-count", style: TREE_CHILD_COUNT_STYLE }, t2("tree.childCount", { count: row.childCount })) : null, row?.parentOutside === true && ticket.parent !== void 0 ? /* @__PURE__ */ React34.createElement(
12467
+ return /* @__PURE__ */ React36.createElement("span", { style: CARD_META_STYLE }, /* @__PURE__ */ React36.createElement(TicketStatusBadge, { status: ticket.status }), ticket.category === null ? null : /* @__PURE__ */ React36.createElement("span", { style: CATEGORY_BADGES[ticket.category] }, ticket.category), row?.hasChildren === true ? /* @__PURE__ */ React36.createElement("span", { "data-testid": "tree-child-count", style: TREE_CHILD_COUNT_STYLE }, t2("tree.childCount", { count: row.childCount })) : null, row?.parentOutside === true && ticket.parent !== void 0 ? /* @__PURE__ */ React36.createElement(
11944
12468
  "span",
11945
12469
  {
11946
12470
  "data-testid": "parent-badge",
@@ -11948,7 +12472,7 @@ function MetaRow(props) {
11948
12472
  style: PARENT_BADGE_STYLE
11949
12473
  },
11950
12474
  t2("tree.parentBadge", { parent: ticket.parent })
11951
- ) : null, shown.map((label) => /* @__PURE__ */ React34.createElement("span", { key: label, "data-testid": "ticket-label", style: LABEL_BADGE_STYLE }, label)), hidden > 0 ? /* @__PURE__ */ React34.createElement("span", { "data-testid": "ticket-label-more", style: LABEL_BADGE_STYLE }, "+", String(hidden)) : null, props.fields.showAssignees && ticket.assignees.length > 0 ? /* @__PURE__ */ React34.createElement(AssigneeMeta, { assignees: ticket.assignees }) : null, props.fields.showAuthor && ticket.author !== null ? /* @__PURE__ */ React34.createElement(AuthorMeta, { author: ticket.author }) : null, /* @__PURE__ */ React34.createElement(
12475
+ ) : null, shown.map((label) => /* @__PURE__ */ React36.createElement("span", { key: label, "data-testid": "ticket-label", style: LABEL_BADGE_STYLE }, label)), hidden > 0 ? /* @__PURE__ */ React36.createElement("span", { "data-testid": "ticket-label-more", style: LABEL_BADGE_STYLE }, "+", String(hidden)) : null, props.fields.showAssignees && ticket.assignees.length > 0 ? /* @__PURE__ */ React36.createElement(AssigneeMeta, { assignees: ticket.assignees }) : null, props.fields.showAuthor && ticket.author !== null ? /* @__PURE__ */ React36.createElement(AuthorMeta, { author: ticket.author }) : null, /* @__PURE__ */ React36.createElement(
11952
12476
  TimeMeta,
11953
12477
  {
11954
12478
  createdAt: ticket.createdAt,
@@ -11962,10 +12486,10 @@ function MetaRow(props) {
11962
12486
  function AssigneeMeta(props) {
11963
12487
  const { t: t2 } = useI18n();
11964
12488
  const separator = t2("row.assigneesSeparator");
11965
- const all = props.assignees.join(separator);
12489
+ const all = props.assignees.map((author) => authorName(author)).join(separator);
11966
12490
  const shown = props.assignees.slice(0, MAX_ROW_ASSIGNEES);
11967
12491
  const hidden = props.assignees.length - shown.length;
11968
- return /* @__PURE__ */ React34.createElement(
12492
+ return /* @__PURE__ */ React36.createElement(
11969
12493
  "span",
11970
12494
  {
11971
12495
  role: "group",
@@ -11974,9 +12498,8 @@ function AssigneeMeta(props) {
11974
12498
  title: t2("row.assigneesTitle", { names: all }),
11975
12499
  style: ASSIGNEE_GROUP_STYLE
11976
12500
  },
11977
- /* @__PURE__ */ React34.createElement("span", { "aria-hidden": "true", style: ASSIGNEE_ICON_STYLE }, /* @__PURE__ */ React34.createElement(PersonIcon, null)),
11978
- /* @__PURE__ */ React34.createElement("span", { "data-testid": "ticket-assignee", style: ASSIGNEE_NAME_STYLE }, shown.join(separator)),
11979
- hidden > 0 ? /* @__PURE__ */ React34.createElement(
12501
+ shown.map((author) => /* @__PURE__ */ React36.createElement("span", { key: author.login, style: ASSIGNEE_PERSON_STYLE }, /* @__PURE__ */ React36.createElement(TicketAvatar, { author, role: "assignee", testId: "ticket-assignee-avatar" }), /* @__PURE__ */ React36.createElement("span", { "data-testid": "ticket-assignee", style: ASSIGNEE_NAME_STYLE }, authorName(author)))),
12502
+ hidden > 0 ? /* @__PURE__ */ React36.createElement(
11980
12503
  "span",
11981
12504
  {
11982
12505
  "data-testid": "ticket-assignee-more",
@@ -11993,7 +12516,7 @@ function AuthorMeta(props) {
11993
12516
  const { author } = props;
11994
12517
  const name = authorName(author);
11995
12518
  const full = authorTitle(author, t2);
11996
- return /* @__PURE__ */ React34.createElement(React34.Fragment, null, /* @__PURE__ */ React34.createElement(TicketAvatar, { author }), /* @__PURE__ */ React34.createElement("span", { "data-testid": "ticket-author", title: full, style: AUTHOR_NAME_STYLE }, name));
12519
+ return /* @__PURE__ */ React36.createElement("span", { "data-testid": "ticket-author-group", style: AUTHOR_GROUP_STYLE }, /* @__PURE__ */ React36.createElement(TicketAvatar, { author }), /* @__PURE__ */ React36.createElement("span", { "data-testid": "ticket-author", title: full, style: AUTHOR_NAME_STYLE }, name));
11997
12520
  }
11998
12521
  function TimeMeta(props) {
11999
12522
  const { t: t2 } = useI18n();
@@ -12006,7 +12529,7 @@ function TimeMeta(props) {
12006
12529
  }
12007
12530
  if (updatedAge.length > 0) segments.push(t2("row.time.updated", { age: updatedAge }));
12008
12531
  if (segments.length === 0) return null;
12009
- return /* @__PURE__ */ React34.createElement(
12532
+ return /* @__PURE__ */ React36.createElement(
12010
12533
  "span",
12011
12534
  {
12012
12535
  "data-testid": "ticket-age",
@@ -12032,11 +12555,11 @@ function pickRowLabels(labels, limit) {
12032
12555
  }
12033
12556
 
12034
12557
  // src/client/tickets-view-footer.tsx
12035
- var React35 = __toESM(require("react"), 1);
12558
+ var React37 = __toESM(require("react"), 1);
12036
12559
  function Footer(props) {
12037
12560
  const { t: t2 } = useI18n();
12038
12561
  if (props.injection.canInjectCurrent && props.notice === null) return null;
12039
- return /* @__PURE__ */ React35.createElement(
12562
+ return /* @__PURE__ */ React37.createElement(
12040
12563
  "footer",
12041
12564
  {
12042
12565
  style: {
@@ -12047,10 +12570,10 @@ function Footer(props) {
12047
12570
  borderTop: `1px solid ${COLORS.border}`
12048
12571
  }
12049
12572
  },
12050
- props.injection.canInjectCurrent ? null : /* @__PURE__ */ React35.createElement("div", { "data-testid": "no-session-hint", style: { color: COLORS.secondary, fontSize: 12 } }, t2(
12573
+ props.injection.canInjectCurrent ? null : /* @__PURE__ */ React37.createElement("div", { "data-testid": "no-session-hint", style: { color: COLORS.secondary, fontSize: 12 } }, t2(
12051
12574
  props.injection.canStartNewSession ? "injection.footerNewSession" : "injection.footerUnavailable"
12052
12575
  )),
12053
- props.notice === null ? null : /* @__PURE__ */ React35.createElement(
12576
+ props.notice === null ? null : /* @__PURE__ */ React37.createElement(
12054
12577
  "div",
12055
12578
  {
12056
12579
  role: "status",
@@ -12063,7 +12586,7 @@ function Footer(props) {
12063
12586
  }
12064
12587
 
12065
12588
  // src/client/tickets-header.tsx
12066
- var React36 = __toESM(require("react"), 1);
12589
+ var React38 = __toESM(require("react"), 1);
12067
12590
  var REFRESH_ERROR_STYLE2 = {
12068
12591
  color: COLORS.error,
12069
12592
  fontSize: 12,
@@ -12074,7 +12597,7 @@ var REFRESH_ERROR_STYLE2 = {
12074
12597
  };
12075
12598
  function TicketsHeader(props) {
12076
12599
  const { t: t2 } = useI18n();
12077
- return /* @__PURE__ */ React36.createElement("header", { style: HEADER_STYLE }, /* @__PURE__ */ React36.createElement("div", { style: { display: "flex", alignItems: "center", gap: 8, minWidth: 0 } }, /* @__PURE__ */ React36.createElement("div", { style: REPO_CHIP_STYLE }, /* @__PURE__ */ React36.createElement(FolderIcon, null), /* @__PURE__ */ React36.createElement(
12600
+ return /* @__PURE__ */ React38.createElement("header", { style: HEADER_STYLE }, /* @__PURE__ */ React38.createElement("div", { style: { display: "flex", alignItems: "center", gap: 8, minWidth: 0 } }, /* @__PURE__ */ React38.createElement("div", { style: REPO_CHIP_STYLE }, /* @__PURE__ */ React38.createElement(FolderIcon, null), /* @__PURE__ */ React38.createElement(
12078
12601
  "span",
12079
12602
  {
12080
12603
  "data-testid": "repo-name",
@@ -12082,7 +12605,7 @@ function TicketsHeader(props) {
12082
12605
  ...props.snapshot === null ? {} : { title: props.snapshot.repository }
12083
12606
  },
12084
12607
  props.snapshot?.repository ?? (props.loading ? t2("repo.identifying") : t2("repo.unidentified"))
12085
- )), props.snapshot === null ? null : /* @__PURE__ */ React36.createElement("span", { "data-testid": "backend-badge", style: BACKEND_BADGE_STYLE }, backendLabel(props.snapshot.backend, t2)), props.snapshot === null ? null : /* @__PURE__ */ React36.createElement(SourceBadge2, { source: props.snapshot.source }), props.snapshot?.backend === "gitea" && props.snapshot.repositoryHost !== null ? /* @__PURE__ */ React36.createElement(
12608
+ )), props.snapshot === null ? null : /* @__PURE__ */ React38.createElement("span", { "data-testid": "backend-badge", style: BACKEND_BADGE_STYLE }, backendLabel(props.snapshot.backend, t2)), props.snapshot === null ? null : /* @__PURE__ */ React38.createElement(SourceBadge2, { source: props.snapshot.source }), props.snapshot?.backend === "gitea" && props.snapshot.repositoryHost !== null ? /* @__PURE__ */ React38.createElement(
12086
12609
  "span",
12087
12610
  {
12088
12611
  "data-testid": "repo-host",
@@ -12090,7 +12613,7 @@ function TicketsHeader(props) {
12090
12613
  style: REPO_HOST_STYLE
12091
12614
  },
12092
12615
  props.snapshot.repositoryHost
12093
- ) : null), /* @__PURE__ */ React36.createElement("div", { style: { display: "flex", alignItems: "center", gap: 4, flex: "none" } }, /* @__PURE__ */ React36.createElement("span", { "data-testid": "snapshot-age", style: AGE_STYLE }, props.snapshot === null ? t2("snapshot.none") : formatRelativeTime(props.snapshot.fetchedAt, props.now, t2)), props.notice === null ? null : /* @__PURE__ */ React36.createElement("span", { "data-testid": "refresh-error", title: props.notice, style: REFRESH_ERROR_STYLE2 }, props.notice), /* @__PURE__ */ React36.createElement(
12616
+ ) : null), /* @__PURE__ */ React38.createElement("div", { style: { display: "flex", alignItems: "center", gap: 4, flex: "none" } }, /* @__PURE__ */ React38.createElement("span", { "data-testid": "snapshot-age", style: AGE_STYLE }, props.snapshot === null ? t2("snapshot.none") : formatRelativeTime(props.snapshot.fetchedAt, props.now, t2)), props.notice === null ? null : /* @__PURE__ */ React38.createElement("span", { "data-testid": "refresh-error", title: props.notice, style: REFRESH_ERROR_STYLE2 }, props.notice), /* @__PURE__ */ React38.createElement(
12094
12617
  "button",
12095
12618
  {
12096
12619
  type: "button",
@@ -12107,13 +12630,13 @@ function TicketsHeader(props) {
12107
12630
  },
12108
12631
  style: { ...REFRESH_BUTTON_STYLE, opacity: props.busy ? 0.6 : 1 }
12109
12632
  },
12110
- /* @__PURE__ */ React36.createElement(RefreshIcon, null),
12633
+ /* @__PURE__ */ React38.createElement(RefreshIcon, null),
12111
12634
  props.busy ? t2("refresh.busy") : t2("refresh.action")
12112
12635
  )));
12113
12636
  }
12114
12637
  function SourceBadge2(props) {
12115
12638
  const { t: t2 } = useI18n();
12116
- return /* @__PURE__ */ React36.createElement(
12639
+ return /* @__PURE__ */ React38.createElement(
12117
12640
  "span",
12118
12641
  {
12119
12642
  "data-testid": "snapshot-source",
@@ -12127,7 +12650,7 @@ function SourceBadge2(props) {
12127
12650
  }
12128
12651
 
12129
12652
  // src/client/tickets-more.tsx
12130
- var React37 = __toESM(require("react"), 1);
12653
+ var React39 = __toESM(require("react"), 1);
12131
12654
  var MORE_STYLE = {
12132
12655
  display: "flex",
12133
12656
  alignItems: "center",
@@ -12159,7 +12682,7 @@ function moreStateOf(snapshot) {
12159
12682
  function MoreFooter(props) {
12160
12683
  const { t: t2 } = useI18n();
12161
12684
  const { state } = props;
12162
- return /* @__PURE__ */ React37.createElement("div", { ref: props.sentinel, "data-testid": "load-more", style: MORE_STYLE }, state.loading ? t2("tickets.more.loading") : state.error === null ? t2("tickets.more.scroll") : t2("tickets.more.failed", { message: state.error.message }), state.error === null ? null : /* @__PURE__ */ React37.createElement(
12685
+ return /* @__PURE__ */ React39.createElement("div", { ref: props.sentinel, "data-testid": "load-more", style: MORE_STYLE }, state.loading ? t2("tickets.more.loading") : state.error === null ? t2("tickets.more.scroll") : t2("tickets.more.failed", { message: state.error.message }), state.error === null ? null : /* @__PURE__ */ React39.createElement(
12163
12686
  "button",
12164
12687
  {
12165
12688
  type: "button",
@@ -12171,8 +12694,8 @@ function MoreFooter(props) {
12171
12694
  ));
12172
12695
  }
12173
12696
  function useMoreSentinel(active, onVisible) {
12174
- const node = React37.useRef(null);
12175
- React37.useEffect(() => {
12697
+ const node = React39.useRef(null);
12698
+ React39.useEffect(() => {
12176
12699
  if (!active) return;
12177
12700
  const target = node.current;
12178
12701
  if (target === null || typeof IntersectionObserver === "undefined") return;
@@ -12280,7 +12803,7 @@ function ancestorRefs(byRef, ref) {
12280
12803
  }
12281
12804
 
12282
12805
  // src/client/tickets-tree-controls.tsx
12283
- var React38 = __toESM(require("react"), 1);
12806
+ var React40 = __toESM(require("react"), 1);
12284
12807
  function hierarchyHintKey(snapshot) {
12285
12808
  if (snapshot.hierarchy === "none") {
12286
12809
  if (snapshot.backend === "gitlab") return "layout.gitlabUnavailable";
@@ -12293,7 +12816,7 @@ function hierarchyHintKey(snapshot) {
12293
12816
  }
12294
12817
  function LayoutControl(props) {
12295
12818
  const { t: t2 } = useI18n();
12296
- return /* @__PURE__ */ React38.createElement("div", { role: "group", "aria-label": t2("layout.group"), style: ICON_SEGMENTED_STYLE }, /* @__PURE__ */ React38.createElement(
12819
+ return /* @__PURE__ */ React40.createElement("div", { role: "group", "aria-label": t2("layout.group"), style: ICON_SEGMENTED_STYLE }, /* @__PURE__ */ React40.createElement(
12297
12820
  "button",
12298
12821
  {
12299
12822
  type: "button",
@@ -12311,8 +12834,8 @@ function LayoutControl(props) {
12311
12834
  ...props.layout === "flat" ? CHIP_ACTIVE_STYLE : void 0
12312
12835
  }
12313
12836
  },
12314
- /* @__PURE__ */ React38.createElement(FlatListIcon, null)
12315
- ), /* @__PURE__ */ React38.createElement(
12837
+ /* @__PURE__ */ React40.createElement(FlatListIcon, null)
12838
+ ), /* @__PURE__ */ React40.createElement(
12316
12839
  "button",
12317
12840
  {
12318
12841
  type: "button",
@@ -12331,15 +12854,15 @@ function LayoutControl(props) {
12331
12854
  ...props.layout === "tree" ? CHIP_ACTIVE_STYLE : void 0
12332
12855
  }
12333
12856
  },
12334
- /* @__PURE__ */ React38.createElement(TreeListIcon, null)
12857
+ /* @__PURE__ */ React40.createElement(TreeListIcon, null)
12335
12858
  ));
12336
12859
  }
12337
12860
 
12338
12861
  // src/client/tickets-toolbar.tsx
12339
- var React41 = __toESM(require("react"), 1);
12862
+ var React43 = __toESM(require("react"), 1);
12340
12863
 
12341
12864
  // src/client/row-display-control.tsx
12342
- var React39 = __toESM(require("react"), 1);
12865
+ var React41 = __toESM(require("react"), 1);
12343
12866
  var CHECK_STYLE = {
12344
12867
  display: "inline-flex",
12345
12868
  color: COLORS.accent
@@ -12353,10 +12876,10 @@ var DISPLAY_ITEMS = [
12353
12876
  ];
12354
12877
  function RowDisplayControl(props) {
12355
12878
  const { t: t2 } = useI18n();
12356
- const [open, setOpen] = React39.useState(false);
12357
- const wrapRef = React39.useRef(null);
12358
- const triggerRef = React39.useRef(null);
12359
- React39.useEffect(() => {
12879
+ const [open, setOpen] = React41.useState(false);
12880
+ const wrapRef = React41.useRef(null);
12881
+ const triggerRef = React41.useRef(null);
12882
+ React41.useEffect(() => {
12360
12883
  if (!open) return void 0;
12361
12884
  const onPointerDown = (event) => {
12362
12885
  if (wrapRef.current?.contains(event.target) === true) return;
@@ -12374,7 +12897,7 @@ function RowDisplayControl(props) {
12374
12897
  document.removeEventListener("keydown", onKeyDown);
12375
12898
  };
12376
12899
  }, [open]);
12377
- return /* @__PURE__ */ React39.createElement("div", { ref: wrapRef, style: DISPLAY_MENU_WRAP_STYLE }, /* @__PURE__ */ React39.createElement(
12900
+ return /* @__PURE__ */ React41.createElement("div", { ref: wrapRef, style: DISPLAY_MENU_WRAP_STYLE }, /* @__PURE__ */ React41.createElement(
12378
12901
  "button",
12379
12902
  {
12380
12903
  ref: triggerRef,
@@ -12392,10 +12915,10 @@ function RowDisplayControl(props) {
12392
12915
  ...open ? { background: COLORS.surfaceActive, color: COLORS.text } : void 0
12393
12916
  }
12394
12917
  },
12395
- /* @__PURE__ */ React39.createElement(DisplaySettingsIcon, null)
12396
- ), open ? /* @__PURE__ */ React39.createElement("div", { role: "group", "aria-label": t2("row.displayGroup"), style: DISPLAY_MENU_PANEL_STYLE }, DISPLAY_ITEMS.filter(
12918
+ /* @__PURE__ */ React41.createElement(DisplaySettingsIcon, null)
12919
+ ), open ? /* @__PURE__ */ React41.createElement("div", { role: "group", "aria-label": t2("row.displayGroup"), style: DISPLAY_MENU_PANEL_STYLE }, DISPLAY_ITEMS.filter(
12397
12920
  (item) => item.field !== "showAssignees" || props.assigneesAvailable
12398
- ).map((item) => /* @__PURE__ */ React39.createElement(
12921
+ ).map((item) => /* @__PURE__ */ React41.createElement(
12399
12922
  MenuItem,
12400
12923
  {
12401
12924
  key: item.field,
@@ -12409,7 +12932,7 @@ function RowDisplayControl(props) {
12409
12932
  ))) : null);
12410
12933
  }
12411
12934
  function MenuItem(props) {
12412
- return /* @__PURE__ */ React39.createElement(
12935
+ return /* @__PURE__ */ React41.createElement(
12413
12936
  "button",
12414
12937
  {
12415
12938
  type: "button",
@@ -12420,12 +12943,12 @@ function MenuItem(props) {
12420
12943
  style: DISPLAY_MENU_ITEM_STYLE
12421
12944
  },
12422
12945
  props.label,
12423
- /* @__PURE__ */ React39.createElement("span", { "aria-hidden": "true", style: props.pressed ? CHECK_STYLE : CHECK_OFF_STYLE }, /* @__PURE__ */ React39.createElement(CheckIcon, null))
12946
+ /* @__PURE__ */ React41.createElement("span", { "aria-hidden": "true", style: props.pressed ? CHECK_STYLE : CHECK_OFF_STYLE }, /* @__PURE__ */ React41.createElement(CheckIcon, null))
12424
12947
  );
12425
12948
  }
12426
12949
 
12427
12950
  // src/client/sort-control.tsx
12428
- var React40 = __toESM(require("react"), 1);
12951
+ var React42 = __toESM(require("react"), 1);
12429
12952
  var GROUP_STYLE2 = {
12430
12953
  ...SEGMENTED_STYLE,
12431
12954
  flexWrap: "nowrap",
@@ -12491,7 +13014,7 @@ function SortControl(props) {
12491
13014
  const next = props.direction === "asc" ? "desc" : "asc";
12492
13015
  const currentLabel = t2(DIRECTION_KEYS[props.direction]);
12493
13016
  const nextLabel = t2(DIRECTION_KEYS[next]);
12494
- return /* @__PURE__ */ React40.createElement("div", { role: "group", "aria-label": t2("sort.group"), style: GROUP_STYLE2 }, /* @__PURE__ */ React40.createElement("span", { style: SELECT_WRAP_STYLE }, /* @__PURE__ */ React40.createElement(
13017
+ return /* @__PURE__ */ React42.createElement("div", { role: "group", "aria-label": t2("sort.group"), style: GROUP_STYLE2 }, /* @__PURE__ */ React42.createElement("span", { style: SELECT_WRAP_STYLE }, /* @__PURE__ */ React42.createElement(
12495
13018
  "select",
12496
13019
  {
12497
13020
  "data-testid": "sort-key",
@@ -12503,8 +13026,8 @@ function SortControl(props) {
12503
13026
  },
12504
13027
  style: SELECT_STYLE
12505
13028
  },
12506
- TICKET_SORT_KEYS.map((key) => /* @__PURE__ */ React40.createElement("option", { key, value: key }, t2(SORT_KEYS[key])))
12507
- ), /* @__PURE__ */ React40.createElement("span", { style: CARET_STYLE }, /* @__PURE__ */ React40.createElement(CaretIcon, null))), /* @__PURE__ */ React40.createElement(
13029
+ TICKET_SORT_KEYS.map((key) => /* @__PURE__ */ React42.createElement("option", { key, value: key }, t2(SORT_KEYS[key])))
13030
+ ), /* @__PURE__ */ React42.createElement("span", { style: CARET_STYLE }, /* @__PURE__ */ React42.createElement(CaretIcon, null))), /* @__PURE__ */ React42.createElement(
12508
13031
  "button",
12509
13032
  {
12510
13033
  type: "button",
@@ -12520,7 +13043,7 @@ function SortControl(props) {
12520
13043
  ));
12521
13044
  }
12522
13045
  function CaretIcon() {
12523
- return /* @__PURE__ */ React40.createElement("svg", { width: "8", height: "8", viewBox: "0 0 8 8", "aria-hidden": "true" }, /* @__PURE__ */ React40.createElement("path", { d: "M0.5 2h7L4 6.5z", fill: "currentColor" }));
13046
+ return /* @__PURE__ */ React42.createElement("svg", { width: "8", height: "8", viewBox: "0 0 8 8", "aria-hidden": "true" }, /* @__PURE__ */ React42.createElement("path", { d: "M0.5 2h7L4 6.5z", fill: "currentColor" }));
12524
13047
  }
12525
13048
 
12526
13049
  // src/client/tickets-toolbar.tsx
@@ -12538,7 +13061,7 @@ var CHIP_STATS = {
12538
13061
  };
12539
13062
  function Toolbar(props) {
12540
13063
  const { t: t2 } = useI18n();
12541
- return /* @__PURE__ */ React41.createElement("div", { style: TOOLBAR_STYLE }, /* @__PURE__ */ React41.createElement("div", { role: "group", "aria-label": t2("filter.group"), style: SEGMENTED_STYLE }, TICKET_FILTERS.map((value) => /* @__PURE__ */ React41.createElement(
13064
+ return /* @__PURE__ */ React43.createElement("div", { style: TOOLBAR_STYLE }, /* @__PURE__ */ React43.createElement("div", { role: "group", "aria-label": t2("filter.group"), style: SEGMENTED_STYLE }, TICKET_FILTERS.map((value) => /* @__PURE__ */ React43.createElement(
12542
13065
  Chip,
12543
13066
  {
12544
13067
  key: value,
@@ -12551,7 +13074,7 @@ function Toolbar(props) {
12551
13074
  props.onFilter(value);
12552
13075
  }
12553
13076
  }
12554
- ))), /* @__PURE__ */ React41.createElement(
13077
+ ))), /* @__PURE__ */ React43.createElement(
12555
13078
  SortControl,
12556
13079
  {
12557
13080
  sortKey: props.sortKey,
@@ -12561,7 +13084,7 @@ function Toolbar(props) {
12561
13084
  props.onSort(props.sortKey);
12562
13085
  }
12563
13086
  }
12564
- ), /* @__PURE__ */ React41.createElement(
13087
+ ), /* @__PURE__ */ React43.createElement(
12565
13088
  RowDisplayControl,
12566
13089
  {
12567
13090
  fields: props.fields,
@@ -12571,7 +13094,7 @@ function Toolbar(props) {
12571
13094
  ));
12572
13095
  }
12573
13096
  function ChipButton(props) {
12574
- return /* @__PURE__ */ React41.createElement(
13097
+ return /* @__PURE__ */ React43.createElement(
12575
13098
  "button",
12576
13099
  {
12577
13100
  type: "button",
@@ -12586,16 +13109,16 @@ function ChipButton(props) {
12586
13109
  }
12587
13110
  function Chip(props) {
12588
13111
  const stat = props.stat;
12589
- return /* @__PURE__ */ React41.createElement(ChipButton, { testId: props.testId, active: props.active, onClick: props.onClick }, stat === void 0 ? null : /* @__PURE__ */ React41.createElement("span", { "aria-hidden": "true", style: { ...CHIP_DOT_STYLE, background: stat.color } }), props.label, stat === void 0 ? null : /* @__PURE__ */ React41.createElement("span", { "data-testid": `stat-${stat.key}`, style: CHIP_COUNT_STYLE }, props.count[stat.key]));
13112
+ return /* @__PURE__ */ React43.createElement(ChipButton, { testId: props.testId, active: props.active, onClick: props.onClick }, stat === void 0 ? null : /* @__PURE__ */ React43.createElement("span", { "aria-hidden": "true", style: { ...CHIP_DOT_STYLE, background: stat.color } }), props.label, stat === void 0 ? null : /* @__PURE__ */ React43.createElement("span", { "data-testid": `stat-${stat.key}`, style: CHIP_COUNT_STYLE }, props.count[stat.key]));
12590
13113
  }
12591
13114
 
12592
13115
  // src/client/use-collapsed-tickets.ts
12593
- var React42 = __toESM(require("react"), 1);
13116
+ var React44 = __toESM(require("react"), 1);
12594
13117
  function useCollapsedTickets(workspaceRoot, focused, visible) {
12595
13118
  const session = useTicketTreeSession();
12596
- const [localCollapsed, setLocalCollapsed] = React42.useState(() => /* @__PURE__ */ new Set());
12597
- const previousRoot = React42.useRef(workspaceRoot);
12598
- const expandedFor = React42.useRef(null);
13119
+ const [localCollapsed, setLocalCollapsed] = React44.useState(() => /* @__PURE__ */ new Set());
13120
+ const previousRoot = React44.useRef(workspaceRoot);
13121
+ const expandedFor = React44.useRef(null);
12599
13122
  if (previousRoot.current !== workspaceRoot) {
12600
13123
  previousRoot.current = workspaceRoot;
12601
13124
  expandedFor.current = null;
@@ -12603,7 +13126,7 @@ function useCollapsedTickets(workspaceRoot, focused, visible) {
12603
13126
  }
12604
13127
  const collapsed = session?.collapsed ?? localCollapsed;
12605
13128
  const setCollapsed = session?.setCollapsed ?? setLocalCollapsed;
12606
- React42.useEffect(() => {
13129
+ React44.useEffect(() => {
12607
13130
  if (focused === null || visible.length === 0 || expandedFor.current === focused) return;
12608
13131
  expandedFor.current = focused;
12609
13132
  setCollapsed((current) => expandAncestors(visible, current, focused));
@@ -12666,7 +13189,7 @@ function sameLogin(left, right) {
12666
13189
  return left.toLowerCase() === right.toLowerCase();
12667
13190
  }
12668
13191
  function isAssignedTo(ticket, viewer) {
12669
- return ticket.assignees.some((login) => sameLogin(login, viewer));
13192
+ return ticket.assignees.some((author) => sameLogin(author.login, viewer));
12670
13193
  }
12671
13194
  function isCreatedBy(ticket, viewer) {
12672
13195
  return ticket.author !== null && sameLogin(ticket.author.login, viewer);
@@ -12720,7 +13243,7 @@ function timestamp(value) {
12720
13243
  }
12721
13244
 
12722
13245
  // src/client/use-view-preference.ts
12723
- var React43 = __toESM(require("react"), 1);
13246
+ var React45 = __toESM(require("react"), 1);
12724
13247
 
12725
13248
  // src/client/view-preference.ts
12726
13249
  var DEFAULT_VIEW = {
@@ -12855,8 +13378,8 @@ function isLayout(value) {
12855
13378
 
12856
13379
  // src/client/use-view-preference.ts
12857
13380
  function useViewPreference(workspaceRoot) {
12858
- const storage = React43.useMemo(resolvePreferenceStorage, []);
12859
- const [viewState, setViewState] = React43.useState(() => ({
13381
+ const storage = React45.useMemo(resolvePreferenceStorage, []);
13382
+ const [viewState, setViewState] = React45.useState(() => ({
12860
13383
  workspaceRoot,
12861
13384
  preference: readViewPreference(storage, workspaceRoot)
12862
13385
  }));
@@ -12991,13 +13514,13 @@ function useTicketsViewState(props) {
12991
13514
  function TicketsView(props) {
12992
13515
  const { t: t2 } = useI18n();
12993
13516
  const state = useTicketsViewState(props);
12994
- return /* @__PURE__ */ React44.createElement(
13517
+ return /* @__PURE__ */ React46.createElement(
12995
13518
  "div",
12996
13519
  {
12997
13520
  "data-testid": "tickets-view",
12998
13521
  style: { display: "flex", flexDirection: "column", flex: 1, minHeight: 0 }
12999
13522
  },
13000
- /* @__PURE__ */ React44.createElement(
13523
+ /* @__PURE__ */ React46.createElement(
13001
13524
  TicketsHeader,
13002
13525
  {
13003
13526
  snapshot: state.snapshot,
@@ -13009,9 +13532,9 @@ function TicketsView(props) {
13009
13532
  onRefreshFull: state.refreshFull
13010
13533
  }
13011
13534
  ),
13012
- props.actions === void 0 ? /* @__PURE__ */ React44.createElement("div", { style: ACTION_BAR_STYLE }, /* @__PURE__ */ React44.createElement(ActionBar, { injection: props.injection, onInject: state.inject })) : null,
13013
- state.error !== null ? /* @__PURE__ */ React44.createElement(ErrorBanner, { error: state.error, onOpenEnvCheck: props.onOpenEnvCheck }) : null,
13014
- state.snapshot !== null ? /* @__PURE__ */ React44.createElement(
13535
+ props.actions === void 0 ? /* @__PURE__ */ React46.createElement("div", { style: ACTION_BAR_STYLE }, /* @__PURE__ */ React46.createElement(ActionBar, { injection: props.injection, onInject: state.inject })) : null,
13536
+ state.error !== null ? /* @__PURE__ */ React46.createElement(ErrorBanner, { error: state.error, onOpenEnvCheck: props.onOpenEnvCheck }) : null,
13537
+ state.snapshot !== null ? /* @__PURE__ */ React46.createElement(
13015
13538
  SnapshotContent,
13016
13539
  {
13017
13540
  snapshot: state.snapshot,
@@ -13050,13 +13573,13 @@ function TicketsView(props) {
13050
13573
  onPick: props.onOpenTicket,
13051
13574
  onSkillAction: state.onSkillAction
13052
13575
  }
13053
- ) : state.phase === "loading" ? /* @__PURE__ */ React44.createElement("div", { "data-testid": "loading", style: EMPTY_STYLE }, t2("snapshot.loading")) : null,
13054
- /* @__PURE__ */ React44.createElement(Footer, { injection: props.injection, notice: state.notice, tone: state.noticeTone })
13576
+ ) : state.phase === "loading" ? /* @__PURE__ */ React46.createElement("div", { "data-testid": "loading", style: EMPTY_STYLE }, t2("snapshot.loading")) : null,
13577
+ /* @__PURE__ */ React46.createElement(Footer, { injection: props.injection, notice: state.notice, tone: state.noticeTone })
13055
13578
  );
13056
13579
  }
13057
13580
  function SnapshotContent(props) {
13058
13581
  const { t: t2 } = useI18n();
13059
- return /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(
13582
+ return /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement(
13060
13583
  Toolbar,
13061
13584
  {
13062
13585
  filter: props.filter,
@@ -13069,7 +13592,7 @@ function SnapshotContent(props) {
13069
13592
  onSort: props.onSort,
13070
13593
  onToggleField: props.onToggleRowField
13071
13594
  }
13072
- ), props.snapshot.viewer === null ? null : /* @__PURE__ */ React44.createElement(
13595
+ ), props.snapshot.viewer === null ? null : /* @__PURE__ */ React46.createElement(
13073
13596
  MyTicketsBar,
13074
13597
  {
13075
13598
  viewer: props.snapshot.viewer,
@@ -13080,10 +13603,10 @@ function SnapshotContent(props) {
13080
13603
  onToggleCreated: props.onToggleCreated,
13081
13604
  onClear: props.onClearMyTickets
13082
13605
  }
13083
- ), /* @__PURE__ */ React44.createElement(
13606
+ ), /* @__PURE__ */ React46.createElement(
13084
13607
  TicketRows,
13085
13608
  {
13086
- layoutControl: /* @__PURE__ */ React44.createElement(
13609
+ layoutControl: /* @__PURE__ */ React46.createElement(
13087
13610
  LayoutControl,
13088
13611
  {
13089
13612
  layout: props.preferenceLayout,
@@ -13092,7 +13615,7 @@ function SnapshotContent(props) {
13092
13615
  onLayout: props.onLayout
13093
13616
  }
13094
13617
  ),
13095
- notes: /* @__PURE__ */ React44.createElement(TreeNotes, { ...props }),
13618
+ notes: /* @__PURE__ */ React46.createElement(TreeNotes, { ...props }),
13096
13619
  snapshot: props.snapshot,
13097
13620
  visible: props.visible,
13098
13621
  rows: props.rows,
@@ -13111,17 +13634,17 @@ function SnapshotContent(props) {
13111
13634
  }
13112
13635
  function TreeNotes(props) {
13113
13636
  const { t: t2 } = useI18n();
13114
- return /* @__PURE__ */ React44.createElement(React44.Fragment, null, props.layout === "tree" && props.snapshot.total > props.snapshot.loaded ? /* @__PURE__ */ React44.createElement("div", { "data-testid": "tree-coverage", style: TREE_NOTE_STYLE }, t2("tree.coverage", { loaded: props.snapshot.loaded })) : null, props.preferenceLayout === "tree" && !props.hierarchyAvailable ? /* @__PURE__ */ React44.createElement("div", { "data-testid": "tree-degraded", style: TREE_DEGRADED_STYLE }, t2("tree.degraded")) : null, props.preferenceLayout !== "tree" && !props.hierarchyAvailable ? /* @__PURE__ */ React44.createElement("div", { "data-testid": "tree-unavailable", style: TREE_NOTE_STYLE }, t2(hierarchyHintKey(props.snapshot))) : null);
13637
+ return /* @__PURE__ */ React46.createElement(React46.Fragment, null, props.layout === "tree" && props.snapshot.total > props.snapshot.loaded ? /* @__PURE__ */ React46.createElement("div", { "data-testid": "tree-coverage", style: TREE_NOTE_STYLE }, t2("tree.coverage", { loaded: props.snapshot.loaded })) : null, props.preferenceLayout === "tree" && !props.hierarchyAvailable ? /* @__PURE__ */ React46.createElement("div", { "data-testid": "tree-degraded", style: TREE_DEGRADED_STYLE }, t2("tree.degraded")) : null, props.preferenceLayout !== "tree" && !props.hierarchyAvailable ? /* @__PURE__ */ React46.createElement("div", { "data-testid": "tree-unavailable", style: TREE_NOTE_STYLE }, t2(hierarchyHintKey(props.snapshot))) : null);
13115
13638
  }
13116
13639
  function useFocusedTicket(focusRef, onFocusHandled, workspaceRoot) {
13117
- const [focused, setFocused] = React44.useState(null);
13118
- React44.useEffect(() => {
13640
+ const [focused, setFocused] = React46.useState(null);
13641
+ React46.useEffect(() => {
13119
13642
  if (focusRef === null || focusRef === void 0) return;
13120
13643
  setFocused(focusRef);
13121
13644
  onFocusHandled?.();
13122
13645
  }, [focusRef, onFocusHandled]);
13123
- const previousRoot = React44.useRef(workspaceRoot);
13124
- React44.useEffect(() => {
13646
+ const previousRoot = React46.useRef(workspaceRoot);
13647
+ React46.useEffect(() => {
13125
13648
  if (previousRoot.current === workspaceRoot) return;
13126
13649
  previousRoot.current = workspaceRoot;
13127
13650
  setFocused(null);
@@ -13135,7 +13658,7 @@ function TicketRows(props) {
13135
13658
  more.available && more.error === null && !more.loading,
13136
13659
  more.onLoadMore
13137
13660
  );
13138
- return /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement("div", { style: LIST_HEADER_STYLE }, /* @__PURE__ */ React44.createElement("span", { "data-testid": "loaded-total", style: LOADED_STYLE }, t2("tickets.loaded", { loaded: props.snapshot.loaded, total: props.snapshot.total }), more.capped ? t2("tickets.loadedCapped") : ""), props.layoutControl), props.notes, /* @__PURE__ */ React44.createElement(
13661
+ return /* @__PURE__ */ React46.createElement(React46.Fragment, null, /* @__PURE__ */ React46.createElement("div", { style: LIST_HEADER_STYLE }, /* @__PURE__ */ React46.createElement("span", { "data-testid": "loaded-total", style: LOADED_STYLE }, t2("tickets.loaded", { loaded: props.snapshot.loaded, total: props.snapshot.total }), more.capped ? t2("tickets.loadedCapped") : ""), props.layoutControl), props.notes, /* @__PURE__ */ React46.createElement(
13139
13662
  TicketList,
13140
13663
  {
13141
13664
  tickets: props.visible,
@@ -13149,7 +13672,7 @@ function TicketRows(props) {
13149
13672
  fields: props.fields,
13150
13673
  onPick: props.onPick,
13151
13674
  onSkillAction: props.onSkillAction,
13152
- footer: more.available ? /* @__PURE__ */ React44.createElement(MoreFooter, { state: more, sentinel }) : null
13675
+ footer: more.available ? /* @__PURE__ */ React46.createElement(MoreFooter, { state: more, sentinel }) : null
13153
13676
  }
13154
13677
  ));
13155
13678
  }
@@ -13157,11 +13680,11 @@ function TicketRows(props) {
13157
13680
  // src/client/task-panel.tsx
13158
13681
  var NO_CAPABILITIES = () => [];
13159
13682
  function TaskPanel(props) {
13160
- const [view, setView] = React45.useState("tickets");
13161
- const [focusBackend, setFocusBackend] = React45.useState(null);
13683
+ const [view, setView] = React47.useState("tickets");
13684
+ const [focusBackend, setFocusBackend] = React47.useState(null);
13162
13685
  const navigation = useDetailNavigation(props.workspaceRoot);
13163
- const [focusTicket, setFocusTicket] = React45.useState(null);
13164
- const previousView = React45.useRef("tickets");
13686
+ const [focusTicket, setFocusTicket] = React47.useState(null);
13687
+ const previousView = React47.useRef("tickets");
13165
13688
  const actions = useTicketActions(props.workspaceRoot, props.injection);
13166
13689
  const clientCapabilities = props.clientCapabilities ?? NO_CAPABILITIES;
13167
13690
  const request = useSnapshotRequest(props.client, props.workspaceRoot, {
@@ -13172,7 +13695,7 @@ function TaskPanel(props) {
13172
13695
  if (view !== "help") previousView.current = view;
13173
13696
  setView("help");
13174
13697
  };
13175
- return /* @__PURE__ */ React45.createElement("div", { "data-testid": "task-panel", "data-anvil-panel": "", style: PANEL_STYLE }, /* @__PURE__ */ React45.createElement("style", null, PANEL_SHEET), /* @__PURE__ */ React45.createElement(
13698
+ return /* @__PURE__ */ React47.createElement("div", { "data-testid": "task-panel", "data-anvil-panel": "", style: PANEL_STYLE }, /* @__PURE__ */ React47.createElement("style", null, PANEL_SHEET), /* @__PURE__ */ React47.createElement(
13176
13699
  ViewTabs,
13177
13700
  {
13178
13701
  view,
@@ -13189,9 +13712,9 @@ function TaskPanel(props) {
13189
13712
  setView("env");
13190
13713
  },
13191
13714
  onOpenHelp: openHelp,
13192
- actions: view === "tickets" && open === null ? /* @__PURE__ */ React45.createElement(ActionBar, { injection: props.injection, onInject: actions.inject }) : null
13715
+ actions: view === "tickets" && open === null ? /* @__PURE__ */ React47.createElement(ActionBar, { injection: props.injection, onInject: actions.inject }) : null
13193
13716
  }
13194
- ), /* @__PURE__ */ React45.createElement(TicketTreeSessionProvider, { workspaceRoot: props.workspaceRoot }, /* @__PURE__ */ React45.createElement(
13717
+ ), /* @__PURE__ */ React47.createElement(TicketTreeSessionProvider, { workspaceRoot: props.workspaceRoot }, /* @__PURE__ */ React47.createElement(
13195
13718
  PanelContent,
13196
13719
  {
13197
13720
  panel: props,
@@ -13231,7 +13754,7 @@ function TaskPanel(props) {
13231
13754
  function PanelContent(props) {
13232
13755
  const panel = props.panel;
13233
13756
  if (props.view === "tickets") {
13234
- return /* @__PURE__ */ React45.createElement(
13757
+ return /* @__PURE__ */ React47.createElement(
13235
13758
  TicketsPane,
13236
13759
  {
13237
13760
  client: panel.client,
@@ -13252,7 +13775,7 @@ function PanelContent(props) {
13252
13775
  );
13253
13776
  }
13254
13777
  if (props.view === "overview") {
13255
- return /* @__PURE__ */ React45.createElement(
13778
+ return /* @__PURE__ */ React47.createElement(
13256
13779
  OverviewPane,
13257
13780
  {
13258
13781
  request: props.request,
@@ -13264,7 +13787,7 @@ function PanelContent(props) {
13264
13787
  );
13265
13788
  }
13266
13789
  if (props.view === "env") {
13267
- return /* @__PURE__ */ React45.createElement(
13790
+ return /* @__PURE__ */ React47.createElement(
13268
13791
  EnvCheckView,
13269
13792
  {
13270
13793
  client: panel.client,
@@ -13275,10 +13798,10 @@ function PanelContent(props) {
13275
13798
  }
13276
13799
  );
13277
13800
  }
13278
- return /* @__PURE__ */ React45.createElement(HelpView, { onBack: props.onBack });
13801
+ return /* @__PURE__ */ React47.createElement(HelpView, { onBack: props.onBack });
13279
13802
  }
13280
13803
  function OverviewPane(props) {
13281
- return /* @__PURE__ */ React45.createElement(
13804
+ return /* @__PURE__ */ React47.createElement(
13282
13805
  OverviewView,
13283
13806
  {
13284
13807
  request: props.request,
@@ -13294,7 +13817,7 @@ function TicketsPane(props) {
13294
13817
  const open = props.open;
13295
13818
  const snapshot = props.request.snapshot;
13296
13819
  const current = findSnapshotTicket(snapshot?.tickets, open.target.ref) ?? open.target.ticket;
13297
- return /* @__PURE__ */ React45.createElement(
13820
+ return /* @__PURE__ */ React47.createElement(
13298
13821
  TicketDetailView,
13299
13822
  {
13300
13823
  key: open.target.ref,
@@ -13310,7 +13833,7 @@ function TicketsPane(props) {
13310
13833
  }
13311
13834
  );
13312
13835
  }
13313
- return /* @__PURE__ */ React45.createElement(
13836
+ return /* @__PURE__ */ React47.createElement(
13314
13837
  TicketsView,
13315
13838
  {
13316
13839
  request: props.request,
@@ -13327,7 +13850,7 @@ function TicketsPane(props) {
13327
13850
  }
13328
13851
  function ViewTabs(props) {
13329
13852
  const { t: t2 } = useI18n();
13330
- return /* @__PURE__ */ React45.createElement("div", { style: VIEW_BAR_STYLE }, /* @__PURE__ */ React45.createElement("div", { role: "group", "aria-label": t2("view.group"), style: VIEW_TABS_STYLE }, /* @__PURE__ */ React45.createElement(
13853
+ return /* @__PURE__ */ React47.createElement("div", { style: VIEW_BAR_STYLE }, /* @__PURE__ */ React47.createElement("div", { role: "group", "aria-label": t2("view.group"), style: VIEW_TABS_STYLE }, /* @__PURE__ */ React47.createElement(
13331
13854
  ViewChip,
13332
13855
  {
13333
13856
  testId: "view-tickets",
@@ -13335,7 +13858,7 @@ function ViewTabs(props) {
13335
13858
  active: props.view === "tickets",
13336
13859
  onClick: props.onOpenTickets
13337
13860
  }
13338
- ), /* @__PURE__ */ React45.createElement(
13861
+ ), /* @__PURE__ */ React47.createElement(
13339
13862
  ViewChip,
13340
13863
  {
13341
13864
  testId: "view-overview",
@@ -13343,7 +13866,7 @@ function ViewTabs(props) {
13343
13866
  active: props.view === "overview",
13344
13867
  onClick: props.onOpenOverview
13345
13868
  }
13346
- ), /* @__PURE__ */ React45.createElement(
13869
+ ), /* @__PURE__ */ React47.createElement(
13347
13870
  ViewChip,
13348
13871
  {
13349
13872
  testId: "view-env",
@@ -13351,10 +13874,10 @@ function ViewTabs(props) {
13351
13874
  active: props.view === "env",
13352
13875
  onClick: props.onOpenEnvCheck
13353
13876
  }
13354
- )), /* @__PURE__ */ React45.createElement("div", { style: VIEW_BAR_END_STYLE }, props.actions, /* @__PURE__ */ React45.createElement(TipsButton, { onClick: props.onOpenHelp })));
13877
+ )), /* @__PURE__ */ React47.createElement("div", { style: VIEW_BAR_END_STYLE }, props.actions, /* @__PURE__ */ React47.createElement(TipsButton, { onClick: props.onOpenHelp })));
13355
13878
  }
13356
13879
  function ViewChip(props) {
13357
- return /* @__PURE__ */ React45.createElement(
13880
+ return /* @__PURE__ */ React47.createElement(
13358
13881
  "button",
13359
13882
  {
13360
13883
  type: "button",
@@ -13369,7 +13892,7 @@ function ViewChip(props) {
13369
13892
  }
13370
13893
  function TipsButton(props) {
13371
13894
  const { t: t2 } = useI18n();
13372
- return /* @__PURE__ */ React45.createElement(
13895
+ return /* @__PURE__ */ React47.createElement(
13373
13896
  "button",
13374
13897
  {
13375
13898
  type: "button",
@@ -13379,11 +13902,11 @@ function TipsButton(props) {
13379
13902
  onClick: props.onClick,
13380
13903
  style: ICON_BUTTON_STYLE
13381
13904
  },
13382
- /* @__PURE__ */ React45.createElement(TipsIcon, null)
13905
+ /* @__PURE__ */ React47.createElement(TipsIcon, null)
13383
13906
  );
13384
13907
  }
13385
13908
  function TipsIcon() {
13386
- return /* @__PURE__ */ React45.createElement(
13909
+ return /* @__PURE__ */ React47.createElement(
13387
13910
  "svg",
13388
13911
  {
13389
13912
  width: 14,
@@ -13396,9 +13919,9 @@ function TipsIcon() {
13396
13919
  strokeLinecap: "round",
13397
13920
  strokeLinejoin: "round"
13398
13921
  },
13399
- /* @__PURE__ */ React45.createElement("path", { d: "M8 1.8a4.1 4.1 0 0 0-2.5 7.4c.3.2.5.5.5.9v.4h4v-.4c0-.4.2-.7.5-.9A4.1 4.1 0 0 0 8 1.8Z" }),
13400
- /* @__PURE__ */ React45.createElement("path", { d: "M6.4 12.6h3.2" }),
13401
- /* @__PURE__ */ React45.createElement("path", { d: "M7.2 14.4h1.6" })
13922
+ /* @__PURE__ */ React47.createElement("path", { d: "M8 1.8a4.1 4.1 0 0 0-2.5 7.4c.3.2.5.5.5.9v.4h4v-.4c0-.4.2-.7.5-.9A4.1 4.1 0 0 0 8 1.8Z" }),
13923
+ /* @__PURE__ */ React47.createElement("path", { d: "M6.4 12.6h3.2" }),
13924
+ /* @__PURE__ */ React47.createElement("path", { d: "M7.2 14.4h1.6" })
13402
13925
  );
13403
13926
  }
13404
13927
 
@@ -13520,7 +14043,7 @@ function registerInjection(scope, injectionRef, capabilities) {
13520
14043
  });
13521
14044
  }
13522
14045
  function TaskTabTitle() {
13523
- return /* @__PURE__ */ React46.createElement("span", null, "MattWorkflow");
14046
+ return /* @__PURE__ */ React48.createElement("span", null, "MattWorkflow");
13524
14047
  }
13525
14048
  function createTaskTab(client, injectionRef, capabilities, i18n) {
13526
14049
  return function TaskTab(props) {
@@ -13531,7 +14054,7 @@ function createTaskTab(client, injectionRef, capabilities, i18n) {
13531
14054
  );
13532
14055
  const readiness = useInjectionReadiness(injectionRef);
13533
14056
  const refreshSignal = useAgentActivitySignal(useSessions, sessionId);
13534
- const injection = React46.useMemo(
14057
+ const injection = React48.useMemo(
13535
14058
  () => ({
13536
14059
  canInjectCurrent: sessionId !== void 0 && readiness.current,
13537
14060
  canStartNewSession: readiness.newSession,
@@ -13539,7 +14062,7 @@ function createTaskTab(client, injectionRef, capabilities, i18n) {
13539
14062
  }),
13540
14063
  [injectionRef, sessionId, readiness.current, readiness.newSession]
13541
14064
  );
13542
- return /* @__PURE__ */ React46.createElement(I18nProvider, { i18n }, /* @__PURE__ */ React46.createElement(
14065
+ return /* @__PURE__ */ React48.createElement(I18nProvider, { i18n }, /* @__PURE__ */ React48.createElement(
13543
14066
  TaskPanel,
13544
14067
  {
13545
14068
  client,
@@ -13563,8 +14086,8 @@ function notify(ref) {
13563
14086
  for (const listener of ref.listeners) listener();
13564
14087
  }
13565
14088
  function useInjectionReadiness(ref) {
13566
- const [readiness, setReadiness] = React46.useState(() => readReadiness(ref));
13567
- React46.useEffect(() => {
14089
+ const [readiness, setReadiness] = React48.useState(() => readReadiness(ref));
14090
+ React48.useEffect(() => {
13568
14091
  const update = () => {
13569
14092
  setReadiness(readReadiness(ref));
13570
14093
  };