Skip to content

Commit dd11964

Browse files
committed
🤖 Add detailed timing logs for useResumeManager and UI ready
Add logs to pinpoint when auto-resume blocks the UI: 1. useResumeManager effect setup 2. Initial workspace check (runs on mount) 3. attemptResume start/finish for each workspace 4. resumeStream IPC call duration 5. App fully mounted and interactive marker This will show if the first-launch freeze is caused by: - useResumeManager checking interrupted streams - resumeStream IPC taking 10s on first run - Or something else entirely
1 parent 9df8ea5 commit dd11964

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/hooks/useResumeManager.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ export function useResumeManager() {
117117

118118
if (timeSinceLastRetry < delay) return false; // Not time yet
119119

120+
console.log(
121+
`[RENDERER][ResumeManager] Workspace ${workspaceId} eligible (attempt=${attempt}) at ${performance.now()}ms`
122+
);
120123
return true;
121124
};
122125

@@ -127,6 +130,8 @@ export function useResumeManager() {
127130
const attemptResume = async (workspaceId: string) => {
128131
if (!isEligibleForResume(workspaceId)) return;
129132

133+
console.log(`[RENDERER] attemptResume started for ${workspaceId}: ${performance.now()}ms`);
134+
130135
// Mark as retrying
131136
retryingRef.current.add(workspaceId);
132137

@@ -139,8 +144,10 @@ export function useResumeManager() {
139144
const { attempt } = retryState;
140145

141146
try {
147+
const resumeStart = performance.now();
142148
const options = getSendOptionsFromStorage(workspaceId);
143149
const result = await window.api.workspace.resumeStream(workspaceId, options);
150+
console.log(`[RENDERER] resumeStream IPC took ${performance.now() - resumeStart}ms`);
144151

145152
if (!result.success) {
146153
// Increment attempt and reset timer for next retry

0 commit comments

Comments
 (0)