-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathfull.patch
More file actions
66 lines (64 loc) · 2.62 KB
/
full.patch
File metadata and controls
66 lines (64 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
diff --git a/src/ui/RepoList.tsx b/src/ui/RepoList.tsx
index f22a3b6..d7c4d12 100644
--- a/src/ui/RepoList.tsx
+++ b/src/ui/RepoList.tsx
@@ -8,6 +8,7 @@ import { makeApolloKey, makeSearchKey, isFresh, markFetched } from '../apolloMet
import type { RepoNode, RateLimitInfo } from '../types';
import { exec } from 'child_process';
import OrgSwitcher from './OrgSwitcher';
+import { logger } from '../logger';
import { DeleteModal, ArchiveModal, SyncModal, InfoModal, LogoutModal, VisibilityModal, SortModal, ChangeVisibilityModal } from './components/modals';
import { RepoRow, FilterInput, RepoListHeader } from './components/repo';
import { SlowSpinner } from './components/common';
@@ -49,6 +50,13 @@ export default function RepoList({ token, maxVisibleRows, onLogout, viewerLogin,
// Log on component mount
React.useEffect(() => {
addDebugMessage(`[RepoList] Component mounted`);
+ logger.info('RepoList component mounted', {
+ token: token ? 'present' : 'missing',
+ tokenLength: token?.length,
+ viewerLogin,
+ ownerContext,
+ prefsLoaded
+ });
}, []);
// Get terminal width for dynamic description truncation
@@ -119,6 +127,7 @@ export default function RepoList({ token, maxVisibleRows, onLogout, viewerLogin,
// Visibility modal state
const [visibilityMode, setVisibilityMode] = useState(false);
const [isEnterpriseOrg, setIsEnterpriseOrg] = useState(false);
+ const [hasInternalRepos, setHasInternalRepos] = useState(false);
// Change visibility modal state
const [changeVisibilityMode, setChangeVisibilityMode] = useState(false);
@@ -399,6 +408,16 @@ export default function RepoList({ token, maxVisibleRows, onLogout, viewerLogin,
overrideForkTracking?: boolean,
policy?: 'cache-first' | 'network-only'
) => {
+ logger.info('fetchPage called', {
+ after,
+ reset,
+ isSortChange,
+ policy,
+ token: token ? 'present' : 'missing',
+ viewerLogin,
+ ownerContext
+ });
+
if (isSortChange) {
setSortingLoading(true);
} else if (after && !reset) {
@@ -475,6 +494,14 @@ export default function RepoList({ token, maxVisibleRows, onLogout, viewerLogin,
setRateLimit(page.rateLimit);
setError(null);
} catch (e: any) {
+ logger.error('Failed to fetch repositories in RepoList', {
+ error: e.message,
+ stack: e.stack,
+ graphQLErrors: e.graphQLErrors,
+ networkError: e.networkError,
+ statusCode: e.statusCode,
+ response: e.response
+ });
setError('Failed to load repositories. Check network or token.');
} finally {
setLoading(false);