@ondrej-svec/hog 1.24.1 → 1.24.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -7129,7 +7129,7 @@ var init_overlay_renderer = __esm({
7129
7129
 
7130
7130
  // src/board/components/panel-layout.tsx
7131
7131
  import { Box as Box22 } from "ink";
7132
- import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs23 } from "react/jsx-runtime";
7132
+ import { jsx as jsx23, jsxs as jsxs23 } from "react/jsx-runtime";
7133
7133
  function getLayoutMode(cols) {
7134
7134
  if (cols >= WIDE_THRESHOLD) return "wide";
7135
7135
  if (cols >= MEDIUM_THRESHOLD) return "medium";
@@ -7176,17 +7176,18 @@ function PanelLayout({
7176
7176
  /* @__PURE__ */ jsx23(Box22, { height: ACTIVITY_HEIGHT, children: activityPanel })
7177
7177
  ] });
7178
7178
  }
7179
- const STACKED_LEFT_HEIGHT = 6;
7179
+ const usableWidth = cols - 2;
7180
+ const halfWidth = Math.floor(usableWidth / 2);
7180
7181
  return /* @__PURE__ */ jsxs23(Box22, { flexDirection: "column", height: totalHeight, overflow: "hidden", children: [
7181
- !hideLeftPanel ? /* @__PURE__ */ jsxs23(Fragment3, { children: [
7182
- /* @__PURE__ */ jsx23(Box22, { height: STACKED_LEFT_HEIGHT, overflow: "hidden", children: reposPanel }),
7183
- /* @__PURE__ */ jsx23(Box22, { height: STACKED_LEFT_HEIGHT, overflow: "hidden", children: statusesPanel })
7182
+ !hideLeftPanel ? /* @__PURE__ */ jsxs23(Box22, { height: STACKED_TOP_HEIGHT, flexShrink: 0, children: [
7183
+ /* @__PURE__ */ jsx23(Box22, { width: halfWidth, overflow: "hidden", children: reposPanel }),
7184
+ /* @__PURE__ */ jsx23(Box22, { width: usableWidth - halfWidth, overflow: "hidden", children: statusesPanel })
7184
7185
  ] }) : null,
7185
7186
  /* @__PURE__ */ jsx23(Box22, { flexGrow: 1, flexDirection: "column", children: issuesPanel }),
7186
7187
  /* @__PURE__ */ jsx23(Box22, { height: ACTIVITY_HEIGHT, children: activityPanel })
7187
7188
  ] });
7188
7189
  }
7189
- var WIDE_THRESHOLD, MEDIUM_THRESHOLD, LEFT_COL_WIDTH, ACTIVITY_HEIGHT;
7190
+ var WIDE_THRESHOLD, MEDIUM_THRESHOLD, LEFT_COL_WIDTH, ACTIVITY_HEIGHT, STACKED_TOP_HEIGHT;
7190
7191
  var init_panel_layout = __esm({
7191
7192
  "src/board/components/panel-layout.tsx"() {
7192
7193
  "use strict";
@@ -7194,12 +7195,13 @@ var init_panel_layout = __esm({
7194
7195
  MEDIUM_THRESHOLD = 100;
7195
7196
  LEFT_COL_WIDTH = 24;
7196
7197
  ACTIVITY_HEIGHT = 5;
7198
+ STACKED_TOP_HEIGHT = 5;
7197
7199
  }
7198
7200
  });
7199
7201
 
7200
7202
  // src/board/components/repos-panel.tsx
7201
7203
  import { Box as Box23, Text as Text22 } from "ink";
7202
- import { Fragment as Fragment4, jsx as jsx24, jsxs as jsxs24 } from "react/jsx-runtime";
7204
+ import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs24 } from "react/jsx-runtime";
7203
7205
  function shortName(fullName) {
7204
7206
  return fullName.includes("/") ? fullName.split("/")[1] ?? fullName : fullName;
7205
7207
  }
@@ -7232,7 +7234,7 @@ function ReposPanel({
7232
7234
  aboveCount = scroll.aboveCount;
7233
7235
  belowCount = scroll.belowCount;
7234
7236
  }
7235
- return /* @__PURE__ */ jsx24(Panel, { title: "[1] Repos", isActive, width, flexGrow, height, children: repos.length === 0 ? /* @__PURE__ */ jsx24(Text22, { color: "gray", children: "\u2014" }) : /* @__PURE__ */ jsxs24(Fragment4, { children: [
7237
+ return /* @__PURE__ */ jsx24(Panel, { title: "[1] Repos", isActive, width, flexGrow, height, children: repos.length === 0 ? /* @__PURE__ */ jsx24(Text22, { color: "gray", children: "\u2014" }) : /* @__PURE__ */ jsxs24(Fragment3, { children: [
7236
7238
  hasMoreAbove ? /* @__PURE__ */ jsxs24(Text22, { color: "gray", dimColor: true, children: [
7237
7239
  " ",
7238
7240
  "\u25B2 ",
@@ -7536,7 +7538,7 @@ var init_row_renderer = __esm({
7536
7538
 
7537
7539
  // src/board/components/statuses-panel.tsx
7538
7540
  import { Box as Box26, Text as Text25 } from "ink";
7539
- import { Fragment as Fragment5, jsx as jsx27, jsxs as jsxs27 } from "react/jsx-runtime";
7541
+ import { Fragment as Fragment4, jsx as jsx27, jsxs as jsxs27 } from "react/jsx-runtime";
7540
7542
  function StatusesPanel({
7541
7543
  groups,
7542
7544
  selectedIdx,
@@ -7574,7 +7576,7 @@ function StatusesPanel({
7574
7576
  width,
7575
7577
  flexGrow,
7576
7578
  height,
7577
- children: groups.length === 0 ? /* @__PURE__ */ jsx27(Text25, { color: "gray", children: "\u2014" }) : /* @__PURE__ */ jsxs27(Fragment5, { children: [
7579
+ children: groups.length === 0 ? /* @__PURE__ */ jsx27(Text25, { color: "gray", children: "\u2014" }) : /* @__PURE__ */ jsxs27(Fragment4, { children: [
7578
7580
  hasMoreAbove ? /* @__PURE__ */ jsxs27(Text25, { color: "gray", dimColor: true, children: [
7579
7581
  " ",
7580
7582
  "\u25B2 ",
@@ -7617,10 +7619,10 @@ var init_statuses_panel = __esm({
7617
7619
  // src/board/components/toast-container.tsx
7618
7620
  import { Spinner as Spinner3 } from "@inkjs/ui";
7619
7621
  import { Box as Box27, Text as Text26 } from "ink";
7620
- import { Fragment as Fragment6, jsx as jsx28, jsxs as jsxs28 } from "react/jsx-runtime";
7622
+ import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs28 } from "react/jsx-runtime";
7621
7623
  function ToastContainer({ toasts }) {
7622
7624
  if (toasts.length === 0) return null;
7623
- return /* @__PURE__ */ jsx28(Box27, { flexDirection: "column", children: toasts.map((t) => /* @__PURE__ */ jsx28(Box27, { children: t.type === "loading" ? /* @__PURE__ */ jsxs28(Fragment6, { children: [
7625
+ return /* @__PURE__ */ jsx28(Box27, { flexDirection: "column", children: toasts.map((t) => /* @__PURE__ */ jsx28(Box27, { children: t.type === "loading" ? /* @__PURE__ */ jsxs28(Fragment5, { children: [
7624
7626
  /* @__PURE__ */ jsx28(Spinner3, { label: "" }),
7625
7627
  /* @__PURE__ */ jsxs28(Text26, { color: "cyan", children: [
7626
7628
  " ",
@@ -7656,7 +7658,7 @@ import { execFile as execFile2, spawn as spawn4 } from "child_process";
7656
7658
  import { Spinner as Spinner4 } from "@inkjs/ui";
7657
7659
  import { Box as Box28, Text as Text27, useApp, useStdout as useStdout2 } from "ink";
7658
7660
  import { useCallback as useCallback16, useEffect as useEffect14, useMemo as useMemo5, useRef as useRef19, useState as useState21 } from "react";
7659
- import { Fragment as Fragment7, jsx as jsx29, jsxs as jsxs29 } from "react/jsx-runtime";
7661
+ import { Fragment as Fragment6, jsx as jsx29, jsxs as jsxs29 } from "react/jsx-runtime";
7660
7662
  function resolvePhaseConfig(rc, config2, issueTitle, phase) {
7661
7663
  const phasePrompts = rc.workflow?.phasePrompts ?? config2.board.workflow?.phasePrompts ?? {};
7662
7664
  const template = phasePrompts[phase] ?? DEFAULT_PHASE_PROMPTS[phase];
@@ -8464,13 +8466,16 @@ function Dashboard({ config: config2, options, activeProfile }) {
8464
8466
  label,
8465
8467
  count: issues.length
8466
8468
  }));
8469
+ const leftPanelWidth = layoutMode === "stacked" ? Math.floor(usableWidth / 2) : LEFT_COL_WIDTH;
8470
+ const leftPanelHeight = layoutMode === "stacked" ? STACKED_TOP_HEIGHT : void 0;
8467
8471
  const reposPanel = /* @__PURE__ */ jsx29(
8468
8472
  ReposPanel,
8469
8473
  {
8470
8474
  repos: reposData,
8471
8475
  selectedIdx: clampedRepoIdx,
8472
8476
  isActive: panelFocus.activePanelId === 1,
8473
- width: LEFT_COL_WIDTH
8477
+ width: leftPanelWidth,
8478
+ height: leftPanelHeight
8474
8479
  }
8475
8480
  );
8476
8481
  const statusesPanel = /* @__PURE__ */ jsx29(
@@ -8479,8 +8484,9 @@ function Dashboard({ config: config2, options, activeProfile }) {
8479
8484
  groups: statusesData,
8480
8485
  selectedIdx: clampedStatusIdx,
8481
8486
  isActive: panelFocus.activePanelId === 2,
8482
- width: LEFT_COL_WIDTH,
8483
- flexGrow: 1
8487
+ width: leftPanelWidth,
8488
+ ...layoutMode !== "stacked" ? { flexGrow: 1 } : {},
8489
+ height: leftPanelHeight
8484
8490
  }
8485
8491
  );
8486
8492
  const issuesPanelTitle = `[3] Issues${selectedSection ? ` \u2014 ${selectedSection.repo.shortName}` : ""}${selectedStatusGroup ? ` / ${selectedStatusGroup.label}` : ""}`;
@@ -8560,10 +8566,10 @@ function Dashboard({ config: config2, options, activeProfile }) {
8560
8566
  dateStr
8561
8567
  ] }),
8562
8568
  /* @__PURE__ */ jsx29(Text27, { children: " " }),
8563
- isRefreshing ? /* @__PURE__ */ jsxs29(Fragment7, { children: [
8569
+ isRefreshing ? /* @__PURE__ */ jsxs29(Fragment6, { children: [
8564
8570
  /* @__PURE__ */ jsx29(Spinner4, { label: "" }),
8565
8571
  /* @__PURE__ */ jsx29(Text27, { color: "cyan", children: " Refreshing..." })
8566
- ] }) : /* @__PURE__ */ jsxs29(Fragment7, { children: [
8572
+ ] }) : /* @__PURE__ */ jsxs29(Fragment6, { children: [
8567
8573
  /* @__PURE__ */ jsx29(RefreshAge, { lastRefresh }),
8568
8574
  consecutiveFailures > 0 ? /* @__PURE__ */ jsx29(Text27, { color: "red", children: " (!)" }) : null
8569
8575
  ] }),
@@ -9791,7 +9797,7 @@ async function resolveRef(ref, config2) {
9791
9797
  }
9792
9798
  }
9793
9799
  var program = new Command();
9794
- program.name("hog").description("Personal command deck \u2014 GitHub Projects dashboard with workflow orchestration").version("1.24.1").option("--json", "Force JSON output").option("--human", "Force human-readable output").hook("preAction", (thisCommand) => {
9800
+ program.name("hog").description("Personal command deck \u2014 GitHub Projects dashboard with workflow orchestration").version("1.24.3").option("--json", "Force JSON output").option("--human", "Force human-readable output").hook("preAction", (thisCommand) => {
9795
9801
  const opts = thisCommand.opts();
9796
9802
  if (opts.json) setFormat("json");
9797
9803
  if (opts.human) setFormat("human");