@ogpoyraz/wtx 0.8.7 → 0.8.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.mjs +103 -29
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -25561,10 +25561,11 @@ function useWorktrees(opts) {
25561
25561
  }
25562
25562
  }
25563
25563
  }, [opts]);
25564
+ const clearWarnings = useCallback(() => setWarnings([]), []);
25564
25565
  useEffect(() => {
25565
25566
  refresh();
25566
25567
  }, [refresh]);
25567
- return { blocks, loading, refreshing, error: error52, warnings, lastRefreshed, pendingRepos, refresh };
25568
+ return { blocks, loading, refreshing, error: error52, warnings, lastRefreshed, pendingRepos, refresh, clearWarnings };
25568
25569
  }
25569
25570
  var init_useWorktrees = __esm(() => {
25570
25571
  init_data();
@@ -25865,6 +25866,8 @@ function WorktreeTable({ blocks, selectedIndex, selection = new Set, frame, repo
25865
25866
  height: "100%",
25866
25867
  border: true,
25867
25868
  borderColor: tokens.border,
25869
+ focusedBorderColor: tokens.border,
25870
+ focusable: false,
25868
25871
  title: "Worktrees",
25869
25872
  paddingX: 1,
25870
25873
  focused: false,
@@ -25947,6 +25950,8 @@ function DetailPane({ selectedRow }) {
25947
25950
  height: "100%",
25948
25951
  border: true,
25949
25952
  borderColor: tokens.border,
25953
+ focusedBorderColor: tokens.border,
25954
+ focusable: false,
25950
25955
  title: "Details",
25951
25956
  padding: 1,
25952
25957
  justifyContent: "center",
@@ -25986,6 +25991,8 @@ function DetailPane({ selectedRow }) {
25986
25991
  height: "100%",
25987
25992
  border: true,
25988
25993
  borderColor: tokens.border,
25994
+ focusedBorderColor: tokens.border,
25995
+ focusable: false,
25989
25996
  title: "Details",
25990
25997
  padding: 1,
25991
25998
  focused: false,
@@ -26353,6 +26360,7 @@ function Footer({ loading, lastRefreshed, errorCount, message, busyText, spinner
26353
26360
  /* @__PURE__ */ jsxs3("box", {
26354
26361
  flexDirection: "row",
26355
26362
  gap: 2,
26363
+ alignItems: "center",
26356
26364
  children: [
26357
26365
  message ? /* @__PURE__ */ jsx3("text", {
26358
26366
  fg: tokens.warning,
@@ -26374,6 +26382,12 @@ function Footer({ loading, lastRefreshed, errorCount, message, busyText, spinner
26374
26382
  count: errorCount,
26375
26383
  onClick: onErrorClick
26376
26384
  }) : null,
26385
+ /* @__PURE__ */ jsx3(HintItem, {
26386
+ hintKey: "?",
26387
+ label: "help",
26388
+ isFirst: errorCount === 0,
26389
+ onClick: onHintClick
26390
+ }),
26377
26391
  /* @__PURE__ */ jsx3("text", {
26378
26392
  fg: tokens.dim,
26379
26393
  children: loading ? `${frame} Refreshing…` : `Updated ${lastRefreshed}`
@@ -26388,19 +26402,8 @@ var init_Footer = __esm(() => {
26388
26402
  init_theme();
26389
26403
  init_use_tap();
26390
26404
  HINTS = [
26391
- ["c", "config"],
26392
26405
  ["n", "create"],
26393
- ["f", "fetch"],
26394
- ["?", "help"],
26395
- ["H", "history"],
26396
- ["o", "ide"],
26397
- ["i", "install"],
26398
- ["p", "pull"],
26399
- ["b", "rebase"],
26400
- ["r", "refresh"],
26401
- ["d", "remove"],
26402
- ["m", "rename"],
26403
- ["s", "sync"]
26406
+ ["d", "remove"]
26404
26407
  ];
26405
26408
  });
26406
26409
 
@@ -26510,23 +26513,35 @@ function HelpOverlay() {
26510
26513
  return /* @__PURE__ */ jsxs4(Overlay, {
26511
26514
  title: "Help",
26512
26515
  borderColor: tokens.border,
26516
+ width: 84,
26513
26517
  children: [
26514
26518
  /* @__PURE__ */ jsx6("box", {
26515
26519
  flexDirection: "column",
26516
- style: { maxHeight: 40 },
26520
+ style: { maxHeight: 36 },
26517
26521
  children: /* @__PURE__ */ jsx6("scrollbox", {
26518
26522
  flexGrow: 1,
26519
- children: HELP_ENTRIES.map(([key, desc]) => /* @__PURE__ */ jsxs4("text", {
26523
+ children: HELP_ENTRIES.map(([key, desc]) => /* @__PURE__ */ jsxs4("box", {
26524
+ flexDirection: "row",
26525
+ gap: 1,
26520
26526
  children: [
26521
- /* @__PURE__ */ jsx6("span", {
26522
- fg: tokens.accent,
26523
- children: key.padEnd(10)
26527
+ /* @__PURE__ */ jsx6("box", {
26528
+ width: 18,
26529
+ flexShrink: 0,
26530
+ children: /* @__PURE__ */ jsx6("text", {
26531
+ fg: tokens.accent,
26532
+ children: key
26533
+ })
26524
26534
  }),
26525
- /* @__PURE__ */ jsx6("span", {
26526
- children: " - "
26535
+ /* @__PURE__ */ jsx6("text", {
26536
+ fg: tokens.dim,
26537
+ children: "-"
26527
26538
  }),
26528
- /* @__PURE__ */ jsx6("span", {
26529
- children: desc
26539
+ /* @__PURE__ */ jsx6("box", {
26540
+ flexGrow: 1,
26541
+ children: /* @__PURE__ */ jsx6("text", {
26542
+ fg: tokens.fg,
26543
+ children: desc
26544
+ })
26530
26545
  })
26531
26546
  ]
26532
26547
  }, key))
@@ -27425,14 +27440,17 @@ var init_ConfigOverlay = __esm(() => {
27425
27440
 
27426
27441
  // src/tui/components/WarningsOverlay.tsx
27427
27442
  import { jsx as jsx13, jsxs as jsxs11 } from "@opentui/react/jsx-runtime";
27428
- function WarningsOverlay({ warnings }) {
27443
+ function WarningsOverlay({ warnings, onAcknowledge, onClose }) {
27444
+ const ackTap = useTapHandler(() => onAcknowledge?.());
27445
+ const closeTap = useTapHandler(() => onClose?.());
27429
27446
  return /* @__PURE__ */ jsxs11(Overlay, {
27430
27447
  title: `Warnings (${warnings.length})`,
27431
27448
  borderColor: tokens.warning,
27449
+ width: 80,
27432
27450
  children: [
27433
27451
  /* @__PURE__ */ jsx13("box", {
27434
27452
  flexDirection: "column",
27435
- style: { maxHeight: 30 },
27453
+ style: { maxHeight: 28 },
27436
27454
  children: /* @__PURE__ */ jsx13("scrollbox", {
27437
27455
  flexGrow: 1,
27438
27456
  children: warnings.map((warning, i2) => /* @__PURE__ */ jsxs11("box", {
@@ -27443,7 +27461,7 @@ function WarningsOverlay({ warnings }) {
27443
27461
  fg: tokens.warning,
27444
27462
  children: `⚠ ${warning.repoName}`
27445
27463
  }),
27446
- wrapText(warning.message, 56).map((line, j) => /* @__PURE__ */ jsx13("text", {
27464
+ wrapText(warning.message, 72).map((line, j) => /* @__PURE__ */ jsx13("text", {
27447
27465
  fg: tokens.fg,
27448
27466
  children: ` ${line}`
27449
27467
  }, j))
@@ -27451,9 +27469,46 @@ function WarningsOverlay({ warnings }) {
27451
27469
  }, i2))
27452
27470
  })
27453
27471
  }),
27472
+ /* @__PURE__ */ jsxs11("box", {
27473
+ flexDirection: "row",
27474
+ gap: 3,
27475
+ style: { marginTop: 2 },
27476
+ justifyContent: "center",
27477
+ children: [
27478
+ /* @__PURE__ */ jsx13("box", {
27479
+ ...ackTap,
27480
+ children: /* @__PURE__ */ jsxs11("text", {
27481
+ children: [
27482
+ /* @__PURE__ */ jsx13("span", {
27483
+ fg: tokens.dim,
27484
+ children: "[a] "
27485
+ }),
27486
+ /* @__PURE__ */ jsx13("span", {
27487
+ fg: tokens.success,
27488
+ children: "Acknowledge"
27489
+ })
27490
+ ]
27491
+ })
27492
+ }),
27493
+ /* @__PURE__ */ jsx13("box", {
27494
+ ...closeTap,
27495
+ children: /* @__PURE__ */ jsxs11("text", {
27496
+ children: [
27497
+ /* @__PURE__ */ jsx13("span", {
27498
+ fg: tokens.dim,
27499
+ children: "[esc] "
27500
+ }),
27501
+ /* @__PURE__ */ jsx13("span", {
27502
+ children: "Close"
27503
+ })
27504
+ ]
27505
+ })
27506
+ })
27507
+ ]
27508
+ }),
27454
27509
  /* @__PURE__ */ jsx13("text", {
27455
27510
  style: { marginTop: 1, fg: tokens.dim },
27456
- children: "Press any key to close"
27511
+ children: "Press a to acknowledge and clear errors"
27457
27512
  })
27458
27513
  ]
27459
27514
  });
@@ -27462,6 +27517,7 @@ var init_WarningsOverlay = __esm(() => {
27462
27517
  init_Overlay();
27463
27518
  init_theme();
27464
27519
  init_utils();
27520
+ init_use_tap();
27465
27521
  });
27466
27522
 
27467
27523
  // src/tui/hooks/useSpinnerFrame.ts
@@ -27497,7 +27553,7 @@ function getWorktreePathFor(repoName, branch) {
27497
27553
  }
27498
27554
  function App({ opts }) {
27499
27555
  const renderer = useRenderer2();
27500
- const { blocks, loading, refreshing, error: error52, warnings, lastRefreshed, pendingRepos, refresh } = useWorktrees(opts);
27556
+ const { blocks, loading, refreshing, error: error52, warnings, lastRefreshed, pendingRepos, refresh, clearWarnings } = useWorktrees(opts);
27501
27557
  const [selectedIndex, setSelectedIndex] = useState8(0);
27502
27558
  const [modal, setModal] = useState8({ type: "none" });
27503
27559
  const [actionMessage, setActionMessage] = useState8();
@@ -27927,7 +27983,20 @@ function App({ opts }) {
27927
27983
  return;
27928
27984
  }
27929
27985
  if (modal.type !== "none") {
27930
- if (modal.type === "error" || modal.type === "help" || modal.type === "history" || modal.type === "warnings") {
27986
+ if (modal.type === "warnings") {
27987
+ if (key.name === "a") {
27988
+ clearWarnings();
27989
+ setModal({ type: "none" });
27990
+ return;
27991
+ }
27992
+ if (key.name === "escape" || key.name === "q" || key.name === "enter" || key.name === "return") {
27993
+ setModal({ type: "none" });
27994
+ return;
27995
+ }
27996
+ setModal({ type: "none" });
27997
+ return;
27998
+ }
27999
+ if (modal.type === "error" || modal.type === "help" || modal.type === "history") {
27931
28000
  setModal({ type: "none" });
27932
28001
  if (modal.type === "error" && error52) {
27933
28002
  renderer.destroy();
@@ -28291,7 +28360,12 @@ function App({ opts }) {
28291
28360
  modal.type === "help" && /* @__PURE__ */ jsx14(HelpOverlay, {}),
28292
28361
  modal.type === "history" && /* @__PURE__ */ jsx14(HistoryOverlay, {}),
28293
28362
  modal.type === "warnings" && /* @__PURE__ */ jsx14(WarningsOverlay, {
28294
- warnings
28363
+ warnings,
28364
+ onAcknowledge: () => {
28365
+ clearWarnings();
28366
+ setModal({ type: "none" });
28367
+ },
28368
+ onClose: () => setModal({ type: "none" })
28295
28369
  }),
28296
28370
  modal.type === "error" && /* @__PURE__ */ jsx14(ConfirmModal, {
28297
28371
  title: "Error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ogpoyraz/wtx",
3
- "version": "0.8.7",
3
+ "version": "0.8.8",
4
4
  "description": "Multi-repo git worktree manager",
5
5
  "type": "module",
6
6
  "bin": {