tycono 0.3.14-beta.6 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tui/app.tsx +43 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tycono",
3
- "version": "0.3.14-beta.6",
3
+ "version": "0.3.14-beta.8",
4
4
  "description": "Build an AI company. Watch them work.",
5
5
  "type": "module",
6
6
  "bin": {
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,17 +670,53 @@ 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 Panel Mode to isolate if yoga layout is the cause
672
- if (process.env.PANEL_MINIMAL) {
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 debug)</Text>
676
- <Text color="gray">Events: {sse.events.length} | Roles: {flatRoleIds.length} | Press Esc to go back</Text>
678
+ <Text color="cyan">Panel Mode (minimal)</Text>
679
+ <Text color="gray">Events: {sse.events.length} | Press Esc</Text>
677
680
  </Box>
678
681
  );
679
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} />
713
+ </Box>
714
+ );
715
+ }
716
+ // Cap panel width to prevent yoga OOM on very wide terminals (245+ columns)
717
+ const panelWidth = Math.min(process.stdout.columns || 120, 160);
680
718
  return (
681
- <Box flexDirection="column" height={termHeight}>
719
+ <Box flexDirection="column" height={termHeight} width={panelWidth}>
682
720
  <Box flexGrow={1} flexDirection="column">
683
721
  <PanelMode
684
722
  tree={orgTree}