kandown 0.34.0 → 0.34.2

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/bin/tui.js CHANGED
@@ -54963,7 +54963,7 @@ import { spawn, execSync } from "child_process";
54963
54963
  import { homedir as homedir2 } from "os";
54964
54964
 
54965
54965
  // src/lib/version.ts
54966
- var KANDOWN_VERSION = "0.34.0";
54966
+ var KANDOWN_VERSION = "0.34.2";
54967
54967
 
54968
54968
  // src/cli/lib/updater.ts
54969
54969
  import { fileURLToPath as fileURLToPath2 } from "url";
@@ -57479,8 +57479,7 @@ function InlineContextMenu({ cursor, colWidth }) {
57479
57479
  }
57480
57480
  var MENU_HEIGHT = 2;
57481
57481
 
57482
- // src/cli/screens/board.tsx
57483
- var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
57482
+ // src/cli/screens/board/helpers.ts
57484
57483
  var TASKS_START_Y = 5;
57485
57484
  function truncate(str, maxLen) {
57486
57485
  if (maxLen <= 0) return "";
@@ -57517,6 +57516,34 @@ function columnAccentColor(name) {
57517
57516
  if (/done|archive|closed|complete/.test(normalized)) return "green";
57518
57517
  return "cyan";
57519
57518
  }
57519
+ function getTitleCategory(title) {
57520
+ const bracket = title.match(/^\[([^\]]+)\]\s*/);
57521
+ if (bracket) return { key: `[${bracket[1].toLowerCase()}]`, label: bracket[1] };
57522
+ const hash = title.match(/#(\w+)/);
57523
+ if (hash) return { key: `#${hash[1].toLowerCase()}`, label: `#${hash[1]}` };
57524
+ return null;
57525
+ }
57526
+ function computeScrollIdx(tasks, focusedRow, contextMenuRow, maxTasksHeight) {
57527
+ if (focusedRow < 0) return 0;
57528
+ const reserveBottom = focusedRow < tasks.length - 1 ? 1 : 0;
57529
+ let currentScroll = 0;
57530
+ while (currentScroll < focusedRow) {
57531
+ const hasTopIndicator = currentScroll > 0;
57532
+ const adjustedMaxHeight = maxTasksHeight - (hasTopIndicator ? 1 : 0) - reserveBottom;
57533
+ let h = 0;
57534
+ for (let k = currentScroll; k <= focusedRow; k++) {
57535
+ h += getTitleCategory(tasks[k].title) !== null ? 3 : 1;
57536
+ if (contextMenuRow === k) h += MENU_HEIGHT;
57537
+ if (k < focusedRow) h += 1;
57538
+ }
57539
+ if (h <= adjustedMaxHeight) break;
57540
+ currentScroll++;
57541
+ }
57542
+ return currentScroll;
57543
+ }
57544
+
57545
+ // src/cli/screens/board/components.tsx
57546
+ var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
57520
57547
  function SingleTaskRow({ task, focused, dragging, colWidth }) {
57521
57548
  const cursor = dragging ? "\u2195" : focused ? "\u25B8" : " ";
57522
57549
  const check2 = task.checked ? "\u2713" : "\u25CB";
@@ -57555,13 +57582,6 @@ function SingleTaskRow({ task, focused, dragging, colWidth }) {
57555
57582
  ] })
57556
57583
  ] });
57557
57584
  }
57558
- function getTitleCategory(title) {
57559
- const bracket = title.match(/^\[([^\]]+)\]\s*/);
57560
- if (bracket) return { key: `[${bracket[1].toLowerCase()}]`, label: bracket[1] };
57561
- const hash = title.match(/#(\w+)/);
57562
- if (hash) return { key: `#${hash[1].toLowerCase()}`, label: `#${hash[1]}` };
57563
- return null;
57564
- }
57565
57585
  function CategoryTaskRow({ task, focused, dragging, colWidth }) {
57566
57586
  const cursor = dragging ? "\u2195" : focused ? "\u25B8" : " ";
57567
57587
  const check2 = task.checked ? "\u2713" : "\u25CB";
@@ -57605,24 +57625,6 @@ function MovePlaceholder({ name, focused, colWidth }) {
57605
57625
  }
57606
57626
  ) });
57607
57627
  }
