@ondrej-svec/hog 1.21.0 → 1.21.1

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
@@ -606,7 +606,7 @@ __export(github_exports, {
606
606
  import { execFile, execFileSync as execFileSync2 } from "child_process";
607
607
  import { promisify } from "util";
608
608
  function runGh(args) {
609
- return execFileSync2("gh", args, { encoding: "utf-8", timeout: 3e4 }).trim();
609
+ return execFileSync2("gh", args, { encoding: "utf-8", timeout: 3e4, stdio: "pipe" }).trim();
610
610
  }
611
611
  function runGhJson(args) {
612
612
  const output = runGh(args);
@@ -4045,7 +4045,7 @@ function Panel({ title, isActive, width, height, flexGrow, children }) {
4045
4045
  const color = isActive ? "cyan" : "gray";
4046
4046
  const topLine = buildTopLine(title, width);
4047
4047
  return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", width, height, flexGrow, overflow: "hidden", children: [
4048
- /* @__PURE__ */ jsx2(Text2, { color, children: topLine }),
4048
+ /* @__PURE__ */ jsx2(Box2, { flexShrink: 0, children: /* @__PURE__ */ jsx2(Text2, { color, children: topLine }) }),
4049
4049
  /* @__PURE__ */ jsx2(
4050
4050
  Box2,
4051
4051
  {
@@ -7089,13 +7089,6 @@ function Dashboard({ config: config2, options, activeProfile }) {
7089
7089
  enrichment: workflowState.enrichment,
7090
7090
  onEnrichmentChange: handleEnrichmentChange
7091
7091
  });
7092
- const dailyNudgeShownRef = useRef17(false);
7093
- useEffect12(() => {
7094
- if (nudges.shouldShowDailyNudge && !dailyNudgeShownRef.current && ui.canAct) {
7095
- dailyNudgeShownRef.current = true;
7096
- ui.enterNudge();
7097
- }
7098
- }, [nudges.shouldShowDailyNudge, ui]);
7099
7092
  useEffect12(() => {
7100
7093
  const last = logEntries[logEntries.length - 1];
7101
7094
  if (last?.status === "error") setLogVisible(true);
@@ -7328,6 +7321,7 @@ function Dashboard({ config: config2, options, activeProfile }) {
7328
7321
  termSize.rows - CHROME_ROWS - overlayBarRows - toastRows - logPaneRows
7329
7322
  );
7330
7323
  const issuesPanelHeight = Math.max(5, totalPanelHeight - ACTIVITY_HEIGHT);
7324
+ const contentRowCount = Math.max(1, issuesPanelHeight - 2);
7331
7325
  const flatRows = useMemo5(() => {
7332
7326
  const rows = buildFlatRowsForRepo(boardTree.sections, selectedRepoName, selectedStatusGroupId);
7333
7327
  return rows.map((row) => {
@@ -7360,17 +7354,17 @@ function Dashboard({ config: config2, options, activeProfile }) {
7360
7354
  if (selectedRowIdx >= 0) {
7361
7355
  if (selectedRowIdx < scrollRef.current) {
7362
7356
  scrollRef.current = selectedRowIdx;
7363
- } else if (selectedRowIdx >= scrollRef.current + issuesPanelHeight) {
7364
- scrollRef.current = selectedRowIdx - issuesPanelHeight + 1;
7357
+ } else if (selectedRowIdx >= scrollRef.current + contentRowCount) {
7358
+ scrollRef.current = selectedRowIdx - contentRowCount + 1;
7365
7359
  }
7366
7360
  }
7367
- const maxOffset = Math.max(0, flatRows.length - issuesPanelHeight);
7361
+ const maxOffset = Math.max(0, flatRows.length - contentRowCount);
7368
7362
  scrollRef.current = Math.max(0, Math.min(scrollRef.current, maxOffset));
7369
- const visibleRows = flatRows.slice(scrollRef.current, scrollRef.current + issuesPanelHeight);
7363
+ const visibleRows = flatRows.slice(scrollRef.current, scrollRef.current + contentRowCount);
7370
7364
  const hasMoreAbove = scrollRef.current > 0;
7371
- const hasMoreBelow = scrollRef.current + issuesPanelHeight < flatRows.length;
7365
+ const hasMoreBelow = scrollRef.current + contentRowCount < flatRows.length;
7372
7366
  const aboveCount = scrollRef.current;
7373
- const belowCount = flatRows.length - scrollRef.current - issuesPanelHeight;
7367
+ const belowCount = flatRows.length - scrollRef.current - contentRowCount;
7374
7368
  const selectedItem = useMemo5(() => {
7375
7369
  const id = nav.selectedId;
7376
7370
  if (!id || isHeaderId(id)) return { issue: null, repoName: null };
@@ -8143,7 +8137,7 @@ function fetchRecentActivity(repoName, shortName2) {
8143
8137
  "-q",
8144
8138
  '.[] | select(.type == "IssuesEvent" or .type == "IssueCommentEvent" or .type == "PullRequestEvent" or .type == "CreateEvent") | {type: .type, actor: .actor.login, action: .payload.action, number: (.payload.issue.number // .payload.pull_request.number), title: (.payload.issue.title // .payload.pull_request.title), body: (.payload.comment.body // .payload.pull_request.body), created_at: .created_at, ref: .payload.ref, ref_type: .payload.ref_type, merged: .payload.pull_request.merged}'
8145
8139
  ],
8146
- { encoding: "utf-8", timeout: 15e3 }
8140
+ { encoding: "utf-8", timeout: 15e3, stdio: "pipe" }
8147
8141
  );
8148
8142
  const cutoff = Date.now() - 24 * 60 * 60 * 1e3;
8149
8143
  const events = [];
@@ -9087,7 +9081,7 @@ async function resolveRef(ref, config2) {
9087
9081
  }
9088
9082
  }
9089
9083
  var program = new Command();
9090
- program.name("hog").description("Personal command deck \u2014 GitHub Projects dashboard with workflow orchestration").version("1.21.0").option("--json", "Force JSON output").option("--human", "Force human-readable output").hook("preAction", (thisCommand) => {
9084
+ program.name("hog").description("Personal command deck \u2014 GitHub Projects dashboard with workflow orchestration").version("1.21.1").option("--json", "Force JSON output").option("--human", "Force human-readable output").hook("preAction", (thisCommand) => {
9091
9085
  const opts = thisCommand.opts();
9092
9086
  if (opts.json) setFormat("json");
9093
9087
  if (opts.human) setFormat("human");