@ondrej-svec/hog 1.9.2 → 1.9.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
@@ -5395,26 +5395,20 @@ function Dashboard({ config: config2, options, activeProfile }) {
5395
5395
  () => flatRows.findIndex((r) => r.navId === nav.selectedId),
5396
5396
  [flatRows, nav.selectedId]
5397
5397
  );
5398
+ const stickyHeader = useMemo3(() => {
5399
+ if (selectedRowIdx < 0) return null;
5400
+ for (let i = selectedRowIdx; i >= 0; i--) {
5401
+ const row = flatRows[i];
5402
+ if (row?.type === "subHeader") return { text: row.text, count: row.count };
5403
+ }
5404
+ return null;
5405
+ }, [flatRows, selectedRowIdx]);
5398
5406
  if (selectedRowIdx >= 0) {
5399
5407
  if (selectedRowIdx < scrollRef.current) {
5400
5408
  scrollRef.current = selectedRowIdx;
5401
5409
  } else if (selectedRowIdx >= scrollRef.current + viewportHeight) {
5402
5410
  scrollRef.current = selectedRowIdx - viewportHeight + 1;
5403
5411
  }
5404
- if (scrollRef.current > 0 && scrollRef.current === selectedRowIdx) {
5405
- let subIdx = -1;
5406
- for (let i = selectedRowIdx - 1; i >= 0; i--) {
5407
- const row = flatRows[i];
5408
- if (!row || row.type === "sectionHeader") break;
5409
- if (row.type === "subHeader") {
5410
- subIdx = i;
5411
- break;
5412
- }
5413
- }
5414
- if (subIdx >= 0 && selectedRowIdx - subIdx < viewportHeight) {
5415
- scrollRef.current = subIdx;
5416
- }
5417
- }
5418
5412
  }
5419
5413
  const maxOffset = Math.max(0, flatRows.length - viewportHeight);
5420
5414
  scrollRef.current = Math.max(0, Math.min(scrollRef.current, maxOffset));
@@ -5685,44 +5679,57 @@ function Dashboard({ config: config2, options, activeProfile }) {
5685
5679
  onPushEntry: pushEntry
5686
5680
  }
5687
5681
  ),