57608
- function computeScrollIdx(tasks, focusedRow, contextMenuRow, maxTasksHeight) {
57609
- if (focusedRow < 0) return 0;
57610
- const reserveBottom = focusedRow < tasks.length - 1 ? 1 : 0;
57611
- let currentScroll = 0;
57612
- while (currentScroll < focusedRow) {
57613
- const hasTopIndicator = currentScroll > 0;
57614
- const adjustedMaxHeight = maxTasksHeight - (hasTopIndicator ? 1 : 0) - reserveBottom;
57615
- let h = 0;
57616
- for (let k = currentScroll; k <= focusedRow; k++) {
57617
- h += getTitleCategory(tasks[k].title) !== null ? 3 : 1;
57618
- if (contextMenuRow === k) h += MENU_HEIGHT;
57619
- if (k < focusedRow) h += 1;
57620
- }
57621
- if (h <= adjustedMaxHeight) break;
57622
- currentScroll++;
57623
- }
57624
- return currentScroll;
57625
- }
57626
57628
  function KanbanColumn({
57627
57629
  name,
57628
57630
  tasks,
@@ -57816,6 +57818,9 @@ function TaskDetail({ task, taskId, scrollOffset }) {
57816
57818
  ] })
57817
57819
  ] });
57818
57820
  }
57821
+
57822
+ // src/cli/screens/board.tsx
57823
+ var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
57819
57824
  function Board({ kandownDir, version }) {
57820
57825
  const { exit } = use_app_default();
57821
57826
  const [board, setBoard] = (0, import_react37.useState)(null);
@@ -58635,24 +58640,24 @@ function Board({ kandownDir, version }) {
58635
58640
  }
58636
58641
  });
58637
58642
  if (boardError) {
58638
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "column", padding: 2, children: [
58639
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "red", bold: true, children: "Error loading board" }),
58640
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "red", children: boardError }),
58641
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "gray", children: "Press 'r' to retry or 'q' to quit." })
58643
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", padding: 2, children: [
58644
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "red", bold: true, children: "Error loading board" }),
58645
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "red", children: boardError }),
58646
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "gray", children: "Press 'r' to retry or 'q' to quit." })
58642
58647
  ] });
58643
58648
  }
58644
58649
  if (!board) {
58645
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { padding: 2, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "gray", children: "Loading board\u2026" }) });
58650
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { padding: 2, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "gray", children: "Loading board\u2026" }) });
58646
58651
  }
58647
58652
  if (board.columns.length === 0) {
58648
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "column", padding: 2, children: [
58649
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: "red", bold: true, children: [
58653
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", padding: 2, children: [
58654
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "red", bold: true, children: [
58650
58655
  "No board found at ",
58651
58656
  kandownDir
58652
58657
  ] }),
58653
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: "gray", children: [
58658
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "gray", children: [
58654
58659
  "Run ",
58655
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "cyan", children: "kandown init" }),
58660
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", children: "kandown init" }),
58656
58661
  " to set up."
58657
58662
  ] })
58658
58663
  ] });
@@ -58668,80 +58673,80 @@ function Board({ kandownDir, version }) {
58668
58673
  modeHint = "drag over target column \xB7 release to drop \xB7 Esc cancel";
58669
58674
  }
58670
58675
  if (mode === "cheatsheet") {
58671
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 2, paddingY: 1, children: [
58672
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "cyan", bold: true, children: "Kandown TUI Cheatsheet (Press Esc or ? to return)" }),
58673
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "gray", children: "\u2500".repeat(60) }),
58674
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58675
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "n " }),
58676
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 2, paddingY: 1, children: [
58677
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", bold: true, children: "Kandown TUI Cheatsheet (Press Esc or ? to return)" }),
58678
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "gray", children: "\u2500".repeat(60) }),
58679
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58680
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "n " }),
58676
58681
  "Create new task (inline: #tag @user p1 due:date +t12)"
58677
58682
  ] }),
58678
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58679
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "e " }),
58683
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58684
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "e " }),
58680
58685
  "Edit task file in $EDITOR"
58681
58686
  ] }),
58682
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58683
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "x " }),
58687
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58688
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "x " }),
58684
58689
  "Archive focused task"
58685
58690
  ] }),
