gh-manager-cli 1.10.5 → 1.11.0

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/index.js CHANGED
@@ -16,20 +16,20 @@ import {
16
16
  updateCacheAfterArchive,
17
17
  updateCacheAfterDelete,
18
18
  updateCacheWithRepository
19
- } from "./chunk-XCFI3TG5.js";
19
+ } from "./chunk-75Y3BQBE.js";
20
20
 
21
21
  // package.json
22
22
  var require_package = __commonJS({
23
23
  "package.json"(exports, module) {
24
24
  module.exports = {
25
25
  name: "gh-manager-cli",
26
- version: "1.10.5",
26
+ version: "1.11.0",
27
27
  private: false,
28
28
  description: "Interactive CLI to manage your GitHub repos (personal) with Ink",
29
29
  license: "MIT",
30
30
  main: "dist/index.js",
31
31
  bin: {
32
- "gh-manager": "dist/index.js"
32
+ "gh-manager-cli": "dist/index.js"
33
33
  },
34
34
  files: [
35
35
  "dist/",
@@ -52,10 +52,12 @@ var require_package = __commonJS({
52
52
  "build:binaries": "npm run build && pkg dist/index.js --targets node18-linux-x64,node18-macos-x64,node18-windows-x64 --out-path ./binaries",
53
53
  dev: "tsup --watch",
54
54
  start: "node dist/index.js",
55
- "start:cache": "GH_MANAGER_APOLLO=1 GH_MANAGER_DEBUG=1 node dist/index.js",
56
- "start:no-cache": "GH_MANAGER_APOLLO=0 GH_MANAGER_DEBUG=1 node dist/index.js",
57
- "test:cache": "pnpm build && pnpm start:cache",
58
- prepublishOnly: "pnpm run build"
55
+ "start:debug": "GH_MANAGER_DEBUG=1 node dist/index.js",
56
+ "start:dev": "REPOS_PER_FETCH=5 GH_MANAGER_DEBUG=1 node dist/index.js",
57
+ prepublishOnly: "pnpm run build",
58
+ test: "vitest run",
59
+ "test:watch": "vitest",
60
+ "test:coverage": "vitest run --coverage"
59
61
  },
60
62
  engines: {
61
63
  node: ">=18"
@@ -78,10 +80,13 @@ var require_package = __commonJS({
78
80
  "@semantic-release/git": "^10.0.1",
79
81
  "@types/node": "^24.3.0",
80
82
  "@types/react": "^19.1.12",
83
+ "ink-testing-library": "^3.0.0",
81
84
  pkg: "^5.8.1",
82
85
  "semantic-release": "^24.2.7",
83
86
  tsup: "^8.5.0",
84
- typescript: "^5.9.2"
87
+ typescript: "^5.9.2",
88
+ vitest: "^2.1.3",
89
+ "@vitest/coverage-v8": "^2.1.3"
85
90
  },
86
91
  repository: {
87
92
  type: "git",
@@ -115,18 +120,18 @@ var require_package = __commonJS({
115
120
  {
116
121
  assets: [
117
122
  {
118
- path: "binaries/gh-manager-linux-x64/gh-manager-linux-x64",
119
- name: "gh-manager-linux-x64",
123
+ path: "binaries/gh-manager-cli-linux-x64/gh-manager-cli-linux-x64",
124
+ name: "gh-manager-cli-linux-x64",
120
125
  label: "Linux x64 Binary"
121
126
  },
122
127
  {
123
- path: "binaries/gh-manager-macos-x64/gh-manager-macos-x64",
124
- name: "gh-manager-macos-x64",
128
+ path: "binaries/gh-manager-cli-macos-x64/gh-manager-cli-macos-x64",
129
+ name: "gh-manager-cli-macos-x64",
125
130
  label: "macOS x64 Binary"
126
131
  },
127
132
  {
128
- path: "binaries/gh-manager-windows-x64/gh-manager-windows-x64.exe",
129
- name: "gh-manager-windows-x64.exe",
133
+ path: "binaries/gh-manager-cli-windows-x64/gh-manager-cli-windows-x64.exe",
134
+ name: "gh-manager-cli-windows-x64.exe",
130
135
  label: "Windows x64 Binary"
131
136
  }
132
137
  ]
@@ -139,13 +144,13 @@ var require_package = __commonJS({
139
144
  });
140
145
 
141
146
  // src/index.tsx
142
- import { render, Box as Box7, Text as Text8 } from "ink";
147
+ import { render, Box as Box14, Text as Text15 } from "ink";
143
148
  import "dotenv/config";
144
149
 
145
150
  // src/ui/App.tsx
146
- import { useEffect as useEffect4, useMemo as useMemo2, useState as useState4 } from "react";
147
- import { Box as Box6, Text as Text7, useApp as useApp2, useStdout as useStdout2, useInput as useInput3 } from "ink";
148
- import TextInput3 from "ink-text-input";
151
+ import { useEffect as useEffect7, useMemo as useMemo2, useState as useState10 } from "react";
152
+ import { Box as Box13, Text as Text14, useApp as useApp2, useStdout as useStdout2, useInput as useInput10 } from "ink";
153
+ import TextInput4 from "ink-text-input";
149
154
 
150
155
  // src/config.ts
151
156
  import fs from "fs";
@@ -201,10 +206,10 @@ function storeUIPrefs(patch) {
201
206
  }
202
207
 
203
208
  // src/ui/RepoList.tsx
204
- import React3, { useEffect as useEffect3, useMemo, useState as useState3 } from "react";
205
- import { Box as Box5, Text as Text6, useApp, useInput as useInput2, useStdout } from "ink";
206
- import TextInput2 from "ink-text-input";
207
- import chalk3 from "chalk";
209
+ import React9, { useEffect as useEffect6, useMemo, useState as useState9, useRef } from "react";
210
+ import { Box as Box12, Text as Text13, useApp, useInput as useInput9, useStdout } from "ink";
211
+ import TextInput3 from "ink-text-input";
212
+ import chalk10 from "chalk";
208
213
 
209
214
  // src/apolloMeta.ts
210
215
  import fs2 from "fs";
@@ -279,7 +284,7 @@ function OrgSwitcher({ token, currentContext, onSelect, onClose }) {
279
284
  const loadOrgs = async () => {
280
285
  try {
281
286
  setLoading(true);
282
- const client = await import("./github-6IFMCQKW.js").then((m) => m.makeClient(token));
287
+ const client = await import("./github-6OEBCAUZ.js").then((m) => m.makeClient(token));
283
288
  const orgs = await fetchViewerOrganizations(client);
284
289
  setOrganizations(orgs);
285
290
  if (!isPersonalContext) {
@@ -333,10 +338,47 @@ function OrgSwitcher({ token, currentContext, onSelect, onClose }) {
333
338
  ] });
334
339
  }
335
340
 
336
- // src/ui/components/repo/RepoRow.tsx
337
- import { Box as Box2, Text as Text2 } from "ink";
341
+ // src/ui/components/modals/DeleteModal.tsx
342
+ import { useState as useState3, useEffect as useEffect3 } from "react";
343
+ import { Box as Box2, Text as Text3, useInput as useInput2 } from "ink";
344
+ import TextInput from "ink-text-input";
338
345
  import chalk2 from "chalk";
339
346
 
347
+ // src/ui/components/common/SlowSpinner.tsx
348
+ import { useEffect as useEffect2, useState as useState2 } from "react";
349
+ import { Text as Text2 } from "ink";
350
+ import { jsx as jsx2 } from "react/jsx-runtime";
351
+ function SlowSpinner() {
352
+ const frames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
353
+ const [frame, setFrame] = useState2(0);
354
+ useEffect2(() => {
355
+ const timer = setInterval(() => {
356
+ setFrame((f) => (f + 1) % frames.length);
357
+ }, 500);
358
+ return () => clearInterval(timer);
359
+ }, [frames.length]);
360
+ return /* @__PURE__ */ jsx2(Text2, { children: frames[frame] });
361
+ }
362
+
363
+ // src/ui/components/modals/DeleteModal.tsx
364
+ import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
365
+
366
+ // src/ui/components/modals/ArchiveModal.tsx
367
+ import { useState as useState4 } from "react";
368
+ import { Box as Box3, Text as Text4, useInput as useInput3 } from "ink";
369
+ import chalk3 from "chalk";
370
+ import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
371
+
372
+ // src/ui/components/modals/SyncModal.tsx
373
+ import { useState as useState5 } from "react";
374
+ import { Box as Box4, Text as Text5, useInput as useInput4 } from "ink";
375
+ import chalk4 from "chalk";
376
+ import { Fragment as Fragment3, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
377
+
378
+ // src/ui/components/modals/InfoModal.tsx
379
+ import { Box as Box5, Text as Text6, useInput as useInput5 } from "ink";
380
+ import chalk5 from "chalk";
381
+
340
382
  // src/utils.ts
341
383
  function truncate(str, max = 80) {
342
384
  if (str.length <= max) return str;
@@ -355,8 +397,317 @@ function formatDate(dateStr) {
355
397
  return `${Math.floor(diffDays / 365)} years ago`;
356
398
  }
357
399
 
400
+ // src/ui/components/modals/InfoModal.tsx
401
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
402
+
403
+ // src/ui/components/modals/LogoutModal.tsx
404
+ import { useState as useState6 } from "react";
405
+ import { Box as Box6, Text as Text7, useInput as useInput6 } from "ink";
406
+ import chalk6 from "chalk";
407
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
408
+
409
+ // src/ui/components/modals/VisibilityModal.tsx
410
+ import { useState as useState7, useEffect as useEffect4 } from "react";
411
+ import { Box as Box7, Text as Text8, useInput as useInput7 } from "ink";
412
+ import chalk7 from "chalk";
413
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
414
+ function VisibilityModal({
415
+ currentFilter,
416
+ hasInternalRepos,
417
+ onSelect,
418
+ onCancel
419
+ }) {
420
+ const options = hasInternalRepos ? ["all", "public", "private", "internal"] : ["all", "public", "private"];
421
+ const [selectedIndex, setSelectedIndex] = useState7(0);
422
+ const [focusedOption, setFocusedOption] = useState7("all");
423
+ useEffect4(() => {
424
+ const currentIndex = options.indexOf(currentFilter);
425
+ if (currentIndex !== -1) {
426
+ setSelectedIndex(currentIndex);
427
+ setFocusedOption(currentFilter);
428
+ }
429
+ }, [currentFilter]);
430
+ useInput7((input, key) => {
431
+ if (key.escape || input && input.toUpperCase() === "C") {
432
+ onCancel();
433
+ return;
434
+ }
435
+ if (key.leftArrow || key.upArrow) {
436
+ if (focusedOption === "cancel") {
437
+ const lastIndex = options.length - 1;
438
+ setSelectedIndex(lastIndex);
439
+ setFocusedOption(options[lastIndex]);
440
+ } else {
441
+ const currentIdx = options.indexOf(focusedOption);
442
+ if (currentIdx > 0) {
443
+ setSelectedIndex(currentIdx - 1);
444
+ setFocusedOption(options[currentIdx - 1]);
445
+ }
446
+ }
447
+ }
448
+ if (key.rightArrow || key.downArrow) {
449
+ if (focusedOption !== "cancel") {
450
+ const currentIdx = options.indexOf(focusedOption);
451
+ if (currentIdx < options.length - 1) {
452
+ setSelectedIndex(currentIdx + 1);
453
+ setFocusedOption(options[currentIdx + 1]);
454
+ } else {
455
+ setFocusedOption("cancel");
456
+ }
457
+ }
458
+ }
459
+ if (key.tab) {
460
+ if (focusedOption === "cancel") {
461
+ setSelectedIndex(0);
462
+ setFocusedOption(options[0]);
463
+ } else {
464
+ const currentIdx = options.indexOf(focusedOption);
465
+ if (currentIdx < options.length - 1) {
466
+ setSelectedIndex(currentIdx + 1);
467
+ setFocusedOption(options[currentIdx + 1]);
468
+ } else {
469
+ setFocusedOption("cancel");
470
+ }
471
+ }
472
+ }
473
+ if (key.return) {
474
+ if (focusedOption === "cancel") {
475
+ onCancel();
476
+ } else {
477
+ onSelect(focusedOption);
478
+ }
479
+ }
480
+ if (input) {
481
+ const upperInput = input.toUpperCase();
482
+ if (upperInput === "A") {
483
+ onSelect("all");
484
+ } else if (upperInput === "P") {
485
+ onSelect("public");
486
+ } else if (upperInput === "R") {
487
+ onSelect("private");
488
+ } else if (upperInput === "I" && hasInternalRepos) {
489
+ onSelect("internal");
490
+ }
491
+ }
492
+ });
493
+ const getButtonLabel = (filter) => {
494
+ switch (filter) {
495
+ case "all":
496
+ return "All Repositories";
497
+ case "public":
498
+ return "Public Only";
499
+ case "private":
500
+ return "Private Only";
501
+ case "internal":
502
+ return "Internal Only";
503
+ }
504
+ };
505
+ const getButtonColor = (filter) => {
506
+ if (filter === currentFilter) {
507
+ return "green";
508
+ }
509
+ return focusedOption === filter ? "cyan" : "gray";
510
+ };
511
+ return /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 3, paddingY: 2, width: 60, children: [
512
+ /* @__PURE__ */ jsx8(Text8, { bold: true, children: "Visibility Filter" }),
513
+ /* @__PURE__ */ jsx8(Box7, { height: 1, children: /* @__PURE__ */ jsx8(Text8, { children: " " }) }),
514
+ /* @__PURE__ */ jsx8(Text8, { color: "gray", children: "Select which repositories to display:" }),
515
+ /* @__PURE__ */ jsx8(Box7, { height: 1, children: /* @__PURE__ */ jsx8(Text8, { children: " " }) }),
516
+ /* @__PURE__ */ jsx8(Box7, { flexDirection: "column", gap: 1, children: options.map((option) => /* @__PURE__ */ jsx8(
517
+ Box7,
518
+ {
519
+ borderStyle: focusedOption === option ? "round" : "single",
520
+ borderColor: getButtonColor(option),
521
+ paddingX: 2,
522
+ paddingY: 1,
523
+ width: "100%",
524
+ children: /* @__PURE__ */ jsxs7(Box7, { flexDirection: "row", justifyContent: "space-between", children: [
525
+ /* @__PURE__ */ jsx8(Text8, { color: focusedOption === option ? "white" : void 0, children: focusedOption === option ? chalk7[getButtonColor(option)].bold(getButtonLabel(option)) : chalk7[getButtonColor(option)](getButtonLabel(option)) }),
526
+ option === currentFilter && /* @__PURE__ */ jsx8(Text8, { color: "green", children: " \u2713 Current" })
527
+ ] })
528
+ },
529
+ option
530
+ )) }),
531
+ /* @__PURE__ */ jsx8(Box7, { height: 1, children: /* @__PURE__ */ jsx8(Text8, { children: " " }) }),
532
+ /* @__PURE__ */ jsx8(
533
+ Box7,
534
+ {
535
+ borderStyle: focusedOption === "cancel" ? "round" : "single",
536
+ borderColor: focusedOption === "cancel" ? "white" : "gray",
537
+ paddingX: 2,
538
+ paddingY: 1,
539
+ width: "100%",
540
+ justifyContent: "center",
541
+ children: /* @__PURE__ */ jsx8(Text8, { children: focusedOption === "cancel" ? chalk7.white.bold("Cancel") : chalk7.gray("Cancel") })
542
+ }
543
+ ),
544
+ /* @__PURE__ */ jsx8(Box7, { height: 1, children: /* @__PURE__ */ jsx8(Text8, { children: " " }) }),
545
+ /* @__PURE__ */ jsx8(Box7, { flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs7(Text8, { color: "gray", children: [
546
+ "\u2191\u2193 Navigate \u2022 Enter Select \u2022 A All \u2022 P Public \u2022 R Private",
547
+ hasInternalRepos && " \u2022 I Internal",
548
+ " \u2022 C/Esc Cancel"
549
+ ] }) })
550
+ ] });
551
+ }
552
+
553
+ // src/ui/components/modals/SortModal.tsx
554
+ import { useState as useState8, useEffect as useEffect5 } from "react";
555
+ import { Box as Box8, Text as Text9, useInput as useInput8 } from "ink";
556
+ import chalk8 from "chalk";
557
+ import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
558
+ function SortModal({
559
+ currentSort,
560
+ onSelect,
561
+ onCancel
562
+ }) {
563
+ const options = ["updated", "pushed", "name", "stars"];
564
+ const [selectedIndex, setSelectedIndex] = useState8(0);
565
+ const [focusedOption, setFocusedOption] = useState8("updated");
566
+ useEffect5(() => {
567
+ const currentIndex = options.indexOf(currentSort);
568
+ if (currentIndex !== -1) {
569
+ setSelectedIndex(currentIndex);
570
+ setFocusedOption(currentSort);
571
+ }
572
+ }, [currentSort]);
573
+ useInput8((input, key) => {
574
+ if (key.escape || input && input.toUpperCase() === "C") {
575
+ onCancel();
576
+ return;
577
+ }
578
+ if (key.leftArrow || key.upArrow) {
579
+ if (focusedOption === "cancel") {
580
+ const lastIndex = options.length - 1;
581
+ setSelectedIndex(lastIndex);
582
+ setFocusedOption(options[lastIndex]);
583
+ } else {
584
+ const currentIdx = options.indexOf(focusedOption);
585
+ if (currentIdx > 0) {
586
+ setSelectedIndex(currentIdx - 1);
587
+ setFocusedOption(options[currentIdx - 1]);
588
+ }
589
+ }
590
+ }
591
+ if (key.rightArrow || key.downArrow) {
592
+ if (focusedOption !== "cancel") {
593
+ const currentIdx = options.indexOf(focusedOption);
594
+ if (currentIdx < options.length - 1) {
595
+ setSelectedIndex(currentIdx + 1);
596
+ setFocusedOption(options[currentIdx + 1]);
597
+ } else {
598
+ setFocusedOption("cancel");
599
+ }
600
+ }
601
+ }
602
+ if (key.tab) {
603
+ if (focusedOption === "cancel") {
604
+ setSelectedIndex(0);
605
+ setFocusedOption(options[0]);
606
+ } else {
607
+ const currentIdx = options.indexOf(focusedOption);
608
+ if (currentIdx < options.length - 1) {
609
+ setSelectedIndex(currentIdx + 1);
610
+ setFocusedOption(options[currentIdx + 1]);
611
+ } else {
612
+ setFocusedOption("cancel");
613
+ }
614
+ }
615
+ }
616
+ if (key.return) {
617
+ if (focusedOption === "cancel") {
618
+ onCancel();
619
+ } else {
620
+ onSelect(focusedOption);
621
+ }
622
+ }
623
+ if (input) {
624
+ const upperInput = input.toUpperCase();
625
+ if (upperInput === "U") {
626
+ onSelect("updated");
627
+ } else if (upperInput === "P") {
628
+ onSelect("pushed");
629
+ } else if (upperInput === "N") {
630
+ onSelect("name");
631
+ } else if (upperInput === "S") {
632
+ onSelect("stars");
633
+ }
634
+ }
635
+ });
636
+ const getButtonLabel = (sort) => {
637
+ switch (sort) {
638
+ case "updated":
639
+ return "Last Updated";
640
+ case "pushed":
641
+ return "Last Pushed";
642
+ case "name":
643
+ return "Name";
644
+ case "stars":
645
+ return "Stars";
646
+ }
647
+ };
648
+ const getButtonDescription = (sort) => {
649
+ switch (sort) {
650
+ case "updated":
651
+ return "When the repository was last modified";
652
+ case "pushed":
653
+ return "When code was last pushed";
654
+ case "name":
655
+ return "Alphabetical by repository name";
656
+ case "stars":
657
+ return "Number of stars";
658
+ }
659
+ };
660
+ const getButtonColor = (sort) => {
661
+ if (sort === currentSort) {
662
+ return "green";
663
+ }
664
+ return focusedOption === sort ? "cyan" : "gray";
665
+ };
666
+ return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 3, paddingY: 2, width: 60, children: [
667
+ /* @__PURE__ */ jsx9(Text9, { bold: true, children: "Sort By" }),
668
+ /* @__PURE__ */ jsx9(Box8, { height: 1, children: /* @__PURE__ */ jsx9(Text9, { children: " " }) }),
669
+ /* @__PURE__ */ jsx9(Text9, { color: "gray", children: "Select how to sort repositories:" }),
670
+ /* @__PURE__ */ jsx9(Box8, { height: 1, children: /* @__PURE__ */ jsx9(Text9, { children: " " }) }),
671
+ /* @__PURE__ */ jsx9(Box8, { flexDirection: "column", gap: 1, children: options.map((option) => /* @__PURE__ */ jsx9(
672
+ Box8,
673
+ {
674
+ borderStyle: focusedOption === option ? "round" : "single",
675
+ borderColor: getButtonColor(option),
676
+ paddingX: 2,
677
+ paddingY: 1,
678
+ width: "100%",
679
+ children: /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
680
+ /* @__PURE__ */ jsxs8(Box8, { flexDirection: "row", justifyContent: "space-between", children: [
681
+ /* @__PURE__ */ jsx9(Text9, { color: focusedOption === option ? "white" : void 0, children: focusedOption === option ? chalk8[getButtonColor(option)].bold(getButtonLabel(option)) : chalk8[getButtonColor(option)](getButtonLabel(option)) }),
682
+ option === currentSort && /* @__PURE__ */ jsx9(Text9, { color: "green", children: " \u2713 Current" })
683
+ ] }),
684
+ /* @__PURE__ */ jsx9(Text9, { color: "gray", dimColor: true, children: getButtonDescription(option) })
685
+ ] })
686
+ },
687
+ option
688
+ )) }),
689
+ /* @__PURE__ */ jsx9(Box8, { height: 1, children: /* @__PURE__ */ jsx9(Text9, { children: " " }) }),
690
+ /* @__PURE__ */ jsx9(
691
+ Box8,
692
+ {
693
+ borderStyle: focusedOption === "cancel" ? "round" : "single",
694
+ borderColor: focusedOption === "cancel" ? "white" : "gray",
695
+ paddingX: 2,
696
+ paddingY: 1,
697
+ width: "100%",
698
+ justifyContent: "center",
699
+ children: /* @__PURE__ */ jsx9(Text9, { children: focusedOption === "cancel" ? chalk8.white.bold("Cancel") : chalk8.gray("Cancel") })
700
+ }
701
+ ),
702
+ /* @__PURE__ */ jsx9(Box8, { height: 1, children: /* @__PURE__ */ jsx9(Text9, { children: " " }) }),
703
+ /* @__PURE__ */ jsx9(Box8, { flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsx9(Text9, { color: "gray", children: "\u2191\u2193 Navigate \u2022 Enter Select \u2022 U Updated \u2022 P Pushed \u2022 N Name \u2022 S Stars \u2022 C/Esc Cancel" }) })
704
+ ] });
705
+ }
706
+
358
707
  // src/ui/components/repo/RepoRow.tsx
359
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
708
+ import { Box as Box9, Text as Text10 } from "ink";
709
+ import chalk9 from "chalk";
710
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
360
711
  function RepoRow({
361
712
  repo,
362
713
  selected,
@@ -372,126 +723,168 @@ function RepoRow({
372
723
  const commitsBehind = hasCommitData ? repo.parent.defaultBranchRef.target.history.totalCount - repo.defaultBranchRef.target.history.totalCount : 0;
373
724
  const showCommitsBehind = forkTracking && hasCommitData;
374
725
  let line1 = "";
375
- const numColor = selected ? chalk2.cyan : chalk2.gray;
376
- const nameColor = selected ? chalk2.cyan.bold : chalk2.white;
726
+ const numColor = selected ? chalk9.cyan : chalk9.gray;
727
+ const nameColor = selected ? chalk9.cyan.bold : chalk9.white;
377
728
  line1 += numColor(`${String(index).padStart(3, " ")}.`);
378
729
  line1 += nameColor(` ${repo.nameWithOwner}`);
379
- if (repo.isPrivate) line1 += chalk2.yellow(" Private");
380
- if (repo.isArchived) line1 += " " + chalk2.bgGray.whiteBright(" Archived ") + " ";
730
+ if (repo.isPrivate) line1 += chalk9.yellow(" Private");
731
+ if (repo.isArchived) line1 += " " + chalk9.bgGray.whiteBright(" Archived ") + " ";
381
732
  if (repo.isFork && repo.parent) {
382
- line1 += chalk2.blue(` Fork of ${repo.parent.nameWithOwner}`);
733
+ line1 += chalk9.blue(` Fork of ${repo.parent.nameWithOwner}`);
383
734
  if (showCommitsBehind) {
384
735
  if (commitsBehind > 0) {
385
- line1 += chalk2.yellow(` (${commitsBehind} behind)`);
736
+ line1 += chalk9.yellow(` (${commitsBehind} behind)`);
386
737
  } else {
387
- line1 += chalk2.green(` (0 behind)`);
738
+ line1 += chalk9.green(` (0 behind)`);
388
739
  }
389
740
  }
390
741
  }
391
742
  let line2 = " ";
392
- const metaColor = selected ? chalk2.white : chalk2.gray;
393
- if (langName) line2 += chalk2.hex(langColor)("\u25CF ") + metaColor(`${langName} `);
743
+ const metaColor = selected ? chalk9.white : chalk9.gray;
744
+ if (langName) line2 += chalk9.hex(langColor)("\u25CF ") + metaColor(`${langName} `);
394
745
  line2 += metaColor(`\u2605 ${repo.stargazerCount} \u2442 ${repo.forkCount} Updated ${formatDate(repo.updatedAt)}`);
395
746
  const line3 = repo.description ? ` ${truncate(repo.description, Math.max(30, maxWidth - 10))}` : null;
396
747
  let fullText = line1 + "\n" + line2;
397
748
  if (line3) fullText += "\n" + metaColor(line3);
398
- return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", backgroundColor: selected ? "gray" : void 0, children: [
399
- /* @__PURE__ */ jsx2(Text2, { children: dim ? chalk2.dim(fullText) : fullText }),
400
- spacingLines > 0 && /* @__PURE__ */ jsx2(Box2, { height: spacingLines, children: /* @__PURE__ */ jsx2(Text2, { children: " " }) })
749
+ const spacingAbove = Math.floor(spacingLines / 2);
750
+ const spacingBelow = spacingLines - spacingAbove;
751
+ return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", backgroundColor: selected ? "gray" : void 0, children: [
752
+ spacingAbove > 0 && /* @__PURE__ */ jsx10(Box9, { height: spacingAbove, children: /* @__PURE__ */ jsx10(Text10, { children: " " }) }),
753
+ /* @__PURE__ */ jsx10(Text10, { children: dim ? chalk9.dim(fullText) : fullText }),
754
+ spacingBelow > 0 && /* @__PURE__ */ jsx10(Box9, { height: spacingBelow, children: /* @__PURE__ */ jsx10(Text10, { children: " " }) })
401
755
  ] });
402
756
  }
403
757
 
404
758
  // src/ui/components/repo/FilterInput.tsx
405
- import { Box as Box3, Text as Text3 } from "ink";
406
- import TextInput from "ink-text-input";
407
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
759
+ import { Box as Box10, Text as Text11 } from "ink";
760
+ import TextInput2 from "ink-text-input";
761
+ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
408
762
 
409
763
  // src/ui/components/repo/RepoListHeader.tsx
410
- import { Box as Box4, Text as Text5 } from "ink";
411
-
412
- // src/ui/components/common/SlowSpinner.tsx
413
- import { useEffect as useEffect2, useState as useState2 } from "react";
414
- import { Text as Text4 } from "ink";
415
- import { jsx as jsx4 } from "react/jsx-runtime";
416
- function SlowSpinner() {
417
- const frames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
418
- const [frame, setFrame] = useState2(0);
419
- useEffect2(() => {
420
- const timer = setInterval(() => {
421
- setFrame((f) => (f + 1) % frames.length);
422
- }, 500);
423
- return () => clearInterval(timer);
424
- }, [frames.length]);
425
- return /* @__PURE__ */ jsx4(Text4, { children: frames[frame] });
764
+ import { Box as Box11, Text as Text12 } from "ink";
765
+ import { Fragment as Fragment4, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
766
+ function RepoListHeader({
767
+ ownerContext,
768
+ sortKey,
769
+ sortDir,
770
+ forkTracking,
771
+ filter,
772
+ searchActive,
773
+ searchLoading,
774
+ visibilityFilter = "all"
775
+ }) {
776
+ return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "row", gap: 2, marginBottom: 1, children: [
777
+ /* @__PURE__ */ jsx12(Text12, { color: "cyan", bold: true, children: ownerContext === "personal" ? "Personal Account" : `Organization: ${ownerContext.name || ownerContext.login}` }),
778
+ /* @__PURE__ */ jsxs11(Text12, { color: "gray", dimColor: true, children: [
779
+ "Sort: ",
780
+ sortKey,
781
+ " ",
782
+ sortDir === "asc" ? "\u2191" : "\u2193"
783
+ ] }),
784
+ /* @__PURE__ */ jsxs11(Text12, { color: "gray", dimColor: true, children: [
785
+ "Fork Status - Commits Behind: ",
786
+ forkTracking ? "ON" : "OFF"
787
+ ] }),
788
+ visibilityFilter !== "all" && /* @__PURE__ */ jsxs11(Text12, { color: "yellow", children: [
789
+ "Visibility: ",
790
+ visibilityFilter === "public" ? "Public" : visibilityFilter === "private" ? "Private" : "Internal"
791
+ ] }),
792
+ filter && !searchActive && /* @__PURE__ */ jsxs11(Text12, { color: "cyan", children: [
793
+ 'Filter: "',
794
+ filter,
795
+ '"'
796
+ ] }),
797
+ searchActive && /* @__PURE__ */ jsxs11(Fragment4, { children: [
798
+ /* @__PURE__ */ jsxs11(Text12, { color: "cyan", children: [
799
+ 'Search: "',
800
+ filter.trim(),
801
+ '"'
802
+ ] }),
803
+ searchLoading && /* @__PURE__ */ jsx12(Box11, { marginLeft: 1, children: /* @__PURE__ */ jsxs11(Text12, { color: "cyan", children: [
804
+ /* @__PURE__ */ jsx12(SlowSpinner, {}),
805
+ " Searching\u2026"
806
+ ] }) })
807
+ ] })
808
+ ] });
426
809
  }
427
810
 
428
- // src/ui/components/repo/RepoListHeader.tsx
429
- import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
430
-
431
811
  // src/ui/RepoList.tsx
432
- import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
433
- var PAGE_SIZE = process.env.GH_MANAGER_DEV === "1" || process.env.NODE_ENV === "development" ? 5 : 15;
812
+ import { Fragment as Fragment5, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
813
+ var getPageSize = () => {
814
+ const envValue = process.env.REPOS_PER_FETCH;
815
+ if (envValue) {
816
+ const parsed = parseInt(envValue, 10);
817
+ if (!isNaN(parsed) && parsed >= 1 && parsed <= 50) {
818
+ return parsed;
819
+ }
820
+ }
821
+ return 15;
822
+ };
823
+ var PAGE_SIZE = getPageSize();
434
824
  function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextChange }) {
435
825
  const { exit } = useApp();
436
826
  const { stdout } = useStdout();
437
827
  const client = useMemo(() => makeClient(token), [token]);
438
- const [debugMessages, setDebugMessages] = useState3([]);
828
+ const [debugMessages, setDebugMessages] = useState9([]);
439
829
  const addDebugMessage = (msg) => {
440
830
  if (process.env.GH_MANAGER_DEBUG === "1") {
441
831
  setDebugMessages((prev) => [...prev.slice(-9), msg]);
442
832
  }
443
833
  };
444
- React3.useEffect(() => {
834
+ React9.useEffect(() => {
445
835
  addDebugMessage(`[RepoList] Component mounted`);
446
836
  }, []);
447
837
  const terminalWidth = stdout?.columns ?? 80;
448
838
  const availableHeight = maxVisibleRows ?? 20;
449
- const [items, setItems] = useState3([]);
450
- const [cursor, setCursor] = useState3(0);
451
- const [endCursor, setEndCursor] = useState3(null);
452
- const [hasNextPage, setHasNextPage] = useState3(false);
453
- const [totalCount, setTotalCount] = useState3(0);
454
- const [loading, setLoading] = useState3(true);
455
- const [sortingLoading, setSortingLoading] = useState3(false);
456
- const [refreshing, setRefreshing] = useState3(false);
457
- const [loadingMore, setLoadingMore] = useState3(false);
458
- const [error, setError] = useState3(null);
459
- const [rateLimit, setRateLimit] = useState3(void 0);
460
- const [prevRateLimit, setPrevRateLimit] = useState3(void 0);
461
- const [density, setDensity] = useState3(2);
462
- const [prefsLoaded, setPrefsLoaded] = useState3(false);
463
- const [ownerContext, setOwnerContext] = useState3("personal");
464
- const [ownerAffiliations, setOwnerAffiliations] = useState3(["OWNER"]);
465
- const [orgSwitcherOpen, setOrgSwitcherOpen] = useState3(false);
466
- const [searchItems, setSearchItems] = useState3([]);
467
- const [searchEndCursor, setSearchEndCursor] = useState3(null);
468
- const [searchHasNextPage, setSearchHasNextPage] = useState3(false);
469
- const [searchTotalCount, setSearchTotalCount] = useState3(0);
470
- const [searchLoading, setSearchLoading] = useState3(false);
471
- const [deleteMode, setDeleteMode] = useState3(false);
472
- const [deleteTarget, setDeleteTarget] = useState3(null);
473
- const [deleteCode, setDeleteCode] = useState3("");
474
- const [typedCode, setTypedCode] = useState3("");
475
- const [deleting, setDeleting] = useState3(false);
476
- const [deleteError, setDeleteError] = useState3(null);
477
- const [deleteConfirmStage, setDeleteConfirmStage] = useState3(false);
478
- const [confirmFocus, setConfirmFocus] = useState3("delete");
479
- const [archiveMode, setArchiveMode] = useState3(false);
480
- const [archiveTarget, setArchiveTarget] = useState3(null);
481
- const [archiving, setArchiving] = useState3(false);
482
- const [archiveError, setArchiveError] = useState3(null);
483
- const [archiveFocus, setArchiveFocus] = useState3("confirm");
484
- const [syncMode, setSyncMode] = useState3(false);
485
- const [syncTarget, setSyncTarget] = useState3(null);
486
- const [syncing, setSyncing] = useState3(false);
487
- const [syncError, setSyncError] = useState3(null);
488
- const [syncFocus, setSyncFocus] = useState3("confirm");
489
- const [syncTrigger, setSyncTrigger] = useState3(false);
490
- const [infoMode, setInfoMode] = useState3(false);
491
- const [infoRepo, setInfoRepo] = useState3(null);
492
- const [logoutMode, setLogoutMode] = useState3(false);
493
- const [logoutFocus, setLogoutFocus] = useState3("confirm");
494
- const [logoutError, setLogoutError] = useState3(null);
839
+ const [items, setItems] = useState9([]);
840
+ const [cursor, setCursor] = useState9(0);
841
+ const [endCursor, setEndCursor] = useState9(null);
842
+ const [hasNextPage, setHasNextPage] = useState9(false);
843
+ const [totalCount, setTotalCount] = useState9(0);
844
+ const [loading, setLoading] = useState9(true);
845
+ const [sortingLoading, setSortingLoading] = useState9(false);
846
+ const [refreshing, setRefreshing] = useState9(false);
847
+ const [loadingMore, setLoadingMore] = useState9(false);
848
+ const [error, setError] = useState9(null);
849
+ const [rateLimit, setRateLimit] = useState9(void 0);
850
+ const [prevRateLimit, setPrevRateLimit] = useState9(void 0);
851
+ const [density, setDensity] = useState9(2);
852
+ const [prefsLoaded, setPrefsLoaded] = useState9(false);
853
+ const [ownerContext, setOwnerContext] = useState9("personal");
854
+ const [ownerAffiliations, setOwnerAffiliations] = useState9(["OWNER"]);
855
+ const [orgSwitcherOpen, setOrgSwitcherOpen] = useState9(false);
856
+ const [searchItems, setSearchItems] = useState9([]);
857
+ const [searchEndCursor, setSearchEndCursor] = useState9(null);
858
+ const [searchHasNextPage, setSearchHasNextPage] = useState9(false);
859
+ const [searchTotalCount, setSearchTotalCount] = useState9(0);
860
+ const [searchLoading, setSearchLoading] = useState9(false);
861
+ const [deleteMode, setDeleteMode] = useState9(false);
862
+ const [deleteTarget, setDeleteTarget] = useState9(null);
863
+ const [deleteCode, setDeleteCode] = useState9("");
864
+ const [typedCode, setTypedCode] = useState9("");
865
+ const [deleting, setDeleting] = useState9(false);
866
+ const [deleteError, setDeleteError] = useState9(null);
867
+ const [deleteConfirmStage, setDeleteConfirmStage] = useState9(false);
868
+ const [confirmFocus, setConfirmFocus] = useState9("delete");
869
+ const [archiveMode, setArchiveMode] = useState9(false);
870
+ const [archiveTarget, setArchiveTarget] = useState9(null);
871
+ const [archiving, setArchiving] = useState9(false);
872
+ const [archiveError, setArchiveError] = useState9(null);
873
+ const [archiveFocus, setArchiveFocus] = useState9("confirm");
874
+ const [syncMode, setSyncMode] = useState9(false);
875
+ const [syncTarget, setSyncTarget] = useState9(null);
876
+ const [syncing, setSyncing] = useState9(false);
877
+ const [syncError, setSyncError] = useState9(null);
878
+ const [syncFocus, setSyncFocus] = useState9("confirm");
879
+ const [syncTrigger, setSyncTrigger] = useState9(false);
880
+ const [infoMode, setInfoMode] = useState9(false);
881
+ const [infoRepo, setInfoRepo] = useState9(null);
882
+ const [logoutMode, setLogoutMode] = useState9(false);
883
+ const [logoutFocus, setLogoutFocus] = useState9("confirm");
884
+ const [logoutError, setLogoutError] = useState9(null);
885
+ const [visibilityMode, setVisibilityMode] = useState9(false);
886
+ const [hasInternalRepos, setHasInternalRepos] = useState9(false);
887
+ const [sortMode, setSortMode] = useState9(false);
495
888
  function closeArchiveModal() {
496
889
  setArchiveMode(false);
497
890
  setArchiveTarget(null);
@@ -614,11 +1007,13 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
614
1007
  setDeleteError("Failed to delete repository. Ensure delete_repo scope and admin permissions.");
615
1008
  }
616
1009
  }
617
- const [filter, setFilter] = useState3("");
618
- const [filterMode, setFilterMode] = useState3(false);
619
- const [sortKey, setSortKey] = useState3("updated");
620
- const [sortDir, setSortDir] = useState3("desc");
621
- const [forkTracking, setForkTracking] = useState3(true);
1010
+ const [filter, setFilter] = useState9("");
1011
+ const [filterMode, setFilterMode] = useState9(false);
1012
+ const [sortKey, setSortKey] = useState9("updated");
1013
+ const [sortDir, setSortDir] = useState9("desc");
1014
+ const [forkTracking, setForkTracking] = useState9(true);
1015
+ const [visibilityFilter, setVisibilityFilter] = useState9("all");
1016
+ const previousVisibilityFilter = useRef("all");
622
1017
  const sortFieldMap = {
623
1018
  "updated": "UPDATED_AT",
624
1019
  "pushed": "PUSHED_AT",
@@ -639,6 +1034,9 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
639
1034
  direction: sortDir.toUpperCase()
640
1035
  };
641
1036
  const orgLogin2 = ownerContext !== "personal" ? ownerContext.login : void 0;
1037
+ let privacy;
1038
+ if (visibilityFilter === "public") privacy = "PUBLIC";
1039
+ else if (visibilityFilter === "private") privacy = "PRIVATE";
642
1040
  const page = await fetchViewerReposPageUnified(
643
1041
  token,
644
1042
  PAGE_SIZE,
@@ -647,12 +1045,16 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
647
1045
  overrideForkTracking ?? forkTracking,
648
1046
  policy ?? (after ? "network-only" : "cache-first"),
649
1047
  ownerAffiliations,
650
- orgLogin2
1048
+ orgLogin2,
1049
+ privacy
651
1050
  );
652
1051
  setItems((prev) => reset || !after ? page.nodes : [...prev, ...page.nodes]);
653
1052
  setEndCursor(page.endCursor);
654
1053
  setHasNextPage(page.hasNextPage);
655
1054
  setTotalCount(page.totalCount);
1055
+ if (page.nodes.some((repo) => repo.visibility === "INTERNAL")) {
1056
+ setHasInternalRepos(true);
1057
+ }
656
1058
  if (!after) {
657
1059
  try {
658
1060
  const key = makeApolloKey({
@@ -738,7 +1140,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
738
1140
  setSearchLoading(false);
739
1141
  }
740
1142
  };
741
- useEffect3(() => {
1143
+ useEffect6(() => {
742
1144
  const ui = getUIPrefs();
743
1145
  if (ui.density !== void 0) setDensity(ui.density);
744
1146
  if (ui.sortKey && ["updated", "pushed", "name", "stars"].includes(ui.sortKey)) {
@@ -749,6 +1151,9 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
749
1151
  }
750
1152
  if (ui.forkTracking !== void 0) setForkTracking(ui.forkTracking);
751
1153
  else setForkTracking(true);
1154
+ if (ui.visibilityFilter && ["all", "public", "private", "internal"].includes(ui.visibilityFilter)) {
1155
+ setVisibilityFilter(ui.visibilityFilter);
1156
+ }
752
1157
  if (ui.ownerContext) {
753
1158
  setOwnerContext(ui.ownerContext);
754
1159
  if (onOrgContextChange) {
@@ -760,7 +1165,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
760
1165
  }
761
1166
  setPrefsLoaded(true);
762
1167
  }, [onOrgContextChange]);
763
- useEffect3(() => {
1168
+ useEffect6(() => {
764
1169
  if (!prefsLoaded) return;
765
1170
  let policy = "cache-first";
766
1171
  const orgLogin2 = ownerContext !== "personal" ? ownerContext.login : void 0;
@@ -780,7 +1185,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
780
1185
  setCursor(0);
781
1186
  fetchPage(null, true, false, void 0, policy);
782
1187
  }, [client, prefsLoaded, ownerContext, ownerAffiliations]);
783
- useEffect3(() => {
1188
+ useEffect6(() => {
784
1189
  if (!searchActive) {
785
1190
  if (items.length > 0) {
786
1191
  let policy = "cache-first";
@@ -819,7 +1224,24 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
819
1224
  }
820
1225
  }
821
1226
  }, [sortKey, sortDir]);
822
- useEffect3(() => {
1227
+ useEffect6(() => {
1228
+ if (visibilityFilter !== "all" || previousVisibilityFilter.current && previousVisibilityFilter.current !== visibilityFilter) {
1229
+ if (!searchActive) {
1230
+ if (items.length > 0) {
1231
+ let policy = "network-only";
1232
+ const orgLogin2 = ownerContext !== "personal" ? ownerContext.login : void 0;
1233
+ fetchPage(null, true, true, void 0, policy);
1234
+ }
1235
+ } else {
1236
+ if (!searchLoading && filter.trim().length >= 3) {
1237
+ let policy = "network-only";
1238
+ fetchSearchPage(null, true, policy);
1239
+ }
1240
+ }
1241
+ }
1242
+ previousVisibilityFilter.current = visibilityFilter;
1243
+ }, [visibilityFilter]);
1244
+ useEffect6(() => {
823
1245
  if (viewerLogin && searchActive && !searchLoading && searchItems.length === 0) {
824
1246
  let policy = "cache-first";
825
1247
  try {
@@ -839,7 +1261,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
839
1261
  fetchSearchPage(null, true, policy);
840
1262
  }
841
1263
  }, [viewerLogin]);
842
- useInput2((input, key) => {
1264
+ useInput9((input, key) => {
843
1265
  if (orgSwitcherOpen) {
844
1266
  return;
845
1267
  }
@@ -951,6 +1373,12 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
951
1373
  }
952
1374
  return;
953
1375
  }
1376
+ if (visibilityMode) {
1377
+ return;
1378
+ }
1379
+ if (sortMode) {
1380
+ return;
1381
+ }
954
1382
  if (filterMode) {
955
1383
  if (key.escape) {
956
1384
  setFilterMode(false);
@@ -999,7 +1427,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
999
1427
  const repo = visibleItems[cursor];
1000
1428
  if (repo) openInBrowser(`https://github.com/${repo.nameWithOwner}`);
1001
1429
  }
1002
- if (key.delete && !key.backspace || key.backspace && key.ctrl) {
1430
+ if (key.delete || key.backspace) {
1003
1431
  const repo = visibleItems[cursor];
1004
1432
  if (repo) {
1005
1433
  setDeleteTarget(repo);
@@ -1104,12 +1532,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1104
1532
  return;
1105
1533
  }
1106
1534
  if (input && input.toUpperCase() === "S") {
1107
- const order = ["updated", "pushed", "name", "stars"];
1108
- const idx = order.indexOf(sortKey);
1109
- const newSortKey = order[(idx + 1) % order.length];
1110
- setSortKey(newSortKey);
1111
- setCursor(0);
1112
- storeUIPrefs({ sortKey: newSortKey });
1535
+ setSortMode(true);
1113
1536
  return;
1114
1537
  }
1115
1538
  if (input && input.toUpperCase() === "D") {
@@ -1149,14 +1572,24 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1149
1572
  });
1150
1573
  return;
1151
1574
  }
1575
+ if (input && input.toUpperCase() === "V") {
1576
+ setVisibilityMode(true);
1577
+ return;
1578
+ }
1152
1579
  });
1153
1580
  const filtered = useMemo(() => {
1581
+ let result = items;
1582
+ if (visibilityFilter === "internal") {
1583
+ result = result.filter((r) => r.visibility === "INTERNAL");
1584
+ }
1154
1585
  const q = filter.trim().toLowerCase();
1155
- if (!q) return items;
1156
- return items.filter(
1157
- (r) => r.nameWithOwner.toLowerCase().includes(q) || (r.description ? r.description.toLowerCase().includes(q) : false)
1158
- );
1159
- }, [items, filter]);
1586
+ if (q) {
1587
+ result = result.filter(
1588
+ (r) => r.nameWithOwner.toLowerCase().includes(q) || (r.description ? r.description.toLowerCase().includes(q) : false)
1589
+ );
1590
+ }
1591
+ return result;
1592
+ }, [items, filter, visibilityFilter]);
1160
1593
  const filteredAndSorted = useMemo(() => {
1161
1594
  const arr = [...filtered];
1162
1595
  const dir = sortDir === "asc" ? 1 : -1;
@@ -1179,12 +1612,12 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1179
1612
  }, [filtered, sortKey, sortDir]);
1180
1613
  const searchActive = filter.trim().length >= 3;
1181
1614
  const visibleItems = searchActive ? searchItems : filteredAndSorted;
1182
- useEffect3(() => {
1615
+ useEffect6(() => {
1183
1616
  if (searchActive) {
1184
1617
  addDebugMessage(`[State] searchActive=${searchActive}, searchItems=${searchItems.length}, visibleItems=${visibleItems.length}, filter="${filter}"`);
1185
1618
  }
1186
1619
  }, [searchActive, searchItems.length, visibleItems.length, filter]);
1187
- useEffect3(() => {
1620
+ useEffect6(() => {
1188
1621
  setCursor((c) => Math.min(c, Math.max(0, (searchActive ? searchItems.length : items.length) - 1)));
1189
1622
  }, [searchActive, searchItems.length, items.length]);
1190
1623
  const headerHeight = 2;
@@ -1205,7 +1638,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1205
1638
  const end = Math.min(total, start + visibleRepos + buffer);
1206
1639
  return { start, end };
1207
1640
  }, [visibleItems.length, cursor, listHeight, spacingLines]);
1208
- useEffect3(() => {
1641
+ useEffect6(() => {
1209
1642
  const prefetchThreshold = Math.floor(visibleItems.length * 0.8);
1210
1643
  const nearEnd = visibleItems.length > 0 && cursor >= prefetchThreshold;
1211
1644
  if (searchActive) {
@@ -1226,89 +1659,89 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1226
1659
  exec(cmd);
1227
1660
  }
1228
1661
  const lowRate = rateLimit && rateLimit.remaining <= Math.ceil(rateLimit.limit * 0.1);
1229
- const modalOpen = deleteMode || archiveMode || syncMode || logoutMode || infoMode;
1230
- const headerBar = useMemo(() => /* @__PURE__ */ jsxs5(Box5, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: [
1231
- /* @__PURE__ */ jsxs5(Box5, { flexDirection: "row", gap: 1, children: [
1232
- /* @__PURE__ */ jsx6(Text6, { bold: true, color: modalOpen ? "gray" : void 0, dimColor: modalOpen ? true : void 0, children: " Repositories" }),
1233
- /* @__PURE__ */ jsxs5(Text6, { color: "gray", children: [
1662
+ const modalOpen = deleteMode || archiveMode || syncMode || logoutMode || infoMode || visibilityMode;
1663
+ const headerBar = useMemo(() => /* @__PURE__ */ jsxs12(Box12, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: [
1664
+ /* @__PURE__ */ jsxs12(Box12, { flexDirection: "row", gap: 1, children: [
1665
+ /* @__PURE__ */ jsx13(Text13, { bold: true, color: modalOpen ? "gray" : void 0, dimColor: modalOpen ? true : void 0, children: " Repositories" }),
1666
+ /* @__PURE__ */ jsxs12(Text13, { color: "gray", children: [
1234
1667
  "(",
1235
1668
  visibleItems.length,
1236
1669
  "/",
1237
1670
  searchActive ? searchTotalCount : totalCount,
1238
1671
  ")"
1239
1672
  ] }),
1240
- (loading || searchLoading) && /* @__PURE__ */ jsx6(Box5, { width: 2, flexShrink: 0, flexGrow: 0, marginLeft: 1, children: /* @__PURE__ */ jsx6(Text6, { color: "yellow", children: /* @__PURE__ */ jsx6(SlowSpinner, {}) }) })
1673
+ (loading || searchLoading) && /* @__PURE__ */ jsx13(Box12, { width: 2, flexShrink: 0, flexGrow: 0, marginLeft: 1, children: /* @__PURE__ */ jsx13(Text13, { color: "yellow", children: /* @__PURE__ */ jsx13(SlowSpinner, {}) }) })
1241
1674
  ] }),
1242
- rateLimit && /* @__PURE__ */ jsxs5(Text6, { color: lowRate ? "yellow" : "gray", children: [
1675
+ rateLimit && /* @__PURE__ */ jsxs12(Text13, { color: lowRate ? "yellow" : "gray", children: [
1243
1676
  "API: ",
1244
1677
  rateLimit.remaining,
1245
1678
  "/",
1246
1679
  rateLimit.limit,
1247
- prevRateLimit !== void 0 && prevRateLimit !== rateLimit.remaining && /* @__PURE__ */ jsx6(Text6, { color: rateLimit.remaining < prevRateLimit ? "red" : "green", children: ` (${rateLimit.remaining - prevRateLimit > 0 ? "+" : ""}${rateLimit.remaining - prevRateLimit})` })
1680
+ prevRateLimit !== void 0 && prevRateLimit !== rateLimit.remaining && /* @__PURE__ */ jsx13(Text13, { color: rateLimit.remaining < prevRateLimit ? "red" : "green", children: ` (${rateLimit.remaining - prevRateLimit > 0 ? "+" : ""}${rateLimit.remaining - prevRateLimit})` })
1248
1681
  ] })
1249
1682
  ] }), [visibleItems.length, searchActive, searchTotalCount, totalCount, loading, searchLoading, rateLimit, lowRate, modalOpen, prevRateLimit]);
1250
1683
  if (error) {
1251
- return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", height: availableHeight, children: [
1252
- /* @__PURE__ */ jsx6(Box5, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs5(Box5, { flexDirection: "row", gap: 1, children: [
1253
- /* @__PURE__ */ jsx6(Text6, { bold: true, children: " Repositories" }),
1254
- /* @__PURE__ */ jsx6(Text6, { color: "red", children: "(Error)" })
1684
+ return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", height: availableHeight, children: [
1685
+ /* @__PURE__ */ jsx13(Box12, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs12(Box12, { flexDirection: "row", gap: 1, children: [
1686
+ /* @__PURE__ */ jsx13(Text13, { bold: true, children: " Repositories" }),
1687
+ /* @__PURE__ */ jsx13(Text13, { color: "red", children: "(Error)" })
1255
1688
  ] }) }),
1256
- /* @__PURE__ */ jsx6(Box5, { borderStyle: "single", borderColor: "red", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx6(Box5, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", alignItems: "center", children: [
1257
- /* @__PURE__ */ jsx6(Text6, { color: "red", children: error }),
1258
- /* @__PURE__ */ jsx6(Box5, { marginTop: 1, children: /* @__PURE__ */ jsx6(Text6, { color: "gray", dimColor: true, children: "Press 'r' to retry or 'q' to quit" }) })
1689
+ /* @__PURE__ */ jsx13(Box12, { borderStyle: "single", borderColor: "red", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx13(Box12, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", alignItems: "center", children: [
1690
+ /* @__PURE__ */ jsx13(Text13, { color: "red", children: error }),
1691
+ /* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx13(Text13, { color: "gray", dimColor: true, children: "Press 'r' to retry or 'q' to quit" }) })
1259
1692
  ] }) }) }),
1260
- /* @__PURE__ */ jsx6(Box5, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx6(Text6, { color: "gray", children: "Press 'r' to retry \u2022 'q' to quit" }) })
1693
+ /* @__PURE__ */ jsx13(Box12, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx13(Text13, { color: "gray", children: "Press 'r' to retry \u2022 'q' to quit" }) })
1261
1694
  ] });
1262
1695
  }
1263
1696
  if (loading && items.length === 0 || sortingLoading) {
1264
- return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", height: availableHeight, children: [
1265
- /* @__PURE__ */ jsx6(Box5, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs5(Box5, { flexDirection: "row", gap: 1, children: [
1266
- /* @__PURE__ */ jsx6(Text6, { bold: true, children: " Repositories" }),
1267
- /* @__PURE__ */ jsx6(Text6, { color: "gray", children: "(Loading...)" })
1697
+ return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", height: availableHeight, children: [
1698
+ /* @__PURE__ */ jsx13(Box12, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs12(Box12, { flexDirection: "row", gap: 1, children: [
1699
+ /* @__PURE__ */ jsx13(Text13, { bold: true, children: " Repositories" }),
1700
+ /* @__PURE__ */ jsx13(Text13, { color: "gray", children: "(Loading...)" })
1268
1701
  ] }) }),
1269
- /* @__PURE__ */ jsx6(Box5, { borderStyle: "single", borderColor: "yellow", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx6(Box5, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx6(Box5, { flexDirection: "column", alignItems: "center", children: /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", alignItems: "center", children: [
1270
- /* @__PURE__ */ jsxs5(Box5, { height: 1, flexDirection: "row", children: [
1271
- /* @__PURE__ */ jsx6(Box5, { width: 2, flexShrink: 0, flexGrow: 0, children: /* @__PURE__ */ jsx6(Text6, { color: "cyan", children: /* @__PURE__ */ jsx6(SlowSpinner, {}) }) }),
1272
- /* @__PURE__ */ jsx6(Text6, { color: "cyan", children: refreshing ? "Refreshing..." : sortingLoading ? "Applying sort..." : "Loading repositories..." })
1702
+ /* @__PURE__ */ jsx13(Box12, { borderStyle: "single", borderColor: "yellow", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx13(Box12, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx13(Box12, { flexDirection: "column", alignItems: "center", children: /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", alignItems: "center", children: [
1703
+ /* @__PURE__ */ jsxs12(Box12, { height: 1, flexDirection: "row", children: [
1704
+ /* @__PURE__ */ jsx13(Box12, { width: 2, flexShrink: 0, flexGrow: 0, children: /* @__PURE__ */ jsx13(Text13, { color: "cyan", children: /* @__PURE__ */ jsx13(SlowSpinner, {}) }) }),
1705
+ /* @__PURE__ */ jsx13(Text13, { color: "cyan", children: refreshing ? "Refreshing..." : sortingLoading ? "Applying sort..." : "Loading repositories..." })
1273
1706
  ] }),
1274
- /* @__PURE__ */ jsx6(Box5, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx6(Text6, { color: "gray", children: refreshing ? "Fetching latest repository data" : sortingLoading ? `Sorting by ${sortKey} (${sortDir === "asc" ? "ascending" : "descending"})` : "Fetching your GitHub repositories" }) })
1707
+ /* @__PURE__ */ jsx13(Box12, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx13(Text13, { color: "gray", children: refreshing ? "Fetching latest repository data" : sortingLoading ? `Sorting by ${sortKey} (${sortDir === "asc" ? "ascending" : "descending"})` : "Fetching your GitHub repositories" }) })
1275
1708
  ] }) }) }) }),
1276
- /* @__PURE__ */ jsx6(Box5, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx6(Text6, { color: "gray", children: "Please wait..." }) })
1709
+ /* @__PURE__ */ jsx13(Box12, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx13(Text13, { color: "gray", children: "Please wait..." }) })
1277
1710
  ] });
1278
1711
  }
1279
- return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", height: availableHeight, children: [
1712
+ return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", height: availableHeight, children: [
1280
1713
  headerBar,
1281
- /* @__PURE__ */ jsx6(Box5, { borderStyle: "single", borderColor: modalOpen ? "gray" : "yellow", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: deleteMode && deleteTarget ? (
1714
+ /* @__PURE__ */ jsx13(Box12, { borderStyle: "single", borderColor: modalOpen ? "gray" : "yellow", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: deleteMode && deleteTarget ? (
1282
1715
  // Centered modal; hide list content while modal is open
1283
- /* @__PURE__ */ jsx6(Box5, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", borderStyle: "round", borderColor: "red", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
1284
- /* @__PURE__ */ jsx6(Text6, { bold: true, children: "Delete Confirmation" }),
1285
- /* @__PURE__ */ jsx6(Text6, { color: "red", children: "\u26A0\uFE0F Delete repository?" }),
1286
- /* @__PURE__ */ jsx6(Box5, { height: 2, children: /* @__PURE__ */ jsx6(Text6, { children: " " }) }),
1716
+ /* @__PURE__ */ jsx13(Box12, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", borderStyle: "round", borderColor: "red", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
1717
+ /* @__PURE__ */ jsx13(Text13, { bold: true, children: "Delete Confirmation" }),
1718
+ /* @__PURE__ */ jsx13(Text13, { color: "red", children: "\u26A0\uFE0F Delete repository?" }),
1719
+ /* @__PURE__ */ jsx13(Box12, { height: 2, children: /* @__PURE__ */ jsx13(Text13, { children: " " }) }),
1287
1720
  (() => {
1288
1721
  const langName = deleteTarget.primaryLanguage?.name || "";
1289
1722
  const langColor = deleteTarget.primaryLanguage?.color || "#666666";
1290
1723
  let line1 = "";
1291
- line1 += chalk3.white(deleteTarget.nameWithOwner);
1292
- if (deleteTarget.isPrivate) line1 += chalk3.yellow(" Private");
1293
- if (deleteTarget.isArchived) line1 += chalk3.gray.dim(" Archived");
1294
- if (deleteTarget.isFork && deleteTarget.parent) line1 += chalk3.blue(` Fork of ${deleteTarget.parent.nameWithOwner}`);
1724
+ line1 += chalk10.white(deleteTarget.nameWithOwner);
1725
+ if (deleteTarget.isPrivate) line1 += chalk10.yellow(" Private");
1726
+ if (deleteTarget.isArchived) line1 += chalk10.gray.dim(" Archived");
1727
+ if (deleteTarget.isFork && deleteTarget.parent) line1 += chalk10.blue(` Fork of ${deleteTarget.parent.nameWithOwner}`);
1295
1728
  let line2 = "";
1296
- if (langName) line2 += chalk3.hex(langColor)("\u25CF ") + chalk3.gray(`${langName} `);
1297
- line2 += chalk3.gray(`\u2605 ${deleteTarget.stargazerCount} \u2442 ${deleteTarget.forkCount} Updated ${formatDate(deleteTarget.updatedAt)}`);
1298
- return /* @__PURE__ */ jsxs5(Fragment2, { children: [
1299
- /* @__PURE__ */ jsx6(Text6, { children: line1 }),
1300
- /* @__PURE__ */ jsx6(Text6, { children: line2 })
1729
+ if (langName) line2 += chalk10.hex(langColor)("\u25CF ") + chalk10.gray(`${langName} `);
1730
+ line2 += chalk10.gray(`\u2605 ${deleteTarget.stargazerCount} \u2442 ${deleteTarget.forkCount} Updated ${formatDate(deleteTarget.updatedAt)}`);
1731
+ return /* @__PURE__ */ jsxs12(Fragment5, { children: [
1732
+ /* @__PURE__ */ jsx13(Text13, { children: line1 }),
1733
+ /* @__PURE__ */ jsx13(Text13, { children: line2 })
1301
1734
  ] });
1302
1735
  })(),
1303
- /* @__PURE__ */ jsx6(Box5, { marginTop: 1, children: /* @__PURE__ */ jsxs5(Text6, { children: [
1736
+ /* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsxs12(Text13, { children: [
1304
1737
  "Type ",
1305
- /* @__PURE__ */ jsx6(Text6, { color: "yellow", bold: true, children: deleteCode }),
1738
+ /* @__PURE__ */ jsx13(Text13, { color: "yellow", bold: true, children: deleteCode }),
1306
1739
  " to confirm."
1307
1740
  ] }) }),
1308
- !deleteConfirmStage && /* @__PURE__ */ jsxs5(Box5, { marginTop: 1, children: [
1309
- /* @__PURE__ */ jsx6(Text6, { children: "Confirm code: " }),
1310
- /* @__PURE__ */ jsx6(
1311
- TextInput2,
1741
+ !deleteConfirmStage && /* @__PURE__ */ jsxs12(Box12, { marginTop: 1, children: [
1742
+ /* @__PURE__ */ jsx13(Text13, { children: "Confirm code: " }),
1743
+ /* @__PURE__ */ jsx13(
1744
+ TextInput3,
1312
1745
  {
1313
1746
  value: typedCode,
1314
1747
  onChange: (v) => {
@@ -1334,11 +1767,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1334
1767
  }
1335
1768
  )
1336
1769
  ] }),
1337
- deleteConfirmStage && /* @__PURE__ */ jsxs5(Box5, { marginTop: 1, flexDirection: "column", children: [
1338
- /* @__PURE__ */ jsx6(Text6, { color: "red", children: "This action will permanently delete the repository. This cannot be undone." }),
1339
- /* @__PURE__ */ jsxs5(Box5, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
1340
- /* @__PURE__ */ jsx6(
1341
- Box5,
1770
+ deleteConfirmStage && /* @__PURE__ */ jsxs12(Box12, { marginTop: 1, flexDirection: "column", children: [
1771
+ /* @__PURE__ */ jsx13(Text13, { color: "red", children: "This action will permanently delete the repository. This cannot be undone." }),
1772
+ /* @__PURE__ */ jsxs12(Box12, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
1773
+ /* @__PURE__ */ jsx13(
1774
+ Box12,
1342
1775
  {
1343
1776
  borderStyle: "round",
1344
1777
  borderColor: "red",
@@ -1347,11 +1780,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1347
1780
  alignItems: "center",
1348
1781
  justifyContent: "center",
1349
1782
  flexDirection: "column",
1350
- children: /* @__PURE__ */ jsx6(Text6, { children: confirmFocus === "delete" ? chalk3.bgRed.white.bold(" Delete ") : chalk3.red.bold("Delete") })
1783
+ children: /* @__PURE__ */ jsx13(Text13, { children: confirmFocus === "delete" ? chalk10.bgRed.white.bold(" Delete ") : chalk10.red.bold("Delete") })
1351
1784
  }
1352
1785
  ),
1353
- /* @__PURE__ */ jsx6(
1354
- Box5,
1786
+ /* @__PURE__ */ jsx13(
1787
+ Box12,
1355
1788
  {
1356
1789
  borderStyle: "round",
1357
1790
  borderColor: confirmFocus === "cancel" ? "white" : "gray",
@@ -1360,17 +1793,17 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1360
1793
  alignItems: "center",
1361
1794
  justifyContent: "center",
1362
1795
  flexDirection: "column",
1363
- children: /* @__PURE__ */ jsx6(Text6, { children: confirmFocus === "cancel" ? chalk3.bgGray.white.bold(" Cancel ") : chalk3.gray.bold("Cancel") })
1796
+ children: /* @__PURE__ */ jsx13(Text13, { children: confirmFocus === "cancel" ? chalk10.bgGray.white.bold(" Cancel ") : chalk10.gray.bold("Cancel") })
1364
1797
  }
1365
1798
  )
1366
1799
  ] }),
1367
- /* @__PURE__ */ jsx6(Box5, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs5(Text6, { color: "gray", children: [
1800
+ /* @__PURE__ */ jsx13(Box12, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs12(Text13, { color: "gray", children: [
1368
1801
  "Press Enter to ",
1369
1802
  confirmFocus === "delete" ? "Delete" : "Cancel",
1370
1803
  " | Y to Delete | C to Cancel"
1371
1804
  ] }) }),
1372
- /* @__PURE__ */ jsx6(Box5, { marginTop: 1, children: /* @__PURE__ */ jsx6(
1373
- TextInput2,
1805
+ /* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx13(
1806
+ TextInput3,
1374
1807
  {
1375
1808
  value: "",
1376
1809
  onChange: () => {
@@ -1383,18 +1816,18 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1383
1816
  }
1384
1817
  ) })
1385
1818
  ] }),
1386
- deleteError && /* @__PURE__ */ jsx6(Box5, { marginTop: 1, children: /* @__PURE__ */ jsx6(Text6, { color: "magenta", children: deleteError }) }),
1387
- deleting && /* @__PURE__ */ jsx6(Box5, { marginTop: 1, children: /* @__PURE__ */ jsx6(Text6, { color: "yellow", children: "Deleting..." }) })
1819
+ deleteError && /* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx13(Text13, { color: "magenta", children: deleteError }) }),
1820
+ deleting && /* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx13(Text13, { color: "yellow", children: "Deleting..." }) })
1388
1821
  ] }) })
1389
- ) : archiveMode && archiveTarget ? /* @__PURE__ */ jsx6(Box5, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", borderStyle: "round", borderColor: archiveTarget.isArchived ? "green" : "yellow", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
1390
- /* @__PURE__ */ jsx6(Text6, { bold: true, children: archiveTarget.isArchived ? "Unarchive Confirmation" : "Archive Confirmation" }),
1391
- /* @__PURE__ */ jsx6(Text6, { color: archiveTarget.isArchived ? "green" : "yellow", children: archiveTarget.isArchived ? "\u21BA Unarchive repository?" : "\u26A0\uFE0F Archive repository?" }),
1392
- /* @__PURE__ */ jsx6(Box5, { height: 1, children: /* @__PURE__ */ jsx6(Text6, { children: " " }) }),
1393
- /* @__PURE__ */ jsx6(Text6, { children: archiveTarget.nameWithOwner }),
1394
- /* @__PURE__ */ jsx6(Box5, { marginTop: 1, children: /* @__PURE__ */ jsx6(Text6, { children: archiveTarget.isArchived ? "This will make the repository active again." : "This will make the repository read-only." }) }),
1395
- /* @__PURE__ */ jsxs5(Box5, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
1396
- /* @__PURE__ */ jsx6(
1397
- Box5,
1822
+ ) : archiveMode && archiveTarget ? /* @__PURE__ */ jsx13(Box12, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", borderStyle: "round", borderColor: archiveTarget.isArchived ? "green" : "yellow", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
1823
+ /* @__PURE__ */ jsx13(Text13, { bold: true, children: archiveTarget.isArchived ? "Unarchive Confirmation" : "Archive Confirmation" }),
1824
+ /* @__PURE__ */ jsx13(Text13, { color: archiveTarget.isArchived ? "green" : "yellow", children: archiveTarget.isArchived ? "\u21BA Unarchive repository?" : "\u26A0\uFE0F Archive repository?" }),
1825
+ /* @__PURE__ */ jsx13(Box12, { height: 1, children: /* @__PURE__ */ jsx13(Text13, { children: " " }) }),
1826
+ /* @__PURE__ */ jsx13(Text13, { children: archiveTarget.nameWithOwner }),
1827
+ /* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx13(Text13, { children: archiveTarget.isArchived ? "This will make the repository active again." : "This will make the repository read-only." }) }),
1828
+ /* @__PURE__ */ jsxs12(Box12, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
1829
+ /* @__PURE__ */ jsx13(
1830
+ Box12,
1398
1831
  {
1399
1832
  borderStyle: "round",
1400
1833
  borderColor: archiveTarget.isArchived ? "green" : "yellow",
@@ -1403,11 +1836,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1403
1836
  alignItems: "center",
1404
1837
  justifyContent: "center",
1405
1838
  flexDirection: "column",
1406
- children: /* @__PURE__ */ jsx6(Text6, { children: archiveFocus === "confirm" ? chalk3.bgGreen.white.bold(` ${archiveTarget.isArchived ? "Unarchive" : "Archive"} `) : chalk3.bold[archiveTarget.isArchived ? "green" : "yellow"](archiveTarget.isArchived ? "Unarchive" : "Archive") })
1839
+ children: /* @__PURE__ */ jsx13(Text13, { children: archiveFocus === "confirm" ? chalk10.bgGreen.white.bold(` ${archiveTarget.isArchived ? "Unarchive" : "Archive"} `) : chalk10.bold[archiveTarget.isArchived ? "green" : "yellow"](archiveTarget.isArchived ? "Unarchive" : "Archive") })
1407
1840
  }
1408
1841
  ),
1409
- /* @__PURE__ */ jsx6(
1410
- Box5,
1842
+ /* @__PURE__ */ jsx13(
1843
+ Box12,
1411
1844
  {
1412
1845
  borderStyle: "round",
1413
1846
  borderColor: archiveFocus === "cancel" ? "white" : "gray",
@@ -1416,19 +1849,19 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1416
1849
  alignItems: "center",
1417
1850
  justifyContent: "center",
1418
1851
  flexDirection: "column",
1419
- children: /* @__PURE__ */ jsx6(Text6, { children: archiveFocus === "cancel" ? chalk3.bgGray.white.bold(" Cancel ") : chalk3.gray.bold("Cancel") })
1852
+ children: /* @__PURE__ */ jsx13(Text13, { children: archiveFocus === "cancel" ? chalk10.bgGray.white.bold(" Cancel ") : chalk10.gray.bold("Cancel") })
1420
1853
  }
1421
1854
  )
1422
1855
  ] }),
1423
- /* @__PURE__ */ jsx6(Box5, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs5(Text6, { color: "gray", children: [
1856
+ /* @__PURE__ */ jsx13(Box12, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs12(Text13, { color: "gray", children: [
1424
1857
  "Press Enter to ",
1425
1858
  archiveFocus === "confirm" ? archiveTarget.isArchived ? "Unarchive" : "Archive" : "Cancel",
1426
1859
  " | Y to ",
1427
1860
  archiveTarget.isArchived ? "Unarchive" : "Archive",
1428
1861
  " | C to Cancel"
1429
1862
  ] }) }),
1430
- /* @__PURE__ */ jsx6(Box5, { marginTop: 1, children: /* @__PURE__ */ jsx6(
1431
- TextInput2,
1863
+ /* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx13(
1864
+ TextInput3,
1432
1865
  {
1433
1866
  value: "",
1434
1867
  onChange: () => {
@@ -1442,21 +1875,21 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1442
1875
  }
1443
1876
  }
1444
1877
  ) }),
1445
- archiveError && /* @__PURE__ */ jsx6(Box5, { marginTop: 1, children: /* @__PURE__ */ jsx6(Text6, { color: "magenta", children: archiveError }) }),
1446
- archiving && /* @__PURE__ */ jsx6(Box5, { marginTop: 1, children: /* @__PURE__ */ jsx6(Text6, { color: "yellow", children: archiveTarget.isArchived ? "Unarchiving..." : "Archiving..." }) })
1447
- ] }) }) : syncMode && syncTarget ? /* @__PURE__ */ jsx6(Box5, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", borderStyle: "round", borderColor: "blue", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
1448
- /* @__PURE__ */ jsx6(Text6, { bold: true, children: "Sync Fork Confirmation" }),
1449
- /* @__PURE__ */ jsx6(Text6, { color: "blue", children: "\u27F2 Sync fork with upstream?" }),
1450
- /* @__PURE__ */ jsx6(Box5, { height: 1, children: /* @__PURE__ */ jsx6(Text6, { children: " " }) }),
1451
- /* @__PURE__ */ jsx6(Text6, { children: syncTarget.nameWithOwner }),
1452
- syncTarget.parent && /* @__PURE__ */ jsxs5(Text6, { color: "gray", children: [
1878
+ archiveError && /* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx13(Text13, { color: "magenta", children: archiveError }) }),
1879
+ archiving && /* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx13(Text13, { color: "yellow", children: archiveTarget.isArchived ? "Unarchiving..." : "Archiving..." }) })
1880
+ ] }) }) : syncMode && syncTarget ? /* @__PURE__ */ jsx13(Box12, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", borderStyle: "round", borderColor: "blue", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
1881
+ /* @__PURE__ */ jsx13(Text13, { bold: true, children: "Sync Fork Confirmation" }),
1882
+ /* @__PURE__ */ jsx13(Text13, { color: "blue", children: "\u27F2 Sync fork with upstream?" }),
1883
+ /* @__PURE__ */ jsx13(Box12, { height: 1, children: /* @__PURE__ */ jsx13(Text13, { children: " " }) }),
1884
+ /* @__PURE__ */ jsx13(Text13, { children: syncTarget.nameWithOwner }),
1885
+ syncTarget.parent && /* @__PURE__ */ jsxs12(Text13, { color: "gray", children: [
1453
1886
  "Upstream: ",
1454
1887
  syncTarget.parent.nameWithOwner
1455
1888
  ] }),
1456
- /* @__PURE__ */ jsx6(Box5, { marginTop: 1, children: /* @__PURE__ */ jsx6(Text6, { children: "This will merge upstream changes into your fork." }) }),
1457
- /* @__PURE__ */ jsxs5(Box5, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
1458
- /* @__PURE__ */ jsx6(
1459
- Box5,
1889
+ /* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx13(Text13, { children: "This will merge upstream changes into your fork." }) }),
1890
+ /* @__PURE__ */ jsxs12(Box12, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
1891
+ /* @__PURE__ */ jsx13(
1892
+ Box12,
1460
1893
  {
1461
1894
  borderStyle: "round",
1462
1895
  borderColor: "blue",
@@ -1465,11 +1898,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1465
1898
  alignItems: "center",
1466
1899
  justifyContent: "center",
1467
1900
  flexDirection: "column",
1468
- children: /* @__PURE__ */ jsx6(Text6, { children: syncFocus === "confirm" ? chalk3.bgBlue.white.bold(" Sync ") : chalk3.blue.bold("Sync") })
1901
+ children: /* @__PURE__ */ jsx13(Text13, { children: syncFocus === "confirm" ? chalk10.bgBlue.white.bold(" Sync ") : chalk10.blue.bold("Sync") })
1469
1902
  }
1470
1903
  ),
1471
- /* @__PURE__ */ jsx6(
1472
- Box5,
1904
+ /* @__PURE__ */ jsx13(
1905
+ Box12,
1473
1906
  {
1474
1907
  borderStyle: "round",
1475
1908
  borderColor: syncFocus === "cancel" ? "white" : "gray",
@@ -1478,17 +1911,17 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1478
1911
  alignItems: "center",
1479
1912
  justifyContent: "center",
1480
1913
  flexDirection: "column",
1481
- children: /* @__PURE__ */ jsx6(Text6, { children: syncFocus === "cancel" ? chalk3.bgGray.white.bold(" Cancel ") : chalk3.gray.bold("Cancel") })
1914
+ children: /* @__PURE__ */ jsx13(Text13, { children: syncFocus === "cancel" ? chalk10.bgGray.white.bold(" Cancel ") : chalk10.gray.bold("Cancel") })
1482
1915
  }
1483
1916
  )
1484
1917
  ] }),
1485
- /* @__PURE__ */ jsx6(Box5, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs5(Text6, { color: "gray", children: [
1918
+ /* @__PURE__ */ jsx13(Box12, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs12(Text13, { color: "gray", children: [
1486
1919
  "Press Enter to ",
1487
1920
  syncFocus === "confirm" ? "Sync" : "Cancel",
1488
1921
  " | Y to Sync | C to Cancel"
1489
1922
  ] }) }),
1490
- /* @__PURE__ */ jsx6(Box5, { marginTop: 1, children: /* @__PURE__ */ jsx6(
1491
- TextInput2,
1923
+ /* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx13(
1924
+ TextInput3,
1492
1925
  {
1493
1926
  value: "",
1494
1927
  onChange: () => {
@@ -1502,14 +1935,14 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1502
1935
  }
1503
1936
  }
1504
1937
  ) }),
1505
- syncError && /* @__PURE__ */ jsx6(Box5, { marginTop: 1, children: /* @__PURE__ */ jsx6(Text6, { color: "magenta", children: syncError }) }),
1506
- syncing && /* @__PURE__ */ jsx6(Box5, { marginTop: 1, children: /* @__PURE__ */ jsx6(Text6, { color: "yellow", children: "Syncing..." }) })
1507
- ] }) }) : logoutMode ? /* @__PURE__ */ jsx6(Box5, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
1508
- /* @__PURE__ */ jsx6(Text6, { bold: true, children: "Logout Confirmation" }),
1509
- /* @__PURE__ */ jsx6(Text6, { color: "cyan", children: "Are you sure you want to log out?" }),
1510
- /* @__PURE__ */ jsxs5(Box5, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
1511
- /* @__PURE__ */ jsx6(
1512
- Box5,
1938
+ syncError && /* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx13(Text13, { color: "magenta", children: syncError }) }),
1939
+ syncing && /* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx13(Text13, { color: "yellow", children: "Syncing..." }) })
1940
+ ] }) }) : logoutMode ? /* @__PURE__ */ jsx13(Box12, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
1941
+ /* @__PURE__ */ jsx13(Text13, { bold: true, children: "Logout Confirmation" }),
1942
+ /* @__PURE__ */ jsx13(Text13, { color: "cyan", children: "Are you sure you want to log out?" }),
1943
+ /* @__PURE__ */ jsxs12(Box12, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
1944
+ /* @__PURE__ */ jsx13(
1945
+ Box12,
1513
1946
  {
1514
1947
  borderStyle: "round",
1515
1948
  borderColor: "cyan",
@@ -1518,11 +1951,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1518
1951
  alignItems: "center",
1519
1952
  justifyContent: "center",
1520
1953
  flexDirection: "column",
1521
- children: /* @__PURE__ */ jsx6(Text6, { children: logoutFocus === "confirm" ? chalk3.bgCyan.white.bold(" Logout ") : chalk3.cyan.bold("Logout") })
1954
+ children: /* @__PURE__ */ jsx13(Text13, { children: logoutFocus === "confirm" ? chalk10.bgCyan.white.bold(" Logout ") : chalk10.cyan.bold("Logout") })
1522
1955
  }
1523
1956
  ),
1524
- /* @__PURE__ */ jsx6(
1525
- Box5,
1957
+ /* @__PURE__ */ jsx13(
1958
+ Box12,
1526
1959
  {
1527
1960
  borderStyle: "round",
1528
1961
  borderColor: logoutFocus === "cancel" ? "white" : "gray",
@@ -1531,16 +1964,16 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1531
1964
  alignItems: "center",
1532
1965
  justifyContent: "center",
1533
1966
  flexDirection: "column",
1534
- children: /* @__PURE__ */ jsx6(Text6, { children: logoutFocus === "cancel" ? chalk3.bgGray.white.bold(" Cancel ") : chalk3.gray.bold("Cancel") })
1967
+ children: /* @__PURE__ */ jsx13(Text13, { children: logoutFocus === "cancel" ? chalk10.bgGray.white.bold(" Cancel ") : chalk10.gray.bold("Cancel") })
1535
1968
  }
1536
1969
  )
1537
1970
  ] }),
1538
- /* @__PURE__ */ jsx6(Box5, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs5(Text6, { color: "gray", children: [
1971
+ /* @__PURE__ */ jsx13(Box12, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs12(Text13, { color: "gray", children: [
1539
1972
  "Press Enter to ",
1540
1973
  logoutFocus === "confirm" ? "Logout" : "Cancel",
1541
1974
  " | Y to Logout | C to Cancel"
1542
1975
  ] }) })
1543
- ] }) }) : orgSwitcherOpen ? /* @__PURE__ */ jsx6(Box5, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx6(
1976
+ ] }) }) : orgSwitcherOpen ? /* @__PURE__ */ jsx13(Box12, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx13(
1544
1977
  OrgSwitcher,
1545
1978
  {
1546
1979
  token,
@@ -1548,78 +1981,87 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1548
1981
  onSelect: handleOrgContextChange,
1549
1982
  onClose: () => setOrgSwitcherOpen(false)
1550
1983
  }
1551
- ) }) : infoMode ? /* @__PURE__ */ jsx6(Box5, { height: contentHeight, alignItems: "center", justifyContent: "center", children: (() => {
1984
+ ) }) : infoMode ? /* @__PURE__ */ jsx13(Box12, { height: contentHeight, alignItems: "center", justifyContent: "center", children: (() => {
1552
1985
  const repo = infoRepo || visibleItems[cursor];
1553
- if (!repo) return /* @__PURE__ */ jsx6(Text6, { color: "red", children: "No repository selected." });
1986
+ if (!repo) return /* @__PURE__ */ jsx13(Text13, { color: "red", children: "No repository selected." });
1554
1987
  const langName = repo.primaryLanguage?.name || "N/A";
1555
1988
  const langColor = repo.primaryLanguage?.color || "#666666";
1556
- return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 90), children: [
1557
- /* @__PURE__ */ jsxs5(Text6, { bold: true, children: [
1989
+ return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 90), children: [
1990
+ /* @__PURE__ */ jsxs12(Text13, { bold: true, children: [
1558
1991
  "Repository Info ",
1559
- infoRepo ? chalk3.dim("(cached)") : ""
1992
+ infoRepo ? chalk10.dim("(cached)") : ""
1560
1993
  ] }),
1561
- /* @__PURE__ */ jsx6(Box5, { height: 1, children: /* @__PURE__ */ jsx6(Text6, { children: " " }) }),
1562
- /* @__PURE__ */ jsx6(Text6, { children: chalk3.bold(repo.nameWithOwner) }),
1563
- repo.description && /* @__PURE__ */ jsx6(Text6, { color: "gray", children: repo.description }),
1564
- /* @__PURE__ */ jsx6(Box5, { height: 1, children: /* @__PURE__ */ jsx6(Text6, { children: " " }) }),
1565
- /* @__PURE__ */ jsxs5(Text6, { children: [
1566
- repo.isPrivate ? chalk3.yellow("Private") : chalk3.green("Public"),
1567
- repo.isArchived ? chalk3.gray(" Archived") : "",
1568
- repo.isFork ? chalk3.blue(" Fork") : ""
1994
+ /* @__PURE__ */ jsx13(Box12, { height: 1, children: /* @__PURE__ */ jsx13(Text13, { children: " " }) }),
1995
+ /* @__PURE__ */ jsx13(Text13, { children: chalk10.bold(repo.nameWithOwner) }),
1996
+ repo.description && /* @__PURE__ */ jsx13(Text13, { color: "gray", children: repo.description }),
1997
+ /* @__PURE__ */ jsx13(Box12, { height: 1, children: /* @__PURE__ */ jsx13(Text13, { children: " " }) }),
1998
+ /* @__PURE__ */ jsxs12(Text13, { children: [
1999
+ repo.visibility === "PRIVATE" ? chalk10.yellow("Private") : repo.visibility === "INTERNAL" ? chalk10.cyan("Internal") : chalk10.green("Public"),
2000
+ repo.isArchived ? chalk10.gray(" Archived") : "",
2001
+ repo.isFork ? chalk10.blue(" Fork") : ""
1569
2002
  ] }),
1570
- /* @__PURE__ */ jsx6(Text6, { children: chalk3.gray(`\u2605 ${repo.stargazerCount} \u2442 ${repo.forkCount}`) }),
1571
- /* @__PURE__ */ jsxs5(Text6, { children: [
1572
- chalk3.hex(langColor)(`\u25CF `),
1573
- chalk3.gray(`${langName}`)
2003
+ /* @__PURE__ */ jsx13(Text13, { children: chalk10.gray(`\u2605 ${repo.stargazerCount} \u2442 ${repo.forkCount}`) }),
2004
+ /* @__PURE__ */ jsxs12(Text13, { children: [
2005
+ chalk10.hex(langColor)(`\u25CF `),
2006
+ chalk10.gray(`${langName}`)
1574
2007
  ] }),
1575
- /* @__PURE__ */ jsxs5(Text6, { color: "gray", children: [
2008
+ /* @__PURE__ */ jsxs12(Text13, { color: "gray", children: [
1576
2009
  "Updated: ",
1577
2010
  formatDate(repo.updatedAt),
1578
2011
  " \u2022 Pushed: ",
1579
2012
  formatDate(repo.pushedAt)
1580
2013
  ] }),
1581
- /* @__PURE__ */ jsxs5(Text6, { color: "gray", children: [
2014
+ /* @__PURE__ */ jsxs12(Text13, { color: "gray", children: [
1582
2015
  "Size: ",
1583
2016
  repo.diskUsage,
1584
2017
  " KB"
1585
2018
  ] }),
1586
- /* @__PURE__ */ jsx6(Box5, { height: 1, children: /* @__PURE__ */ jsx6(Text6, { children: " " }) }),
1587
- /* @__PURE__ */ jsx6(Text6, { color: "gray", children: "Press Esc or I to close" })
2019
+ /* @__PURE__ */ jsx13(Box12, { height: 1, children: /* @__PURE__ */ jsx13(Text13, { children: " " }) }),
2020
+ /* @__PURE__ */ jsx13(Text13, { color: "gray", children: "Press Esc or I to close" })
1588
2021
  ] });
1589
- })() }) : /* @__PURE__ */ jsxs5(Fragment2, { children: [
1590
- /* @__PURE__ */ jsxs5(Box5, { flexDirection: "row", gap: 2, marginBottom: 1, children: [
1591
- /* @__PURE__ */ jsx6(Text6, { color: "cyan", bold: true, children: ownerContext === "personal" ? "Personal Account" : `Organization: ${ownerContext.name || ownerContext.login}` }),
1592
- /* @__PURE__ */ jsxs5(Text6, { color: "gray", dimColor: true, children: [
1593
- "Sort: ",
2022
+ })() }) : visibilityMode ? /* @__PURE__ */ jsx13(Box12, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx13(
2023
+ VisibilityModal,
2024
+ {
2025
+ currentFilter: visibilityFilter,
2026
+ hasInternalRepos,
2027
+ onSelect: (filter2) => {
2028
+ setVisibilityFilter(filter2);
2029
+ setVisibilityMode(false);
2030
+ setCursor(0);
2031
+ storeUIPrefs({ visibilityFilter: filter2 });
2032
+ },
2033
+ onCancel: () => setVisibilityMode(false)
2034
+ }
2035
+ ) }) : sortMode ? /* @__PURE__ */ jsx13(Box12, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx13(
2036
+ SortModal,
2037
+ {
2038
+ currentSort: sortKey,
2039
+ onSelect: (sort) => {
2040
+ setSortKey(sort);
2041
+ setSortMode(false);
2042
+ setCursor(0);
2043
+ storeUIPrefs({ sortKey: sort });
2044
+ },
2045
+ onCancel: () => setSortMode(false)
2046
+ }
2047
+ ) }) : /* @__PURE__ */ jsxs12(Fragment5, { children: [
2048
+ /* @__PURE__ */ jsx13(
2049
+ RepoListHeader,
2050
+ {
2051
+ ownerContext,
1594
2052
  sortKey,
1595
- " ",
1596
- sortDir === "asc" ? "\u2191" : "\u2193"
1597
- ] }),
1598
- /* @__PURE__ */ jsxs5(Text6, { color: "gray", dimColor: true, children: [
1599
- "Forks - Commits Behind: ",
1600
- forkTracking ? "ON" : "OFF"
1601
- ] }),
1602
- filter && !searchActive && /* @__PURE__ */ jsxs5(Text6, { color: "cyan", children: [
1603
- 'Filter: "',
2053
+ sortDir,
2054
+ forkTracking,
1604
2055
  filter,
1605
- '"'
1606
- ] }),
1607
- searchActive && /* @__PURE__ */ jsxs5(Fragment2, { children: [
1608
- /* @__PURE__ */ jsxs5(Text6, { color: "cyan", children: [
1609
- 'Search: "',
1610
- filter.trim(),
1611
- '"'
1612
- ] }),
1613
- searchLoading && /* @__PURE__ */ jsx6(Box5, { marginLeft: 1, children: /* @__PURE__ */ jsxs5(Text6, { color: "cyan", children: [
1614
- /* @__PURE__ */ jsx6(SlowSpinner, {}),
1615
- " Searching\u2026"
1616
- ] }) })
1617
- ] })
1618
- ] }),
1619
- filterMode && /* @__PURE__ */ jsxs5(Box5, { marginBottom: 1, children: [
1620
- /* @__PURE__ */ jsx6(Text6, { children: "Filter: " }),
1621
- /* @__PURE__ */ jsx6(
1622
- TextInput2,
2056
+ searchActive,
2057
+ searchLoading,
2058
+ visibilityFilter
2059
+ }
2060
+ ),
2061
+ filterMode && /* @__PURE__ */ jsxs12(Box12, { marginBottom: 1, children: [
2062
+ /* @__PURE__ */ jsx13(Text13, { children: "Filter: " }),
2063
+ /* @__PURE__ */ jsx13(
2064
+ TextInput3,
1623
2065
  {
1624
2066
  value: filter,
1625
2067
  onChange: (val) => {
@@ -1658,10 +2100,10 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1658
2100
  }
1659
2101
  )
1660
2102
  ] }),
1661
- /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", height: listHeight, children: [
1662
- filterMode && filter.trim().length > 0 && filter.trim().length < 3 ? /* @__PURE__ */ jsx6(Box5, { justifyContent: "center", alignItems: "center", flexGrow: 1, children: /* @__PURE__ */ jsx6(Text6, { color: "gray", dimColor: true, children: "Type at least 3 characters to search" }) }) : visibleItems.slice(windowed.start, windowed.end).map((repo, i) => {
2103
+ /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", height: listHeight, children: [
2104
+ filterMode && filter.trim().length > 0 && filter.trim().length < 3 ? /* @__PURE__ */ jsx13(Box12, { justifyContent: "center", alignItems: "center", flexGrow: 1, children: /* @__PURE__ */ jsx13(Text13, { color: "gray", dimColor: true, children: "Type at least 3 characters to search" }) }) : visibleItems.slice(windowed.start, windowed.end).map((repo, i) => {
1663
2105
  const idx = windowed.start + i;
1664
- return /* @__PURE__ */ jsx6(
2106
+ return /* @__PURE__ */ jsx13(
1665
2107
  RepoRow,
1666
2108
  {
1667
2109
  repo,
@@ -1674,43 +2116,44 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1674
2116
  repo.nameWithOwner
1675
2117
  );
1676
2118
  }),
1677
- loadingMore && hasNextPage && /* @__PURE__ */ jsx6(Box5, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs5(Box5, { flexDirection: "row", children: [
1678
- /* @__PURE__ */ jsx6(Box5, { width: 2, flexShrink: 0, flexGrow: 0, marginRight: 1, children: /* @__PURE__ */ jsx6(Text6, { color: "cyan", children: /* @__PURE__ */ jsx6(SlowSpinner, {}) }) }),
1679
- /* @__PURE__ */ jsx6(Text6, { color: "cyan", children: "Loading more repositories..." })
2119
+ loadingMore && hasNextPage && /* @__PURE__ */ jsx13(Box12, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs12(Box12, { flexDirection: "row", children: [
2120
+ /* @__PURE__ */ jsx13(Box12, { width: 2, flexShrink: 0, flexGrow: 0, marginRight: 1, children: /* @__PURE__ */ jsx13(Text13, { color: "cyan", children: /* @__PURE__ */ jsx13(SlowSpinner, {}) }) }),
2121
+ /* @__PURE__ */ jsx13(Text13, { color: "cyan", children: "Loading more repositories..." })
1680
2122
  ] }) }),
1681
- !loading && !searchLoading && visibleItems.length === 0 && /* @__PURE__ */ jsx6(Box5, { justifyContent: "center", alignItems: "center", flexGrow: 1, children: /* @__PURE__ */ jsx6(Text6, { color: "gray", dimColor: true, children: searchActive ? "No repositories match your search" : filter ? "No repositories match your filter" : "No repositories found" }) })
2123
+ !loading && !searchLoading && visibleItems.length === 0 && /* @__PURE__ */ jsx13(Box12, { justifyContent: "center", alignItems: "center", flexGrow: 1, children: /* @__PURE__ */ jsx13(Text13, { color: "gray", dimColor: true, children: searchActive ? "No repositories match your search" : filter ? "No repositories match your filter" : "No repositories found" }) })
1682
2124
  ] })
1683
2125
  ] }) }),
1684
- /* @__PURE__ */ jsxs5(Box5, { marginTop: 1, paddingX: 1, flexDirection: "column", children: [
1685
- /* @__PURE__ */ jsx6(Box5, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx6(Text6, { color: "gray", dimColor: modalOpen ? true : void 0, children: "\u2191\u2193 Navigate \u2022 Ctrl+G Top \u2022 G Bottom \u2022 / Filter \u2022 W Org Switcher \u2022 S Sort \u2022 D Direction \u2022 T Density \u2022 F Forks \u2022 \u23CE/O Open" }) }),
1686
- /* @__PURE__ */ jsx6(Box5, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx6(Text6, { color: "gray", dimColor: modalOpen ? true : void 0, children: "Del/Ctrl+Backspace Delete \u2022 Ctrl+A Un/Archive \u2022 Ctrl+S Sync Fork \u2022 I Info \u2022 Ctrl+I Cache \u2022 Ctrl+L Logout \u2022 R Refresh \u2022 Q Quit" }) })
2126
+ /* @__PURE__ */ jsxs12(Box12, { marginTop: 1, paddingX: 1, flexDirection: "column", children: [
2127
+ /* @__PURE__ */ jsx13(Box12, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx13(Text13, { color: "gray", dimColor: modalOpen ? true : void 0, children: "\u2191\u2193 Navigate \u2022 \u23CE/O Open \u2022 R Refresh \u2022 W Org Switch \u2022 Ctrl+L Logout \u2022 Q Quit" }) }),
2128
+ /* @__PURE__ */ jsx13(Box12, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx13(Text13, { color: "gray", dimColor: modalOpen ? true : void 0, children: "Ctrl+G Top \u2022 G Bottom \u2022 / Search \u2022 S Sort \u2022 D Direction \u2022 T Density \u2022 F Fork Status \u2022 V Visibility" }) }),
2129
+ /* @__PURE__ */ jsx13(Box12, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx13(Text13, { color: "gray", dimColor: modalOpen ? true : void 0, children: "I Info \u2022 Ctrl+I Cache Info \u2022 Ctrl+A Un/Archive \u2022 Del/Backspace Delete \u2022 Ctrl+S Sync Fork" }) })
1687
2130
  ] }),
1688
- process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsxs5(Box5, { marginTop: 1, borderStyle: "single", borderColor: "yellow", paddingX: 1, flexDirection: "column", children: [
1689
- /* @__PURE__ */ jsx6(Text6, { bold: true, color: "yellow", children: "Debug Messages:" }),
1690
- debugMessages.length === 0 ? /* @__PURE__ */ jsx6(Text6, { color: "gray", children: "No debug messages yet..." }) : debugMessages.map((msg, i) => /* @__PURE__ */ jsx6(Text6, { color: "gray", children: msg }, i))
2131
+ process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsxs12(Box12, { marginTop: 1, borderStyle: "single", borderColor: "yellow", paddingX: 1, flexDirection: "column", children: [
2132
+ /* @__PURE__ */ jsx13(Text13, { bold: true, color: "yellow", children: "Debug Messages:" }),
2133
+ debugMessages.length === 0 ? /* @__PURE__ */ jsx13(Text13, { color: "gray", children: "No debug messages yet..." }) : debugMessages.map((msg, i) => /* @__PURE__ */ jsx13(Text13, { color: "gray", children: msg }, i))
1691
2134
  ] })
1692
2135
  ] });
1693
2136
  }
1694
2137
 
1695
2138
  // src/ui/App.tsx
1696
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
2139
+ import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
1697
2140
  var packageJson = require_package();
1698
2141
  function App() {
1699
2142
  const { exit } = useApp2();
1700
2143
  const { stdout } = useStdout2();
1701
- const [mode, setMode] = useState4("checking");
1702
- const [token, setToken] = useState4(null);
1703
- const [input, setInput] = useState4("");
1704
- const [error, setError] = useState4(null);
1705
- const [viewer, setViewer] = useState4(null);
1706
- const [rateLimitReset, setRateLimitReset] = useState4(null);
1707
- const [orgContext, setOrgContext] = useState4("personal");
1708
- const [dims, setDims] = useState4(() => {
2144
+ const [mode, setMode] = useState10("checking");
2145
+ const [token, setToken] = useState10(null);
2146
+ const [input, setInput] = useState10("");
2147
+ const [error, setError] = useState10(null);
2148
+ const [viewer, setViewer] = useState10(null);
2149
+ const [rateLimitReset, setRateLimitReset] = useState10(null);
2150
+ const [orgContext, setOrgContext] = useState10("personal");
2151
+ const [dims, setDims] = useState10(() => {
1709
2152
  const cols = stdout?.columns ?? 100;
1710
2153
  const rows = stdout?.rows ?? 30;
1711
2154
  return { cols, rows };
1712
2155
  });
1713
- useEffect4(() => {
2156
+ useEffect7(() => {
1714
2157
  if (!stdout) return;
1715
2158
  const onResize = () => {
1716
2159
  const cols = stdout.columns ?? 100;
@@ -1722,7 +2165,7 @@ function App() {
1722
2165
  stdout.off?.("resize", onResize);
1723
2166
  };
1724
2167
  }, [stdout]);
1725
- useEffect4(() => {
2168
+ useEffect7(() => {
1726
2169
  const env = getTokenFromEnv();
1727
2170
  const stored = getStoredToken();
1728
2171
  if (env) {
@@ -1735,7 +2178,7 @@ function App() {
1735
2178
  setMode("prompt");
1736
2179
  }
1737
2180
  }, []);
1738
- useEffect4(() => {
2181
+ useEffect7(() => {
1739
2182
  (async () => {
1740
2183
  if (mode !== "validating" || !token) return;
1741
2184
  const timeoutId = setTimeout(() => {
@@ -1751,6 +2194,7 @@ function App() {
1751
2194
  if (!getStoredToken()) {
1752
2195
  storeToken(token);
1753
2196
  }
2197
+ setInput("");
1754
2198
  setMode("ready");
1755
2199
  } catch (e) {
1756
2200
  clearTimeout(timeoutId);
@@ -1818,9 +2262,10 @@ function App() {
1818
2262
  }
1819
2263
  setToken(null);
1820
2264
  setViewer(null);
2265
+ setInput("");
1821
2266
  setMode("prompt");
1822
2267
  };
1823
- useInput3((input2, key) => {
2268
+ useInput10((input2, key) => {
1824
2269
  if (mode === "prompt" && key.escape) {
1825
2270
  exit();
1826
2271
  }
@@ -1846,19 +2291,19 @@ function App() {
1846
2291
  }
1847
2292
  });
1848
2293
  const verticalPadding = Math.floor(dims.rows * 0.15);
1849
- const header = useMemo2(() => /* @__PURE__ */ jsxs6(Box6, { flexDirection: "row", justifyContent: "space-between", marginBottom: 1, children: [
1850
- /* @__PURE__ */ jsxs6(Box6, { flexDirection: "row", gap: 1, children: [
1851
- /* @__PURE__ */ jsxs6(Text7, { bold: true, color: "cyan", children: [
2294
+ const header = useMemo2(() => /* @__PURE__ */ jsxs13(Box13, { flexDirection: "row", justifyContent: "space-between", marginBottom: 1, children: [
2295
+ /* @__PURE__ */ jsxs13(Box13, { flexDirection: "row", gap: 1, children: [
2296
+ /* @__PURE__ */ jsxs13(Text14, { bold: true, color: "cyan", children: [
1852
2297
  " ",
1853
2298
  "GitHub Repository Manager"
1854
2299
  ] }),
1855
- /* @__PURE__ */ jsxs6(Text7, { color: "gray", dimColor: true, children: [
2300
+ /* @__PURE__ */ jsxs13(Text14, { color: "gray", dimColor: true, children: [
1856
2301
  "v",
1857
2302
  packageJson.version
1858
2303
  ] }),
1859
- process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsx7(Text7, { backgroundColor: "blue", color: "white", children: " debug mode " })
2304
+ process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsx14(Text14, { backgroundColor: "blue", color: "white", children: " debug mode " })
1860
2305
  ] }),
1861
- viewer && /* @__PURE__ */ jsx7(Text7, { color: "gray", children: orgContext !== "personal" && orgContext.login ? `${orgContext.login}/@${viewer} ` : `@${viewer} ` })
2306
+ viewer && /* @__PURE__ */ jsx14(Text14, { color: "gray", children: orgContext !== "personal" && orgContext.login ? `${orgContext.login}/@${viewer} ` : `@${viewer} ` })
1862
2307
  ] }), [viewer, orgContext]);
1863
2308
  if (mode === "rate_limited") {
1864
2309
  const formatResetTime = (resetTime) => {
@@ -1881,56 +2326,56 @@ function App() {
1881
2326
  return "Unknown";
1882
2327
  }
1883
2328
  };
1884
- return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
2329
+ return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
1885
2330
  header,
1886
- /* @__PURE__ */ jsx7(Box6, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs6(Box6, { borderStyle: "single", borderColor: "yellow", paddingX: 3, paddingY: 2, flexDirection: "column", width: Math.min(dims.cols - 8, 80), children: [
1887
- /* @__PURE__ */ jsx7(Text7, { bold: true, color: "yellow", marginBottom: 1, children: "\u26A0\uFE0F Rate Limit Exceeded" }),
1888
- /* @__PURE__ */ jsx7(Text7, { color: "gray", marginBottom: 1, children: "You've hit GitHub's API rate limit for your token." }),
1889
- /* @__PURE__ */ jsx7(Text7, { color: "gray", marginBottom: 1, children: "This happens when you make too many requests in a short time." }),
1890
- rateLimitReset && /* @__PURE__ */ jsxs6(Box6, { marginTop: 1, marginBottom: 1, children: [
1891
- /* @__PURE__ */ jsxs6(Text7, { children: [
1892
- /* @__PURE__ */ jsx7(Text7, { color: "cyan", children: "Reset in:" }),
2331
+ /* @__PURE__ */ jsx14(Box13, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs13(Box13, { borderStyle: "single", borderColor: "yellow", paddingX: 3, paddingY: 2, flexDirection: "column", width: Math.min(dims.cols - 8, 80), children: [
2332
+ /* @__PURE__ */ jsx14(Text14, { bold: true, color: "yellow", marginBottom: 1, children: "\u26A0\uFE0F Rate Limit Exceeded" }),
2333
+ /* @__PURE__ */ jsx14(Text14, { color: "gray", marginBottom: 1, children: "You've hit GitHub's API rate limit for your token." }),
2334
+ /* @__PURE__ */ jsx14(Text14, { color: "gray", marginBottom: 1, children: "This happens when you make too many requests in a short time." }),
2335
+ rateLimitReset && /* @__PURE__ */ jsxs13(Box13, { marginTop: 1, marginBottom: 1, children: [
2336
+ /* @__PURE__ */ jsxs13(Text14, { children: [
2337
+ /* @__PURE__ */ jsx14(Text14, { color: "cyan", children: "Reset in:" }),
1893
2338
  " ",
1894
- /* @__PURE__ */ jsx7(Text7, { bold: true, children: formatResetTime(rateLimitReset) })
2339
+ /* @__PURE__ */ jsx14(Text14, { bold: true, children: formatResetTime(rateLimitReset) })
1895
2340
  ] }),
1896
- /* @__PURE__ */ jsxs6(Text7, { color: "gray", dimColor: true, children: [
2341
+ /* @__PURE__ */ jsxs13(Text14, { color: "gray", dimColor: true, children: [
1897
2342
  "(",
1898
2343
  new Date(rateLimitReset).toLocaleTimeString(),
1899
2344
  ")"
1900
2345
  ] })
1901
2346
  ] }),
1902
- /* @__PURE__ */ jsxs6(Box6, { marginTop: 2, flexDirection: "column", gap: 1, children: [
1903
- /* @__PURE__ */ jsx7(Text7, { bold: true, children: "What would you like to do?" }),
1904
- /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", paddingLeft: 2, children: [
1905
- /* @__PURE__ */ jsxs6(Text7, { children: [
1906
- /* @__PURE__ */ jsx7(Text7, { color: "cyan", bold: true, children: "r" }),
2347
+ /* @__PURE__ */ jsxs13(Box13, { marginTop: 2, flexDirection: "column", gap: 1, children: [
2348
+ /* @__PURE__ */ jsx14(Text14, { bold: true, children: "What would you like to do?" }),
2349
+ /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", paddingLeft: 2, children: [
2350
+ /* @__PURE__ */ jsxs13(Text14, { children: [
2351
+ /* @__PURE__ */ jsx14(Text14, { color: "cyan", bold: true, children: "r" }),
1907
2352
  " - Retry now ",
1908
2353
  rateLimitReset && formatResetTime(rateLimitReset) !== "Now (should be reset)" ? "(likely to fail until reset)" : "(should work now)"
1909
2354
  ] }),
1910
- /* @__PURE__ */ jsxs6(Text7, { children: [
1911
- /* @__PURE__ */ jsx7(Text7, { color: "cyan", bold: true, children: "l" }),
2355
+ /* @__PURE__ */ jsxs13(Text14, { children: [
2356
+ /* @__PURE__ */ jsx14(Text14, { color: "cyan", bold: true, children: "l" }),
1912
2357
  " - Logout and use a different token"
1913
2358
  ] }),
1914
- /* @__PURE__ */ jsxs6(Text7, { children: [
1915
- /* @__PURE__ */ jsx7(Text7, { color: "gray", bold: true, children: "q/Esc" }),
2359
+ /* @__PURE__ */ jsxs13(Text14, { children: [
2360
+ /* @__PURE__ */ jsx14(Text14, { color: "gray", bold: true, children: "q/Esc" }),
1916
2361
  " - Quit application"
1917
2362
  ] })
1918
2363
  ] })
1919
2364
  ] }),
1920
- /* @__PURE__ */ jsx7(Text7, { color: "gray", dimColor: true, marginTop: 2, children: "Tip: Using multiple tokens or waiting between requests can help avoid rate limits." })
2365
+ /* @__PURE__ */ jsx14(Text14, { color: "gray", dimColor: true, marginTop: 2, children: "Tip: Using multiple tokens or waiting between requests can help avoid rate limits." })
1921
2366
  ] }) })
1922
2367
  ] });
1923
2368
  }
1924
2369
  if (mode === "prompt") {
1925
- return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
2370
+ return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
1926
2371
  header,
1927
- /* @__PURE__ */ jsx7(Box6, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs6(Box6, { borderStyle: "single", borderColor: "cyan", paddingX: 2, paddingY: 1, flexDirection: "column", children: [
1928
- /* @__PURE__ */ jsx7(Text7, { bold: true, marginBottom: 1, children: "Authentication Required" }),
1929
- /* @__PURE__ */ jsx7(Text7, { color: "gray", marginBottom: 1, children: "Enter your GitHub Personal Access Token" }),
1930
- /* @__PURE__ */ jsxs6(Box6, { children: [
1931
- /* @__PURE__ */ jsx7(Text7, { children: "Token: " }),
1932
- /* @__PURE__ */ jsx7(
1933
- TextInput3,
2372
+ /* @__PURE__ */ jsx14(Box13, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs13(Box13, { borderStyle: "single", borderColor: "cyan", paddingX: 2, paddingY: 1, flexDirection: "column", children: [
2373
+ /* @__PURE__ */ jsx14(Text14, { bold: true, marginBottom: 1, children: "Authentication Required" }),
2374
+ /* @__PURE__ */ jsx14(Text14, { color: "gray", marginBottom: 1, children: "Enter your GitHub Personal Access Token" }),
2375
+ /* @__PURE__ */ jsxs13(Box13, { children: [
2376
+ /* @__PURE__ */ jsx14(Text14, { children: "Token: " }),
2377
+ /* @__PURE__ */ jsx14(
2378
+ TextInput4,
1934
2379
  {
1935
2380
  value: input,
1936
2381
  onChange: setInput,
@@ -1939,30 +2384,30 @@ function App() {
1939
2384
  }
1940
2385
  )
1941
2386
  ] }),
1942
- error && /* @__PURE__ */ jsx7(Text7, { color: "red", marginTop: 1, children: error }),
1943
- /* @__PURE__ */ jsx7(Text7, { color: "gray", dimColor: true, marginTop: 1, children: "The token will be stored securely in your local config" }),
1944
- /* @__PURE__ */ jsx7(Text7, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to quit" })
2387
+ error && /* @__PURE__ */ jsx14(Text14, { color: "red", marginTop: 1, children: error }),
2388
+ /* @__PURE__ */ jsx14(Text14, { color: "gray", dimColor: true, marginTop: 1, children: "The token will be stored securely in your local config" }),
2389
+ /* @__PURE__ */ jsx14(Text14, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to quit" })
1945
2390
  ] }) })
1946
2391
  ] });
1947
2392
  }
1948
2393
  if (mode === "validating" || mode === "checking") {
1949
- return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
2394
+ return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
1950
2395
  header,
1951
- /* @__PURE__ */ jsx7(Box6, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", alignItems: "center", children: [
1952
- /* @__PURE__ */ jsx7(Text7, { color: "yellow", children: "Validating token..." }),
1953
- mode === "validating" && /* @__PURE__ */ jsx7(Text7, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to cancel" })
2396
+ /* @__PURE__ */ jsx14(Box13, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", alignItems: "center", children: [
2397
+ /* @__PURE__ */ jsx14(Text14, { color: "yellow", children: "Validating token..." }),
2398
+ mode === "validating" && /* @__PURE__ */ jsx14(Text14, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to cancel" })
1954
2399
  ] }) })
1955
2400
  ] });
1956
2401
  }
1957
2402
  if (mode === "error") {
1958
- return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
2403
+ return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
1959
2404
  header,
1960
- /* @__PURE__ */ jsx7(Box6, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx7(Text7, { color: "red", children: error ?? "Unexpected error" }) })
2405
+ /* @__PURE__ */ jsx14(Box13, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx14(Text14, { color: "red", children: error ?? "Unexpected error" }) })
1961
2406
  ] });
1962
2407
  }
1963
- return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
2408
+ return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
1964
2409
  header,
1965
- /* @__PURE__ */ jsx7(
2410
+ /* @__PURE__ */ jsx14(
1966
2411
  RepoList,
1967
2412
  {
1968
2413
  token,
@@ -1976,7 +2421,7 @@ function App() {
1976
2421
  }
1977
2422
 
1978
2423
  // src/index.tsx
1979
- import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
2424
+ import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
1980
2425
  if (process.env.GH_MANAGER_DEBUG === "1") {
1981
2426
  process.stderr.write("\u{1F41B} Debug mode enabled\n");
1982
2427
  }
@@ -1989,8 +2434,8 @@ process.on("unhandledRejection", (reason) => {
1989
2434
  process.exit(1);
1990
2435
  });
1991
2436
  render(
1992
- /* @__PURE__ */ jsxs7(Box7, { flexDirection: "column", children: [
1993
- /* @__PURE__ */ jsx8(App, {}),
1994
- /* @__PURE__ */ jsx8(Text8, { color: "gray" })
2437
+ /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", children: [
2438
+ /* @__PURE__ */ jsx15(App, {}),
2439
+ /* @__PURE__ */ jsx15(Text15, { color: "gray" })
1995
2440
  ] })
1996
2441
  );