tycono 0.3.13-beta.5 → 0.3.13-beta.6
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/package.json
CHANGED
|
@@ -139,11 +139,26 @@ function readFilePreview(filePath: string, maxLines: number): string[] {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
// OOM debug: track render count
|
|
143
|
+
let panelRenderCount = 0;
|
|
144
|
+
|
|
142
145
|
export const PanelMode: React.FC<PanelModeProps> = ({
|
|
143
146
|
tree, flatRoles, events, selectedRoleIndex, selectedRoleId,
|
|
144
147
|
streamStatus, waveId, activeSessions, allSessions, companyRoot, waves,
|
|
145
148
|
focusedWaveId, onMove, onSelect, onEscape, onFocusWave,
|
|
146
149
|
}) => {
|
|
150
|
+
panelRenderCount++;
|
|
151
|
+
if (panelRenderCount % 100 === 0) {
|
|
152
|
+
const mem = process.memoryUsage();
|
|
153
|
+
console.error(`[PanelMode] render #${panelRenderCount} heap=${Math.round(mem.heapUsed/1024/1024)}MB events=${events.length}`);
|
|
154
|
+
}
|
|
155
|
+
if (panelRenderCount > 1000) {
|
|
156
|
+
console.error(`[PanelMode] ⛔ RENDER LOOP DETECTED: ${panelRenderCount} renders. Bailing out.`);
|
|
157
|
+
onEscape(); // Force back to command mode
|
|
158
|
+
panelRenderCount = 0;
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
|
|
147
162
|
const [termHeight, setTermHeight] = useState(process.stdout.rows || 30);
|
|
148
163
|
const [rightTab, setRightTab] = useState<RightTab>('stream');
|
|
149
164
|
const [docsFilter, setDocsFilter] = useState<DocsFilter>('all');
|