58686
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58687
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "D " }),
58691
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58692
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "D " }),
58688
58693
  "Delete focused task (with confirmation)"
58689
58694
  ] }),
58690
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58691
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "/ " }),
58695
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58696
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "/ " }),
58692
58697
  "Search / fuzzy filter tasks"
58693
58698
  ] }),
58694
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58695
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "f " }),
58699
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58700
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "f " }),
58696
58701
  "Cycle filter mode (All, P1, AI owner, Human owner)"
58697
58702
  ] }),
58698
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58699
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "u " }),
58703
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58704
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "u " }),
58700
58705
  "Undo last action"
58701
58706
  ] }),
58702
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58703
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "m " }),
58707
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58708
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "m " }),
58704
58709
  "Open move context menu"
58705
58710
  ] }),
58706
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58707
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "a " }),
58711
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58712
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "a " }),
58708
58713
  "Launch AI agent on task"
58709
58714
  ] }),
58710
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58711
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "g " }),
58715
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58716
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "g " }),
58712
58717
  "Send task to agent hook"
58713
58718
  ] }),
58714
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58715
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "d " }),
58719
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58720
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "d " }),
58716
58721
  "Toggle local web daemon"
58717
58722
  ] }),
58718
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58719
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "r " }),
58723
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58724
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "r " }),
58720
58725
  "Reload board from disk"
58721
58726
  ] }),
58722
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58723
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "h/l \u2190/\u2192 " }),
58727
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58728
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "h/l \u2190/\u2192 " }),
58724
58729
  "Navigate columns"
58725
58730
  ] }),
58726
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58727
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "j/k \u2191/\u2193 " }),
58731
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58732
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "j/k \u2191/\u2193 " }),
58728
58733
  "Navigate tasks"
58729
58734
  ] }),
58730
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58731
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "Enter " }),
58735
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58736
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "Enter " }),
58732
58737
  "Open task details"
58733
58738
  ] }),
58734
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
58735
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: "q / Esc " }),
58739
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
58740
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: "q / Esc " }),
58736
58741
  "Quit / Cancel"
58737
58742
  ] })
58738
58743
  ] });
58739
58744
  }
58740
58745
  if (mode === "agent-picker") {
58741
58746
  const taskId = detailTaskId || focusedTask?.id || "";
58742
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "column", children: [
58743
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(BoardHeader, { title: board.title, inTmux, version, daemonStatus, daemonBusy }),
58744
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
58747
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", children: [
58748
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(BoardHeader, { title: board.title, inTmux, version, daemonStatus, daemonBusy }),
58749
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
58745
58750
  AgentPicker,
58746
58751
  {
58747
58752
  agents: installedAgents,
@@ -58753,21 +58758,21 @@ function Board({ kandownDir, version }) {
58753
58758
  ] });
58754
58759
  }
58755
58760
  if (mode === "detail" && detailTask) {
58756
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "column", children: [
58757
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { marginBottom: 1, justifyContent: "space-between", children: [
58758
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "gray", children: "Esc back \xB7 a agent \xB7 j/k scroll" }),
58759
- daemonStatus.running && daemonStatus.metadata ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "blue", underline: true, children: terminalHyperlink(webLinkLabel(daemonStatus.metadata.url), daemonStatus.metadata.url) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: "gray", dimColor: true, children: [
58761
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", children: [
58762
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { marginBottom: 1, justifyContent: "space-between", children: [
58763
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "gray", children: "Esc back \xB7 a agent \xB7 j/k scroll" }),
58764
+ daemonStatus.running && daemonStatus.metadata ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "blue", underline: true, children: terminalHyperlink(webLinkLabel(daemonStatus.metadata.url), daemonStatus.metadata.url) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "gray", dimColor: true, children: [
58760
58765
  "KANDOWN ",
58761
58766
  board.title
58762
58767
  ] })
58763
58768
  ] }),
58764
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TaskDetail, { task: detailTask, taskId: detailTaskId, scrollOffset: detailScroll }),
58765
- statusMsg && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", children: statusMsg }) })
58769
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TaskDetail, { task: detailTask, taskId: detailTaskId, scrollOffset: detailScroll }),
58770
+ statusMsg && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", children: statusMsg }) })
58766
58771
  ] });
