tycono 0.3.14-beta.7 → 0.3.14-beta.8
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 +1 -1
- package/src/tui/app.tsx +40 -4
package/package.json
CHANGED
package/src/tui/app.tsx
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
import React, { useState, useCallback, useMemo, useEffect, useRef } from 'react';
|
|
15
15
|
import { Box, Text, useApp, useInput } from 'ink';
|
|
16
16
|
import { StatusBar } from './components/StatusBar';
|
|
17
|
+
import { OrgTree } from './components/OrgTree';
|
|
18
|
+
import { StreamView } from './components/StreamView';
|
|
17
19
|
import { CommandMode, type StreamLine } from './components/CommandMode';
|
|
18
20
|
import { PanelMode } from './components/PanelMode';
|
|
19
21
|
import { SetupWizard } from './components/SetupWizard';
|
|
@@ -668,12 +670,46 @@ export const App: React.FC = () => {
|
|
|
668
670
|
// Command Mode: scrollable terminal (no fullscreen)
|
|
669
671
|
// Panel Mode: fullscreen (intentional — like vim for inspection)
|
|
670
672
|
if (mode === 'panel') {
|
|
671
|
-
// OOM debug: minimal
|
|
672
|
-
|
|
673
|
+
// OOM debug levels: 0=full, 1=minimal, 2=orgTree only, 3=stream only
|
|
674
|
+
const debugLevel = parseInt(process.env.PANEL_MINIMAL || '0', 10);
|
|
675
|
+
if (debugLevel === 1) {
|
|
673
676
|
return (
|
|
674
677
|
<Box flexDirection="column">
|
|
675
|
-
<Text color="cyan">Panel Mode (minimal
|
|
676
|
-
<Text color="gray">Events: {sse.events.length} |
|
|
678
|
+
<Text color="cyan">Panel Mode (minimal)</Text>
|
|
679
|
+
<Text color="gray">Events: {sse.events.length} | Press Esc</Text>
|
|
680
|
+
</Box>
|
|
681
|
+
);
|
|
682
|
+
}
|
|
683
|
+
if (debugLevel === 2) {
|
|
684
|
+
return (
|
|
685
|
+
<Box flexDirection="column">
|
|
686
|
+
<OrgTree tree={orgTree} focused={true} selectedIndex={0} flatRoles={flatRoleIds} ceoStatus="idle" />
|
|
687
|
+
<Text color="gray">OrgTree only | Press Esc</Text>
|
|
688
|
+
</Box>
|
|
689
|
+
);
|
|
690
|
+
}
|
|
691
|
+
if (debugLevel === 3) {
|
|
692
|
+
return (
|
|
693
|
+
<Box flexDirection="column">
|
|
694
|
+
<StreamView events={sse.events} allRoleIds={flatRoleIds} streamStatus={sse.streamStatus} waveId={focusedWaveId} roleLabel="All" />
|
|
695
|
+
<Text color="gray">StreamView only | Press Esc</Text>
|
|
696
|
+
</Box>
|
|
697
|
+
);
|
|
698
|
+
}
|
|
699
|
+
if (debugLevel === 4) {
|
|
700
|
+
// Full layout structure but empty content
|
|
701
|
+
return (
|
|
702
|
+
<Box flexDirection="column" height={termHeight}>
|
|
703
|
+
<Box flexGrow={1}>
|
|
704
|
+
<Box flexDirection="column" width={28}>
|
|
705
|
+
<Text color="green">Left Panel</Text>
|
|
706
|
+
</Box>
|
|
707
|
+
<Text color="gray">{'\u2502'}</Text>
|
|
708
|
+
<Box flexGrow={1} flexDirection="column" overflow="hidden">
|
|
709
|
+
<Text color="cyan">Right Panel</Text>
|
|
710
|
+
</Box>
|
|
711
|
+
</Box>
|
|
712
|
+
<StatusBar companyName="test" waveIndex={1} waveCount={1} waveStatus="idle" activeCount={0} portCount={0} totalCost={0} />
|
|
677
713
|
</Box>
|
|
678
714
|
);
|
|
679
715
|
}
|