gh-manager-cli 1.44.0 → 1.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ import {
5
5
  archiveRepositoryById,
6
6
  changeRepositoryVisibility,
7
7
  checkOrganizationIsEnterprise,
8
+ createRepositoryRest,
8
9
  deleteRepositoryRest,
9
10
  enrichForksWithAheadBehind,
10
11
  fetchRepositoryByOwnerAndName,
@@ -21,6 +22,7 @@ import {
21
22
  renameRepositoryById,
22
23
  starRepository,
23
24
  syncForkWithUpstream,
25
+ transferRepositoryRest,
24
26
  unarchiveRepositoryById,
25
27
  unstarRepository,
26
28
  updateCacheAfterArchive,
@@ -28,14 +30,14 @@ import {
28
30
  updateCacheAfterRename,
29
31
  updateCacheAfterVisibilityChange,
30
32
  updateCacheWithRepository
31
- } from "./chunk-MKIUBPVD.js";
33
+ } from "./chunk-WHX6IOTW.js";
32
34
 
33
35
  // package.json
34
36
  var require_package = __commonJS({
35
37
  "package.json"(exports, module) {
36
38
  module.exports = {
37
39
  name: "gh-manager-cli",
38
- version: "1.44.0",
40
+ version: "1.45.1",
39
41
  private: false,
40
42
  description: "TUI terminal app to manage GitHub repos. Clean up your account in 5 minutes. Archive, delete, rename repos with keyboard shortcuts. Alternative to clicking through github.com",
41
43
  license: "MIT",
@@ -155,13 +157,13 @@ var require_package = __commonJS({
155
157
 
156
158
  // src/index.tsx
157
159
  var import_package = __toESM(require_package(), 1);
158
- import { render, Box as Box24, Text as Text25 } from "ink";
160
+ import { render, Box as Box26, Text as Text27 } from "ink";
159
161
  import "dotenv/config";
160
162
 
161
163
  // src/ui/App.tsx
162
- import { useEffect as useEffect13, useMemo as useMemo3, useState as useState19 } from "react";
163
- import { Box as Box23, Text as Text24, useApp as useApp2, useStdout as useStdout2, useInput as useInput19 } from "ink";
164
- import TextInput6 from "ink-text-input";
164
+ import { useEffect as useEffect14, useMemo as useMemo3, useState as useState21 } from "react";
165
+ import { Box as Box25, Text as Text26, useApp as useApp2, useStdout as useStdout2, useInput as useInput21 } from "ink";
166
+ import TextInput8 from "ink-text-input";
165
167
 
166
168
  // src/config/config.ts
167
169
  import fs from "fs";
@@ -409,9 +411,9 @@ async function openGitHubAuthorizationPage() {
409
411
  }
410
412
 
411
413
  // src/ui/views/RepoList.tsx
412
- import React17, { useEffect as useEffect12, useMemo as useMemo2, useState as useState17, useRef, useCallback } from "react";
413
- import { Box as Box20, Text as Text21, useApp, useInput as useInput17, useStdout } from "ink";
414
- import TextInput5 from "ink-text-input";
414
+ import React19, { useEffect as useEffect13, useMemo as useMemo2, useState as useState19, useRef as useRef7, useCallback } from "react";
415
+ import { Box as Box22, Text as Text23, useApp, useInput as useInput19, useStdout } from "ink";
416
+ import TextInput7 from "ink-text-input";
415
417
  import chalk15 from "chalk";
416
418
 
417
419
  // src/config/themes.ts
@@ -629,7 +631,7 @@ function OrgSwitcher({ token, currentContext, onSelect, onClose }) {
629
631
  try {
630
632
  setLoading(true);
631
633
  setError(null);
632
- const client = await import("./github-6HD7I2UI.js").then((m) => m.makeClient(token));
634
+ const client = await import("./github-72MPRF5W.js").then((m) => m.makeClient(token));
633
635
  const orgs = await fetchViewerOrganizations(client);
634
636
  setOrganizations(orgs);
635
637
  const entOrgs = /* @__PURE__ */ new Set();
@@ -811,7 +813,7 @@ function ArchiveFilterModal({
811
813
  }
812
814
 
813
815
  // src/ui/components/modals/DeleteModal.tsx
814
- import { useState as useState4, useEffect as useEffect4 } from "react";
816
+ import { useEffect as useEffect4, useRef, useState as useState4 } from "react";
815
817
  import { Box as Box3, Text as Text4, useInput as useInput3 } from "ink";
816
818
  import TextInput from "ink-text-input";
817
819
  import chalk4 from "chalk";
@@ -836,13 +838,13 @@ function SlowSpinner({ interval = 500 } = {}) {
836
838
  import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
837
839
 
838
840
  // src/ui/components/modals/ArchiveModal.tsx
839
- import { useState as useState5 } from "react";
841
+ import { useRef as useRef2, useState as useState5 } from "react";
840
842
  import { Box as Box4, Text as Text5, useInput as useInput4 } from "ink";
841
843
  import chalk5 from "chalk";
842
844
  import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
843
845
 
844
846
  // src/ui/components/modals/SyncModal.tsx
845
- import { useState as useState6 } from "react";
847
+ import { useRef as useRef3, useState as useState6 } from "react";
846
848
  import { Box as Box5, Text as Text6, useInput as useInput5 } from "ink";
847
849
  import chalk6 from "chalk";
848
850
  import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
@@ -1368,6 +1370,7 @@ var ChangeVisibilityModal = ({
1368
1370
  }, [isOpen, isFork]);
1369
1371
  useInput11((input, key) => {
1370
1372
  if (!isOpen) return;
1373
+ if (changing) return;
1371
1374
  if (key.escape || input?.toLowerCase() === "c") {
1372
1375
  onClose();
1373
1376
  return;
@@ -1521,6 +1524,7 @@ var ChangeVisibilityModal = ({
1521
1524
  onChange: () => {
1522
1525
  },
1523
1526
  onSubmit: () => {
1527
+ if (changing) return;
1524
1528
  if (isFork || focusedButton === "cancel") {
1525
1529
  onClose();
1526
1530
  } else {
@@ -1664,7 +1668,7 @@ function CopyUrlModal({ repo, terminalWidth, onClose, onCopy, theme: themeProp }
1664
1668
  }
1665
1669
 
1666
1670
  // src/ui/components/modals/RenameModal.tsx
1667
- import { useState as useState13, useEffect as useEffect9 } from "react";
1671
+ import { useEffect as useEffect9, useRef as useRef4, useState as useState13 } from "react";
1668
1672
  import { Box as Box13, Text as Text14, useInput as useInput13 } from "ink";
1669
1673
  import TextInput3 from "ink-text-input";
1670
1674
  import { Fragment as Fragment6, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
@@ -1672,6 +1676,7 @@ function RenameModal({ repo, onRename, onCancel, theme: themeProp }) {
1672
1676
  const { theme } = useTheme(themeProp?.name ?? "default");
1673
1677
  const [newName, setNewName] = useState13("");
1674
1678
  const [renaming, setRenaming] = useState13(false);
1679
+ const renamingRef = useRef4(false);
1675
1680
  const [renameError, setRenameError] = useState13(null);
1676
1681
  useEffect9(() => {
1677
1682
  if (repo) {
@@ -1680,7 +1685,7 @@ function RenameModal({ repo, onRename, onCancel, theme: themeProp }) {
1680
1685
  }
1681
1686
  }, [repo]);
1682
1687
  useInput13((input, key) => {
1683
- if (renaming) return;
1688
+ if (renamingRef.current) return;
1684
1689
  if (key.escape) {
1685
1690
  onCancel();
1686
1691
  return;
@@ -1693,13 +1698,15 @@ function RenameModal({ repo, onRename, onCancel, theme: themeProp }) {
1693
1698
  }
1694
1699
  });
1695
1700
  const handleRenameConfirm = async () => {
1696
- if (!repo || renaming || !newName.trim() || newName === repo.name) return;
1701
+ if (!repo || renamingRef.current || !newName.trim() || newName === repo.name) return;
1697
1702
  try {
1703
+ renamingRef.current = true;
1698
1704
  setRenaming(true);
1699
1705
  setRenameError(null);
1700
1706
  await onRename(repo, newName.trim());
1701
1707
  } catch (e) {
1702
1708
  setRenameError(e.message || "Failed to rename repository");
1709
+ renamingRef.current = false;
1703
1710
  setRenaming(false);
1704
1711
  }
1705
1712
  };
@@ -1775,6 +1782,7 @@ function StarModal({
1775
1782
  const [focusedButton, setFocusedButton] = useState14("cancel");
1776
1783
  useInput14((input, key) => {
1777
1784
  if (!visible) return;
1785
+ if (isStarring) return;
1778
1786
  if (key.escape || input === "c" || input === "C") {
1779
1787
  onCancel();
1780
1788
  return;
@@ -1945,11 +1953,345 @@ function OpenInBrowserModal({ repo, onOpen, onCancel, theme: themeProp }) {
1945
1953
  );
1946
1954
  }
1947
1955
 
1948
- // src/ui/components/modals/UnstarModal.tsx
1949
- import { useEffect as useEffect11, useState as useState16 } from "react";
1950
- import { Box as Box16, Text as Text17 } from "ink";
1951
- import { useInput as useInput16 } from "ink";
1956
+ // src/ui/components/modals/CreateRepoModal.tsx
1957
+ import { useState as useState16, useRef as useRef5 } from "react";
1958
+ import { Box as Box16, Text as Text17, useInput as useInput16 } from "ink";
1959
+ import TextInput4 from "ink-text-input";
1952
1960
  import { Fragment as Fragment8, jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
1961
+ function CreateRepoModal({ ownerSlug, isOrg, isEnterprise, onCreate, onCancel, theme: themeProp }) {
1962
+ const { theme, c } = useTheme(themeProp?.name ?? "default");
1963
+ const [name, setName] = useState16("");
1964
+ const [visibility, setVisibility] = useState16("PRIVATE");
1965
+ const [creating, setCreating] = useState16(false);
1966
+ const [error, setError] = useState16(null);
1967
+ const submittingRef = useRef5(false);
1968
+ const visibilities = isOrg && isEnterprise ? ["PRIVATE", "PUBLIC", "INTERNAL"] : ["PRIVATE", "PUBLIC"];
1969
+ useInput16((input, key) => {
1970
+ if (submittingRef.current) return;
1971
+ if (key.escape) {
1972
+ onCancel();
1973
+ return;
1974
+ }
1975
+ if (key.tab) {
1976
+ setVisibility((v) => {
1977
+ const idx = visibilities.indexOf(v);
1978
+ return visibilities[(idx + 1) % visibilities.length];
1979
+ });
1980
+ return;
1981
+ }
1982
+ if (key.return) {
1983
+ if (name.trim()) handleCreateConfirm();
1984
+ return;
1985
+ }
1986
+ });
1987
+ const handleCreateConfirm = async () => {
1988
+ if (!name.trim() || creating || submittingRef.current) return;
1989
+ submittingRef.current = true;
1990
+ try {
1991
+ setCreating(true);
1992
+ setError(null);
1993
+ await onCreate(name.trim(), visibility);
1994
+ } catch (e) {
1995
+ setError(e instanceof Error ? e.message : "Failed to create repository");
1996
+ } finally {
1997
+ setCreating(false);
1998
+ submittingRef.current = false;
1999
+ }
2000
+ };
2001
+ const handleNameChange = (value) => {
2002
+ setName(value.replace(/[^a-zA-Z0-9\-_.]/g, "").replace(/^\.+/, ""));
2003
+ };
2004
+ const visLabel = (v) => v === "PUBLIC" ? "Public" : v === "PRIVATE" ? "Private" : "Internal";
2005
+ const isDisabled = !name.trim();
2006
+ return /* @__PURE__ */ jsxs16(
2007
+ Box16,
2008
+ {
2009
+ flexDirection: "column",
2010
+ borderStyle: "round",
2011
+ borderColor: theme.primary,
2012
+ paddingX: 3,
2013
+ paddingY: 2,
2014
+ width: 80,
2015
+ children: [
2016
+ /* @__PURE__ */ jsx17(Text17, { bold: true, color: theme.primary, children: "Create New Repository" }),
2017
+ /* @__PURE__ */ jsx17(Box16, { height: 1, children: /* @__PURE__ */ jsx17(Text17, { children: " " }) }),
2018
+ /* @__PURE__ */ jsxs16(Text17, { color: theme.muted, children: [
2019
+ "Owner: ",
2020
+ ownerSlug,
2021
+ " ",
2022
+ isOrg ? "(organisation)" : "(personal)"
2023
+ ] }),
2024
+ /* @__PURE__ */ jsx17(Box16, { height: 1, children: /* @__PURE__ */ jsx17(Text17, { children: " " }) }),
2025
+ /* @__PURE__ */ jsx17(Text17, { children: "Repository name:" }),
2026
+ /* @__PURE__ */ jsxs16(Box16, { flexDirection: "row", alignItems: "center", children: [
2027
+ /* @__PURE__ */ jsxs16(Text17, { children: [
2028
+ ownerSlug,
2029
+ "/"
2030
+ ] }),
2031
+ /* @__PURE__ */ jsx17(
2032
+ TextInput4,
2033
+ {
2034
+ value: name,
2035
+ onChange: handleNameChange,
2036
+ placeholder: "my-new-repo",
2037
+ focus: !creating
2038
+ }
2039
+ )
2040
+ ] }),
2041
+ /* @__PURE__ */ jsx17(Box16, { height: 1, children: /* @__PURE__ */ jsx17(Text17, { children: " " }) }),
2042
+ /* @__PURE__ */ jsxs16(Box16, { flexDirection: "row", children: [
2043
+ /* @__PURE__ */ jsx17(Text17, { children: "Visibility: " }),
2044
+ visibilities.map((v, i) => /* @__PURE__ */ jsxs16(Text17, { children: [
2045
+ v === visibility ? c.btnPrimary(` ${visLabel(v)} `) : c.muted(visLabel(v)),
2046
+ i < visibilities.length - 1 ? " " : ""
2047
+ ] }, v))
2048
+ ] }),
2049
+ creating ? /* @__PURE__ */ jsx17(Box16, { marginTop: 2, justifyContent: "center", children: /* @__PURE__ */ jsxs16(Box16, { flexDirection: "row", children: [
2050
+ /* @__PURE__ */ jsx17(Box16, { marginRight: 1, children: /* @__PURE__ */ jsx17(SlowSpinner, {}) }),
2051
+ /* @__PURE__ */ jsx17(Text17, { color: theme.primary, children: "Creating repository..." })
2052
+ ] }) }) : /* @__PURE__ */ jsxs16(Fragment8, { children: [
2053
+ /* @__PURE__ */ jsx17(Box16, { marginTop: 2, children: /* @__PURE__ */ jsx17(Text17, { color: theme.muted, children: isDisabled ? "Enter a name to create the repository" : `Press Enter to create "${ownerSlug}/${name}"` }) }),
2054
+ /* @__PURE__ */ jsx17(Box16, { marginTop: 1, children: /* @__PURE__ */ jsx17(Text17, { color: theme.muted, children: "Tab to change visibility \u2022 Esc to cancel" }) })
2055
+ ] }),
2056
+ error && /* @__PURE__ */ jsx17(Box16, { marginTop: 1, children: /* @__PURE__ */ jsx17(Text17, { color: theme.error, children: error }) })
2057
+ ]
2058
+ }
2059
+ );
2060
+ }
2061
+
2062
+ // src/ui/components/modals/TransferModal.tsx
2063
+ import { useState as useState17, useRef as useRef6, useEffect as useEffect11 } from "react";
2064
+ import { Box as Box17, Text as Text18, useInput as useInput17 } from "ink";
2065
+ import TextInput5 from "ink-text-input";
2066
+ import { Fragment as Fragment9, jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
2067
+ function TransferModal({ repo, onTransfer, onCancel, theme: themeProp }) {
2068
+ const { theme, c } = useTheme(themeProp?.name ?? "default");
2069
+ const [newOwner, setNewOwner] = useState17("");
2070
+ const [stage, setStage] = useState17("input");
2071
+ const [focus, setFocus] = useState17("cancel");
2072
+ const [transferring, setTransferring] = useState17(false);
2073
+ const [error, setError] = useState17(null);
2074
+ const [transferCode, setTransferCode] = useState17("");
2075
+ const [typedCode, setTypedCode] = useState17("");
2076
+ const submittingRef = useRef6(false);
2077
+ const owner = repo ? repo.nameWithOwner.split("/")[0] : "";
2078
+ useEffect11(() => {
2079
+ if (repo) {
2080
+ const chars = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789";
2081
+ let code = "";
2082
+ for (let i = 0; i < 4; i++) {
2083
+ code += chars.charAt(Math.floor(Math.random() * chars.length));
2084
+ }
2085
+ setTransferCode(code);
2086
+ setTypedCode("");
2087
+ setStage("input");
2088
+ setFocus("cancel");
2089
+ setError(null);
2090
+ }
2091
+ }, [repo]);
2092
+ useInput17((input, key) => {
2093
+ if (submittingRef.current || !repo) return;
2094
+ if (key.escape) {
2095
+ onCancel();
2096
+ return;
2097
+ }
2098
+ if (stage === "input") {
2099
+ if (key.return) {
2100
+ const target = newOwner.trim();
2101
+ if (target && target.toLowerCase() !== owner.toLowerCase()) {
2102
+ setError(null);
2103
+ setTypedCode("");
2104
+ setStage("code");
2105
+ }
2106
+ }
2107
+ return;
2108
+ }
2109
+ if (stage === "code") {
2110
+ return;
2111
+ }
2112
+ if (key.leftArrow || key.rightArrow || key.tab) {
2113
+ setFocus((f) => f === "transfer" ? "cancel" : "transfer");
2114
+ return;
2115
+ }
2116
+ if (input === "y" || input === "Y") {
2117
+ handleTransferConfirm();
2118
+ return;
2119
+ }
2120
+ if (input === "c" || input === "C") {
2121
+ onCancel();
2122
+ return;
2123
+ }
2124
+ if (key.return) {
2125
+ if (focus === "transfer") handleTransferConfirm();
2126
+ else onCancel();
2127
+ return;
2128
+ }
2129
+ });
2130
+ const advanceToConfirm = () => {
2131
+ setError(null);
2132
+ setStage("confirm");
2133
+ setFocus("cancel");
2134
+ };
2135
+ const handleCodeChange = (value) => {
2136
+ const up = value.toUpperCase();
2137
+ setTypedCode(up);
2138
+ if (up === transferCode) advanceToConfirm();
2139
+ };
2140
+ const handleCodeSubmit = () => {
2141
+ if (typedCode.toUpperCase() === transferCode) {
2142
+ advanceToConfirm();
2143
+ } else {
2144
+ setError("Incorrect verification code. Please try again.");
2145
+ setTypedCode("");
2146
+ }
2147
+ };
2148
+ const handleTransferConfirm = async () => {
2149
+ if (transferring || submittingRef.current || !repo || !newOwner.trim()) return;
2150
+ submittingRef.current = true;
2151
+ try {
2152
+ setTransferring(true);
2153
+ setError(null);
2154
+ await onTransfer(repo, newOwner.trim());
2155
+ } catch (e) {
2156
+ setError(e instanceof Error ? e.message : "Failed to transfer repository");
2157
+ } finally {
2158
+ setTransferring(false);
2159
+ submittingRef.current = false;
2160
+ }
2161
+ };
2162
+ const handleOwnerChange = (value) => {
2163
+ setNewOwner(value.replace(/[^a-zA-Z0-9-]/g, "").replace(/^-+/, ""));
2164
+ };
2165
+ const isInputDisabled = !newOwner.trim() || newOwner.trim().toLowerCase() === owner.toLowerCase();
2166
+ if (!repo) return null;
2167
+ return /* @__PURE__ */ jsxs17(
2168
+ Box17,
2169
+ {
2170
+ flexDirection: "column",
2171
+ borderStyle: "round",
2172
+ borderColor: theme.warning,
2173
+ paddingX: 3,
2174
+ paddingY: 2,
2175
+ width: 80,
2176
+ children: [
2177
+ /* @__PURE__ */ jsx18(Text18, { bold: true, color: theme.warning, children: "Transfer Repository" }),
2178
+ /* @__PURE__ */ jsx18(Box17, { height: 1, children: /* @__PURE__ */ jsx18(Text18, { children: " " }) }),
2179
+ /* @__PURE__ */ jsxs17(Text18, { color: theme.muted, children: [
2180
+ "Repository: ",
2181
+ repo.nameWithOwner
2182
+ ] }),
2183
+ stage === "input" && /* @__PURE__ */ jsxs17(Fragment9, { children: [
2184
+ /* @__PURE__ */ jsx18(Box17, { height: 1, children: /* @__PURE__ */ jsx18(Text18, { children: " " }) }),
2185
+ /* @__PURE__ */ jsx18(Text18, { children: "New owner (username or organisation):" }),
2186
+ /* @__PURE__ */ jsxs17(Box17, { flexDirection: "row", alignItems: "center", children: [
2187
+ /* @__PURE__ */ jsx18(
2188
+ TextInput5,
2189
+ {
2190
+ value: newOwner,
2191
+ onChange: handleOwnerChange,
2192
+ placeholder: "new-owner",
2193
+ focus: !transferring
2194
+ }
2195
+ ),
2196
+ /* @__PURE__ */ jsxs17(Text18, { children: [
2197
+ "/",
2198
+ repo.name
2199
+ ] })
2200
+ ] }),
2201
+ /* @__PURE__ */ jsx18(Box17, { marginTop: 2, children: /* @__PURE__ */ jsx18(Text18, { color: theme.muted, children: isInputDisabled ? "Enter a different owner to continue" : `Press Enter to review the transfer to "${newOwner}/${repo.name}"` }) }),
2202
+ /* @__PURE__ */ jsx18(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx18(Text18, { color: theme.muted, children: "Press Esc to cancel" }) })
2203
+ ] }),
2204
+ stage === "code" && /* @__PURE__ */ jsxs17(Fragment9, { children: [
2205
+ /* @__PURE__ */ jsx18(Box17, { height: 1, children: /* @__PURE__ */ jsx18(Text18, { children: " " }) }),
2206
+ /* @__PURE__ */ jsxs17(Text18, { children: [
2207
+ "Transfer ",
2208
+ c.text.bold(repo.nameWithOwner),
2209
+ " ",
2210
+ "\u2192",
2211
+ " ",
2212
+ c.warning.bold(`${newOwner}/${repo.name}`)
2213
+ ] }),
2214
+ /* @__PURE__ */ jsx18(Box17, { height: 1, children: /* @__PURE__ */ jsx18(Text18, { children: " " }) }),
2215
+ /* @__PURE__ */ jsx18(Text18, { children: `To confirm, please type ${c.warning.bold(transferCode)} below:` }),
2216
+ /* @__PURE__ */ jsxs17(Box17, { marginTop: 1, flexDirection: "row", alignItems: "center", children: [
2217
+ /* @__PURE__ */ jsx18(Text18, { children: "Verification code: " }),
2218
+ /* @__PURE__ */ jsx18(
2219
+ TextInput5,
2220
+ {
2221
+ value: typedCode,
2222
+ onChange: handleCodeChange,
2223
+ onSubmit: handleCodeSubmit,
2224
+ focus: !transferring
2225
+ }
2226
+ )
2227
+ ] }),
2228
+ /* @__PURE__ */ jsx18(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx18(Text18, { color: theme.muted, children: "Type the code to continue \u2022 Esc to cancel" }) })
2229
+ ] }),
2230
+ stage === "confirm" && /* @__PURE__ */ jsxs17(Fragment9, { children: [
2231
+ /* @__PURE__ */ jsx18(Box17, { height: 1, children: /* @__PURE__ */ jsx18(Text18, { children: " " }) }),
2232
+ /* @__PURE__ */ jsxs17(Text18, { children: [
2233
+ "Transfer ",
2234
+ c.text.bold(repo.nameWithOwner),
2235
+ " ",
2236
+ "\u2192",
2237
+ " ",
2238
+ c.warning.bold(`${newOwner}/${repo.name}`)
2239
+ ] }),
2240
+ /* @__PURE__ */ jsx18(Box17, { marginTop: 1, children: /* @__PURE__ */ jsxs17(Text18, { color: theme.warning, children: [
2241
+ "\u26A0\uFE0F This hands ownership to ",
2242
+ newOwner,
2243
+ ". You may lose admin access, and only the new owner can transfer it back."
2244
+ ] }) }),
2245
+ transferring ? /* @__PURE__ */ jsx18(Box17, { marginTop: 2, justifyContent: "center", children: /* @__PURE__ */ jsxs17(Box17, { flexDirection: "row", children: [
2246
+ /* @__PURE__ */ jsx18(Box17, { marginRight: 1, children: /* @__PURE__ */ jsx18(SlowSpinner, {}) }),
2247
+ /* @__PURE__ */ jsx18(Text18, { color: theme.warning, children: "Transferring repository..." })
2248
+ ] }) }) : /* @__PURE__ */ jsxs17(Fragment9, { children: [
2249
+ /* @__PURE__ */ jsxs17(Box17, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
2250
+ /* @__PURE__ */ jsx18(
2251
+ Box17,
2252
+ {
2253
+ borderStyle: "round",
2254
+ borderColor: focus === "transfer" ? theme.warning : theme.muted,
2255
+ height: 3,
2256
+ width: 20,
2257
+ alignItems: "center",
2258
+ justifyContent: "center",
2259
+ flexDirection: "column",
2260
+ children: /* @__PURE__ */ jsx18(Text18, { children: focus === "transfer" ? c.btnPrimary(" Transfer ") : c.warning.bold("Transfer") })
2261
+ }
2262
+ ),
2263
+ /* @__PURE__ */ jsx18(
2264
+ Box17,
2265
+ {
2266
+ borderStyle: "round",
2267
+ borderColor: focus === "cancel" ? "white" : theme.muted,
2268
+ height: 3,
2269
+ width: 20,
2270
+ alignItems: "center",
2271
+ justifyContent: "center",
2272
+ flexDirection: "column",
2273
+ children: /* @__PURE__ */ jsx18(Text18, { children: focus === "cancel" ? c.btnMuted(" Cancel ") : c.muted.bold("Cancel") })
2274
+ }
2275
+ )
2276
+ ] }),
2277
+ /* @__PURE__ */ jsx18(Box17, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs17(Text18, { color: theme.muted, children: [
2278
+ "\u2190/\u2192 Focus \u2022 Enter to ",
2279
+ focus === "transfer" ? "Transfer" : "Cancel",
2280
+ " \u2022 Y Transfer \u2022 C/Esc Cancel"
2281
+ ] }) })
2282
+ ] })
2283
+ ] }),
2284
+ error && /* @__PURE__ */ jsx18(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx18(Text18, { color: theme.error, children: error }) })
2285
+ ]
2286
+ }
2287
+ );
2288
+ }
2289
+
2290
+ // src/ui/components/modals/UnstarModal.tsx
2291
+ import { useEffect as useEffect12, useState as useState18 } from "react";
2292
+ import { Box as Box18, Text as Text19 } from "ink";
2293
+ import { useInput as useInput18 } from "ink";
2294
+ import { Fragment as Fragment10, jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
1953
2295
  function UnstarModal({
1954
2296
  visible,
1955
2297
  repo,
@@ -1960,9 +2302,10 @@ function UnstarModal({
1960
2302
  theme: themeProp
1961
2303
  }) {
1962
2304
  const { theme } = useTheme(themeProp?.name ?? "default");
1963
- const [focusedButton, setFocusedButton] = useState16("cancel");
1964
- useInput16((input, key) => {
2305
+ const [focusedButton, setFocusedButton] = useState18("cancel");
2306
+ useInput18((input, key) => {
1965
2307
  if (!visible) return;
2308
+ if (isUnstarring) return;
1966
2309
  if (key.escape || input === "c" || input === "C") {
1967
2310
  onCancel();
1968
2311
  return;
@@ -1979,12 +2322,12 @@ function UnstarModal({
1979
2322
  if (input === "n" || input === "N") onCancel();
1980
2323
  if (input === "u" || input === "U") onConfirm();
1981
2324
  });
1982
- useEffect11(() => {
2325
+ useEffect12(() => {
1983
2326
  if (visible) setFocusedButton("cancel");
1984
2327
  }, [visible]);
1985
2328
  if (!visible || !repo) return null;
1986
- return /* @__PURE__ */ jsxs16(
1987
- Box16,
2329
+ return /* @__PURE__ */ jsxs18(
2330
+ Box18,
1988
2331
  {
1989
2332
  flexDirection: "column",
1990
2333
  borderStyle: "round",
@@ -1993,28 +2336,28 @@ function UnstarModal({
1993
2336
  paddingY: 1,
1994
2337
  marginTop: 1,
1995
2338
  children: [
1996
- /* @__PURE__ */ jsx17(Box16, { marginBottom: 1, children: /* @__PURE__ */ jsx17(Text17, { bold: true, color: theme.warning, children: "\u2B50 Unstar Repository" }) }),
1997
- /* @__PURE__ */ jsx17(Box16, { marginBottom: 1, children: /* @__PURE__ */ jsxs16(Text17, { children: [
2339
+ /* @__PURE__ */ jsx19(Box18, { marginBottom: 1, children: /* @__PURE__ */ jsx19(Text19, { bold: true, color: theme.warning, children: "\u2B50 Unstar Repository" }) }),
2340
+ /* @__PURE__ */ jsx19(Box18, { marginBottom: 1, children: /* @__PURE__ */ jsxs18(Text19, { children: [
1998
2341
  "Are you sure you want to unstar",
1999
2342
  " ",
2000
- /* @__PURE__ */ jsx17(Text17, { bold: true, color: theme.primary, children: repo.nameWithOwner }),
2343
+ /* @__PURE__ */ jsx19(Text19, { bold: true, color: theme.primary, children: repo.nameWithOwner }),
2001
2344
  "?"
2002
2345
  ] }) }),
2003
- repo.description && /* @__PURE__ */ jsx17(Box16, { marginBottom: 1, children: /* @__PURE__ */ jsx17(Text17, { dimColor: true, wrap: "wrap", children: repo.description }) }),
2004
- /* @__PURE__ */ jsx17(Box16, { marginBottom: 1, children: /* @__PURE__ */ jsxs16(Text17, { dimColor: true, children: [
2346
+ repo.description && /* @__PURE__ */ jsx19(Box18, { marginBottom: 1, children: /* @__PURE__ */ jsx19(Text19, { dimColor: true, wrap: "wrap", children: repo.description }) }),
2347
+ /* @__PURE__ */ jsx19(Box18, { marginBottom: 1, children: /* @__PURE__ */ jsxs18(Text19, { dimColor: true, children: [
2005
2348
  "Stars: ",
2006
2349
  repo.stargazerCount,
2007
2350
  " \u2022 Forks: ",
2008
2351
  repo.forkCount
2009
2352
  ] }) }),
2010
- error && /* @__PURE__ */ jsx17(Box16, { marginBottom: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs16(Text17, { color: theme.error, wrap: "wrap", children: [
2353
+ error && /* @__PURE__ */ jsx19(Box18, { marginBottom: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs18(Text19, { color: theme.error, wrap: "wrap", children: [
2011
2354
  error.includes("OAuth access restrictions") ? "\u26A0\uFE0F " : "Error: ",
2012
2355
  error
2013
2356
  ] }) }),
2014
- isUnstarring ? /* @__PURE__ */ jsx17(Box16, { children: /* @__PURE__ */ jsx17(Text17, { color: theme.warning, children: "Unstarring..." }) }) : /* @__PURE__ */ jsxs16(Fragment8, { children: [
2015
- /* @__PURE__ */ jsxs16(Box16, { gap: 2, children: [
2016
- /* @__PURE__ */ jsx17(Box16, { children: /* @__PURE__ */ jsxs16(
2017
- Text17,
2357
+ isUnstarring ? /* @__PURE__ */ jsx19(Box18, { children: /* @__PURE__ */ jsx19(Text19, { color: theme.warning, children: "Unstarring..." }) }) : /* @__PURE__ */ jsxs18(Fragment10, { children: [
2358
+ /* @__PURE__ */ jsxs18(Box18, { gap: 2, children: [
2359
+ /* @__PURE__ */ jsx19(Box18, { children: /* @__PURE__ */ jsxs18(
2360
+ Text19,
2018
2361
  {
2019
2362
  backgroundColor: focusedButton === "cancel" ? "white" : void 0,
2020
2363
  color: focusedButton === "cancel" ? "black" : "white",
@@ -2026,8 +2369,8 @@ function UnstarModal({
2026
2369
  ]
2027
2370
  }
2028
2371
  ) }),
2029
- /* @__PURE__ */ jsx17(Box16, { children: /* @__PURE__ */ jsxs16(
2030
- Text17,
2372
+ /* @__PURE__ */ jsx19(Box18, { children: /* @__PURE__ */ jsxs18(
2373
+ Text19,
2031
2374
  {
2032
2375
  backgroundColor: focusedButton === "unstar" ? "yellow" : void 0,
2033
2376
  color: focusedButton === "unstar" ? "black" : theme.warning,
@@ -2040,7 +2383,7 @@ function UnstarModal({
2040
2383
  }
2041
2384
  ) })
2042
2385
  ] }),
2043
- /* @__PURE__ */ jsx17(Box16, { marginTop: 1, children: /* @__PURE__ */ jsx17(Text17, { dimColor: true, children: "Use \u2190 \u2192 to navigate, Enter to select" }) })
2386
+ /* @__PURE__ */ jsx19(Box18, { marginTop: 1, children: /* @__PURE__ */ jsx19(Text19, { dimColor: true, children: "Use \u2190 \u2192 to navigate, Enter to select" }) })
2044
2387
  ] })
2045
2388
  ]
2046
2389
  }
@@ -2048,9 +2391,9 @@ function UnstarModal({
2048
2391
  }
2049
2392
 
2050
2393
  // src/ui/components/repo/RepoRow.tsx
2051
- import { Box as Box17, Text as Text18 } from "ink";
2394
+ import { Box as Box19, Text as Text20 } from "ink";
2052
2395
  import chalk14 from "chalk";
2053
- import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
2396
+ import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
2054
2397
  function RepoRow({
2055
2398
  repo,
2056
2399
  selected,
@@ -2110,21 +2453,21 @@ function RepoRow({
2110
2453
  if (line3) fullText += "\n" + metaColor(line3);
2111
2454
  const spacingAbove = Math.floor(spacingLines / 2);
2112
2455
  const spacingBelow = spacingLines - spacingAbove;
2113
- return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", backgroundColor: selected ? theme.selectedBg : void 0, children: [
2114
- spacingAbove > 0 && /* @__PURE__ */ jsx18(Box17, { height: spacingAbove, children: /* @__PURE__ */ jsx18(Text18, { children: " " }) }),
2115
- /* @__PURE__ */ jsx18(Text18, { children: dim ? chalk14.dim(fullText) : fullText }),
2116
- spacingBelow > 0 && /* @__PURE__ */ jsx18(Box17, { height: spacingBelow, children: /* @__PURE__ */ jsx18(Text18, { children: " " }) })
2456
+ return /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", backgroundColor: selected ? theme.selectedBg : void 0, children: [
2457
+ spacingAbove > 0 && /* @__PURE__ */ jsx20(Box19, { height: spacingAbove, children: /* @__PURE__ */ jsx20(Text20, { children: " " }) }),
2458
+ /* @__PURE__ */ jsx20(Text20, { children: dim ? chalk14.dim(fullText) : fullText }),
2459
+ spacingBelow > 0 && /* @__PURE__ */ jsx20(Box19, { height: spacingBelow, children: /* @__PURE__ */ jsx20(Text20, { children: " " }) })
2117
2460
  ] });
2118
2461
  }
2119
2462
 
2120
2463
  // src/ui/components/repo/FilterInput.tsx
2121
- import { Box as Box18, Text as Text19 } from "ink";
2122
- import TextInput4 from "ink-text-input";
2123
- import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
2464
+ import { Box as Box20, Text as Text21 } from "ink";
2465
+ import TextInput6 from "ink-text-input";
2466
+ import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
2124
2467
 
2125
2468
  // src/ui/components/repo/RepoListHeader.tsx
2126
- import { Box as Box19, Text as Text20 } from "ink";
2127
- import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
2469
+ import { Box as Box21, Text as Text22 } from "ink";
2470
+ import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
2128
2471
  function RepoListHeader({
2129
2472
  ownerContext,
2130
2473
  sortKey,
@@ -2141,26 +2484,26 @@ function RepoListHeader({
2141
2484
  const { theme } = useTheme(themeProp?.name ?? "default");
2142
2485
  const contextLabel = ownerContext === "personal" ? "Personal Account" : ownerContext?.type === "organization" ? `Organisation: ${ownerContext.name ?? ownerContext.login}` : "";
2143
2486
  const visibilityLabel = visibilityFilter === "public" ? "Public" : visibilityFilter === "private" ? isEnterprise ? "Private/Internal" : "Private" : visibilityFilter === "internal" ? "Internal" : "";
2144
- return /* @__PURE__ */ jsxs19(Box19, { flexDirection: "row", gap: 2, marginBottom: 1, children: [
2145
- contextLabel && /* @__PURE__ */ jsx20(Text20, { children: contextLabel }),
2146
- starsMode && /* @__PURE__ */ jsx20(Text20, { color: theme.warning, bold: true, children: "\u2B50 Stars Mode" }),
2147
- /* @__PURE__ */ jsxs19(Text20, { color: theme.muted, dimColor: true, children: [
2487
+ return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "row", gap: 2, marginBottom: 1, children: [
2488
+ contextLabel && /* @__PURE__ */ jsx22(Text22, { children: contextLabel }),
2489
+ starsMode && /* @__PURE__ */ jsx22(Text22, { color: theme.warning, bold: true, children: "\u2B50 Stars Mode" }),
2490
+ /* @__PURE__ */ jsxs21(Text22, { color: theme.muted, dimColor: true, children: [
2148
2491
  "Sort: ",
2149
2492
  filterActive ? "relevance" : `${sortKey} ${sortDir === "asc" ? "\u2191" : "\u2193"}`
2150
2493
  ] }),
2151
- /* @__PURE__ */ jsxs19(Text20, { color: theme.muted, dimColor: true, children: [
2494
+ /* @__PURE__ */ jsxs21(Text22, { color: theme.muted, dimColor: true, children: [
2152
2495
  "Fork Status - Commits Behind: ",
2153
2496
  forkTracking ? "ON" : "OFF"
2154
2497
  ] }),
2155
- !!visibilityLabel && !starsMode && /* @__PURE__ */ jsxs19(Text20, { color: theme.warning, children: [
2498
+ !!visibilityLabel && !starsMode && /* @__PURE__ */ jsxs21(Text22, { color: theme.warning, children: [
2156
2499
  "Visibility: ",
2157
2500
  visibilityLabel
2158
2501
  ] }),
2159
- archiveFilter !== "all" && /* @__PURE__ */ jsxs19(Text20, { color: theme.primary, children: [
2502
+ archiveFilter !== "all" && /* @__PURE__ */ jsxs21(Text22, { color: theme.primary, children: [
2160
2503
  "Archive: ",
2161
2504
  archiveFilter === "archived" ? "Archived" : "Unarchived"
2162
2505
  ] }),
2163
- (filterActive || starsMode && filter.trim().length > 0) && /* @__PURE__ */ jsxs19(Text20, { color: theme.primary, children: [
2506
+ (filterActive || starsMode && filter.trim().length > 0) && /* @__PURE__ */ jsxs21(Text22, { color: theme.primary, children: [
2164
2507
  starsMode ? "Filter" : "Search",
2165
2508
  ': "',
2166
2509
  filter.trim(),
@@ -2170,7 +2513,7 @@ function RepoListHeader({
2170
2513
  }
2171
2514
 
2172
2515
  // src/ui/views/RepoList.tsx
2173
- import { Fragment as Fragment9, jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
2516
+ import { Fragment as Fragment11, jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
2174
2517
  var getPageSize = () => {
2175
2518
  const envValue = process.env.REPOS_PER_FETCH;
2176
2519
  if (envValue) {
@@ -2186,17 +2529,17 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2186
2529
  const { exit } = useApp();
2187
2530
  const { stdout } = useStdout();
2188
2531
  const client = useMemo2(() => makeClient(token), [token]);
2189
- const [debugMessages, setDebugMessages] = useState17([]);
2532
+ const [debugMessages, setDebugMessages] = useState19([]);
2190
2533
  const addDebugMessage = useCallback((msg) => {
2191
2534
  if (process.env.GH_MANAGER_DEBUG === "1") {
2192
2535
  setDebugMessages((prev) => [...prev.slice(-9), msg]);
2193
2536
  }
2194
2537
  }, []);
2195
- const handleOrgContextChangeRef = useRef(onOrgContextChange);
2196
- useEffect12(() => {
2538
+ const handleOrgContextChangeRef = useRef7(onOrgContextChange);
2539
+ useEffect13(() => {
2197
2540
  handleOrgContextChangeRef.current = onOrgContextChange;
2198
2541
  }, [onOrgContextChange]);
2199
- React17.useEffect(() => {
2542
+ React19.useEffect(() => {
2200
2543
  addDebugMessage(`[RepoList] Component mounted`);
2201
2544
  logger.info("RepoList component mounted", {
2202
2545
  token: token ? "present" : "missing",
@@ -2208,90 +2551,93 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2208
2551
  }, []);
2209
2552
  const terminalWidth = stdout?.columns ?? 80;
2210
2553
  const availableHeight = maxVisibleRows ?? 20;
2211
- const [items, setItems] = useState17([]);
2212
- const [cursor, setCursor] = useState17(0);
2213
- const [endCursor, setEndCursor] = useState17(null);
2214
- const [hasNextPage, setHasNextPage] = useState17(false);
2215
- const [totalCount, setTotalCount] = useState17(0);
2216
- const [loading, setLoading] = useState17(true);
2217
- const [sortingLoading, setSortingLoading] = useState17(false);
2218
- const [refreshing, setRefreshing] = useState17(false);
2219
- const [loadingMore, setLoadingMore] = useState17(false);
2220
- const [error, setError] = useState17(null);
2221
- const [rateLimit, setRateLimit] = useState17(void 0);
2222
- const [prevRateLimit, setPrevRateLimit] = useState17(void 0);
2223
- const [restRateLimit, setRestRateLimit] = useState17(void 0);
2224
- const [prevRestRateLimit, setPrevRestRateLimit] = useState17(void 0);
2225
- const [density, setDensity] = useState17(2);
2226
- const [prefsLoaded, setPrefsLoaded] = useState17(false);
2227
- const [themeName, setThemeName] = useState17("default");
2228
- const [themeToast, setThemeToast] = useState17(null);
2229
- const themeToastTimerRef = useRef(null);
2554
+ const [items, setItems] = useState19([]);
2555
+ const [cursor, setCursor] = useState19(0);
2556
+ const [endCursor, setEndCursor] = useState19(null);
2557
+ const [hasNextPage, setHasNextPage] = useState19(false);
2558
+ const [totalCount, setTotalCount] = useState19(0);
2559
+ const [loading, setLoading] = useState19(true);
2560
+ const [sortingLoading, setSortingLoading] = useState19(false);
2561
+ const [refreshing, setRefreshing] = useState19(false);
2562
+ const [loadingMore, setLoadingMore] = useState19(false);
2563
+ const [error, setError] = useState19(null);
2564
+ const [rateLimit, setRateLimit] = useState19(void 0);
2565
+ const [prevRateLimit, setPrevRateLimit] = useState19(void 0);
2566
+ const [restRateLimit, setRestRateLimit] = useState19(void 0);
2567
+ const [prevRestRateLimit, setPrevRestRateLimit] = useState19(void 0);
2568
+ const [density, setDensity] = useState19(2);
2569
+ const [prefsLoaded, setPrefsLoaded] = useState19(false);
2570
+ const [themeName, setThemeName] = useState19("default");
2571
+ const [themeToast, setThemeToast] = useState19(null);
2572
+ const themeToastTimerRef = useRef7(null);
2230
2573
  const { theme, c: tc } = useTheme(themeName);
2231
- const [ownerContext, setOwnerContext] = useState17("personal");
2232
- const [ownerAffiliations, setOwnerAffiliations] = useState17(["OWNER"]);
2233
- const [orgSwitcherOpen, setOrgSwitcherOpen] = useState17(false);
2234
- const [operationCount, setOperationCount] = useState17(0);
2235
- const [showSponsorReminder, setShowSponsorReminder] = useState17(false);
2236
- const [deleteMode, setDeleteMode] = useState17(false);
2237
- const [deleteTarget, setDeleteTarget] = useState17(null);
2238
- const [deleteCode, setDeleteCode] = useState17("");
2239
- const [typedCode, setTypedCode] = useState17("");
2240
- const [deleting, setDeleting] = useState17(false);
2241
- const [deleteError, setDeleteError] = useState17(null);
2242
- const [deleteConfirmStage, setDeleteConfirmStage] = useState17(false);
2243
- const [confirmFocus, setConfirmFocus] = useState17("delete");
2244
- const [archiveMode, setArchiveMode] = useState17(false);
2245
- const [archiveTarget, setArchiveTarget] = useState17(null);
2246
- const [archiving, setArchiving] = useState17(false);
2247
- const [archiveError, setArchiveError] = useState17(null);
2248
- const [archiveFocus, setArchiveFocus] = useState17("confirm");
2249
- const [syncMode, setSyncMode] = useState17(false);
2250
- const [syncTarget, setSyncTarget] = useState17(null);
2251
- const [syncing, setSyncing] = useState17(false);
2252
- const [syncError, setSyncError] = useState17(null);
2253
- const [syncFocus, setSyncFocus] = useState17("confirm");
2254
- const [renameMode, setRenameMode] = useState17(false);
2255
- const [renameTarget, setRenameTarget] = useState17(null);
2256
- const [copyUrlMode, setCopyUrlMode] = useState17(false);
2257
- const [copyUrlTarget, setCopyUrlTarget] = useState17(null);
2258
- const [copyToast, setCopyToast] = useState17(null);
2259
- const [syncTrigger, setSyncTrigger] = useState17(false);
2260
- const [infoMode, setInfoMode] = useState17(false);
2261
- const [infoRepo, setInfoRepo] = useState17(null);
2262
- const [logoutMode, setLogoutMode] = useState17(false);
2263
- const [logoutFocus, setLogoutFocus] = useState17("confirm");
2264
- const [logoutError, setLogoutError] = useState17(null);
2265
- const [archiveFilterMode, setArchiveFilterMode] = useState17(false);
2266
- const [visibilityMode, setVisibilityMode] = useState17(false);
2267
- const [isEnterpriseOrg, setIsEnterpriseOrg] = useState17(false);
2268
- const [hasInternalRepos, setHasInternalRepos] = useState17(false);
2269
- const [changeVisibilityMode, setChangeVisibilityMode] = useState17(false);
2270
- const [changeVisibilityTarget, setChangeVisibilityTarget] = useState17(null);
2271
- const [changingVisibility, setChangingVisibility] = useState17(false);
2272
- const [changeVisibilityError, setChangeVisibilityError] = useState17(null);
2273
- const [sortMode, setSortMode] = useState17(false);
2274
- const [sortDirectionMode, setSortDirectionMode] = useState17(false);
2275
- const [starsMode, setStarsMode] = useState17(false);
2276
- const [starredItems, setStarredItems] = useState17([]);
2277
- const [starredEndCursor, setStarredEndCursor] = useState17(null);
2278
- const [starredHasNextPage, setStarredHasNextPage] = useState17(false);
2279
- const [starredTotalCount, setStarredTotalCount] = useState17(0);
2280
- const [starredLoading, setStarredLoading] = useState17(false);
2281
- const [unstarMode, setUnstarMode] = useState17(false);
2282
- const [unstarTarget, setUnstarTarget] = useState17(null);
2283
- const [unstarring, setUnstarring] = useState17(false);
2284
- const [unstarError, setUnstarError] = useState17(null);
2285
- const [starMode, setStarMode] = useState17(false);
2286
- const [starTarget, setStarTarget] = useState17(null);
2287
- const [starring, setStarring] = useState17(false);
2288
- const [starError, setStarError] = useState17(null);
2289
- const [openInBrowserMode, setOpenInBrowserMode] = useState17(false);
2290
- const [openInBrowserTarget, setOpenInBrowserTarget] = useState17(null);
2291
- const [enrichingForks, setEnrichingForks] = useState17(false);
2292
- const enrichmentDoneRef = useRef(/* @__PURE__ */ new Set());
2293
- const appliedInitialOrg = useRef(false);
2294
- useEffect12(() => {
2574
+ const [ownerContext, setOwnerContext] = useState19("personal");
2575
+ const [ownerAffiliations, setOwnerAffiliations] = useState19(["OWNER"]);
2576
+ const [orgSwitcherOpen, setOrgSwitcherOpen] = useState19(false);
2577
+ const [operationCount, setOperationCount] = useState19(0);
2578
+ const [showSponsorReminder, setShowSponsorReminder] = useState19(false);
2579
+ const [deleteMode, setDeleteMode] = useState19(false);
2580
+ const [deleteTarget, setDeleteTarget] = useState19(null);
2581
+ const [deleteCode, setDeleteCode] = useState19("");
2582
+ const [typedCode, setTypedCode] = useState19("");
2583
+ const [deleting, setDeleting] = useState19(false);
2584
+ const [deleteError, setDeleteError] = useState19(null);
2585
+ const [deleteConfirmStage, setDeleteConfirmStage] = useState19(false);
2586
+ const [confirmFocus, setConfirmFocus] = useState19("delete");
2587
+ const [archiveMode, setArchiveMode] = useState19(false);
2588
+ const [archiveTarget, setArchiveTarget] = useState19(null);
2589
+ const [archiving, setArchiving] = useState19(false);
2590
+ const [archiveError, setArchiveError] = useState19(null);
2591
+ const [archiveFocus, setArchiveFocus] = useState19("confirm");
2592
+ const [syncMode, setSyncMode] = useState19(false);
2593
+ const [syncTarget, setSyncTarget] = useState19(null);
2594
+ const [syncing, setSyncing] = useState19(false);
2595
+ const [syncError, setSyncError] = useState19(null);
2596
+ const [syncFocus, setSyncFocus] = useState19("confirm");
2597
+ const [renameMode, setRenameMode] = useState19(false);
2598
+ const [renameTarget, setRenameTarget] = useState19(null);
2599
+ const [createMode, setCreateMode] = useState19(false);
2600
+ const [transferMode, setTransferMode] = useState19(false);
2601
+ const [transferTarget, setTransferTarget] = useState19(null);
2602
+ const [copyUrlMode, setCopyUrlMode] = useState19(false);
2603
+ const [copyUrlTarget, setCopyUrlTarget] = useState19(null);
2604
+ const [copyToast, setCopyToast] = useState19(null);
2605
+ const [syncTrigger, setSyncTrigger] = useState19(false);
2606
+ const [infoMode, setInfoMode] = useState19(false);
2607
+ const [infoRepo, setInfoRepo] = useState19(null);
2608
+ const [logoutMode, setLogoutMode] = useState19(false);
2609
+ const [logoutFocus, setLogoutFocus] = useState19("confirm");
2610
+ const [logoutError, setLogoutError] = useState19(null);
2611
+ const [archiveFilterMode, setArchiveFilterMode] = useState19(false);
2612
+ const [visibilityMode, setVisibilityMode] = useState19(false);
2613
+ const [isEnterpriseOrg, setIsEnterpriseOrg] = useState19(false);
2614
+ const [hasInternalRepos, setHasInternalRepos] = useState19(false);
2615
+ const [changeVisibilityMode, setChangeVisibilityMode] = useState19(false);
2616
+ const [changeVisibilityTarget, setChangeVisibilityTarget] = useState19(null);
2617
+ const [changingVisibility, setChangingVisibility] = useState19(false);
2618
+ const [changeVisibilityError, setChangeVisibilityError] = useState19(null);
2619
+ const [sortMode, setSortMode] = useState19(false);
2620
+ const [sortDirectionMode, setSortDirectionMode] = useState19(false);
2621
+ const [starsMode, setStarsMode] = useState19(false);
2622
+ const [starredItems, setStarredItems] = useState19([]);
2623
+ const [starredEndCursor, setStarredEndCursor] = useState19(null);
2624
+ const [starredHasNextPage, setStarredHasNextPage] = useState19(false);
2625
+ const [starredTotalCount, setStarredTotalCount] = useState19(0);
2626
+ const [starredLoading, setStarredLoading] = useState19(false);
2627
+ const [unstarMode, setUnstarMode] = useState19(false);
2628
+ const [unstarTarget, setUnstarTarget] = useState19(null);
2629
+ const [unstarring, setUnstarring] = useState19(false);
2630
+ const [unstarError, setUnstarError] = useState19(null);
2631
+ const [starMode, setStarMode] = useState19(false);
2632
+ const [starTarget, setStarTarget] = useState19(null);
2633
+ const [starring, setStarring] = useState19(false);
2634
+ const [starError, setStarError] = useState19(null);
2635
+ const [openInBrowserMode, setOpenInBrowserMode] = useState19(false);
2636
+ const [openInBrowserTarget, setOpenInBrowserTarget] = useState19(null);
2637
+ const [enrichingForks, setEnrichingForks] = useState19(false);
2638
+ const enrichmentDoneRef = useRef7(/* @__PURE__ */ new Set());
2639
+ const appliedInitialOrg = useRef7(false);
2640
+ useEffect13(() => {
2295
2641
  (async () => {
2296
2642
  if (appliedInitialOrg.current) return;
2297
2643
  if (!initialOrgSlug2) return;
@@ -2529,7 +2875,62 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2529
2875
  throw error2;
2530
2876
  }
2531
2877
  }
2532
- const copyToastTimerRef = useRef(null);
2878
+ async function executeCreate(name, visibility) {
2879
+ if (!name.trim()) return;
2880
+ const org = ownerContext !== "personal" ? ownerContext.login : void 0;
2881
+ const { nameWithOwner } = await createRepositoryRest(token, { name: name.trim(), visibility, org });
2882
+ setFilter("");
2883
+ setFilterMode(false);
2884
+ if (archiveFilter === "archived") {
2885
+ storeUIPrefs({ archiveFilter: "all" });
2886
+ setArchiveFilter("all");
2887
+ }
2888
+ const passesVisibilityFilter = visibilityFilter === "all" || visibilityFilter === "public" && visibility === "PUBLIC" || visibilityFilter === "private" && (visibility === "PRIVATE" || visibility === "INTERNAL");
2889
+ if (!passesVisibilityFilter) {
2890
+ previousVisibilityFilter.current = "all";
2891
+ storeUIPrefs({ visibilityFilter: "all" });
2892
+ setVisibilityFilter("all");
2893
+ }
2894
+ const [owner, repoName] = (nameWithOwner || "").split("/");
2895
+ let created = await fetchRepositoryByOwnerAndName(client, owner, repoName);
2896
+ if (!created) {
2897
+ await new Promise((resolve) => setTimeout(resolve, 600));
2898
+ created = await fetchRepositoryByOwnerAndName(client, owner, repoName);
2899
+ }
2900
+ setCreateMode(false);
2901
+ pendingFocusRef.current = nameWithOwner;
2902
+ if (created) {
2903
+ await updateCacheWithRepository(token, created);
2904
+ const createdId = created.id;
2905
+ setItems((prev) => prev.some((r) => r.id === createdId) ? prev : [created, ...prev]);
2906
+ setTotalCount((c) => c + 1);
2907
+ } else {
2908
+ setRefreshing(true);
2909
+ setSortingLoading(true);
2910
+ try {
2911
+ await purgeApolloCacheFiles();
2912
+ } catch {
2913
+ }
2914
+ fetchPage(null, true, true, void 0, "network-only", passesVisibilityFilter ? void 0 : "all");
2915
+ }
2916
+ }
2917
+ function closeTransferModal() {
2918
+ setTransferMode(false);
2919
+ setTransferTarget(null);
2920
+ }
2921
+ async function executeTransfer(repo, newOwner) {
2922
+ if (!repo || !newOwner.trim()) return;
2923
+ const [owner, name] = (repo.nameWithOwner || "").split("/");
2924
+ const targetId = repo.id;
2925
+ await transferRepositoryRest(token, owner, name, newOwner.trim());
2926
+ await updateCacheAfterDelete(token, targetId);
2927
+ setItems((prev) => prev.filter((r) => r.id !== targetId));
2928
+ setTotalCount((c) => Math.max(0, c - 1));
2929
+ setCursor((c) => Math.max(0, Math.min(c, visibleItems.length - 2)));
2930
+ trackSuccessfulOperation();
2931
+ closeTransferModal();
2932
+ }
2933
+ const copyToastTimerRef = useRef7(null);
2533
2934
  async function handleCopyUrl(url, type) {
2534
2935
  try {
2535
2936
  if (copyToastTimerRef.current) {
@@ -2556,7 +2957,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2556
2957
  throw error2;
2557
2958
  }
2558
2959
  }
2559
- useEffect12(() => {
2960
+ useEffect13(() => {
2560
2961
  return () => {
2561
2962
  if (copyToastTimerRef.current) clearTimeout(copyToastTimerRef.current);
2562
2963
  if (themeToastTimerRef.current) clearTimeout(themeToastTimerRef.current);
@@ -2651,12 +3052,12 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2651
3052
  setDeleteError("Failed to delete repository. Ensure delete_repo scope and admin permissions.");
2652
3053
  }
2653
3054
  }
2654
- const [filter, setFilter] = useState17("");
2655
- const [filterMode, setFilterMode] = useState17(false);
2656
- const [sortKey, setSortKey] = useState17("updated");
2657
- const [sortDir, setSortDir] = useState17("desc");
2658
- const [forkTracking, setForkTracking] = useState17(true);
2659
- useEffect12(() => {
3055
+ const [filter, setFilter] = useState19("");
3056
+ const [filterMode, setFilterMode] = useState19(false);
3057
+ const [sortKey, setSortKey] = useState19("updated");
3058
+ const [sortDir, setSortDir] = useState19("desc");
3059
+ const [forkTracking, setForkTracking] = useState19(true);
3060
+ useEffect13(() => {
2660
3061
  if (loading || loadingMore || hasNextPage || items.length === 0) return;
2661
3062
  if (!forkTracking) return;
2662
3063
  const unenriched = items.filter(
@@ -2722,22 +3123,27 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2722
3123
  async function jumpToUpstreamRepo(parentNameWithOwner) {
2723
3124
  const [parentOwner, parentName] = parentNameWithOwner.split("/");
2724
3125
  if (!parentOwner || !parentName) return;
2725
- const repo = await fetchRepositoryByOwnerAndName(client, parentOwner, parentName);
2726
- if (repo) {
2727
- setInfoRepo(repo);
2728
- setInfoMode(true);
3126
+ try {
3127
+ const repo = await fetchRepositoryByOwnerAndName(client, parentOwner, parentName);
3128
+ if (repo) {
3129
+ setInfoRepo(repo);
3130
+ setInfoMode(true);
3131
+ }
3132
+ } catch (err) {
3133
+ logger.error("Failed to fetch upstream repository", { error: err?.message, parentNameWithOwner });
2729
3134
  }
2730
3135
  }
2731
- const [visibilityFilter, setVisibilityFilter] = useState17("all");
2732
- const previousVisibilityFilter = useRef("all");
2733
- const [archiveFilter, setArchiveFilter] = useState17("all");
3136
+ const [visibilityFilter, setVisibilityFilter] = useState19("all");
3137
+ const previousVisibilityFilter = useRef7("all");
3138
+ const pendingFocusRef = useRef7(null);
3139
+ const [archiveFilter, setArchiveFilter] = useState19("all");
2734
3140
  const sortFieldMap = {
2735
3141
  "updated": "UPDATED_AT",
2736
3142
  "pushed": "PUSHED_AT",
2737
3143
  "name": "NAME",
2738
3144
  "stars": "STARGAZERS"
2739
3145
  };
2740
- const fetchPage = async (after, reset = false, isSortChange = false, overrideForkTracking, policy) => {
3146
+ const fetchPage = async (after, reset = false, isSortChange = false, overrideForkTracking, policy, privacyOverride) => {
2741
3147
  logger.info("fetchPage called", {
2742
3148
  after,
2743
3149
  reset,
@@ -2761,7 +3167,9 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2761
3167
  };
2762
3168
  const orgLogin = ownerContext !== "personal" ? ownerContext.login : void 0;
2763
3169
  let privacy;
2764
- if (visibilityFilter === "public") privacy = "PUBLIC";
3170
+ if (privacyOverride !== void 0) {
3171
+ privacy = privacyOverride === "all" ? void 0 : privacyOverride;
3172
+ } else if (visibilityFilter === "public") privacy = "PUBLIC";
2765
3173
  else if (visibilityFilter === "private") privacy = "PRIVATE";
2766
3174
  const page = await fetchViewerReposPageUnified(
2767
3175
  token,
@@ -2835,7 +3243,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2835
3243
  setLoadingMore(false);
2836
3244
  }
2837
3245
  };
2838
- useEffect12(() => {
3246
+ useEffect13(() => {
2839
3247
  const ui = getUIPrefs();
2840
3248
  if (ui.density !== void 0) setDensity(ui.density);
2841
3249
  if (ui.sortKey && ["updated", "pushed", "name", "stars"].includes(ui.sortKey)) {
@@ -2871,7 +3279,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2871
3279
  }
2872
3280
  setPrefsLoaded(true);
2873
3281
  }, [onOrgContextChange]);
2874
- useEffect12(() => {
3282
+ useEffect13(() => {
2875
3283
  if (!prefsLoaded) return;
2876
3284
  let policy = "cache-first";
2877
3285
  const orgLogin = ownerContext !== "personal" ? ownerContext.login : void 0;
@@ -2891,7 +3299,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2891
3299
  setCursor(0);
2892
3300
  fetchPage(null, true, false, void 0, policy);
2893
3301
  }, [client, prefsLoaded, ownerContext, ownerAffiliations]);
2894
- useEffect12(() => {
3302
+ useEffect13(() => {
2895
3303
  if (visibilityFilter !== "all" || previousVisibilityFilter.current && previousVisibilityFilter.current !== visibilityFilter) {
2896
3304
  if (items.length > 0) {
2897
3305
  fetchPage(null, true, true, void 0, "network-only");
@@ -2899,7 +3307,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2899
3307
  }
2900
3308
  previousVisibilityFilter.current = visibilityFilter;
2901
3309
  }, [visibilityFilter]);
2902
- useInput17((input, key) => {
3310
+ useInput19((input, key) => {
2903
3311
  if (error) {
2904
3312
  if (input && input.toUpperCase() === "Q") {
2905
3313
  try {
@@ -3061,6 +3469,12 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3061
3469
  if (renameMode) {
3062
3470
  return;
3063
3471
  }
3472
+ if (createMode) {
3473
+ return;
3474
+ }
3475
+ if (transferMode) {
3476
+ return;
3477
+ }
3064
3478
  if (openInBrowserMode) {
3065
3479
  return;
3066
3480
  }
@@ -3252,8 +3666,20 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3252
3666
  }
3253
3667
  return;
3254
3668
  }
3255
- if (input && input.toUpperCase() === "W") {
3256
- setOrgSwitcherOpen(true);
3669
+ if (key.ctrl && (input === "n" || input === "N")) {
3670
+ if (!starsMode) {
3671
+ setCreateMode(true);
3672
+ }
3673
+ return;
3674
+ }
3675
+ if (key.shift && input === "M") {
3676
+ if (!starsMode) {
3677
+ const repo = visibleItems[cursor];
3678
+ if (repo) {
3679
+ setTransferTarget(repo);
3680
+ setTransferMode(true);
3681
+ }
3682
+ }
3257
3683
  return;
3258
3684
  }
3259
3685
  if (input && input.toUpperCase() === "S" && !key.shift && !key.ctrl && !filterActive) {
@@ -3416,9 +3842,18 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3416
3842
  return result;
3417
3843
  }, [starredItems, filter, archiveFilter]);
3418
3844
  const visibleItems = starsMode ? filteredStarredItems : filterActive ? fuzzyItems : filteredAndSorted;
3419
- useEffect12(() => {
3845
+ useEffect13(() => {
3420
3846
  setCursor((c) => Math.min(c, Math.max(0, visibleItems.length - 1)));
3421
3847
  }, [filterActive, items.length, visibleItems.length]);
3848
+ useEffect13(() => {
3849
+ const target = pendingFocusRef.current;
3850
+ if (!target) return;
3851
+ const idx = visibleItems.findIndex((r) => r.nameWithOwner === target);
3852
+ if (idx >= 0) {
3853
+ setCursor(idx);
3854
+ pendingFocusRef.current = null;
3855
+ }
3856
+ }, [visibleItems]);
3422
3857
  const headerHeight = 2;
3423
3858
  const footerHeight = 4;
3424
3859
  const containerPadding = 2;
@@ -3429,7 +3864,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3429
3864
  () => computeWindow(visibleItems, cursor, listHeight, spacingLines),
3430
3865
  [visibleItems, cursor, listHeight, spacingLines]
3431
3866
  );
3432
- useEffect12(() => {
3867
+ useEffect13(() => {
3433
3868
  const rawItemsLength = starsMode ? starredItems.length : items.length;
3434
3869
  const filterDrainedPage = visibleItems.length === 0 && archiveFilter !== "all" && rawItemsLength > 0;
3435
3870
  if (starsMode) {
@@ -3448,79 +3883,79 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3448
3883
  exec(cmd);
3449
3884
  }
3450
3885
  const lowRate = rateLimit && rateLimit.remaining <= Math.ceil(rateLimit.limit * 0.1) || restRateLimit && restRateLimit.core.remaining <= Math.ceil(restRateLimit.core.limit * 0.1);
3451
- const modalOpen = deleteMode || archiveMode || syncMode || logoutMode || infoMode || visibilityMode || archiveFilterMode || sortMode || sortDirectionMode || changeVisibilityMode || copyUrlMode || renameMode || openInBrowserMode;
3452
- const headerBar = useMemo2(() => /* @__PURE__ */ jsxs20(Box20, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: [
3453
- /* @__PURE__ */ jsxs20(Box20, { flexDirection: "row", gap: 1, children: [
3454
- /* @__PURE__ */ jsxs20(Text21, { color: theme.primary, bold: !modalOpen, dimColor: modalOpen, children: [
3886
+ const modalOpen = deleteMode || archiveMode || syncMode || logoutMode || infoMode || visibilityMode || archiveFilterMode || sortMode || sortDirectionMode || changeVisibilityMode || copyUrlMode || renameMode || openInBrowserMode || createMode || transferMode;
3887
+ const headerBar = useMemo2(() => /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: [
3888
+ /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", gap: 1, children: [
3889
+ /* @__PURE__ */ jsxs22(Text23, { color: theme.primary, bold: !modalOpen, dimColor: modalOpen, children: [
3455
3890
  " ",
3456
3891
  ownerContext === "personal" ? "Personal" : ownerContext.name || ownerContext.login,
3457
3892
  ownerContext !== "personal" && isEnterpriseOrg && " (ENT)"
3458
3893
  ] }),
3459
- /* @__PURE__ */ jsx21(Text21, { bold: true, color: modalOpen ? theme.muted : void 0, dimColor: modalOpen ? true : void 0, children: "Repositories" }),
3460
- /* @__PURE__ */ jsxs20(Text21, { color: theme.muted, children: [
3894
+ /* @__PURE__ */ jsx23(Text23, { bold: true, color: modalOpen ? theme.muted : void 0, dimColor: modalOpen ? true : void 0, children: "Repositories" }),
3895
+ /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, children: [
3461
3896
  "(",
3462
3897
  visibleItems.length,
3463
3898
  "/",
3464
3899
  totalCount,
3465
3900
  ")"
3466
3901
  ] }),
3467
- loadingMore && hasNextPage && !starsMode && totalCount > 0 && /* @__PURE__ */ jsx21(Text21, { color: theme.primary, children: ` \xB7 loading ${items.length}/${totalCount}` }),
3468
- enrichingForks && /* @__PURE__ */ jsx21(Text21, { color: theme.muted, children: ` \xB7 enriching forks\u2026` }),
3469
- (loading || loadingMore) && /* @__PURE__ */ jsx21(Box20, { width: 2, flexShrink: 0, flexGrow: 0, marginLeft: 1, children: /* @__PURE__ */ jsx21(Text21, { color: theme.warning, children: /* @__PURE__ */ jsx21(SlowSpinner, {}) }) })
3902
+ loadingMore && hasNextPage && !starsMode && totalCount > 0 && /* @__PURE__ */ jsx23(Text23, { color: theme.primary, children: ` \xB7 loading ${items.length}/${totalCount}` }),
3903
+ enrichingForks && /* @__PURE__ */ jsx23(Text23, { color: theme.muted, children: ` \xB7 enriching forks\u2026` }),
3904
+ (loading || loadingMore) && /* @__PURE__ */ jsx23(Box22, { width: 2, flexShrink: 0, flexGrow: 0, marginLeft: 1, children: /* @__PURE__ */ jsx23(Text23, { color: theme.warning, children: /* @__PURE__ */ jsx23(SlowSpinner, {}) }) })
3470
3905
  ] }),
3471
- (rateLimit || restRateLimit) && /* @__PURE__ */ jsxs20(Text21, { color: lowRate ? theme.warning : theme.muted, children: [
3906
+ (rateLimit || restRateLimit) && /* @__PURE__ */ jsxs22(Text23, { color: lowRate ? theme.warning : theme.muted, children: [
3472
3907
  "GraphQL: ",
3473
3908
  rateLimit ? `${rateLimit.remaining}/${rateLimit.limit}` : "---/---",
3474
- prevRateLimit !== void 0 && rateLimit && prevRateLimit !== rateLimit.remaining && /* @__PURE__ */ jsx21(Text21, { color: rateLimit.remaining < prevRateLimit ? theme.error : theme.success, children: ` (${rateLimit.remaining - prevRateLimit > 0 ? "+" : ""}${rateLimit.remaining - prevRateLimit})` }),
3909
+ prevRateLimit !== void 0 && rateLimit && prevRateLimit !== rateLimit.remaining && /* @__PURE__ */ jsx23(Text23, { color: rateLimit.remaining < prevRateLimit ? theme.error : theme.success, children: ` (${rateLimit.remaining - prevRateLimit > 0 ? "+" : ""}${rateLimit.remaining - prevRateLimit})` }),
3475
3910
  " | ",
3476
3911
  "REST: ",
3477
3912
  restRateLimit ? `${restRateLimit.core.remaining}/${restRateLimit.core.limit}` : "---/---",
3478
- prevRestRateLimit !== void 0 && restRateLimit && prevRestRateLimit !== restRateLimit.core.remaining && /* @__PURE__ */ jsx21(Text21, { color: restRateLimit.core.remaining < prevRestRateLimit ? theme.error : theme.success, children: ` (${restRateLimit.core.remaining - prevRestRateLimit > 0 ? "+" : ""}${restRateLimit.core.remaining - prevRestRateLimit})` }),
3913
+ prevRestRateLimit !== void 0 && restRateLimit && prevRestRateLimit !== restRateLimit.core.remaining && /* @__PURE__ */ jsx23(Text23, { color: restRateLimit.core.remaining < prevRestRateLimit ? theme.error : theme.success, children: ` (${restRateLimit.core.remaining - prevRestRateLimit > 0 ? "+" : ""}${restRateLimit.core.remaining - prevRestRateLimit})` }),
3479
3914
  " "
3480
3915
  ] })
3481
3916
  ] }), [visibleItems.length, totalCount, loading, loadingMore, rateLimit, lowRate, modalOpen, prevRateLimit, ownerContext, isEnterpriseOrg, restRateLimit, prevRestRateLimit, enrichingForks, starsMode, hasNextPage, items.length, theme]);
3482
3917
  if (error) {
3483
- return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", height: availableHeight, children: [
3484
- /* @__PURE__ */ jsx21(Box20, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs20(Box20, { flexDirection: "row", gap: 1, children: [
3485
- /* @__PURE__ */ jsx21(Text21, { bold: true, children: " Repositories" }),
3486
- /* @__PURE__ */ jsx21(Text21, { color: "red", children: "(Error)" })
3918
+ return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", height: availableHeight, children: [
3919
+ /* @__PURE__ */ jsx23(Box22, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", gap: 1, children: [
3920
+ /* @__PURE__ */ jsx23(Text23, { bold: true, children: " Repositories" }),
3921
+ /* @__PURE__ */ jsx23(Text23, { color: "red", children: "(Error)" })
3487
3922
  ] }) }),
3488
- /* @__PURE__ */ jsx21(Box20, { borderStyle: "single", borderColor: "red", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx21(Box20, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", alignItems: "center", children: [
3489
- /* @__PURE__ */ jsx21(Text21, { color: "red", children: error }),
3490
- /* @__PURE__ */ jsx21(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx21(Text21, { color: "gray", dimColor: true, children: "Press R to retry \u2022 Ctrl+L to logout \u2022 Q to quit" }) })
3923
+ /* @__PURE__ */ jsx23(Box22, { borderStyle: "single", borderColor: "red", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx23(Box22, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", alignItems: "center", children: [
3924
+ /* @__PURE__ */ jsx23(Text23, { color: "red", children: error }),
3925
+ /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "gray", dimColor: true, children: "Press R to retry \u2022 Ctrl+L to logout \u2022 Q to quit" }) })
3491
3926
  ] }) }) }),
3492
- /* @__PURE__ */ jsx21(Box20, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx21(Text21, { color: "gray", children: "Press R to retry \u2022 Ctrl+L to logout \u2022 Q to quit" }) })
3927
+ /* @__PURE__ */ jsx23(Box22, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "gray", children: "Press R to retry \u2022 Ctrl+L to logout \u2022 Q to quit" }) })
3493
3928
  ] });
3494
3929
  }
3495
3930
  if (loading && items.length === 0 || sortingLoading) {
3496
- return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", height: availableHeight, children: [
3497
- /* @__PURE__ */ jsx21(Box20, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs20(Box20, { flexDirection: "row", gap: 1, children: [
3498
- /* @__PURE__ */ jsx21(Text21, { bold: true, children: " Repositories" }),
3499
- /* @__PURE__ */ jsx21(Text21, { color: "gray", children: "(Loading...)" })
3931
+ return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", height: availableHeight, children: [
3932
+ /* @__PURE__ */ jsx23(Box22, { flexDirection: "row", justifyContent: "space-between", height: 1, marginBottom: 1, children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", gap: 1, children: [
3933
+ /* @__PURE__ */ jsx23(Text23, { bold: true, children: " Repositories" }),
3934
+ /* @__PURE__ */ jsx23(Text23, { color: "gray", children: "(Loading...)" })
3500
3935
  ] }) }),
3501
- /* @__PURE__ */ jsx21(Box20, { borderStyle: "single", borderColor: "yellow", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx21(Box20, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx21(Box20, { flexDirection: "column", alignItems: "center", children: /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", alignItems: "center", children: [
3502
- /* @__PURE__ */ jsxs20(Box20, { height: 1, flexDirection: "row", children: [
3503
- /* @__PURE__ */ jsx21(Box20, { width: 2, flexShrink: 0, flexGrow: 0, children: /* @__PURE__ */ jsx21(Text21, { color: "cyan", children: /* @__PURE__ */ jsx21(SlowSpinner, {}) }) }),
3504
- /* @__PURE__ */ jsx21(Text21, { color: "cyan", children: refreshing ? "Refreshing..." : sortingLoading ? "Applying sort..." : "Loading repositories..." })
3936
+ /* @__PURE__ */ jsx23(Box22, { borderStyle: "single", borderColor: "yellow", paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: /* @__PURE__ */ jsx23(Box22, { height: contentHeight, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx23(Box22, { flexDirection: "column", alignItems: "center", children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", alignItems: "center", children: [
3937
+ /* @__PURE__ */ jsxs22(Box22, { height: 1, flexDirection: "row", children: [
3938
+ /* @__PURE__ */ jsx23(Box22, { width: 2, flexShrink: 0, flexGrow: 0, children: /* @__PURE__ */ jsx23(Text23, { color: "cyan", children: /* @__PURE__ */ jsx23(SlowSpinner, {}) }) }),
3939
+ /* @__PURE__ */ jsx23(Text23, { color: "cyan", children: refreshing ? "Refreshing..." : sortingLoading ? "Applying sort..." : "Loading repositories..." })
3505
3940
  ] }),
3506
- /* @__PURE__ */ jsx21(Box20, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx21(Text21, { color: "gray", children: refreshing ? "Fetching latest repository data" : sortingLoading ? `Sorting by ${sortKey} (${sortDir === "asc" ? "ascending" : "descending"})` : "Fetching your GitHub repositories" }) })
3941
+ /* @__PURE__ */ jsx23(Box22, { height: 1, marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "gray", children: refreshing ? "Fetching latest repository data" : sortingLoading ? `Sorting by ${sortKey} (${sortDir === "asc" ? "ascending" : "descending"})` : "Fetching your GitHub repositories" }) })
3507
3942
  ] }) }) }) }),
3508
- /* @__PURE__ */ jsx21(Box20, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx21(Text21, { color: "gray", children: "Please wait..." }) })
3943
+ /* @__PURE__ */ jsx23(Box22, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "gray", children: "Please wait..." }) })
3509
3944
  ] });
3510
3945
  }
3511
- return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", height: availableHeight, children: [
3946
+ return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", height: availableHeight, children: [
3512
3947
  headerBar,
3513
- showSponsorReminder && /* @__PURE__ */ jsx21(Box20, { marginX: 1, marginBottom: 1, children: /* @__PURE__ */ jsx21(Box20, { borderStyle: "single", borderColor: "yellow", paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", alignItems: "center", children: [
3514
- /* @__PURE__ */ jsx21(Text21, { color: "yellow", children: "\u{1F49A} Thanks for using gh-manager-cli!" }),
3515
- /* @__PURE__ */ jsx21(Text21, { color: "gray", children: "Your support helps craft more open-source tools" }),
3516
- /* @__PURE__ */ jsx21(Text21, { color: "cyan", children: "\u{1F496} github.com/sponsors/wiiiimm" })
3948
+ showSponsorReminder && /* @__PURE__ */ jsx23(Box22, { marginX: 1, marginBottom: 1, children: /* @__PURE__ */ jsx23(Box22, { borderStyle: "single", borderColor: "yellow", paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", alignItems: "center", children: [
3949
+ /* @__PURE__ */ jsx23(Text23, { color: "yellow", children: "\u{1F49A} Thanks for using gh-manager-cli!" }),
3950
+ /* @__PURE__ */ jsx23(Text23, { color: "gray", children: "Your support helps craft more open-source tools" }),
3951
+ /* @__PURE__ */ jsx23(Text23, { color: "cyan", children: "\u{1F496} github.com/sponsors/wiiiimm" })
3517
3952
  ] }) }) }),
3518
- /* @__PURE__ */ jsx21(Box20, { borderStyle: "single", borderColor: modalOpen ? theme.muted : theme.warning, paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: deleteMode && deleteTarget ? (
3953
+ /* @__PURE__ */ jsx23(Box22, { borderStyle: "single", borderColor: modalOpen ? theme.muted : theme.warning, paddingX: 1, paddingY: 1, marginX: 1, height: contentHeight + containerPadding + 2, flexDirection: "column", children: deleteMode && deleteTarget ? (
3519
3954
  // Centered modal; hide list content while modal is open
3520
- /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: "red", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
3521
- /* @__PURE__ */ jsx21(Text21, { bold: true, children: "Delete Confirmation" }),
3522
- /* @__PURE__ */ jsx21(Text21, { color: "red", children: "\u26A0\uFE0F Delete repository?" }),
3523
- /* @__PURE__ */ jsx21(Box20, { height: 2, children: /* @__PURE__ */ jsx21(Text21, { children: " " }) }),
3955
+ /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", borderStyle: "round", borderColor: "red", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
3956
+ /* @__PURE__ */ jsx23(Text23, { bold: true, children: "Delete Confirmation" }),
3957
+ /* @__PURE__ */ jsx23(Text23, { color: "red", children: "\u26A0\uFE0F Delete repository?" }),
3958
+ /* @__PURE__ */ jsx23(Box22, { height: 2, children: /* @__PURE__ */ jsx23(Text23, { children: " " }) }),
3524
3959
  (() => {
3525
3960
  const langName = deleteTarget.primaryLanguage?.name || "";
3526
3961
  const langColor = deleteTarget.primaryLanguage?.color || "#666666";
@@ -3532,20 +3967,20 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3532
3967
  let line2 = "";
3533
3968
  if (langName) line2 += chalk15.hex(langColor)("\u25CF ") + tc.muted(`${langName} `);
3534
3969
  line2 += tc.muted(`\u2605 ${deleteTarget.stargazerCount} \u2442 ${deleteTarget.forkCount} Updated ${formatDate(deleteTarget.updatedAt)}`);
3535
- return /* @__PURE__ */ jsxs20(Fragment9, { children: [
3536
- /* @__PURE__ */ jsx21(Text21, { children: line1 }),
3537
- /* @__PURE__ */ jsx21(Text21, { children: line2 })
3970
+ return /* @__PURE__ */ jsxs22(Fragment11, { children: [
3971
+ /* @__PURE__ */ jsx23(Text23, { children: line1 }),
3972
+ /* @__PURE__ */ jsx23(Text23, { children: line2 })
3538
3973
  ] });
3539
3974
  })(),
3540
- /* @__PURE__ */ jsx21(Box20, { marginTop: 1, children: /* @__PURE__ */ jsxs20(Text21, { children: [
3975
+ /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text23, { children: [
3541
3976
  "Type ",
3542
- /* @__PURE__ */ jsx21(Text21, { color: "yellow", bold: true, children: deleteCode }),
3977
+ /* @__PURE__ */ jsx23(Text23, { color: "yellow", bold: true, children: deleteCode }),
3543
3978
  " to confirm."
3544
3979
  ] }) }),
3545
- !deleteConfirmStage && /* @__PURE__ */ jsxs20(Box20, { marginTop: 1, children: [
3546
- /* @__PURE__ */ jsx21(Text21, { children: "Confirm code: " }),
3547
- /* @__PURE__ */ jsx21(
3548
- TextInput5,
3980
+ !deleteConfirmStage && /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, children: [
3981
+ /* @__PURE__ */ jsx23(Text23, { children: "Confirm code: " }),
3982
+ /* @__PURE__ */ jsx23(
3983
+ TextInput7,
3549
3984
  {
3550
3985
  value: typedCode,
3551
3986
  onChange: (v) => {
@@ -3571,11 +4006,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3571
4006
  }
3572
4007
  )
3573
4008
  ] }),
3574
- deleteConfirmStage && /* @__PURE__ */ jsxs20(Box20, { marginTop: 1, flexDirection: "column", children: [
3575
- /* @__PURE__ */ jsx21(Text21, { color: "red", children: "This action will permanently delete the repository. This cannot be undone." }),
3576
- /* @__PURE__ */ jsxs20(Box20, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
3577
- /* @__PURE__ */ jsx21(
3578
- Box20,
4009
+ deleteConfirmStage && /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, flexDirection: "column", children: [
4010
+ /* @__PURE__ */ jsx23(Text23, { color: "red", children: "This action will permanently delete the repository. This cannot be undone." }),
4011
+ /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
4012
+ /* @__PURE__ */ jsx23(
4013
+ Box22,
3579
4014
  {
3580
4015
  borderStyle: "round",
3581
4016
  borderColor: "red",
@@ -3584,11 +4019,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3584
4019
  alignItems: "center",
3585
4020
  justifyContent: "center",
3586
4021
  flexDirection: "column",
3587
- children: /* @__PURE__ */ jsx21(Text21, { children: confirmFocus === "delete" ? chalk15.bgRed.white.bold(" Delete ") : tc.error.bold("Delete") })
4022
+ children: /* @__PURE__ */ jsx23(Text23, { children: confirmFocus === "delete" ? chalk15.bgRed.white.bold(" Delete ") : tc.error.bold("Delete") })
3588
4023
  }
3589
4024
  ),
3590
- /* @__PURE__ */ jsx21(
3591
- Box20,
4025
+ /* @__PURE__ */ jsx23(
4026
+ Box22,
3592
4027
  {
3593
4028
  borderStyle: "round",
3594
4029
  borderColor: confirmFocus === "cancel" ? "white" : "gray",
@@ -3597,17 +4032,17 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3597
4032
  alignItems: "center",
3598
4033
  justifyContent: "center",
3599
4034
  flexDirection: "column",
3600
- children: /* @__PURE__ */ jsx21(Text21, { children: confirmFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
4035
+ children: /* @__PURE__ */ jsx23(Text23, { children: confirmFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
3601
4036
  }
3602
4037
  )
3603
4038
  ] }),
3604
- /* @__PURE__ */ jsx21(Box20, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs20(Text21, { color: "gray", children: [
4039
+ /* @__PURE__ */ jsx23(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Text23, { color: "gray", children: [
3605
4040
  "Press Enter to ",
3606
4041
  confirmFocus === "delete" ? "Delete" : "Cancel",
3607
4042
  " | Y to Delete | C to Cancel"
3608
4043
  ] }) }),
3609
- /* @__PURE__ */ jsx21(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx21(
3610
- TextInput5,
4044
+ /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(
4045
+ TextInput7,
3611
4046
  {
3612
4047
  value: "",
3613
4048
  onChange: () => {
@@ -3620,18 +4055,18 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3620
4055
  }
3621
4056
  ) })
3622
4057
  ] }),
3623
- deleteError && /* @__PURE__ */ jsx21(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx21(Text21, { color: "magenta", children: deleteError }) }),
3624
- deleting && /* @__PURE__ */ jsx21(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx21(Text21, { color: "yellow", children: "Deleting..." }) })
4058
+ deleteError && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "magenta", children: deleteError }) }),
4059
+ deleting && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "yellow", children: "Deleting..." }) })
3625
4060
  ] }) })
3626
- ) : archiveMode && archiveTarget ? /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: archiveTarget.isArchived ? "green" : "yellow", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
3627
- /* @__PURE__ */ jsx21(Text21, { bold: true, children: archiveTarget.isArchived ? "Unarchive Confirmation" : "Archive Confirmation" }),
3628
- /* @__PURE__ */ jsx21(Text21, { color: archiveTarget.isArchived ? "green" : "yellow", children: archiveTarget.isArchived ? "\u21BA Unarchive repository?" : "\u26A0\uFE0F Archive repository?" }),
3629
- /* @__PURE__ */ jsx21(Box20, { height: 1, children: /* @__PURE__ */ jsx21(Text21, { children: " " }) }),
3630
- /* @__PURE__ */ jsx21(Text21, { children: archiveTarget.nameWithOwner }),
3631
- /* @__PURE__ */ jsx21(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx21(Text21, { children: archiveTarget.isArchived ? "This will make the repository active again." : "This will make the repository read-only." }) }),
3632
- /* @__PURE__ */ jsxs20(Box20, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
3633
- /* @__PURE__ */ jsx21(
3634
- Box20,
4061
+ ) : archiveMode && archiveTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", borderStyle: "round", borderColor: archiveTarget.isArchived ? "green" : "yellow", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
4062
+ /* @__PURE__ */ jsx23(Text23, { bold: true, children: archiveTarget.isArchived ? "Unarchive Confirmation" : "Archive Confirmation" }),
4063
+ /* @__PURE__ */ jsx23(Text23, { color: archiveTarget.isArchived ? "green" : "yellow", children: archiveTarget.isArchived ? "\u21BA Unarchive repository?" : "\u26A0\uFE0F Archive repository?" }),
4064
+ /* @__PURE__ */ jsx23(Box22, { height: 1, children: /* @__PURE__ */ jsx23(Text23, { children: " " }) }),
4065
+ /* @__PURE__ */ jsx23(Text23, { children: archiveTarget.nameWithOwner }),
4066
+ /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { children: archiveTarget.isArchived ? "This will make the repository active again." : "This will make the repository read-only." }) }),
4067
+ /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
4068
+ /* @__PURE__ */ jsx23(
4069
+ Box22,
3635
4070
  {
3636
4071
  borderStyle: "round",
3637
4072
  borderColor: archiveTarget.isArchived ? "green" : "yellow",
@@ -3640,11 +4075,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3640
4075
  alignItems: "center",
3641
4076
  justifyContent: "center",
3642
4077
  flexDirection: "column",
3643
- children: /* @__PURE__ */ jsx21(Text21, { children: archiveFocus === "confirm" ? chalk15.bgGreen.white.bold(` ${archiveTarget.isArchived ? "Unarchive" : "Archive"} `) : (archiveTarget.isArchived ? tc.success : tc.warning).bold(archiveTarget.isArchived ? "Unarchive" : "Archive") })
4078
+ children: /* @__PURE__ */ jsx23(Text23, { children: archiveFocus === "confirm" ? chalk15.bgGreen.white.bold(` ${archiveTarget.isArchived ? "Unarchive" : "Archive"} `) : (archiveTarget.isArchived ? tc.success : tc.warning).bold(archiveTarget.isArchived ? "Unarchive" : "Archive") })
3644
4079
  }
3645
4080
  ),
3646
- /* @__PURE__ */ jsx21(
3647
- Box20,
4081
+ /* @__PURE__ */ jsx23(
4082
+ Box22,
3648
4083
  {
3649
4084
  borderStyle: "round",
3650
4085
  borderColor: archiveFocus === "cancel" ? "white" : "gray",
@@ -3653,19 +4088,19 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3653
4088
  alignItems: "center",
3654
4089
  justifyContent: "center",
3655
4090
  flexDirection: "column",
3656
- children: /* @__PURE__ */ jsx21(Text21, { children: archiveFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
4091
+ children: /* @__PURE__ */ jsx23(Text23, { children: archiveFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
3657
4092
  }
3658
4093
  )
3659
4094
  ] }),
3660
- /* @__PURE__ */ jsx21(Box20, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs20(Text21, { color: theme.muted, children: [
4095
+ /* @__PURE__ */ jsx23(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, children: [
3661
4096
  "Press Enter to ",
3662
4097
  archiveFocus === "confirm" ? archiveTarget.isArchived ? "Unarchive" : "Archive" : "Cancel",
3663
4098
  " | Y to ",
3664
4099
  archiveTarget.isArchived ? "Unarchive" : "Archive",
3665
4100
  " | C to Cancel"
3666
4101
  ] }) }),
3667
- /* @__PURE__ */ jsx21(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx21(
3668
- TextInput5,
4102
+ /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(
4103
+ TextInput7,
3669
4104
  {
3670
4105
  value: "",
3671
4106
  onChange: () => {
@@ -3679,14 +4114,14 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3679
4114
  }
3680
4115
  }
3681
4116
  ) }),
3682
- archiveError && /* @__PURE__ */ jsx21(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx21(Text21, { color: "magenta", children: archiveError }) }),
3683
- archiving && /* @__PURE__ */ jsx21(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx21(Text21, { color: "yellow", children: archiveTarget.isArchived ? "Unarchiving..." : "Archiving..." }) })
3684
- ] }) }) : syncMode && syncTarget ? /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: "blue", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
3685
- /* @__PURE__ */ jsx21(Text21, { bold: true, children: "Sync Fork Confirmation" }),
3686
- /* @__PURE__ */ jsx21(Text21, { color: "blue", children: "\u27F2 Sync fork with upstream?" }),
3687
- /* @__PURE__ */ jsx21(Box20, { height: 1, children: /* @__PURE__ */ jsx21(Text21, { children: " " }) }),
3688
- /* @__PURE__ */ jsx21(Text21, { children: syncTarget.nameWithOwner }),
3689
- syncTarget.parent && /* @__PURE__ */ jsxs20(Text21, { color: "gray", children: [
4117
+ archiveError && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "magenta", children: archiveError }) }),
4118
+ archiving && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "yellow", children: archiveTarget.isArchived ? "Unarchiving..." : "Archiving..." }) })
4119
+ ] }) }) : syncMode && syncTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", borderStyle: "round", borderColor: "blue", paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
4120
+ /* @__PURE__ */ jsx23(Text23, { bold: true, children: "Sync Fork Confirmation" }),
4121
+ /* @__PURE__ */ jsx23(Text23, { color: "blue", children: "\u27F2 Sync fork with upstream?" }),
4122
+ /* @__PURE__ */ jsx23(Box22, { height: 1, children: /* @__PURE__ */ jsx23(Text23, { children: " " }) }),
4123
+ /* @__PURE__ */ jsx23(Text23, { children: syncTarget.nameWithOwner }),
4124
+ syncTarget.parent && /* @__PURE__ */ jsxs22(Text23, { color: "gray", children: [
3690
4125
  "Upstream: ",
3691
4126
  syncTarget.parent.nameWithOwner
3692
4127
  ] }),
@@ -3701,12 +4136,12 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3701
4136
  if (ahead > 0) parts.push(chalk15.green(`${ahead} ahead`));
3702
4137
  if (behind > 0) parts.push(chalk15.yellow(`${behind} behind`));
3703
4138
  const statusText = parts.length === 0 ? chalk15.green("Your fork is up to date with upstream.") : `This fork is ${parts.join(", ")} of upstream.`;
3704
- return /* @__PURE__ */ jsx21(Text21, { children: statusText });
4139
+ return /* @__PURE__ */ jsx23(Text23, { children: statusText });
3705
4140
  })(),
3706
- /* @__PURE__ */ jsx21(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx21(Text21, { children: "This will merge upstream changes into your fork." }) }),
3707
- /* @__PURE__ */ jsxs20(Box20, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
3708
- /* @__PURE__ */ jsx21(
3709
- Box20,
4141
+ /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { children: "This will merge upstream changes into your fork." }) }),
4142
+ /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
4143
+ /* @__PURE__ */ jsx23(
4144
+ Box22,
3710
4145
  {
3711
4146
  borderStyle: "round",
3712
4147
  borderColor: "blue",
@@ -3715,11 +4150,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3715
4150
  alignItems: "center",
3716
4151
  justifyContent: "center",
3717
4152
  flexDirection: "column",
3718
- children: /* @__PURE__ */ jsx21(Text21, { children: syncFocus === "confirm" ? tc.btnPrimary(" Sync ") : tc.primary.bold("Sync") })
4153
+ children: /* @__PURE__ */ jsx23(Text23, { children: syncFocus === "confirm" ? tc.btnPrimary(" Sync ") : tc.primary.bold("Sync") })
3719
4154
  }
3720
4155
  ),
3721
- /* @__PURE__ */ jsx21(
3722
- Box20,
4156
+ /* @__PURE__ */ jsx23(
4157
+ Box22,
3723
4158
  {
3724
4159
  borderStyle: "round",
3725
4160
  borderColor: syncFocus === "cancel" ? "white" : "gray",
@@ -3728,17 +4163,17 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3728
4163
  alignItems: "center",
3729
4164
  justifyContent: "center",
3730
4165
  flexDirection: "column",
3731
- children: /* @__PURE__ */ jsx21(Text21, { children: syncFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
4166
+ children: /* @__PURE__ */ jsx23(Text23, { children: syncFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
3732
4167
  }
3733
4168
  )
3734
4169
  ] }),
3735
- /* @__PURE__ */ jsx21(Box20, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs20(Text21, { color: theme.muted, children: [
4170
+ /* @__PURE__ */ jsx23(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, children: [
3736
4171
  "Press Enter to ",
3737
4172
  syncFocus === "confirm" ? "Sync" : "Cancel",
3738
4173
  " | Y to Sync | C to Cancel"
3739
4174
  ] }) }),
3740
- /* @__PURE__ */ jsx21(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx21(
3741
- TextInput5,
4175
+ /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(
4176
+ TextInput7,
3742
4177
  {
3743
4178
  value: "",
3744
4179
  onChange: () => {
@@ -3752,14 +4187,14 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3752
4187
  }
3753
4188
  }
3754
4189
  ) }),
3755
- syncError && /* @__PURE__ */ jsx21(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx21(Text21, { color: theme.error, children: syncError }) }),
3756
- syncing && /* @__PURE__ */ jsx21(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx21(Text21, { color: theme.warning, children: "Syncing..." }) })
3757
- ] }) }) : logoutMode ? /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: theme.primary, paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
3758
- /* @__PURE__ */ jsx21(Text21, { bold: true, children: "Logout Confirmation" }),
3759
- /* @__PURE__ */ jsx21(Text21, { color: theme.primary, children: "Are you sure you want to log out?" }),
3760
- /* @__PURE__ */ jsxs20(Box20, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
3761
- /* @__PURE__ */ jsx21(
3762
- Box20,
4190
+ syncError && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: theme.error, children: syncError }) }),
4191
+ syncing && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: theme.warning, children: "Syncing..." }) })
4192
+ ] }) }) : logoutMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", borderStyle: "round", borderColor: theme.primary, paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 80), children: [
4193
+ /* @__PURE__ */ jsx23(Text23, { bold: true, children: "Logout Confirmation" }),
4194
+ /* @__PURE__ */ jsx23(Text23, { color: theme.primary, children: "Are you sure you want to log out?" }),
4195
+ /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", gap: 6, children: [
4196
+ /* @__PURE__ */ jsx23(
4197
+ Box22,
3763
4198
  {
3764
4199
  borderStyle: "round",
3765
4200
  borderColor: theme.primary,
@@ -3768,11 +4203,11 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3768
4203
  alignItems: "center",
3769
4204
  justifyContent: "center",
3770
4205
  flexDirection: "column",
3771
- children: /* @__PURE__ */ jsx21(Text21, { children: logoutFocus === "confirm" ? tc.btnPrimary(" Logout ") : tc.primary.bold("Logout") })
4206
+ children: /* @__PURE__ */ jsx23(Text23, { children: logoutFocus === "confirm" ? tc.btnPrimary(" Logout ") : tc.primary.bold("Logout") })
3772
4207
  }
3773
4208
  ),
3774
- /* @__PURE__ */ jsx21(
3775
- Box20,
4209
+ /* @__PURE__ */ jsx23(
4210
+ Box22,
3776
4211
  {
3777
4212
  borderStyle: "round",
3778
4213
  borderColor: logoutFocus === "cancel" ? "white" : theme.muted,
@@ -3781,16 +4216,16 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3781
4216
  alignItems: "center",
3782
4217
  justifyContent: "center",
3783
4218
  flexDirection: "column",
3784
- children: /* @__PURE__ */ jsx21(Text21, { children: logoutFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
4219
+ children: /* @__PURE__ */ jsx23(Text23, { children: logoutFocus === "cancel" ? tc.btnMuted(" Cancel ") : tc.muted.bold("Cancel") })
3785
4220
  }
3786
4221
  )
3787
4222
  ] }),
3788
- /* @__PURE__ */ jsx21(Box20, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs20(Text21, { color: theme.muted, children: [
4223
+ /* @__PURE__ */ jsx23(Box22, { marginTop: 1, flexDirection: "row", justifyContent: "center", children: /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, children: [
3789
4224
  "Press Enter to ",
3790
4225
  logoutFocus === "confirm" ? "Logout" : "Cancel",
3791
4226
  " | Y to Logout | C to Cancel"
3792
4227
  ] }) })
3793
- ] }) }) : orgSwitcherOpen ? /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx21(
4228
+ ] }) }) : orgSwitcherOpen ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
3794
4229
  OrgSwitcher,
3795
4230
  {
3796
4231
  token,
@@ -3798,45 +4233,45 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3798
4233
  onSelect: handleOrgContextChange,
3799
4234
  onClose: () => setOrgSwitcherOpen(false)
3800
4235
  }
3801
- ) }) : infoMode ? /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: (() => {
4236
+ ) }) : infoMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: (() => {
3802
4237
  const repo = infoRepo || visibleItems[cursor];
3803
- if (!repo) return /* @__PURE__ */ jsx21(Text21, { color: theme.error, children: "No repository selected." });
4238
+ if (!repo) return /* @__PURE__ */ jsx23(Text23, { color: theme.error, children: "No repository selected." });
3804
4239
  const langName = repo.primaryLanguage?.name || "N/A";
3805
4240
  const langColor = repo.primaryLanguage?.color || "#666666";
3806
- return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "round", borderColor: theme.internal, paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 90), children: [
3807
- /* @__PURE__ */ jsxs20(Text21, { bold: true, children: [
4241
+ return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", borderStyle: "round", borderColor: theme.internal, paddingX: 3, paddingY: 2, width: Math.min(terminalWidth - 8, 90), children: [
4242
+ /* @__PURE__ */ jsxs22(Text23, { bold: true, children: [
3808
4243
  "Repository Info ",
3809
4244
  infoRepo ? tc.muted("(cached)") : ""
3810
4245
  ] }),
3811
- /* @__PURE__ */ jsx21(Box20, { height: 1, children: /* @__PURE__ */ jsx21(Text21, { children: " " }) }),
3812
- /* @__PURE__ */ jsx21(Text21, { children: tc.text.bold(repo.nameWithOwner) }),
3813
- repo.description && /* @__PURE__ */ jsx21(Text21, { color: theme.muted, children: repo.description }),
3814
- /* @__PURE__ */ jsx21(Box20, { height: 1, children: /* @__PURE__ */ jsx21(Text21, { children: " " }) }),
3815
- /* @__PURE__ */ jsxs20(Text21, { children: [
4246
+ /* @__PURE__ */ jsx23(Box22, { height: 1, children: /* @__PURE__ */ jsx23(Text23, { children: " " }) }),
4247
+ /* @__PURE__ */ jsx23(Text23, { children: tc.text.bold(repo.nameWithOwner) }),
4248
+ repo.description && /* @__PURE__ */ jsx23(Text23, { color: theme.muted, children: repo.description }),
4249
+ /* @__PURE__ */ jsx23(Box22, { height: 1, children: /* @__PURE__ */ jsx23(Text23, { children: " " }) }),
4250
+ /* @__PURE__ */ jsxs22(Text23, { children: [
3816
4251
  repo.visibility === "PRIVATE" ? tc.private("Private") : repo.visibility === "INTERNAL" ? tc.internal("Internal") : tc.success("Public"),
3817
4252
  repo.isArchived ? tc.archived(" Archived") : "",
3818
4253
  repo.isFork ? tc.fork(" Fork") : ""
3819
4254
  ] }),
3820
- /* @__PURE__ */ jsx21(Text21, { children: tc.muted(`\u2605 ${repo.stargazerCount} \u2442 ${repo.forkCount}`) }),
3821
- /* @__PURE__ */ jsxs20(Text21, { children: [
4255
+ /* @__PURE__ */ jsx23(Text23, { children: tc.muted(`\u2605 ${repo.stargazerCount} \u2442 ${repo.forkCount}`) }),
4256
+ /* @__PURE__ */ jsxs22(Text23, { children: [
3822
4257
  chalk15.hex(langColor)(`\u25CF `),
3823
4258
  tc.muted(`${langName}`)
3824
4259
  ] }),
3825
- /* @__PURE__ */ jsxs20(Text21, { color: theme.muted, children: [
4260
+ /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, children: [
3826
4261
  "Updated: ",
3827
4262
  formatDate(repo.updatedAt),
3828
4263
  " \u2022 Pushed: ",
3829
4264
  formatDate(repo.pushedAt)
3830
4265
  ] }),
3831
- /* @__PURE__ */ jsxs20(Text21, { color: theme.muted, children: [
4266
+ /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, children: [
3832
4267
  "Size: ",
3833
4268
  repo.diskUsage,
3834
4269
  " KB"
3835
4270
  ] }),
3836
- /* @__PURE__ */ jsx21(Box20, { height: 1, children: /* @__PURE__ */ jsx21(Text21, { children: " " }) }),
3837
- /* @__PURE__ */ jsx21(Text21, { color: theme.muted, children: "Press Esc or I to close" })
4271
+ /* @__PURE__ */ jsx23(Box22, { height: 1, children: /* @__PURE__ */ jsx23(Text23, { children: " " }) }),
4272
+ /* @__PURE__ */ jsx23(Text23, { color: theme.muted, children: "Press Esc or I to close" })
3838
4273
  ] });
3839
- })() }) : archiveFilterMode ? /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx21(
4274
+ })() }) : archiveFilterMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
3840
4275
  ArchiveFilterModal,
3841
4276
  {
3842
4277
  currentFilter: archiveFilter,
@@ -3849,7 +4284,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3849
4284
  onCancel: () => setArchiveFilterMode(false),
3850
4285
  theme
3851
4286
  }
3852
- ) }) : visibilityMode ? /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx21(
4287
+ ) }) : visibilityMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
3853
4288
  VisibilityModal,
3854
4289
  {
3855
4290
  currentFilter: visibilityFilter,
@@ -3863,7 +4298,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3863
4298
  onCancel: () => setVisibilityMode(false),
3864
4299
  theme
3865
4300
  }
3866
- ) }) : sortMode ? /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx21(
4301
+ ) }) : sortMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
3867
4302
  SortModal,
3868
4303
  {
3869
4304
  currentSort: sortKey,
@@ -3876,7 +4311,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3876
4311
  onCancel: () => setSortMode(false),
3877
4312
  theme
3878
4313
  }
3879
- ) }) : sortDirectionMode ? /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx21(
4314
+ ) }) : sortDirectionMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
3880
4315
  SortDirectionModal,
3881
4316
  {
3882
4317
  currentDirection: sortDir,
@@ -3890,7 +4325,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3890
4325
  onCancel: () => setSortDirectionMode(false),
3891
4326
  theme
3892
4327
  }
3893
- ) }) : changeVisibilityMode && changeVisibilityTarget ? /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx21(
4328
+ ) }) : changeVisibilityMode && changeVisibilityTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
3894
4329
  ChangeVisibilityModal,
3895
4330
  {
3896
4331
  isOpen: changeVisibilityMode,
@@ -3904,7 +4339,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3904
4339
  error: changeVisibilityError,
3905
4340
  theme
3906
4341
  }
3907
- ) }) : renameMode && renameTarget ? /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx21(
4342
+ ) }) : renameMode && renameTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
3908
4343
  RenameModal,
3909
4344
  {
3910
4345
  repo: renameTarget,
@@ -3912,7 +4347,25 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3912
4347
  onCancel: closeRenameModal,
3913
4348
  theme
3914
4349
  }
3915
- ) }) : copyUrlMode ? /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx21(
4350
+ ) }) : createMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
4351
+ CreateRepoModal,
4352
+ {
4353
+ ownerSlug: ownerContext === "personal" ? viewerLogin || "me" : ownerContext.login,
4354
+ isOrg: ownerContext !== "personal",
4355
+ isEnterprise: isEnterpriseOrg,
4356
+ onCreate: executeCreate,
4357
+ onCancel: () => setCreateMode(false),
4358
+ theme
4359
+ }
4360
+ ) }) : transferMode && transferTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
4361
+ TransferModal,
4362
+ {
4363
+ repo: transferTarget,
4364
+ onTransfer: executeTransfer,
4365
+ onCancel: closeTransferModal,
4366
+ theme
4367
+ }
4368
+ ) }) : copyUrlMode ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
3916
4369
  CopyUrlModal,
3917
4370
  {
3918
4371
  repo: copyUrlTarget,
@@ -3921,7 +4374,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3921
4374
  onCopy: handleCopyUrl,
3922
4375
  theme
3923
4376
  }
3924
- ) }) : unstarMode && unstarTarget ? /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx21(
4377
+ ) }) : unstarMode && unstarTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
3925
4378
  UnstarModal,
3926
4379
  {
3927
4380
  visible: unstarMode,
@@ -3932,7 +4385,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3932
4385
  error: unstarError,
3933
4386
  theme
3934
4387
  }
3935
- ) }) : starMode && starTarget ? /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx21(
4388
+ ) }) : starMode && starTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
3936
4389
  StarModal,
3937
4390
  {
3938
4391
  visible: starMode,
@@ -3944,7 +4397,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3944
4397
  error: starError,
3945
4398
  theme
3946
4399
  }
3947
- ) }) : openInBrowserMode && openInBrowserTarget ? /* @__PURE__ */ jsx21(Box20, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx21(
4400
+ ) }) : openInBrowserMode && openInBrowserTarget ? /* @__PURE__ */ jsx23(Box22, { height: contentHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx23(
3948
4401
  OpenInBrowserModal,
3949
4402
  {
3950
4403
  repo: openInBrowserTarget,
@@ -3959,8 +4412,8 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3959
4412
  },
3960
4413
  theme
3961
4414
  }
3962
- ) }) : /* @__PURE__ */ jsxs20(Fragment9, { children: [
3963
- /* @__PURE__ */ jsx21(
4415
+ ) }) : /* @__PURE__ */ jsxs22(Fragment11, { children: [
4416
+ /* @__PURE__ */ jsx23(
3964
4417
  RepoListHeader,
3965
4418
  {
3966
4419
  ownerContext,
@@ -3976,10 +4429,10 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3976
4429
  theme
3977
4430
  }
3978
4431
  ),
3979
- filterMode && /* @__PURE__ */ jsxs20(Box20, { marginBottom: 1, children: [
3980
- /* @__PURE__ */ jsx21(Text21, { children: "Search: " }),
3981
- /* @__PURE__ */ jsx21(
3982
- TextInput5,
4432
+ filterMode && /* @__PURE__ */ jsxs22(Box22, { marginBottom: 1, children: [
4433
+ /* @__PURE__ */ jsx23(Text23, { children: "Search: " }),
4434
+ /* @__PURE__ */ jsx23(
4435
+ TextInput7,
3983
4436
  {
3984
4437
  value: filter,
3985
4438
  onChange: (val) => {
@@ -3992,10 +4445,10 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
3992
4445
  }
3993
4446
  )
3994
4447
  ] }),
3995
- /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", height: listHeight, children: [
4448
+ /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", height: listHeight, children: [
3996
4449
  visibleItems.slice(windowed.start, windowed.end).map((repo, i) => {
3997
4450
  const idx = windowed.start + i;
3998
- return /* @__PURE__ */ jsx21(
4451
+ return /* @__PURE__ */ jsx23(
3999
4452
  RepoRow,
4000
4453
  {
4001
4454
  repo,
@@ -4010,55 +4463,59 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
4010
4463
  repo.nameWithOwner
4011
4464
  );
4012
4465
  }),
4013
- loadingMore && hasNextPage && !starsMode && /* @__PURE__ */ jsx21(Box20, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs20(Box20, { flexDirection: "row", children: [
4014
- /* @__PURE__ */ jsx21(Box20, { width: 2, flexShrink: 0, flexGrow: 0, marginRight: 1, children: /* @__PURE__ */ jsx21(Text21, { color: "cyan", children: /* @__PURE__ */ jsx21(SlowSpinner, {}) }) }),
4015
- /* @__PURE__ */ jsxs20(Text21, { color: "cyan", children: [
4466
+ loadingMore && hasNextPage && !starsMode && /* @__PURE__ */ jsx23(Box22, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", children: [
4467
+ /* @__PURE__ */ jsx23(Box22, { width: 2, flexShrink: 0, flexGrow: 0, marginRight: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "cyan", children: /* @__PURE__ */ jsx23(SlowSpinner, {}) }) }),
4468
+ /* @__PURE__ */ jsxs22(Text23, { color: "cyan", children: [
4016
4469
  "Loading repositories\u2026 ",
4017
4470
  totalCount > 0 ? `(${items.length}/${totalCount})` : `(${items.length})`
4018
4471
  ] })
4019
4472
  ] }) }),
4020
- loadingMore && hasNextPage && starsMode && /* @__PURE__ */ jsx21(Box20, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs20(Box20, { flexDirection: "row", children: [
4021
- /* @__PURE__ */ jsx21(Box20, { width: 2, flexShrink: 0, flexGrow: 0, marginRight: 1, children: /* @__PURE__ */ jsx21(Text21, { color: "cyan", children: /* @__PURE__ */ jsx21(SlowSpinner, {}) }) }),
4022
- /* @__PURE__ */ jsx21(Text21, { color: "cyan", children: "Loading more repositories..." })
4473
+ loadingMore && hasNextPage && starsMode && /* @__PURE__ */ jsx23(Box22, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs22(Box22, { flexDirection: "row", children: [
4474
+ /* @__PURE__ */ jsx23(Box22, { width: 2, flexShrink: 0, flexGrow: 0, marginRight: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "cyan", children: /* @__PURE__ */ jsx23(SlowSpinner, {}) }) }),
4475
+ /* @__PURE__ */ jsx23(Text23, { color: "cyan", children: "Loading more repositories..." })
4023
4476
  ] }) }),
4024
- filterActive && hasNextPage && !starsMode && /* @__PURE__ */ jsx21(Box20, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs20(Text21, { color: "yellow", dimColor: true, children: [
4477
+ filterActive && hasNextPage && !starsMode && /* @__PURE__ */ jsx23(Box22, { justifyContent: "center", alignItems: "center", marginTop: 1, children: /* @__PURE__ */ jsxs22(Text23, { color: "yellow", dimColor: true, children: [
4025
4478
  "Still loading repos (",
4026
4479
  items.length,
4027
4480
  "/",
4028
4481
  totalCount > 0 ? totalCount : "?",
4029
4482
  ") \u2014 fuzzy results may be incomplete"
4030
4483
  ] }) }),
4031
- !loading && visibleItems.length === 0 && !(filterActive && hasNextPage && !starsMode) && /* @__PURE__ */ jsx21(Box20, { justifyContent: "center", alignItems: "center", flexGrow: 1, children: /* @__PURE__ */ jsx21(Text21, { color: "gray", dimColor: true, children: filter ? "No repositories match your search" : "No repositories found" }) })
4484
+ !loading && visibleItems.length === 0 && !(filterActive && hasNextPage && !starsMode) && /* @__PURE__ */ jsx23(Box22, { justifyContent: "center", alignItems: "center", flexGrow: 1, children: /* @__PURE__ */ jsx23(Text23, { color: "gray", dimColor: true, children: filter ? "No repositories match your search" : "No repositories found" }) })
4032
4485
  ] })
4033
4486
  ] }) }),
4034
- /* @__PURE__ */ jsxs20(Box20, { marginTop: 1, paddingX: 1, flexDirection: "column", children: [
4035
- /* @__PURE__ */ jsx21(Box20, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx21(Text21, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: "\u2191\u2193 Navigate \u2022 Ctrl+G Top \u2022 G Bottom \u2022 \u23CE/O Open \u2022 R Refresh" }) }),
4036
- /* @__PURE__ */ jsx21(Box20, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsxs20(Text21, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: [
4487
+ /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, paddingX: 1, flexDirection: "column", children: [
4488
+ /* @__PURE__ */ jsx23(Box22, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx23(Text23, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: "\u2191\u2193 Navigate \u2022 Ctrl+G Top \u2022 G Bottom \u2022 \u23CE/O Open \u2022 R Refresh" }) }),
4489
+ /* @__PURE__ */ jsx23(Box22, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: [
4037
4490
  "/ Search",
4038
4491
  !filterActive && " \u2022 S Sort \u2022 D Direction",
4039
4492
  " \u2022 T Density \u2022 Shift+T Theme \u2022 A Archive Filter",
4040
4493
  !starsMode && " \u2022 V Visibility Filter"
4041
4494
  ] }) }),
4042
- /* @__PURE__ */ jsx21(Box20, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx21(Text21, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: starsMode ? "Shift+S My Repos \u2022 I Info \u2022 C Copy URL \u2022 U Unstar Repository" : `${ownerContext === "personal" ? "Shift+S Starred \u2022 " : ""}I Info \u2022 C Copy URL \u2022 Ctrl+S Un/Star \u2022 Ctrl+R Rename \u2022 Ctrl+A Un/Archive \u2022 Ctrl+V Change Visibility \u2022 Ctrl+F Sync Fork \u2022 P Jump to upstream` }) }),
4043
- /* @__PURE__ */ jsx21(Box20, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx21(Text21, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: "K Cache Info \u2022 W Org Switch \u2022 Del/Backspace Delete \u2022 Ctrl+L Logout \u2022 Q Quit" }) }),
4044
- /* @__PURE__ */ jsx21(Box20, { width: terminalWidth, justifyContent: "center", marginTop: 1, children: /* @__PURE__ */ jsx21(Text21, { color: theme.warning, dimColor: modalOpen ? true : void 0, children: "\u{1F496} Sponsor on GitHub: github.com/sponsors/wiiiimm" }) })
4495
+ /* @__PURE__ */ jsx23(Box22, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx23(Text23, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: starsMode ? "Shift+S My Repos \u2022 I Info \u2022 C Copy URL \u2022 U Unstar Repository" : `${ownerContext === "personal" ? "Shift+S Starred \u2022 " : ""}I Info \u2022 C Copy URL \u2022 Ctrl+S Un/Star \u2022 Ctrl+R Rename \u2022 Shift+M Transfer \u2022 Ctrl+A Un/Archive \u2022 Ctrl+V Change Visibility \u2022 Ctrl+F Sync Fork \u2022 P Jump to upstream` }) }),
4496
+ /* @__PURE__ */ jsx23(Box22, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsxs22(Text23, { color: theme.muted, dimColor: modalOpen ? true : void 0, children: [
4497
+ "K Cache Info \u2022 W Org Switch",
4498
+ !starsMode ? " \u2022 Ctrl+N New Repo" : "",
4499
+ " \u2022 Del/Backspace Delete \u2022 Ctrl+L Logout \u2022 Q Quit"
4500
+ ] }) }),
4501
+ /* @__PURE__ */ jsx23(Box22, { width: terminalWidth, justifyContent: "center", marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { color: theme.warning, dimColor: modalOpen ? true : void 0, children: "\u{1F496} Sponsor on GitHub: github.com/sponsors/wiiiimm" }) })
4045
4502
  ] }),
4046
- process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsxs20(Box20, { marginTop: 1, borderStyle: "single", borderColor: "yellow", paddingX: 1, flexDirection: "column", children: [
4047
- /* @__PURE__ */ jsx21(Text21, { bold: true, color: "yellow", children: "Debug Messages:" }),
4048
- debugMessages.length === 0 ? /* @__PURE__ */ jsx21(Text21, { color: "gray", children: "No debug messages yet..." }) : debugMessages.map((msg, i) => /* @__PURE__ */ jsx21(Text21, { color: "gray", children: msg }, i))
4503
+ process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsxs22(Box22, { marginTop: 1, borderStyle: "single", borderColor: "yellow", paddingX: 1, flexDirection: "column", children: [
4504
+ /* @__PURE__ */ jsx23(Text23, { bold: true, color: "yellow", children: "Debug Messages:" }),
4505
+ debugMessages.length === 0 ? /* @__PURE__ */ jsx23(Text23, { color: "gray", children: "No debug messages yet..." }) : debugMessages.map((msg, i) => /* @__PURE__ */ jsx23(Text23, { color: "gray", children: msg }, i))
4049
4506
  ] }),
4050
- themeToast && /* @__PURE__ */ jsx21(Box20, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx21(Box20, { borderStyle: "round", borderColor: theme.primary, paddingX: 2, paddingY: 0, children: /* @__PURE__ */ jsx21(Text21, { color: theme.primary, children: themeToast }) }) }),
4051
- copyToast && /* @__PURE__ */ jsx21(Box20, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx21(Box20, { borderStyle: "round", borderColor: copyToast.includes("Failed") ? "red" : "green", paddingX: 2, paddingY: 0, children: /* @__PURE__ */ jsx21(Text21, { color: copyToast.includes("Failed") ? "red" : "green", children: copyToast }) }) })
4507
+ themeToast && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx23(Box22, { borderStyle: "round", borderColor: theme.primary, paddingX: 2, paddingY: 0, children: /* @__PURE__ */ jsx23(Text23, { color: theme.primary, children: themeToast }) }) }),
4508
+ copyToast && /* @__PURE__ */ jsx23(Box22, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx23(Box22, { borderStyle: "round", borderColor: copyToast.includes("Failed") ? "red" : "green", paddingX: 2, paddingY: 0, children: /* @__PURE__ */ jsx23(Text23, { color: copyToast.includes("Failed") ? "red" : "green", children: copyToast }) }) })
4052
4509
  ] });
4053
4510
  }
4054
4511
 
4055
4512
  // src/ui/components/auth/AuthMethodSelector.tsx
4056
- import { useState as useState18 } from "react";
4057
- import { Box as Box21, Text as Text22, useInput as useInput18 } from "ink";
4513
+ import { useState as useState20 } from "react";
4514
+ import { Box as Box23, Text as Text24, useInput as useInput20 } from "ink";
4058
4515
  import chalk16 from "chalk";
4059
- import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
4516
+ import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
4060
4517
  function AuthMethodSelector({ onSelect, onQuit }) {
4061
- const [selectedIndex, setSelectedIndex] = useState18(0);
4518
+ const [selectedIndex, setSelectedIndex] = useState20(0);
4062
4519
  const methods = [
4063
4520
  {
4064
4521
  key: "oauth",
@@ -4071,7 +4528,7 @@ function AuthMethodSelector({ onSelect, onQuit }) {
4071
4528
  description: "Manually enter a GitHub Personal Access Token"
4072
4529
  }
4073
4530
  ];
4074
- useInput18((input, key) => {
4531
+ useInput20((input, key) => {
4075
4532
  if (key.escape || input?.toLowerCase() === "q") {
4076
4533
  if (onQuit) {
4077
4534
  onQuit();
@@ -4090,33 +4547,33 @@ function AuthMethodSelector({ onSelect, onQuit }) {
4090
4547
  onSelect("pat");
4091
4548
  }
4092
4549
  });
4093
- return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "cyan", paddingX: 2, paddingY: 1, children: [
4094
- /* @__PURE__ */ jsx22(Text22, { bold: true, marginBottom: 1, children: "Choose Authentication Method" }),
4095
- /* @__PURE__ */ jsx22(Box21, { flexDirection: "column", marginY: 1, children: methods.map((method, index) => {
4550
+ return /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", borderStyle: "single", borderColor: "cyan", paddingX: 2, paddingY: 1, children: [
4551
+ /* @__PURE__ */ jsx24(Text24, { bold: true, marginBottom: 1, children: "Choose Authentication Method" }),
4552
+ /* @__PURE__ */ jsx24(Box23, { flexDirection: "column", marginY: 1, children: methods.map((method, index) => {
4096
4553
  const isSelected = index === selectedIndex;
4097
4554
  const prefix = isSelected ? chalk16.cyan("\u203A") : " ";
4098
4555
  const numberPrefix = `${index + 1}.`;
4099
- return /* @__PURE__ */ jsxs21(Box21, { flexDirection: "column", marginBottom: 1, children: [
4100
- /* @__PURE__ */ jsx22(Text22, { children: /* @__PURE__ */ jsxs21(Text22, { color: isSelected ? "cyan" : void 0, bold: isSelected, children: [
4556
+ return /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", marginBottom: 1, children: [
4557
+ /* @__PURE__ */ jsx24(Text24, { children: /* @__PURE__ */ jsxs23(Text24, { color: isSelected ? "cyan" : void 0, bold: isSelected, children: [
4101
4558
  prefix,
4102
4559
  " ",
4103
4560
  numberPrefix,
4104
4561
  " ",
4105
4562
  method.label
4106
4563
  ] }) }),
4107
- /* @__PURE__ */ jsxs21(Text22, { color: "gray", dimColor: true, children: [
4564
+ /* @__PURE__ */ jsxs23(Text24, { color: "gray", dimColor: true, children: [
4108
4565
  " ",
4109
4566
  method.description
4110
4567
  ] })
4111
4568
  ] }, method.key);
4112
4569
  }) }),
4113
- /* @__PURE__ */ jsx22(Text22, { color: "gray", dimColor: true, marginTop: 1, children: "Use arrow keys to navigate, Enter to select, or press 1/2 \u2022 Q/Esc to quit" })
4570
+ /* @__PURE__ */ jsx24(Text24, { color: "gray", dimColor: true, marginTop: 1, children: "Use arrow keys to navigate, Enter to select, or press 1/2 \u2022 Q/Esc to quit" })
4114
4571
  ] });
4115
4572
  }
4116
4573
 
4117
4574
  // src/ui/components/auth/OAuthProgress.tsx
4118
- import { Box as Box22, Text as Text23 } from "ink";
4119
- import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
4575
+ import { Box as Box24, Text as Text25 } from "ink";
4576
+ import { jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
4120
4577
  function OAuthProgress({ status, error, deviceCode }) {
4121
4578
  const statusMessages = {
4122
4579
  initializing: {
@@ -4153,69 +4610,69 @@ function OAuthProgress({ status, error, deviceCode }) {
4153
4610
  }
4154
4611
  };
4155
4612
  const { message, showSpinner } = statusMessages[status];
4156
- return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", borderStyle: "single", borderColor: status === "error" ? "red" : "cyan", paddingX: 2, paddingY: 1, children: [
4157
- /* @__PURE__ */ jsx23(Text23, { bold: true, marginBottom: 1, children: "GitHub OAuth Authentication" }),
4158
- /* @__PURE__ */ jsx23(Box22, { marginY: 1, children: showSpinner ? /* @__PURE__ */ jsxs22(Box22, { children: [
4159
- /* @__PURE__ */ jsx23(Text23, { color: "green", children: /* @__PURE__ */ jsx23(SlowSpinner, { interval: 2e3 }) }),
4160
- /* @__PURE__ */ jsxs22(Text23, { children: [
4613
+ return /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", borderStyle: "single", borderColor: status === "error" ? "red" : "cyan", paddingX: 2, paddingY: 1, children: [
4614
+ /* @__PURE__ */ jsx25(Text25, { bold: true, marginBottom: 1, children: "GitHub OAuth Authentication" }),
4615
+ /* @__PURE__ */ jsx25(Box24, { marginY: 1, children: showSpinner ? /* @__PURE__ */ jsxs24(Box24, { children: [
4616
+ /* @__PURE__ */ jsx25(Text25, { color: "green", children: /* @__PURE__ */ jsx25(SlowSpinner, { interval: 2e3 }) }),
4617
+ /* @__PURE__ */ jsxs24(Text25, { children: [
4161
4618
  " ",
4162
4619
  message
4163
4620
  ] })
4164
- ] }) : /* @__PURE__ */ jsxs22(Text23, { color: status === "error" ? "red" : "green", children: [
4621
+ ] }) : /* @__PURE__ */ jsxs24(Text25, { color: status === "error" ? "red" : "green", children: [
4165
4622
  status === "error" ? "\u2717" : "\u2713",
4166
4623
  " ",
4167
4624
  message
4168
4625
  ] }) }),
4169
- (status === "waiting_for_authorization" || status === "polling_for_token") && deviceCode && /* @__PURE__ */ jsxs22(Box22, { marginY: 1, flexDirection: "column", children: [
4170
- /* @__PURE__ */ jsx23(Text23, { bold: true, color: "cyan", marginBottom: 1, children: "\u{1F4CB} Please complete these steps:" }),
4171
- /* @__PURE__ */ jsxs22(Box22, { marginBottom: 1, children: [
4172
- /* @__PURE__ */ jsx23(Text23, { children: "1. Visit: " }),
4173
- /* @__PURE__ */ jsx23(Text23, { bold: true, color: "blue", children: deviceCode.verification_uri })
4626
+ (status === "waiting_for_authorization" || status === "polling_for_token") && deviceCode && /* @__PURE__ */ jsxs24(Box24, { marginY: 1, flexDirection: "column", children: [
4627
+ /* @__PURE__ */ jsx25(Text25, { bold: true, color: "cyan", marginBottom: 1, children: "\u{1F4CB} Please complete these steps:" }),
4628
+ /* @__PURE__ */ jsxs24(Box24, { marginBottom: 1, children: [
4629
+ /* @__PURE__ */ jsx25(Text25, { children: "1. Visit: " }),
4630
+ /* @__PURE__ */ jsx25(Text25, { bold: true, color: "blue", children: deviceCode.verification_uri })
4174
4631
  ] }),
4175
- /* @__PURE__ */ jsxs22(Box22, { marginBottom: 1, flexDirection: "column", children: [
4176
- /* @__PURE__ */ jsx23(Text23, { children: "2. Enter this code:" }),
4177
- /* @__PURE__ */ jsx23(Box22, { borderStyle: "single", borderColor: "yellow", paddingX: 2, paddingY: 1, marginTop: 1, children: /* @__PURE__ */ jsx23(Text23, { bold: true, color: "yellow", children: deviceCode.user_code }) })
4632
+ /* @__PURE__ */ jsxs24(Box24, { marginBottom: 1, flexDirection: "column", children: [
4633
+ /* @__PURE__ */ jsx25(Text25, { children: "2. Enter this code:" }),
4634
+ /* @__PURE__ */ jsx25(Box24, { borderStyle: "single", borderColor: "yellow", paddingX: 2, paddingY: 1, marginTop: 1, children: /* @__PURE__ */ jsx25(Text25, { bold: true, color: "yellow", children: deviceCode.user_code }) })
4178
4635
  ] }),
4179
- status === "waiting_for_authorization" && /* @__PURE__ */ jsx23(Text23, { color: "gray", marginTop: 1, children: "Your browser should open automatically." }),
4180
- status === "polling_for_token" && /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", marginTop: 1, children: [
4181
- /* @__PURE__ */ jsx23(Text23, { color: "gray", children: "Waiting for you to complete authorization in your browser..." }),
4182
- /* @__PURE__ */ jsx23(Text23, { color: "gray", dimColor: true, marginTop: 1, children: "This will timeout in 15 minutes. Press Esc to cancel." })
4636
+ status === "waiting_for_authorization" && /* @__PURE__ */ jsx25(Text25, { color: "gray", marginTop: 1, children: "Your browser should open automatically." }),
4637
+ status === "polling_for_token" && /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", marginTop: 1, children: [
4638
+ /* @__PURE__ */ jsx25(Text25, { color: "gray", children: "Waiting for you to complete authorization in your browser..." }),
4639
+ /* @__PURE__ */ jsx25(Text25, { color: "gray", dimColor: true, marginTop: 1, children: "This will timeout in 15 minutes. Press Esc to cancel." })
4183
4640
  ] })
4184
4641
  ] }),
4185
- status === "error" && error && /* @__PURE__ */ jsxs22(Box22, { marginY: 1, flexDirection: "column", children: [
4186
- /* @__PURE__ */ jsx23(Text23, { color: "red", children: error }),
4187
- /* @__PURE__ */ jsx23(Text23, { color: "gray", marginTop: 1, children: "Press Esc to go back and try again." })
4642
+ status === "error" && error && /* @__PURE__ */ jsxs24(Box24, { marginY: 1, flexDirection: "column", children: [
4643
+ /* @__PURE__ */ jsx25(Text25, { color: "red", children: error }),
4644
+ /* @__PURE__ */ jsx25(Text25, { color: "gray", marginTop: 1, children: "Press Esc to go back and try again." })
4188
4645
  ] }),
4189
- status === "success" && /* @__PURE__ */ jsx23(Text23, { color: "gray", marginTop: 1, children: "Returning to application..." })
4646
+ status === "success" && /* @__PURE__ */ jsx25(Text25, { color: "gray", marginTop: 1, children: "Returning to application..." })
4190
4647
  ] });
4191
4648
  }
4192
4649
 
4193
4650
  // src/ui/App.tsx
4194
- import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
4651
+ import { jsx as jsx26, jsxs as jsxs25 } from "react/jsx-runtime";
4195
4652
  var packageJson = require_package();
4196
4653
  function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlineTokenEphemeral }) {
4197
4654
  const { exit } = useApp2();
4198
4655
  const { stdout } = useStdout2();
4199
- const [mode, setMode] = useState19("checking");
4200
- const [token, setToken] = useState19(null);
4201
- const [input, setInput] = useState19("");
4202
- const [error, setError] = useState19(null);
4203
- const [viewer, setViewer] = useState19(null);
4204
- const [rateLimitReset, setRateLimitReset] = useState19(null);
4205
- const [wasRateLimited, setWasRateLimited] = useState19(false);
4206
- const [orgContext, setOrgContext] = useState19("personal");
4207
- const [authMethod, setAuthMethod] = useState19("pat");
4208
- const [oauthStatus, setOAuthStatus] = useState19("initializing");
4209
- const [tokenSource, setTokenSource] = useState19("pat");
4210
- const [sessionTokenOrigin, setSessionTokenOrigin] = useState19("stored");
4211
- const [deviceCodeResponse, setDeviceCodeResponse] = useState19(null);
4212
- const [oauthDeviceCode, setOauthDeviceCode] = useState19(null);
4213
- const [dims, setDims] = useState19(() => {
4656
+ const [mode, setMode] = useState21("checking");
4657
+ const [token, setToken] = useState21(null);
4658
+ const [input, setInput] = useState21("");
4659
+ const [error, setError] = useState21(null);
4660
+ const [viewer, setViewer] = useState21(null);
4661
+ const [rateLimitReset, setRateLimitReset] = useState21(null);
4662
+ const [wasRateLimited, setWasRateLimited] = useState21(false);
4663
+ const [orgContext, setOrgContext] = useState21("personal");
4664
+ const [authMethod, setAuthMethod] = useState21("pat");
4665
+ const [oauthStatus, setOAuthStatus] = useState21("initializing");
4666
+ const [tokenSource, setTokenSource] = useState21("pat");
4667
+ const [sessionTokenOrigin, setSessionTokenOrigin] = useState21("stored");
4668
+ const [deviceCodeResponse, setDeviceCodeResponse] = useState21(null);
4669
+ const [oauthDeviceCode, setOauthDeviceCode] = useState21(null);
4670
+ const [dims, setDims] = useState21(() => {
4214
4671
  const cols = stdout?.columns ?? 100;
4215
4672
  const rows = stdout?.rows ?? 30;
4216
4673
  return { cols, rows };
4217
4674
  });
4218
- useEffect13(() => {
4675
+ useEffect14(() => {
4219
4676
  if (!stdout) return;
4220
4677
  const onResize = () => {
4221
4678
  const cols = stdout.columns ?? 100;
@@ -4227,7 +4684,7 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
4227
4684
  stdout.off?.("resize", onResize);
4228
4685
  };
4229
4686
  }, [stdout]);
4230
- useEffect13(() => {
4687
+ useEffect14(() => {
4231
4688
  const env = getTokenFromEnv();
4232
4689
  const stored = getStoredToken();
4233
4690
  const source = getTokenSource();
@@ -4251,7 +4708,7 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
4251
4708
  setMode("auth_method_selection");
4252
4709
  }
4253
4710
  }, [inlineToken2]);
4254
- useEffect13(() => {
4711
+ useEffect14(() => {
4255
4712
  if (mode !== "oauth_flow") return;
4256
4713
  (async () => {
4257
4714
  try {
@@ -4303,7 +4760,7 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
4303
4760
  setMode("oauth_flow");
4304
4761
  }
4305
4762
  };
4306
- useEffect13(() => {
4763
+ useEffect14(() => {
4307
4764
  (async () => {
4308
4765
  if (mode !== "validating" || !token) return;
4309
4766
  const timeoutId = setTimeout(() => {
@@ -4415,7 +4872,7 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
4415
4872
  setTokenSource("pat");
4416
4873
  setMode("auth_method_selection");
4417
4874
  };
4418
- useInput19((input2, key) => {
4875
+ useInput21((input2, key) => {
4419
4876
  if ((mode === "prompt" || mode === "auth_method_selection") && key.escape) {
4420
4877
  exit();
4421
4878
  }
@@ -4447,19 +4904,19 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
4447
4904
  }
4448
4905
  });
4449
4906
  const verticalPadding = Math.floor(dims.rows * 0.05);
4450
- const header = useMemo3(() => /* @__PURE__ */ jsxs23(Box23, { flexDirection: "row", justifyContent: "space-between", marginBottom: 1, children: [
4451
- /* @__PURE__ */ jsxs23(Box23, { flexDirection: "row", gap: 1, children: [
4452
- /* @__PURE__ */ jsxs23(Text24, { bold: true, color: "cyan", children: [
4907
+ const header = useMemo3(() => /* @__PURE__ */ jsxs25(Box25, { flexDirection: "row", justifyContent: "space-between", marginBottom: 1, children: [
4908
+ /* @__PURE__ */ jsxs25(Box25, { flexDirection: "row", gap: 1, children: [
4909
+ /* @__PURE__ */ jsxs25(Text26, { bold: true, color: "cyan", children: [
4453
4910
  " ",
4454
4911
  "GitHub Repository Manager"
4455
4912
  ] }),
4456
- /* @__PURE__ */ jsxs23(Text24, { color: "gray", dimColor: true, children: [
4913
+ /* @__PURE__ */ jsxs25(Text26, { color: "gray", dimColor: true, children: [
4457
4914
  "v",
4458
4915
  packageJson.version
4459
4916
  ] }),
4460
- process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsx24(Text24, { backgroundColor: "blue", color: "white", children: " debug mode " })
4917
+ process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsx26(Text26, { backgroundColor: "blue", color: "white", children: " debug mode " })
4461
4918
  ] }),
4462
- viewer && /* @__PURE__ */ jsx24(Text24, { color: "gray", children: orgContext !== "personal" && orgContext.login ? `${orgContext.login}/@${viewer} ` : `@${viewer} ` })
4919
+ viewer && /* @__PURE__ */ jsx26(Text26, { color: "gray", children: orgContext !== "personal" && orgContext.login ? `${orgContext.login}/@${viewer} ` : `@${viewer} ` })
4463
4920
  ] }), [viewer, orgContext]);
4464
4921
  if (mode === "rate_limited") {
4465
4922
  const formatResetTime = (resetTime) => {
@@ -4482,71 +4939,71 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
4482
4939
  return "Unknown";
4483
4940
  }
4484
4941
  };
4485
- return /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
4942
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
4486
4943
  header,
4487
- /* @__PURE__ */ jsx24(Box23, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs23(Box23, { borderStyle: "single", borderColor: "yellow", paddingX: 3, paddingY: 2, flexDirection: "column", width: Math.min(dims.cols - 8, 80), children: [
4488
- /* @__PURE__ */ jsx24(Text24, { bold: true, color: "yellow", marginBottom: 1, children: "\u26A0\uFE0F Rate Limit Exceeded" }),
4489
- /* @__PURE__ */ jsx24(Text24, { color: "gray", marginBottom: 1, children: "You've hit GitHub's API rate limit for your token." }),
4490
- /* @__PURE__ */ jsx24(Text24, { color: "gray", marginBottom: 1, children: "This happens when you make too many requests in a short time." }),
4491
- rateLimitReset && /* @__PURE__ */ jsxs23(Box23, { marginTop: 1, marginBottom: 1, children: [
4492
- /* @__PURE__ */ jsxs23(Text24, { children: [
4493
- /* @__PURE__ */ jsx24(Text24, { color: "cyan", children: "Reset in:" }),
4944
+ /* @__PURE__ */ jsx26(Box25, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs25(Box25, { borderStyle: "single", borderColor: "yellow", paddingX: 3, paddingY: 2, flexDirection: "column", width: Math.min(dims.cols - 8, 80), children: [
4945
+ /* @__PURE__ */ jsx26(Text26, { bold: true, color: "yellow", marginBottom: 1, children: "\u26A0\uFE0F Rate Limit Exceeded" }),
4946
+ /* @__PURE__ */ jsx26(Text26, { color: "gray", marginBottom: 1, children: "You've hit GitHub's API rate limit for your token." }),
4947
+ /* @__PURE__ */ jsx26(Text26, { color: "gray", marginBottom: 1, children: "This happens when you make too many requests in a short time." }),
4948
+ rateLimitReset && /* @__PURE__ */ jsxs25(Box25, { marginTop: 1, marginBottom: 1, children: [
4949
+ /* @__PURE__ */ jsxs25(Text26, { children: [
4950
+ /* @__PURE__ */ jsx26(Text26, { color: "cyan", children: "Reset in:" }),
4494
4951
  " ",
4495
- /* @__PURE__ */ jsx24(Text24, { bold: true, children: formatResetTime(rateLimitReset) })
4952
+ /* @__PURE__ */ jsx26(Text26, { bold: true, children: formatResetTime(rateLimitReset) })
4496
4953
  ] }),
4497
- /* @__PURE__ */ jsxs23(Text24, { color: "gray", dimColor: true, children: [
4954
+ /* @__PURE__ */ jsxs25(Text26, { color: "gray", dimColor: true, children: [
4498
4955
  "(",
4499
4956
  new Date(rateLimitReset).toLocaleTimeString(),
4500
4957
  ")"
4501
4958
  ] })
4502
4959
  ] }),
4503
- /* @__PURE__ */ jsxs23(Box23, { marginTop: 2, flexDirection: "column", gap: 1, children: [
4504
- /* @__PURE__ */ jsx24(Text24, { bold: true, children: "What would you like to do?" }),
4505
- /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", paddingLeft: 2, children: [
4506
- /* @__PURE__ */ jsxs23(Text24, { children: [
4507
- /* @__PURE__ */ jsx24(Text24, { color: "cyan", bold: true, children: "R" }),
4960
+ /* @__PURE__ */ jsxs25(Box25, { marginTop: 2, flexDirection: "column", gap: 1, children: [
4961
+ /* @__PURE__ */ jsx26(Text26, { bold: true, children: "What would you like to do?" }),
4962
+ /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", paddingLeft: 2, children: [
4963
+ /* @__PURE__ */ jsxs25(Text26, { children: [
4964
+ /* @__PURE__ */ jsx26(Text26, { color: "cyan", bold: true, children: "R" }),
4508
4965
  " - Retry now ",
4509
4966
  rateLimitReset && formatResetTime(rateLimitReset) !== "Now (should be reset)" ? "(likely to fail until reset)" : "(should work now)"
4510
4967
  ] }),
4511
- /* @__PURE__ */ jsxs23(Text24, { children: [
4512
- /* @__PURE__ */ jsx24(Text24, { color: "cyan", bold: true, children: "L" }),
4968
+ /* @__PURE__ */ jsxs25(Text26, { children: [
4969
+ /* @__PURE__ */ jsx26(Text26, { color: "cyan", bold: true, children: "L" }),
4513
4970
  " - Logout and choose authentication method"
4514
4971
  ] }),
4515
- /* @__PURE__ */ jsxs23(Text24, { children: [
4516
- /* @__PURE__ */ jsx24(Text24, { color: "gray", bold: true, children: "Q/Esc" }),
4972
+ /* @__PURE__ */ jsxs25(Text26, { children: [
4973
+ /* @__PURE__ */ jsx26(Text26, { color: "gray", bold: true, children: "Q/Esc" }),
4517
4974
  " - Quit application"
4518
4975
  ] })
4519
4976
  ] })
4520
4977
  ] }),
4521
- /* @__PURE__ */ jsx24(Text24, { color: "gray", dimColor: true, marginTop: 2, children: "Tip: Using multiple tokens or waiting between requests can help avoid rate limits." })
4978
+ /* @__PURE__ */ jsx26(Text26, { color: "gray", dimColor: true, marginTop: 2, children: "Tip: Using multiple tokens or waiting between requests can help avoid rate limits." })
4522
4979
  ] }) })
4523
4980
  ] });
4524
4981
  }
4525
4982
  if (mode === "auth_method_selection") {
4526
- return /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
4983
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
4527
4984
  header,
4528
- /* @__PURE__ */ jsx24(Box23, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", alignItems: "center", children: [
4529
- /* @__PURE__ */ jsx24(AuthMethodSelector, { onSelect: handleAuthMethodSelect }),
4530
- error && /* @__PURE__ */ jsx24(Text24, { color: "red", marginTop: 1, children: error })
4985
+ /* @__PURE__ */ jsx26(Box25, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", alignItems: "center", children: [
4986
+ /* @__PURE__ */ jsx26(AuthMethodSelector, { onSelect: handleAuthMethodSelect }),
4987
+ error && /* @__PURE__ */ jsx26(Text26, { color: "red", marginTop: 1, children: error })
4531
4988
  ] }) })
4532
4989
  ] });
4533
4990
  }
4534
4991
  if (mode === "oauth_flow") {
4535
- return /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
4992
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
4536
4993
  header,
4537
- /* @__PURE__ */ jsx24(Box23, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx24(OAuthProgress, { status: oauthStatus, error: error || void 0, deviceCode: oauthDeviceCode || void 0 }) })
4994
+ /* @__PURE__ */ jsx26(Box25, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx26(OAuthProgress, { status: oauthStatus, error: error || void 0, deviceCode: oauthDeviceCode || void 0 }) })
4538
4995
  ] });
4539
4996
  }
4540
4997
  if (mode === "prompt") {
4541
- return /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
4998
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
4542
4999
  header,
4543
- /* @__PURE__ */ jsx24(Box23, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs23(Box23, { borderStyle: "single", borderColor: "cyan", paddingX: 2, paddingY: 1, flexDirection: "column", children: [
4544
- /* @__PURE__ */ jsx24(Text24, { bold: true, marginBottom: 1, children: "Authentication Required" }),
4545
- /* @__PURE__ */ jsx24(Text24, { color: "gray", marginBottom: 1, children: "Enter your GitHub Personal Access Token" }),
4546
- /* @__PURE__ */ jsxs23(Box23, { children: [
4547
- /* @__PURE__ */ jsx24(Text24, { children: "Token: " }),
4548
- /* @__PURE__ */ jsx24(
4549
- TextInput6,
5000
+ /* @__PURE__ */ jsx26(Box25, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs25(Box25, { borderStyle: "single", borderColor: "cyan", paddingX: 2, paddingY: 1, flexDirection: "column", children: [
5001
+ /* @__PURE__ */ jsx26(Text26, { bold: true, marginBottom: 1, children: "Authentication Required" }),
5002
+ /* @__PURE__ */ jsx26(Text26, { color: "gray", marginBottom: 1, children: "Enter your GitHub Personal Access Token" }),
5003
+ /* @__PURE__ */ jsxs25(Box25, { children: [
5004
+ /* @__PURE__ */ jsx26(Text26, { children: "Token: " }),
5005
+ /* @__PURE__ */ jsx26(
5006
+ TextInput8,
4550
5007
  {
4551
5008
  value: input,
4552
5009
  onChange: setInput,
@@ -4555,30 +5012,30 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
4555
5012
  }
4556
5013
  )
4557
5014
  ] }),
4558
- error && /* @__PURE__ */ jsx24(Text24, { color: "red", marginTop: 1, children: error }),
4559
- /* @__PURE__ */ jsx24(Text24, { color: "gray", dimColor: true, marginTop: 1, children: "The token will be stored securely in your local config" }),
4560
- /* @__PURE__ */ jsx24(Text24, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to go back" })
5015
+ error && /* @__PURE__ */ jsx26(Text26, { color: "red", marginTop: 1, children: error }),
5016
+ /* @__PURE__ */ jsx26(Text26, { color: "gray", dimColor: true, marginTop: 1, children: "The token will be stored securely in your local config" }),
5017
+ /* @__PURE__ */ jsx26(Text26, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to go back" })
4561
5018
  ] }) })
4562
5019
  ] });
4563
5020
  }
4564
5021
  if (mode === "validating" || mode === "checking") {
4565
- return /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
5022
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
4566
5023
  header,
4567
- /* @__PURE__ */ jsx24(Box23, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", alignItems: "center", children: [
4568
- /* @__PURE__ */ jsx24(Text24, { color: "yellow", children: "Validating token..." }),
4569
- mode === "validating" && /* @__PURE__ */ jsx24(Text24, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to cancel" })
5024
+ /* @__PURE__ */ jsx26(Box25, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", alignItems: "center", children: [
5025
+ /* @__PURE__ */ jsx26(Text26, { color: "yellow", children: "Validating token..." }),
5026
+ mode === "validating" && /* @__PURE__ */ jsx26(Text26, { color: "gray", dimColor: true, marginTop: 1, children: "Press Esc to cancel" })
4570
5027
  ] }) })
4571
5028
  ] });
4572
5029
  }
4573
5030
  if (mode === "error") {
4574
- return /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
5031
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
4575
5032
  header,
4576
- /* @__PURE__ */ jsx24(Box23, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx24(Text24, { color: "red", children: error ?? "Unexpected error" }) })
5033
+ /* @__PURE__ */ jsx26(Box25, { flexGrow: 1, justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ jsx26(Text26, { color: "red", children: error ?? "Unexpected error" }) })
4577
5034
  ] });
4578
5035
  }
4579
- return /* @__PURE__ */ jsxs23(Box23, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
5036
+ return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", height: dims.rows, paddingX: 2, paddingTop: verticalPadding, paddingBottom: verticalPadding, children: [
4580
5037
  header,
4581
- /* @__PURE__ */ jsx24(
5038
+ /* @__PURE__ */ jsx26(
4582
5039
  RepoList,
4583
5040
  {
4584
5041
  token,
@@ -4593,7 +5050,7 @@ function App({ initialOrgSlug: initialOrgSlug2, inlineToken: inlineToken2, inlin
4593
5050
  }
4594
5051
 
4595
5052
  // src/index.tsx
4596
- import { jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
5053
+ import { jsx as jsx27, jsxs as jsxs26 } from "react/jsx-runtime";
4597
5054
  var argv = process.argv.slice(2);
4598
5055
  var getFlagValue = (name) => {
4599
5056
  const idx = argv.findIndex((a) => a === `--${name}` || a.startsWith(`--${name}=`));
@@ -4706,8 +5163,8 @@ var inlineToken = (() => {
4706
5163
  })();
4707
5164
  logger.debug("Rendering UI");
4708
5165
  var { unmount } = render(
4709
- /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", children: [
4710
- /* @__PURE__ */ jsx25(App, { initialOrgSlug, inlineToken, inlineTokenEphemeral: Boolean(inlineToken) }),
4711
- /* @__PURE__ */ jsx25(Text25, { color: "gray" })
5166
+ /* @__PURE__ */ jsxs26(Box26, { flexDirection: "column", children: [
5167
+ /* @__PURE__ */ jsx27(App, { initialOrgSlug, inlineToken, inlineTokenEphemeral: Boolean(inlineToken) }),
5168
+ /* @__PURE__ */ jsx27(Text27, { color: "gray" })
4712
5169
  ] })
4713
5170
  );