58767
58772
  }
58768
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "column", children: [
58769
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(BoardHeader, { title: board.title, inTmux, modeHint, version, daemonStatus, daemonBusy }),
58770
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { flexDirection: "row", children: board.columns.map((col, cIdx) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
58773
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", children: [
58774
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(BoardHeader, { title: board.title, inTmux, modeHint, version, daemonStatus, daemonBusy }),
58775
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { flexDirection: "row", children: board.columns.map((col, cIdx) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
58771
58776
  KanbanColumn,
58772
58777
  {
58773
58778
  name: col.name,
@@ -58784,47 +58789,56 @@ function Board({ kandownDir, version }) {
58784
58789
  },
58785
58790
  col.name
58786
58791
  )) }),
58787
- mode === "create-task" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { marginTop: 1, borderStyle: "single", borderColor: "green", paddingX: 1, children: [
58788
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "green", bold: true, children: "New Task: " }),
58789
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: createInput }),
58790
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "gray", children: " \u2588 (Enter create \xB7 Esc cancel)" })
58792
+ mode === "create-task" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { marginTop: 1, borderStyle: "single", borderColor: "green", paddingX: 1, children: [
58793
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "green", bold: true, children: "New Task: " }),
58794
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { children: createInput }),
58795
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "gray", children: " \u2588 (Enter create \xB7 Esc cancel)" })
58791
58796
  ] }),
58792
- mode === "confirm-delete" && focusedTask && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { marginTop: 1, borderStyle: "single", borderColor: "red", paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: "red", bold: true, children: [
58797
+ mode === "confirm-delete" && focusedTask && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginTop: 1, borderStyle: "single", borderColor: "red", paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "red", bold: true, children: [
58793
58798
  "Delete task ",
58794
58799
  focusedTask.id,
58795
58800
  " (",
58796
58801
  truncate(focusedTask.title, 30),
58797
58802
  ")? [y/N] "
58798
58803
  ] }) }),
58799
- mode === "search" && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { marginTop: 1, borderStyle: "single", borderColor: "cyan", paddingX: 1, children: [
58800
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "cyan", bold: true, children: "Search: " }),
58801
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: searchQuery }),
58802
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "gray", children: " \u2588 (Enter done \xB7 Esc clear)" })
58804
+ mode === "search" && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { marginTop: 1, borderStyle: "single", borderColor: "cyan", paddingX: 1, children: [
58805
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", bold: true, children: "Search: " }),
58806
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { children: searchQuery }),
58807
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "gray", children: " \u2588 (Enter done \xB7 Esc clear)" })
58803
58808
  ] }),
58804
- (mode === "move-target" || mode === "dragging") && moveTaskId && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: "yellow", bold: true, children: [
58809
+ (mode === "move-target" || mode === "dragging") && moveTaskId && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "yellow", bold: true, children: [
58805
58810
  "Moving ",
58806
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "cyan", children: moveTaskId }),
58807
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "gray", children: " \u2014 " }),
58808
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "yellow", bold: true, children: mode === "dragging" ? "release over a column" : "click a column" }),
58809
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "gray", children: mode === "dragging" ? " \xB7 Esc cancel" : " or \u2190/\u2192 + Enter" })
58811
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", children: moveTaskId }),
58812
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "gray", children: " \u2014 " }),
58813
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: mode === "dragging" ? "release over a column" : "click a column" }),
58814
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "gray", children: mode === "dragging" ? " \xB7 Esc cancel" : " or \u2190/\u2192 + Enter" })
58810
58815
  ] }) }),
58811
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(StatusBar, { message: statusMsg, task: focusedTask, daemonStatus })
58816
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StatusBar, { message: statusMsg, task: focusedTask, daemonStatus })
58812
58817
  ] });
58813
58818
  }
58814
58819
 
58815
58820
  // src/cli/screens/init-prompt.tsx
58816
58821
  var import_react38 = __toESM(require_react(), 1);
