gh-manager-cli 1.13.0 → 1.13.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.13.1](https://github.com/wiiiimm/gh-manager-cli/compare/v1.13.0...v1.13.1) (2025-09-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **auth,keyboard,ux:** retry + cancel flow on rate-limit; shared logout; cache info key = K ([#11](https://github.com/wiiiimm/gh-manager-cli/issues/11)) ([bcbd2fc](https://github.com/wiiiimm/gh-manager-cli/commit/bcbd2fcdb929a9354e3e307f960da4ae06fbbe61))
7
+
1
8
  # [1.13.0](https://github.com/wiiiimm/gh-manager-cli/compare/v1.12.0...v1.13.0) (2025-09-01)
2
9
 
3
10
 
package/README.md CHANGED
@@ -203,7 +203,7 @@ Launch the app, then use the keys below:
203
203
 
204
204
  ### Repository Actions
205
205
  - **Repository info**: `I` to view detailed metadata (size, language, timestamps)
206
- - **Cache info**: `Ctrl+I` to inspect Apollo cache status
206
+ - **Cache info**: `K` to inspect Apollo cache status
207
207
  - **Archive/Unarchive**: `Ctrl+A` with confirmation prompt
208
208
  - **Delete repository**: `Del` or `Backspace` (with two-step confirmation modal)
209
209
  - Type confirmation code → confirm (Y/Enter)
@@ -287,7 +287,7 @@ Debug mode provides:
287
287
 
288
288
  2. **API Credits**: Monitor the API counter in the header - it should remain stable when navigating previously loaded data
289
289
 
290
- 3. **Cache Inspection**: Press `Ctrl+I` (available anytime) to see:
290
+ 3. **Cache Inspection**: Press `K` (available anytime) to see:
291
291
  - Cache file location and size
292
292
  - Recent cache entries with timestamps
293
293
  - Cache age for each query type
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ var require_package = __commonJS({
24
24
  "package.json"(exports, module) {
25
25
  module.exports = {
26
26
  name: "gh-manager-cli",
27
- version: "1.13.0",
27
+ version: "1.13.1",
28
28
  private: false,
29
29
  description: "Interactive CLI to manage your GitHub repos (personal) with Ink",
30
30
  license: "MIT",
@@ -1500,7 +1500,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
1500
1500
  setLogoutFocus("confirm");
1501
1501
  return;
1502
1502
  }
1503
- if (key.ctrl && (input === "i" || input === "I")) {
1503
+ if (input && input.toUpperCase() === "K") {
1504
1504
  (async () => {
1505
1505
  try {
1506
1506
  await inspectCacheStatus();
@@ -2129,7 +2129,7 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin, onOrgContextCh
2129
2129
  /* @__PURE__ */ jsxs12(Box12, { marginTop: 1, paddingX: 1, flexDirection: "column", children: [
2130
2130
  /* @__PURE__ */ jsx13(Box12, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx13(Text13, { color: "gray", dimColor: modalOpen ? true : void 0, children: "\u2191\u2193 Navigate \u2022 \u23CE/O Open \u2022 R Refresh \u2022 W Org Switch \u2022 Ctrl+L Logout \u2022 Q Quit" }) }),
2131
2131
  /* @__PURE__ */ jsx13(Box12, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx13(Text13, { color: "gray", dimColor: modalOpen ? true : void 0, children: "Ctrl+G Top \u2022 G Bottom \u2022 / Search \u2022 S Sort \u2022 D Direction \u2022 T Density \u2022 F Fork Status \u2022 V Visibility" }) }),
2132
- /* @__PURE__ */ jsx13(Box12, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx13(Text13, { color: "gray", dimColor: modalOpen ? true : void 0, children: "I Info \u2022 Ctrl+I Cache Info \u2022 Ctrl+A Un/Archive \u2022 Del/Backspace Delete \u2022 Ctrl+S Sync Fork" }) })
2132
+ /* @__PURE__ */ jsx13(Box12, { width: terminalWidth, justifyContent: "center", children: /* @__PURE__ */ jsx13(Text13, { color: "gray", dimColor: modalOpen ? true : void 0, children: "I Info \u2022 K Cache Info \u2022 Ctrl+A Un/Archive \u2022 Del/Backspace Delete \u2022 Ctrl+S Sync Fork" }) })
2133
2133
  ] }),
2134
2134
  process.env.GH_MANAGER_DEBUG === "1" && /* @__PURE__ */ jsxs12(Box12, { marginTop: 1, borderStyle: "single", borderColor: "yellow", paddingX: 1, flexDirection: "column", children: [
2135
2135
  /* @__PURE__ */ jsx13(Text13, { bold: true, color: "yellow", children: "Debug Messages:" }),
@@ -2150,6 +2150,7 @@ function App() {
2150
2150
  const [error, setError] = useState10(null);
2151
2151
  const [viewer, setViewer] = useState10(null);
2152
2152
  const [rateLimitReset, setRateLimitReset] = useState10(null);
2153
+ const [wasRateLimited, setWasRateLimited] = useState10(false);
2153
2154
  const [orgContext, setOrgContext] = useState10("personal");
2154
2155
  const [dims, setDims] = useState10(() => {
2155
2156
  const cols = stdout?.columns ?? 100;
@@ -2194,6 +2195,8 @@ function App() {
2194
2195
  const login = await getViewerLogin(client);
2195
2196
  clearTimeout(timeoutId);
2196
2197
  setViewer(login);
2198
+ setWasRateLimited(false);
2199
+ setRateLimitReset(null);
2197
2200
  if (!getStoredToken()) {
2198
2201
  storeToken(token);
2199
2202
  }
@@ -2243,12 +2246,14 @@ function App() {
2243
2246
  }
2244
2247
  if (isRateLimit) {
2245
2248
  setRateLimitReset(resetTime);
2249
+ setWasRateLimited(true);
2246
2250
  setMode("rate_limited");
2247
2251
  } else {
2248
2252
  setError(errorMessage);
2253
+ setInput("");
2249
2254
  setMode("prompt");
2255
+ setToken(null);
2250
2256
  }
2251
- setToken(null);
2252
2257
  }
2253
2258
  })();
2254
2259
  }, [mode, token]);
@@ -2263,6 +2268,7 @@ function App() {
2263
2268
  clearStoredToken();
2264
2269
  } catch {
2265
2270
  }
2271
+ setRateLimitReset(null);
2266
2272
  setToken(null);
2267
2273
  setViewer(null);
2268
2274
  setInput("");
@@ -2273,23 +2279,22 @@ function App() {
2273
2279
  exit();
2274
2280
  }
2275
2281
  if (mode === "rate_limited") {
2276
- if (key.escape || input2 === "q") {
2282
+ const ch = (input2 || "").toLowerCase();
2283
+ if (key.escape || ch === "q") {
2277
2284
  exit();
2278
- } else if (input2 === "r") {
2285
+ } else if (ch === "r") {
2279
2286
  setMode("validating");
2280
- } else if (input2 === "l") {
2281
- setToken(null);
2282
- setInput("");
2283
- setRateLimitReset(null);
2284
- setMode("prompt");
2287
+ } else if (ch === "l") {
2288
+ handleLogout();
2285
2289
  }
2286
2290
  }
2287
2291
  if (mode === "validating" && key.escape) {
2288
- if (rateLimitReset) {
2292
+ if (wasRateLimited) {
2289
2293
  setMode("rate_limited");
2290
2294
  } else {
2291
2295
  setMode("prompt");
2292
2296
  setToken(null);
2297
+ setInput("");
2293
2298
  }
2294
2299
  }
2295
2300
  });
@@ -2351,16 +2356,16 @@ function App() {
2351
2356
  /* @__PURE__ */ jsx14(Text14, { bold: true, children: "What would you like to do?" }),
2352
2357
  /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", paddingLeft: 2, children: [
2353
2358
  /* @__PURE__ */ jsxs13(Text14, { children: [
2354
- /* @__PURE__ */ jsx14(Text14, { color: "cyan", bold: true, children: "r" }),
2359
+ /* @__PURE__ */ jsx14(Text14, { color: "cyan", bold: true, children: "R" }),
2355
2360
  " - Retry now ",
2356
2361
  rateLimitReset && formatResetTime(rateLimitReset) !== "Now (should be reset)" ? "(likely to fail until reset)" : "(should work now)"
2357
2362
  ] }),
2358
2363
  /* @__PURE__ */ jsxs13(Text14, { children: [
2359
- /* @__PURE__ */ jsx14(Text14, { color: "cyan", bold: true, children: "l" }),
2364
+ /* @__PURE__ */ jsx14(Text14, { color: "cyan", bold: true, children: "L" }),
2360
2365
  " - Logout and use a different token"
2361
2366
  ] }),
2362
2367
  /* @__PURE__ */ jsxs13(Text14, { children: [
2363
- /* @__PURE__ */ jsx14(Text14, { color: "gray", bold: true, children: "q/Esc" }),
2368
+ /* @__PURE__ */ jsx14(Text14, { color: "gray", bold: true, children: "Q/Esc" }),
2364
2369
  " - Quit application"
2365
2370
  ] })
2366
2371
  ] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gh-manager-cli",
3
- "version": "1.13.0",
3
+ "version": "1.13.1",
4
4
  "private": false,
5
5
  "description": "Interactive CLI to manage your GitHub repos (personal) with Ink",
6
6
  "license": "MIT",