gh-manager-cli 1.6.2 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/index.js +11 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.7.0](https://github.com/wiiiimm/gh-manager-cli/compare/v1.6.2...v1.7.0) (2025-08-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* implement smarter infinite scroll prefetch trigger at 80% ([d124b94](https://github.com/wiiiimm/gh-manager-cli/commit/d124b9483196fe703ccffaea1ffdecef9cca31a5))
|
|
7
|
+
|
|
1
8
|
## [1.6.2](https://github.com/wiiiimm/gh-manager-cli/compare/v1.6.1...v1.6.2) (2025-08-31)
|
|
2
9
|
|
|
3
10
|
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var require_package = __commonJS({
|
|
|
9
9
|
"package.json"(exports, module) {
|
|
10
10
|
module.exports = {
|
|
11
11
|
name: "gh-manager-cli",
|
|
12
|
-
version: "1.
|
|
12
|
+
version: "1.7.0",
|
|
13
13
|
private: false,
|
|
14
14
|
description: "Interactive CLI to manage your GitHub repos (personal) with Ink",
|
|
15
15
|
license: "MIT",
|
|
@@ -1467,11 +1467,18 @@ function RepoList({ token, maxVisibleRows, onLogout, viewerLogin }) {
|
|
|
1467
1467
|
return { start, end };
|
|
1468
1468
|
}, [visibleItems.length, cursor, listHeight, spacingLines]);
|
|
1469
1469
|
useEffect(() => {
|
|
1470
|
-
const
|
|
1470
|
+
const prefetchThreshold = Math.floor(visibleItems.length * 0.8);
|
|
1471
|
+
const nearEnd = visibleItems.length > 0 && cursor >= prefetchThreshold;
|
|
1471
1472
|
if (searchActive) {
|
|
1472
|
-
if (!searchLoading && searchHasNextPage && nearEnd)
|
|
1473
|
+
if (!searchLoading && searchHasNextPage && nearEnd) {
|
|
1474
|
+
addDebugMessage(`[Infinite Scroll] Prefetching search results at ${cursor}/${visibleItems.length} (80% threshold: ${prefetchThreshold})`);
|
|
1475
|
+
fetchSearchPage(searchEndCursor);
|
|
1476
|
+
}
|
|
1473
1477
|
} else {
|
|
1474
|
-
if (!loading && !loadingMore && hasNextPage && nearEnd)
|
|
1478
|
+
if (!loading && !loadingMore && hasNextPage && nearEnd) {
|
|
1479
|
+
addDebugMessage(`[Infinite Scroll] Prefetching repos at ${cursor}/${visibleItems.length} (80% threshold: ${prefetchThreshold})`);
|
|
1480
|
+
fetchPage(endCursor);
|
|
1481
|
+
}
|
|
1475
1482
|
}
|
|
1476
1483
|
}, [cursor, visibleItems.length, searchActive, searchLoading, searchHasNextPage, searchEndCursor, loading, loadingMore, hasNextPage, endCursor]);
|
|
1477
1484
|
function openInBrowser(url) {
|