58817
- var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
58822
+ var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
58818
58823
  function InitPrompt({ kandownDir, onConfirm }) {
58819
58824
  const [pressed, setPressed] = (0, import_react38.useState)(false);
58820
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", padding: 1, borderStyle: "round", borderColor: "yellow", children: [
58821
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, color: "yellow", children: "No .kandown/ project found" }),
58822
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { children: `Create one at ${kandownDir} and start the web daemon?` }),
58823
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: "Press Enter to create, Esc to quit." }),
58824
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { marginTop: 1, children: [
58825
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { inverse: !pressed, color: pressed ? "gray" : "green", children: ` Create (Enter) ` }),
58826
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { children: " " }),
58827
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { inverse: pressed, color: pressed ? "red" : "gray", children: ` Quit (Esc) ` })
58825
+ const { exit } = use_app_default();
58826
+ use_input_default((_input, key) => {
58827
+ if (key.return) {
58828
+ setPressed(true);
58829
+ onConfirm();
58830
+ } else if (key.escape) {
58831
+ exit();
58832
+ }
58833
+ });
58834
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", padding: 1, borderStyle: "round", borderColor: "yellow", children: [
58835
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: true, color: "yellow", children: "No .kandown/ project found" }),
58836
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { children: `Create one at ${kandownDir} and start the web daemon?` }),
58837
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: "Press Enter to create, Esc to quit." }),
58838
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { marginTop: 1, children: [
58839
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { inverse: !pressed, color: pressed ? "gray" : "green", children: ` Create (Enter) ` }),
58840
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { children: " " }),
58841
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { inverse: pressed, color: pressed ? "red" : "gray", children: ` Quit (Esc) ` })
58828
58842
  ] })
58829
58843
  ] });
58830
58844
  }
@@ -58915,7 +58929,7 @@ function openBrowser(target) {
58915
58929
  }
58916
58930
 
58917
58931
  // src/cli/app.tsx
58918
- var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
58932
+ var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
58919
58933
  function getTerminalRows() {
58920
58934
  const rows = process.stdout.rows;
58921
58935
  return typeof rows === "number" && Number.isFinite(rows) && rows > 0 ? rows : 24;
@@ -58936,7 +58950,7 @@ function App2({ screen, kandownDir, version, projectExists = true }) {
58936
58950
  const [created, setCreated] = (0, import_react39.useState)(false);
58937
58951
  let content;
58938
58952
  if (!projectExists && !created) {
58939
- content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
58953
+ content = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
58940
58954
  InitPrompt,
58941
58955
  {
58942
58956
  kandownDir,
@@ -58955,23 +58969,23 @@ function App2({ screen, kandownDir, version, projectExists = true }) {
58955
58969
  } else {
58956
58970
  switch (screen) {
58957
58971
  case "settings":
58958
- content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Settings, { kandownDir, version });
58972
+ content = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Settings, { kandownDir, version });
58959
58973
  break;
58960
58974
  case "board":
58961
- content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Board, { kandownDir, version });
58975
+ content = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Board, { kandownDir, version });
58962
58976
  break;
58963
58977
  default:
58964
- content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { padding: 2, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "red", bold: true, children: [
58978
+ content = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { padding: 2, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Text, { color: "red", bold: true, children: [
58965
58979
  "Unknown screen: ",
58966
58980
  screen
58967
58981
  ] }) });
58968
58982
  }
58969
58983
  }
58970
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { flexDirection: "column", height: rows, overflow: "hidden", children: content });
58984
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Box_default, { flexDirection: "column", height: rows, overflow: "hidden", children: content });
58971
58985
  }
58972
58986
 
58973
58987
  // src/cli/tui.tsx
58974
- var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
58988
+ var import_jsx_runtime8 = __toESM(require_jsx_runtime(), 1);
58975
58989
  async function run(screen, kandownDir, version) {
58976
58990
  if (!process.stdin.isTTY) {
58977
58991
  throw new Error(
@@ -58979,7 +58993,7 @@ async function run(screen, kandownDir, version) {
58979
58993
  );
58980
58994
  }
58981
58995
  const projectExists = existsSync8(join11(kandownDir, "kandown.json"));
58982
- const instance = render_default(/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(App2, { screen, kandownDir, version, projectExists }), {
58996
+ const instance = render_default(/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(App2, { screen, kandownDir, version, projectExists }), {
58983
58997
  exitOnCtrlC: true,
58984
58998
  interactive: true,
58985
58999
  alternateScreen: true,