5688
- !ui.state.helpVisible && ui.state.mode !== "overlay:status" && ui.state.mode !== "overlay:create" && ui.state.mode !== "overlay:createNl" && ui.state.mode !== "overlay:bulkAction" && ui.state.mode !== "overlay:confirmPick" && ui.state.mode !== "focus" ? /* @__PURE__ */ jsxs22(Box21, { height: viewportHeight, children: [
5689
- /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", flexGrow: 1, children: [
5690
- hasMoreAbove ? /* @__PURE__ */ jsxs22(Text21, { color: "gray", dimColor: true, children: [
5691
- " ",
5692
- "\u25B2",
5682
+ !ui.state.helpVisible && ui.state.mode !== "overlay:status" && ui.state.mode !== "overlay:create" && ui.state.mode !== "overlay:createNl" && ui.state.mode !== "overlay:bulkAction" && ui.state.mode !== "overlay:confirmPick" && ui.state.mode !== "focus" ? /* @__PURE__ */ jsxs22(Fragment5, { children: [
5683
+ /* @__PURE__ */ jsx22(Box21, { children: stickyHeader ? /* @__PURE__ */ jsxs22(Fragment5, { children: [
5684
+ /* @__PURE__ */ jsxs22(Text21, { bold: true, color: "white", children: [
5693
5685
  " ",
5694
- aboveCount,
5695
- " more above"
5696
- ] }) : null,
5697
- visibleRows.map((row) => /* @__PURE__ */ jsx22(
5698
- RowRenderer,
5699
- {
5700
- row,
5701
- selectedId: nav.selectedId,
5702
- selfLogin: config2.board.assignee,
5703
- isMultiSelected: ui.state.mode === "multiSelect" && row.navId ? multiSelect.isSelected(row.navId) : void 0
5704
- },
5705
- row.key
5706
- )),
5707
- hasMoreBelow ? /* @__PURE__ */ jsxs22(Text21, { color: "gray", dimColor: true, children: [
5708
- " ",
5709
- "\u25BC",
5710
- " ",
5711
- belowCount,
5712
- " more below"
5686
+ stickyHeader.text
5687
+ ] }),
5688
+ stickyHeader.count != null ? /* @__PURE__ */ jsxs22(Text21, { color: "gray", children: [
5689
+ " (",
5690
+ stickyHeader.count,
5691
+ ")"
5713
5692
  ] }) : null
5714
- ] }),
5715
- showDetailPanel ? /* @__PURE__ */ jsx22(Box21, { marginLeft: 1, width: detailPanelWidth, children: /* @__PURE__ */ jsx22(
5716
- DetailPanel,
5717
- {
5718
- issue: selectedItem.issue,
5719
- task: selectedItem.task,
5720
- width: detailPanelWidth,
5721
- issueRepo: selectedItem.repoName,
5722
- fetchComments: handleFetchComments,
5723
- commentsState: currentCommentsState
5724
- }
5725
- ) }) : null
5693
+ ] }) : null }),
5694
+ /* @__PURE__ */ jsxs22(Box21, { height: viewportHeight, children: [
5695
+ /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", flexGrow: 1, children: [
5696
+ hasMoreAbove ? /* @__PURE__ */ jsxs22(Text21, { color: "gray", dimColor: true, children: [
5697
+ " ",
5698
+ "\u25B2",
5699
+ " ",
5700
+ aboveCount,
5701
+ " more above"
5702
+ ] }) : null,
5703
+ visibleRows.map((row) => /* @__PURE__ */ jsx22(
5704
+ RowRenderer,
5705
+ {
5706
+ row,
5707
+ selectedId: nav.selectedId,
5708
+ selfLogin: config2.board.assignee,
5709
+ isMultiSelected: ui.state.mode === "multiSelect" && row.navId ? multiSelect.isSelected(row.navId) : void 0
5710
+ },
5711
+ row.key
5712
+ )),
5713
+ hasMoreBelow ? /* @__PURE__ */ jsxs22(Text21, { color: "gray", dimColor: true, children: [
5714
+ " ",
5715
+ "\u25BC",
5716
+ " ",
5717
+ belowCount,
5718
+ " more below"
5719
+ ] }) : null
5720
+ ] }),
5721
+ showDetailPanel ? /* @__PURE__ */ jsx22(Box21, { marginLeft: 1, width: detailPanelWidth, children: /* @__PURE__ */ jsx22(
5722
+ DetailPanel,
5723
+ {
5724
+ issue: selectedItem.issue,
5725
+ task: selectedItem.task,
5726
+ width: detailPanelWidth,
5727
+ issueRepo: selectedItem.repoName,
5728
+ fetchComments: handleFetchComments,
5729
+ commentsState: currentCommentsState
5730
+ }
5731
+ ) }) : null
5732
+ ] })
5726
5733
  ] }) : null,
5727
5734
  /* @__PURE__ */ jsx22(ToastContainer, { toasts }),
5728
5735
  logVisible ? /* @__PURE__ */ jsx22(ActionLog, { entries: logEntries }) : null,
@@ -5766,7 +5773,7 @@ var init_dashboard = __esm({
5766
5773
  "priority:medium": 2,
5767
5774
  "priority:low": 3
5768
5775
  };
5769
- CHROME_ROWS = 5;
5776
+ CHROME_ROWS = 6;
5770
5777
  }
5771
5778
  });
5772
5779
 
@@ -6942,7 +6949,7 @@ function resolveProjectId(projectId) {
6942
6949
  process.exit(1);
6943
6950
  }
6944
6951
  var program = new Command();
6945
- program.name("hog").description("Personal command deck \u2014 unified task dashboard for GitHub Projects + TickTick").version("1.9.2").option("--json", "Force JSON output").option("--human", "Force human-readable output").hook("preAction", (thisCommand) => {
6952
+ program.name("hog").description("Personal command deck \u2014 unified task dashboard for GitHub Projects + TickTick").version("1.9.3").option("--json", "Force JSON output").option("--human", "Force human-readable output").hook("preAction", (thisCommand) => {
6946
6953
  const opts = thisCommand.opts();
6947
6954
  if (opts.json) setFormat("json");
6948
6955
  if (opts.human) setFormat("human");