FinceptTerminal is a modern finance application offering advanced market analytics, investment research, and economic data tools, designed for interactive exploration and data-driven decision-making in a user-friendly environment.
C++ ai-agentsalgorithmic-tradingbloomberg-terminalcppfinancefinancial-marketsfintechgood-first-issueinvestmentinvestment-researchmachine-learningopensourcepythonqtquantitative-financestock-markettrading
feat: implement node editor fixes and UI improvements
Apple74fe808ecbbb
diff --git a/fincept-terminal-desktop/src/components/dashboard/DashboardScreen.tsx b/fincept-terminal-desktop/src/components/dashboard/DashboardScreen.tsxindex 505d1e354..e5e57ce41 100644--- a/fincept-terminal-desktop/src/components/dashboard/DashboardScreen.tsx+++ b/fincept-terminal-desktop/src/components/dashboard/DashboardScreen.tsx@@ -21,8 +21,6 @@ import MarketplaceTab from '@/components/tabs/MarketplaceTab';import PortfolioTab from '@/components/tabs/PortfolioTab';import AnalyticsTab from '@/components/tabs/AnalyticsTab';import EquityResearchTab from '@/components/tabs/EquityResearchTab';-import OptionsTab from '@/components/tabs/OptionsTab';-import EconomicCalendarTab from '@/components/tabs/EconomicCalendarTab';import ScreenerTab from '@/components/tabs/ScreenerTab';import DBnomicsTab from '@/components/tabs/DBnomicsTab';import EconomicsTab from '@/components/tabs/EconomicsTab';@@ -635,18 +633,6 @@ export default function FinxeptTerminal() {>Polygon EQ</TabsTrigger>- <TabsTrigger- value="options"- style={activeTab === 'options' ? tabStyles.active : tabStyles.default}- >- Options- </TabsTrigger>- <TabsTrigger- value="calendar"- style={activeTab === 'calendar' ? tabStyles.active : tabStyles.default}- >- Economic Calendar- </TabsTrigger><TabsTriggervalue="screener"style={activeTab === 'screener' ? tabStyles.active : tabStyles.default}@@ -824,12 +810,6 @@ export default function FinxeptTerminal() {<TabsContent value="polygon" className="h-full m-0 p-0"><PolygonEqTab /></TabsContent>- <TabsContent value="options" className="h-full m-0 p-0">- <OptionsTab />- </TabsContent>- <TabsContent value="calendar" className="h-full m-0 p-0">- <EconomicCalendarTab />- </TabsContent><TabsContent value="screener" className="h-full m-0 p-0"><ScreenerTab /></TabsContent>diff --git a/fincept-terminal-desktop/src/components/tabs/EconomicCalendarTab.tsx b/fincept-terminal-desktop/src/components/tabs/EconomicCalendarTab.tsxdeleted file mode 100644index b2d77f66d..000000000--- a/fincept-terminal-desktop/src/components/tabs/EconomicCalendarTab.tsx+++ /dev/null@@ -1,568 +0,0 @@-import React, { useState, useEffect } from 'react';-import { useTerminalTheme } from '@/contexts/ThemeContext';--interface EconomicEvent {- time: string;- country: string;- flag: string;- indicator: string;- importance: 'HIGH' | 'MEDIUM' | 'LOW';- actual: string;- forecast: string;- previous: string;- impact: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL';- category: string;-}--const EconomicCalendarTab: React.FC = () => {- const { colors, fontSize, fontFamily, fontWeight, fontStyle } = useTerminalTheme();- const [currentTime, setCurrentTime] = useState(new Date());- const [selectedDate, setSelectedDate] = useState('2025-03-15');- const [selectedImportance, setSelectedImportance] = useState('ALL');- const [selectedCountry, setSelectedCountry] = useState('ALL');-- useEffect(() => {- const timer = setInterval(() => setCurrentTime(new Date()), 1000);- return () => clearInterval(timer);- }, []);-- const economicEvents: EconomicEvent[] = [- {- time: '08:30',- country: 'US',- flag: '🇺🇸',- indicator: 'Non-Farm Payrolls',- importance: 'HIGH',- actual: '275K',- forecast: '198K',- previous: '229K',- impact: 'POSITIVE',- category: 'Employment'- },- {- time: '08:30',- country: 'US',- flag: '🇺🇸',- indicator: 'Unemployment Rate',- importance: 'HIGH',- actual: '3.6%',- forecast: '3.7%',- previous: '3.7%',- impact: 'POSITIVE',- category: 'Employment'- },- {- time: '08:30',- country: 'US',- flag: '🇺🇸',- indicator: 'Average Hourly Earnings (MoM)',- importance: 'MEDIUM',- actual: '0.4%',- forecast: '0.3%',- previous: '0.6%',- impact: 'POSITIVE',- category: 'Employment'- },- {- time: '10:00',- country: 'US',- flag: '🇺🇸',- indicator: 'ISM Services PMI',- importance: 'HIGH',- actual: '53.4',- forecast: '52.0',- previous: '50.6',- impact: 'POSITIVE',- category: 'Economic Activity'- },- {- time: '14:00',- country: 'US',- flag: '🇺🇸',- indicator: 'FOMC Member Speech',- importance: 'MEDIUM',- actual: '-',- forecast: '-',- previous: '-',- impact: 'NEUTRAL',- category: 'Central Bank'- },- {- time: '03:00',- country: 'CN',- flag: '🇨🇳',- indicator: 'CPI (YoY)',- importance: 'HIGH',- actual: '0.8%',- forecast: '0.5%',- previous: '0.3%',- impact: 'POSITIVE',- category: 'Inflation'- },- {- time: '03:30',- country: 'CN',- flag: '🇨🇳',- indicator: 'PPI (YoY)',- importance: 'MEDIUM',- actual: '-2.5%',- forecast: '-2.6%',- previous: '-2.7%',- impact: 'POSITIVE',- category: 'Inflation'- },- {- time: '05:00',- country: 'EU',- flag: '🇪🇺',- indicator: 'ECB Interest Rate Decision',- importance: 'HIGH',- actual: '4.50%',- forecast: '4.50%',- previous: '4.50%',- impact: 'NEUTRAL',- category: 'Central Bank'- },- {- time: '05:30',- country: 'EU',- flag: '🇪🇺',- indicator: 'ECB Press Conference',- importance: 'HIGH',- actual: '-',- forecast: '-',- previous: '-',- impact: 'NEUTRAL',- category: 'Central Bank'- },- {- time: '06:00',- country: 'GB',- flag: '🇬🇧',- indicator: 'GDP (QoQ)',- importance: 'HIGH',- actual: '0.2%',- forecast: '0.1%',- previous: '0.0%',- impact: 'POSITIVE',- category: 'Economic Activity'- },- {- time: '23:50',- country: 'JP',- flag: '🇯🇵',- indicator: 'BoJ Monetary Policy Statement',- importance: 'HIGH',- actual: '-',- forecast: '-',- previous: '-',- impact: 'NEUTRAL',- category: 'Central Bank'- },- {- time: '07:00',- country: 'DE',- flag: '🇩🇪',- indicator: 'Industrial Production (MoM)',- importance: 'MEDIUM',- actual: '1.2%',- forecast: '0.8%',- previous: '-1.1%',- impact: 'POSITIVE',- category: 'Economic Activity'- }- ];-- const upcomingCentralBankMeetings = [- { date: '2025-03-20', bank: 'FOMC', decision: 'Rate Decision', expected: '5.25-5.50%' },- { date: '2025-04-10', bank: 'ECB', decision: 'Rate Decision', expected: '4.50%' },- { date: '2025-04-25', bank: 'BoJ', decision: 'Policy Meeting', expected: 'No Change' },- { date: '2025-05-01', bank: 'FOMC', decision: 'Rate Decision', expected: '5.00-5.25%' }- ];-- const economicIndicators = [- { name: 'GDP Growth (US)', value: '2.4%', change: 0.1, trend: 'up' },- { name: 'Unemployment (US)', value: '3.6%', change: -0.1, trend: 'down' },- { name: 'CPI Inflation (US)', value: '3.2%', change: 0.2, trend: 'up' },- { name: 'Fed Funds Rate', value: '5.50%', change: 0.0, trend: 'stable' },- { name: 'GDP Growth (EU)', value: '0.5%', change: 0.2, trend: 'up' },- { name: 'ECB Rate', value: '4.50%', change: 0.0, trend: 'stable' }- ];-- const filteredEvents = economicEvents.filter(e =>- (selectedImportance === 'ALL' || e.importance === selectedImportance) &&- (selectedCountry === 'ALL' || e.country === selectedCountry)- ).sort((a, b) => a.time.localeCompare(b.time));-- const getImportanceColor = (importance: string) => {- switch(importance) {- case 'HIGH': return colors.alert;- case 'MEDIUM': return colors.primary;- case 'LOW': return colors.warning;- default: return colors.textMuted;- }- };-- const getImpactColor = (impact: string) => {- switch(impact) {- case 'POSITIVE': return colors.secondary;- case 'NEGATIVE': return colors.alert;- case 'NEUTRAL': return colors.textMuted;- default: return colors.text;- }- };-- return (- <div style={{- height: '100%',- backgroundColor: colors.background,- color: colors.text,- fontFamily: 'Consolas, monospace',- overflow: 'hidden',- display: 'flex',- flexDirection: 'column',- fontSize: '12px'- }}>- {/* Header */}- <div style={{- backgroundColor: colors.panel,- borderBottom: `2px solid ${colors.textMuted}`,- padding: '8px 16px',- flexShrink: 0- }}>- <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>- <div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>- <span style={{ color: colors.primary, fontWeight: 'bold', fontSize: '16px' }}>- ECONOMIC CALENDAR- </span>- <span style={{ color: colors.textMuted }}>|</span>- <span style={{ color: colors.accent }}>GLOBAL EVENTS • INDICATORS • CENTRAL BANKS</span>- </div>- <div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>- <input- type="date"- value={selectedDate}- onChange={(e) => setSelectedDate(e.target.value)}- style={{- backgroundColor: colors.background,- color: colors.accent,- border: `2px solid ${colors.textMuted}`,- padding: '4px 8px',- fontSize: '11px',- fontFamily: 'Consolas, monospace'- }}- />- <span style={{ color: colors.textMuted, fontSize: '11px' }}>- {currentTime.toLocaleTimeString()}- </span>- </div>- </div>- </div>-- {/* Main Content */}- <div style={{ flex: 1, overflow: 'auto', display: 'flex', gap: '12px', padding: '12px' }}>- {/* Left Panel - Indicators & CB Meetings */}- <div style={{ width: '340px', display: 'flex', flexDirection: 'column', gap: '12px' }}>- {/* Economic Indicators */}- <div style={{- backgroundColor: colors.panel,- border: `2px solid ${colors.textMuted}`,- borderLeft: `6px solid ${colors.accent}`,- padding: '12px'- }}>- <div style={{ color: colors.primary, fontSize: '13px', fontWeight: 'bold', marginBottom: '12px' }}>- KEY INDICATORS- </div>- <div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>- {economicIndicators.map((indicator, index) => (- <div key={index} style={{- padding: '10px',- backgroundColor: 'rgba(255,255,255,0.02)',- border: `1px solid ${colors.textMuted}`- }}>- <div style={{ color: colors.textMuted, fontSize: '10px', marginBottom: '4px' }}>- {indicator.name}- </div>- <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>- <span style={{ color: colors.accent, fontSize: '16px', fontWeight: 'bold' }}>- {indicator.value}- </span>- <div style={{ display: 'flex', alignItems: 'center', gap: '4px' }}>- <span style={{- color: indicator.trend === 'up' ? colors.secondary : indicator.trend === 'down' ? colors.alert : colors.textMuted,- fontSize: '12px'- }}>- {indicator.trend === 'up' ? '▲' : indicator.trend === 'down' ? '▼' : '●'}- </span>- <span style={{- color: indicator.change > 0 ? colors.secondary : indicator.change < 0 ? colors.alert : colors.textMuted,- fontSize: '11px'- }}>- {indicator.change > 0 ? '+' : ''}{indicator.change.toFixed(1)}%- </span>- </div>- </div>- </div>- ))}- </div>- </div>-- {/* Central Bank Meetings */}- <div style={{- backgroundColor: colors.panel,- border: `2px solid ${colors.textMuted}`,- borderLeft: `6px solid ${colors.purple}`,- padding: '12px'- }}>- <div style={{ color: colors.primary, fontSize: '13px', fontWeight: 'bold', marginBottom: '12px' }}>- UPCOMING CB MEETINGS- </div>- <div style={{ display: 'flex', flexDirection: 'column', gap: '10px' }}>- {upcomingCentralBankMeetings.map((meeting, index) => (- <div key={index} style={{- padding: '10px',- backgroundColor: 'rgba(200,100,255,0.05)',- border: `1px solid ${colors.purple}`- }}>- <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '6px' }}>- <span style={{ color: colors.purple, fontWeight: 'bold', fontSize: '12px' }}>- {meeting.bank}- </span>- <span style={{ color: colors.textMuted, fontSize: '10px' }}>- {meeting.date}- </span>- </div>- <div style={{ color: colors.text, fontSize: '11px', marginBottom: '4px' }}>- {meeting.decision}- </div>- <div style={{ color: colors.accent, fontSize: '10px' }}>- Expected: {meeting.expected}- </div>- </div>- ))}- </div>- </div>-- {/* Impact Summary */}- <div style={{- backgroundColor: colors.panel,- border: `2px solid ${colors.textMuted}`,- borderLeft: `6px solid ${colors.secondary}`,- padding: '12px'- }}>- <div style={{ color: colors.primary, fontSize: '13px', fontWeight: 'bold', marginBottom: '12px' }}>- TODAY'S IMPACT- </div>- <div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>- <div style={{- padding: '10px',- backgroundColor: 'rgba(255,0,0,0.05)',- border: `1px solid ${colors.alert}`- }}>- <div style={{ color: colors.textMuted, fontSize: '10px', marginBottom: '4px' }}>HIGH IMPACT</div>- <div style={{ color: colors.alert, fontSize: '20px', fontWeight: 'bold' }}>7</div>- <div style={{ color: colors.textMuted, fontSize: '9px' }}>events scheduled</div>- </div>- <div style={{- padding: '10px',- backgroundColor: 'rgba(255,165,0,0.05)',- border: `1px solid ${colors.primary}`- }}>- <div style={{ color: colors.textMuted, fontSize: '10px', marginBottom: '4px' }}>MEDIUM IMPACT</div>- <div style={{ color: colors.primary, fontSize: '20px', fontWeight: 'bold' }}>3</div>- <div style={{ color: colors.textMuted, fontSize: '9px' }}>events scheduled</div>- </div>- <div style={{- padding: '10px',- backgroundColor: 'rgba(255,255,0,0.05)',- border: `1px solid ${colors.warning}`- }}>- <div style={{ color: colors.textMuted, fontSize: '10px', marginBottom: '4px' }}>LOW IMPACT</div>- <div style={{ color: colors.warning, fontSize: '20px', fontWeight: 'bold' }}>2</div>- <div style={{ color: colors.textMuted, fontSize: '9px' }}>events scheduled</div>- </div>- </div>- </div>- </div>-- {/* Right Panel - Events Calendar */}- <div style={{ flex: 1, display: 'flex', flexDirection: 'column' }}>- {/* Filters */}- <div style={{- backgroundColor: colors.panel,- border: `2px solid ${colors.textMuted}`,- padding: '12px',- marginBottom: '12px'- }}>- <div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>- <span style={{ color: colors.textMuted, fontSize: '11px' }}>IMPORTANCE:</span>- {['ALL', 'HIGH', 'MEDIUM', 'LOW'].map((importance) => (- <button key={importance}- onClick={() => setSelectedImportance(importance)}- style={{- padding: '6px 12px',- backgroundColor: selectedImportance === importance ? getImportanceColor(importance) : colors.background,- border: `2px solid ${selectedImportance === importance ? getImportanceColor(importance) : colors.textMuted}`,- color: selectedImportance === importance ? colors.background : colors.text,- fontSize: '10px',- fontWeight: 'bold',- cursor: 'pointer',- fontFamily: 'Consolas, monospace'- }}>- {importance}- </button>- ))}- <span style={{ color: colors.textMuted, marginLeft: '16px' }}>|</span>- <span style={{ color: colors.textMuted, fontSize: '11px' }}>COUNTRY:</span>- {['ALL', 'US', 'EU', 'GB', 'JP', 'CN'].map((country) => (- <button key={country}- onClick={() => setSelectedCountry(country)}- style={{- padding: '6px 12px',- backgroundColor: selectedCountry === country ? colors.accent : colors.background,- border: `2px solid ${selectedCountry === country ? colors.accent : colors.textMuted}`,- color: selectedCountry === country ? colors.background : colors.text,- fontSize: '10px',- fontWeight: 'bold',- cursor: 'pointer',- fontFamily: 'Consolas, monospace'- }}>- {country}- </button>- ))}- </div>- </div>-- {/* Events Table */}- <div style={{- backgroundColor: colors.panel,- border: `2px solid ${colors.textMuted}`,- flex: 1,- overflow: 'auto'- }}>- {/* Table Header */}- <div style={{- display: 'grid',- gridTemplateColumns: '70px 60px 280px 80px 100px 100px 100px 80px',- padding: '10px 12px',- backgroundColor: 'rgba(255,165,0,0.1)',- borderBottom: `2px solid ${colors.primary}`,- position: 'sticky',- top: 0,- zIndex: 10- }}>- <div style={{ color: colors.primary, fontWeight: 'bold', fontSize: '10px' }}>TIME</div>- <div style={{ color: colors.primary, fontWeight: 'bold', fontSize: '10px' }}>CTRY</div>- <div style={{ color: colors.primary, fontWeight: 'bold', fontSize: '10px' }}>INDICATOR</div>- <div style={{ color: colors.primary, fontWeight: 'bold', fontSize: '10px' }}>IMPACT</div>- <div style={{ color: colors.primary, fontWeight: 'bold', fontSize: '10px' }}>ACTUAL</div>- <div style={{ color: colors.primary, fontWeight: 'bold', fontSize: '10px' }}>FORECAST</div>- <div style={{ color: colors.primary, fontWeight: 'bold', fontSize: '10px' }}>PREVIOUS</div>- <div style={{ color: colors.primary, fontWeight: 'bold', fontSize: '10px' }}>RESULT</div>- </div>-- {/* Table Body */}- {filteredEvents.map((event, index) => (- <div key={index}- style={{- display: 'grid',- gridTemplateColumns: '70px 60px 280px 80px 100px 100px 100px 80px',- padding: '12px',- backgroundColor: index % 2 === 0 ? 'rgba(255,255,255,0.02)' : 'transparent',- borderBottom: `1px solid ${colors.textMuted}`,- cursor: 'pointer',- fontSize: '11px'- }}- onMouseEnter={(e) => {- e.currentTarget.style.backgroundColor = 'rgba(255,165,0,0.1)';- }}- onMouseLeave={(e) => {- e.currentTarget.style.backgroundColor = index % 2 === 0 ? 'rgba(255,255,255,0.02)' : 'transparent';- }}>- <div style={{ color: colors.accent, fontWeight: 'bold' }}>{event.time}</div>- <div style={{ fontSize: '16px' }}>{event.flag}</div>- <div>- <div style={{ color: colors.text, fontWeight: 'bold', marginBottom: '2px' }}>- {event.indicator}- </div>- <div style={{ color: colors.textMuted, fontSize: '9px' }}>- {event.category}- </div>- </div>- <div>- <span style={{- padding: '4px 8px',- backgroundColor: `rgba(${event.importance === 'HIGH' ? '255,0,0' : event.importance === 'MEDIUM' ? '255,165,0' : '255,255,0'},0.2)`,- border: `1px solid ${getImportanceColor(event.importance)}`,- color: getImportanceColor(event.importance),- fontSize: '9px',- fontWeight: 'bold'- }}>- {event.importance}- </span>- </div>- <div style={{ color: colors.text, fontWeight: 'bold' }}>{event.actual}</div>- <div style={{ color: colors.warning }}>{event.forecast}</div>- <div style={{ color: colors.textMuted }}>{event.previous}</div>- <div>- <span style={{- color: getImpactColor(event.impact),- fontSize: '16px'- }}>- {event.impact === 'POSITIVE' ? '▲' : event.impact === 'NEGATIVE' ? '▼' : '●'}- </span>- </div>- </div>- ))}- </div>- </div>- </div>-- {/* Footer */}- <div style={{- borderTop: `3px solid ${colors.primary}`,- backgroundColor: colors.panel,- padding: '12px 16px',- fontSize: '11px',- color: colors.text,- flexShrink: 0- }}>- <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '8px' }}>- <div style={{ display: 'flex', alignItems: 'center', gap: '16px' }}>- <span style={{ color: colors.primary, fontWeight: 'bold', fontSize: '13px' }}>- ECONOMIC CALENDAR v1.0- </span>- <span style={{ color: colors.textMuted }}>|</span>- <span style={{ color: colors.accent }}>- Real-time economic events & data- </span>- <span style={{ color: colors.textMuted }}>|</span>- <span style={{ color: colors.secondary }}>- Showing: {filteredEvents.length} events- </span>- </div>- </div>- <div style={{- display: 'flex',- justifyContent: 'space-between',- fontSize: '10px',- paddingTop: '8px',- borderTop: `1px solid ${colors.textMuted}`- }}>- <div style={{ display: 'flex', gap: '16px' }}>- <span style={{ color: colors.textMuted }}><span style={{ color: colors.info }}>F1</span> Help</span>- <span style={{ color: colors.textMuted }}>|</span>- <span style={{ color: colors.textMuted }}><span style={{ color: colors.info }}>F2</span> Export</span>- <span style={{ color: colors.textMuted }}>|</span>- <span style={{ color: colors.textMuted }}><span style={{ color: colors.info }}>F3</span> Alerts</span>- </div>- <div style={{ color: colors.textMuted }}>- © 2025 Fincept Labs • All Rights Reserved- </div>- </div>- </div>- </div>- );-};--export default EconomicCalendarTab;\ No newline at end of filediff --git a/fincept-terminal-desktop/src/components/tabs/NewsTab.tsx b/fincept-terminal-desktop/src/components/tabs/NewsTab.tsxindex ee9fd8af0..bcb3406ee 100644--- a/fincept-terminal-desktop/src/components/tabs/NewsTab.tsx+++ b/fincept-terminal-desktop/src/components/tabs/NewsTab.tsx@@ -20,6 +20,8 @@ const NewsTab: React.FC = () => {const [activeSources, setActiveSources] = useState<string[]>([]);const [selectedArticle, setSelectedArticle] = useState<NewsArticle | null>(null);const [showWebView, setShowWebView] = useState(false);+ const [refreshInterval, setRefreshInterval] = useState(10); // minutes+ const [showIntervalSettings, setShowIntervalSettings] = useState(false);// Manual refresh function with force refreshconst handleRefresh = async () => {@@ -57,11 +59,11 @@ const NewsTab: React.FC = () => {loadNews();- // Refresh news every 5 minutes- const newsRefreshInterval = setInterval(loadNews, 5 * 60 * 1000);+ // Refresh news based on user interval+ const newsRefreshInterval = setInterval(loadNews, refreshInterval * 60 * 1000);return () => clearInterval(newsRefreshInterval);- }, []);+ }, [refreshInterval]);useEffect(() => {const timer = setInterval(() => {@@ -184,8 +186,67 @@ const NewsTab: React.FC = () => {>🔄 {loading ? 'UPDATING...' : 'REFRESH'}</button>+ <span style={{ color: colors.text }}>|</span>+ <button+ onClick={() => setShowIntervalSettings(!showIntervalSettings)}+ style={{+ backgroundColor: colors.info,+ color: colors.background,+ border: 'none',+ padding: '2px 8px',+ fontSize: '11px',+ fontWeight: 'bold',+ cursor: 'pointer',+ borderRadius: '2px'+ }}+ title="Auto-refresh settings"+ >+ ⏱ {refreshInterval}min+ </button></div>+ {/* Interval Settings Dropdown */}+ {showIntervalSettings && (+ <div style={{+ position: 'absolute',+ top: '30px',+ right: '8px',+ backgroundColor: colors.panel,+ border: `2px solid ${colors.primary}`,+ borderRadius: '4px',+ padding: '8px',+ zIndex: 1000,+ boxShadow: `0 4px 8px rgba(0,0,0,0.3)`+ }}>+ <div style={{ fontSize: '11px', color: colors.warning, fontWeight: 'bold', marginBottom: '6px' }}>+ AUTO-REFRESH INTERVAL+ </div>+ {[1, 2, 5, 10, 15, 30].map(min => (+ <button+ key={min}+ onClick={() => {+ setRefreshInterval(min);+ setShowIntervalSettings(false);+ }}+ style={{+ width: '100%',+ backgroundColor: refreshInterval === min ? colors.primary : colors.background,+ color: refreshInterval === min ? colors.background : colors.text,+ border: `1px solid ${colors.textMuted}`,+ padding: '4px 8px',+ fontSize: '10px',+ fontWeight: refreshInterval === min ? 'bold' : 'normal',+ cursor: 'pointer',+ marginBottom: '2px',+ textAlign: 'left'+ }}+ >+ {min} minute{min > 1 ? 's' : ''}+ </button>+ ))}+ </div>+ )}+{/* News Ticker - Continuous seamless scroll like Bloomberg */}<div style={{ display: 'flex', alignItems: 'center', gap: '8px', fontSize: '11px', marginBottom: '2px' }}><span style={{ color: colors.warning, fontWeight: 'bold' }}>BREAKING:</span>diff --git a/fincept-terminal-desktop/src/components/tabs/OptionsTab.tsx b/fincept-terminal-desktop/src/components/tabs/OptionsTab.tsxdeleted file mode 100644index 915200b43..000000000--- a/fincept-terminal-desktop/src/components/tabs/OptionsTab.tsx+++ /dev/null@@ -1,536 +0,0 @@-import React, { useState, useEffect } from 'react';-import { useTerminalTheme } from '@/contexts/ThemeContext';--interface OptionContract {- strike: number;- callBid: number;- callAsk: number;- callLast: number;- callVolume: number;- callOI: number;- callIV: number;- callDelta: number;- callGamma: number;- callTheta: number;- callVega: number;- putBid: number;- putAsk: number;- putLast: number;- putVolume: number;- putOI: number;- putIV: number;- putDelta: number;- putGamma: number;- putTheta: number;- putVega: number;-}--const OptionsTab: React.FC = () => {- const { colors, fontSize, fontFamily, fontWeight, fontStyle } = useTerminalTheme();- const [currentTime, setCurrentTime] = useState(new Date());- const [selectedSymbol, setSelectedSymbol] = useState('AAPL');- const [selectedExpiry, setSelectedExpiry] = useState('2025-03-21');- const [showGreeks, setShowGreeks] = useState(true);-- useEffect(() => {- const timer = setInterval(() => setCurrentTime(new Date()), 1000);- return () => clearInterval(timer);- }, []);-- const underlyingPrice = 178.45;- const symbols = ['AAPL', 'MSFT', 'GOOGL', 'AMZN', 'TSLA', 'NVDA', 'META', 'SPY', 'QQQ'];- const expiryDates = ['2025-03-21', '2025-04-18', '2025-05-16', '2025-06-20', '2025-09-19', '2025-12-19'];-- const optionsChain: OptionContract[] = [- {- strike: 170,- callBid: 9.80, callAsk: 10.10, callLast: 9.95, callVolume: 1245, callOI: 8934,- callIV: 0.284, callDelta: 0.78, callGamma: 0.042, callTheta: -0.089, callVega: 0.156,- putBid: 1.35, putAsk: 1.42, putLast: 1.38, putVolume: 892, putOI: 5623,- putIV: 0.298, putDelta: -0.22, putGamma: 0.042, putTheta: -0.067, putVega: 0.156- },- {- strike: 172.50,- callBid: 7.90, callAsk: 8.15, callLast: 8.05, callVolume: 2134, callOI: 12456,- callIV: 0.276, callDelta: 0.72, callGamma: 0.048, callTheta: -0.094, callVega: 0.167,- putBid: 1.75, putAsk: 1.83, putLast: 1.79, putVolume: 1456, putOI: 8234,- putIV: 0.291, putDelta: -0.28, putGamma: 0.048, putTheta: -0.072, putVega: 0.167- },- {- strike: 175,- callBid: 6.20, callAsk: 6.45, callLast: 6.35, callVolume: 3456, callOI: 18934,- callIV: 0.268, callDelta: 0.65, callGamma: 0.054, callTheta: -0.101, callVega: 0.178,- putBid: 2.30, putAsk: 2.40, putLast: 2.35, putVolume: 2234, putOI: 11234,- putIV: 0.284, putDelta: -0.35, putGamma: 0.054, putTheta: -0.078, putVega: 0.178- },- {- strike: 177.50,- callBid: 4.70, callAsk: 4.90, callLast: 4.82, callVolume: 5678, callOI: 23456,- callIV: 0.261, callDelta: 0.56, callGamma: 0.059, callTheta: -0.108, callVega: 0.189,- putBid: 3.05, putAsk: 3.18, putLast: 3.12, putVolume: 3456, putOI: 15678,- putIV: 0.278, putDelta: -0.44, putGamma: 0.059, putTheta: -0.085, putVega: 0.189- },- {- strike: 180,- callBid: 3.45, callAsk: 3.62, callLast: 3.55, callVolume: 8923, callOI: 34567,- callIV: 0.255, callDelta: 0.47, callGamma: 0.062, callTheta: -0.114, callVega: 0.198,- putBid: 4.10, putAsk: 4.28, putLast: 4.20, putVolume: 5678, putOI: 22345,- putIV: 0.272, putDelta: -0.53, putGamma: 0.062, putTheta: -0.092, putVega: 0.198- },- {- strike: 182.50,- callBid: 2.45, callAsk: 2.58, callLast: 2.52, callVolume: 6789, callOI: 28934,- callIV: 0.249, callDelta: 0.38, callGamma: 0.063, callTheta: -0.118, callVega: 0.205,- putBid: 5.45, putAsk: 5.68, putLast: 5.58, putVolume: 4567, putOI: 19234,- putIV: 0.267, putDelta: -0.62, putGamma: 0.063, putTheta: -0.098, putVega: 0.205- },- {- strike: 185,- callBid: 1.68, callAsk: 1.78, callLast: 1.73, callVolume: 4567, callOI: 21234,- callIV: 0.244, callDelta: 0.29, callGamma: 0.059, callTheta: -0.120, callVega: 0.209,- putBid: 7.20, putAsk: 7.48, putLast: 7.35, putVolume: 3234, putOI: 16789,- putIV: 0.263, putDelta: -0.71, putGamma: 0.059, putTheta: -0.103, putVega: 0.209- },- {- strike: 187.50,- callBid: 1.12, callAsk: 1.20, callLast: 1.16, callVolume: 2345, callOI: 14567,- callIV: 0.240, callDelta: 0.21, callGamma: 0.052, callTheta: -0.119, callVega: 0.210,- putBid: 9.35, putAsk: 9.68, putLast: 9.52, putVolume: 1892, putOI: 12456,- putIV: 0.259, putDelta: -0.79, putGamma: 0.052, putTheta: -0.106, putVega: 0.210- }- ];-- const volatilitySurface = [- { expiry: '1M', atm: 0.255, skew: -0.012 },- { expiry: '2M', atm: 0.268, skew: -0.015 },- { expiry: '3M', atm: 0.281, skew: -0.018 },- { expiry: '6M', atm: 0.302, skew: -0.022 },- { expiry: '1Y', atm: 0.334, skew: -0.028 }- ];-- const portfolioGreeks = {- totalDelta: 245.67,- totalGamma: 12.34,- totalTheta: -89.23,- totalVega: 456.78,- totalRho: 34.56- };-- return (- <div style={{- height: '100%',- backgroundColor: colors.background,- color: colors.text,- fontFamily: 'Consolas, monospace',- overflow: 'hidden',- display: 'flex',- flexDirection: 'column',- fontSize: '12px'- }}>- {/* Header */}- <div style={{- backgroundColor: colors.panel,- borderBottom: `2px solid ${colors.textMuted}`,- padding: '8px 16px',- flexShrink: 0- }}>- <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>- <div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>- <span style={{ color: colors.primary, fontWeight: 'bold', fontSize: '16px' }}>- OPTIONS CHAIN- </span>- <span style={{ color: colors.textMuted }}>|</span>- <div style={{ display: 'flex', gap: '8px', alignItems: 'center' }}>- <span style={{ color: colors.textMuted, fontSize: '11px' }}>SYMBOL:</span>- <select- value={selectedSymbol}- onChange={(e) => setSelectedSymbol(e.target.value)}- style={{- backgroundColor: colors.background,- color: colors.accent,- border: `2px solid ${colors.textMuted}`,- padding: '4px 8px',- fontSize: '11px',- fontFamily: 'Consolas, monospace',- fontWeight: 'bold'- }}>- {symbols.map(sym => (- <option key={sym} value={sym}>{sym}</option>- ))}- </select>- <span style={{ color: colors.textMuted }}>|</span>- <span style={{ color: colors.secondary, fontSize: '14px', fontWeight: 'bold' }}>- ${underlyingPrice.toFixed(2)}- </span>- </div>- <span style={{ color: colors.textMuted }}>|</span>- <div style={{ display: 'flex', gap: '8px', alignItems: 'center' }}>- <span style={{ color: colors.textMuted, fontSize: '11px' }}>EXPIRY:</span>- <select- value={selectedExpiry}- onChange={(e) => setSelectedExpiry(e.target.value)}- style={{- backgroundColor: colors.background,- color: colors.warning,- border: `2px solid ${colors.textMuted}`,- padding: '4px 8px',- fontSize: '11px',- fontFamily: 'Consolas, monospace',- fontWeight: 'bold'- }}>- {expiryDates.map(date => (- <option key={date} value={date}>{date}</option>- ))}- </select>- </div>- </div>- <div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>- <button- onClick={() => setShowGreeks(!showGreeks)}- style={{- padding: '6px 12px',- backgroundColor: showGreeks ? colors.primary : colors.background,- border: `2px solid ${colors.primary}`,- color: showGreeks ? colors.background : colors.primary,- fontSize: '10px',- fontWeight: 'bold',- cursor: 'pointer',- fontFamily: 'Consolas, monospace'- }}>- {showGreeks ? 'HIDE GREEKS' : 'SHOW GREEKS'}- </button>- <span style={{ color: colors.textMuted, fontSize: '11px' }}>- {currentTime.toLocaleTimeString()}- </span>- </div>- </div>- </div>-- {/* Main Content */}- <div style={{ flex: 1, overflow: 'auto', display: 'flex', gap: '12px', padding: '12px' }}>- {/* Left Panel - Greeks & IV */}- <div style={{ width: '280px', display: 'flex', flexDirection: 'column', gap: '12px' }}>- {/* Portfolio Greeks */}- <div style={{- backgroundColor: colors.panel,- border: `2px solid ${colors.textMuted}`,- borderLeft: `6px solid ${colors.secondary}`,- padding: '12px'- }}>- <div style={{ color: colors.primary, fontSize: '13px', fontWeight: 'bold', marginBottom: '12px' }}>- PORTFOLIO GREEKS- </div>- <div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>- <div style={{- padding: '8px',- backgroundColor: 'rgba(0,200,0,0.05)',- border: `1px solid ${colors.secondary}`- }}>- <div style={{ color: colors.textMuted, fontSize: '10px', marginBottom: '2px' }}>DELTA</div>- <div style={{ color: colors.secondary, fontSize: '16px', fontWeight: 'bold' }}>- {portfolioGreeks.totalDelta.toFixed(2)}- </div>- <div style={{ color: colors.textMuted, fontSize: '9px' }}>Directional exposure</div>- </div>- <div style={{- padding: '8px',- backgroundColor: 'rgba(100,150,250,0.05)',- border: `1px solid ${colors.info}`- }}>- <div style={{ color: colors.textMuted, fontSize: '10px', marginBottom: '2px' }}>GAMMA</div>- <div style={{ color: colors.info, fontSize: '16px', fontWeight: 'bold' }}>- {portfolioGreeks.totalGamma.toFixed(2)}- </div>- <div style={{ color: colors.textMuted, fontSize: '9px' }}>Delta sensitivity</div>- </div>- <div style={{- padding: '8px',- backgroundColor: 'rgba(255,0,0,0.05)',- border: `1px solid ${colors.alert}`- }}>- <div style={{ color: colors.textMuted, fontSize: '10px', marginBottom: '2px' }}>THETA</div>- <div style={{ color: colors.alert, fontSize: '16px', fontWeight: 'bold' }}>- {portfolioGreeks.totalTheta.toFixed(2)}- </div>- <div style={{ color: colors.textMuted, fontSize: '9px' }}>Time decay (per day)</div>- </div>- <div style={{- padding: '8px',- backgroundColor: 'rgba(200,100,255,0.05)',- border: `1px solid ${colors.purple}`- }}>- <div style={{ color: colors.textMuted, fontSize: '10px', marginBottom: '2px' }}>VEGA</div>- <div style={{ color: colors.purple, fontSize: '16px', fontWeight: 'bold' }}>- {portfolioGreeks.totalVega.toFixed(2)}- </div>- <div style={{ color: colors.textMuted, fontSize: '9px' }}>Volatility exposure</div>- </div>- </div>- </div>-- {/* Volatility Surface */}- <div style={{- backgroundColor: colors.panel,- border: `2px solid ${colors.textMuted}`,- borderLeft: `6px solid ${colors.purple}`,- padding: '12px'- }}>- <div style={{ color: colors.primary, fontSize: '13px', fontWeight: 'bold', marginBottom: '12px' }}>- IMPLIED VOLATILITY- </div>- <div style={{ display: 'flex', flexDirection: 'column', gap: '6px' }}>- {volatilitySurface.map((vol, index) => (- <div key={index} style={{- padding: '8px',- backgroundColor: index % 2 === 0 ? 'rgba(255,255,255,0.02)' : 'transparent',- borderBottom: `1px solid ${colors.textMuted}`- }}>- <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '4px' }}>- <span style={{ color: colors.textMuted, fontSize: '11px' }}>{vol.expiry}</span>- <span style={{ color: colors.purple, fontSize: '12px', fontWeight: 'bold' }}>- {(vol.atm * 100).toFixed(1)}%- </span>- </div>- <div style={{ fontSize: '9px', color: vol.skew < 0 ? colors.alert : colors.secondary }}>- Skew: {(vol.skew * 100).toFixed(2)}%- </div>- </div>- ))}- </div>- </div>-- {/* Quick Stats */}- <div style={{- backgroundColor: colors.panel,- border: `2px solid ${colors.textMuted}`,- borderLeft: `6px solid ${colors.accent}`,- padding: '12px'- }}>- <div style={{ color: colors.primary, fontSize: '13px', fontWeight: 'bold', marginBottom: '12px' }}>- QUICK STATS- </div>- <div style={{ display: 'flex', flexDirection: 'column', gap: '6px', fontSize: '11px' }}>- <div style={{ display: 'flex', justifyContent: 'space-between' }}>- <span style={{ color: colors.textMuted }}>Total Call Vol:</span>- <span style={{ color: colors.secondary, fontWeight: 'bold' }}>35,198</span>- </div>- <div style={{ display: 'flex', justifyContent: 'space-between' }}>- <span style={{ color: colors.textMuted }}>Total Put Vol:</span>- <span style={{ color: colors.alert, fontWeight: 'bold' }}>23,409</span>- </div>- <div style={{ display: 'flex', justifyContent: 'space-between' }}>- <span style={{ color: colors.textMuted }}>Put/Call Ratio:</span>- <span style={{ color: colors.warning, fontWeight: 'bold' }}>0.67</span>- </div>- <div style={{ display: 'flex', justifyContent: 'space-between' }}>- <span style={{ color: colors.textMuted }}>Max Pain:</span>- <span style={{ color: colors.accent, fontWeight: 'bold' }}>$177.50</span>- </div>- </div>- </div>- </div>-- {/* Right Panel - Options Chain */}- <div style={{ flex: 1, display: 'flex', flexDirection: 'column' }}>- <div style={{- backgroundColor: colors.panel,- border: `2px solid ${colors.textMuted}`,- flex: 1,- overflow: 'auto'- }}>- {/* Table Header */}- <div style={{- display: 'grid',- gridTemplateColumns: showGreeks- ? '80px 70px 70px 70px 80px 60px 60px 60px 60px 60px 80px 70px 70px 70px 80px 60px 60px 60px 60px 60px'- : '100px 80px 80px 80px 100px 80px 100px 80px 80px 80px 100px 80px',- padding: '10px 12px',- backgroundColor: 'rgba(255,165,0,0.1)',- borderBottom: `2px solid ${colors.primary}`,- position: 'sticky',- top: 0,- zIndex: 10,- fontSize: '9px'- }}>- {showGreeks ? (- <>- {/* Calls */}- <div style={{ color: colors.secondary, fontWeight: 'bold', textAlign: 'center' }}>- ========== CALLS ==========- </div>- <div style={{ color: colors.primary, fontWeight: 'bold', textAlign: 'center' }}>STRIKE</div>- {/* Puts */}- <div style={{ color: colors.alert, fontWeight: 'bold', textAlign: 'center' }}>- ========== PUTS ==========- </div>- </>- ) : (- <>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>C.BID</div>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>C.ASK</div>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>C.LAST</div>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>C.VOL</div>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>C.OI</div>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>C.IV</div>- <div style={{ color: colors.primary, fontWeight: 'bold' }}>STRIKE</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>P.BID</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>P.ASK</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>P.LAST</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>P.VOL</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>P.OI</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>P.IV</div>- </>- )}- </div>-- {showGreeks && (- <div style={{- display: 'grid',- gridTemplateColumns: '80px 70px 70px 70px 80px 60px 60px 60px 60px 60px 80px 70px 70px 70px 80px 60px 60px 60px 60px 60px',- padding: '8px 12px',- backgroundColor: colors.panel,- borderBottom: `1px solid ${colors.textMuted}`,- position: 'sticky',- top: '32px',- zIndex: 9,- fontSize: '9px'- }}>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>BID</div>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>ASK</div>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>LAST</div>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>VOL</div>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>OI</div>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>IV</div>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>Δ</div>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>Γ</div>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>Θ</div>- <div style={{ color: colors.secondary, fontWeight: 'bold' }}>V</div>- <div style={{ color: colors.primary, fontWeight: 'bold' }}>STRIKE</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>BID</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>ASK</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>LAST</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>VOL</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>OI</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>IV</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>Δ</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>Γ</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>Θ</div>- <div style={{ color: colors.alert, fontWeight: 'bold' }}>V</div>- </div>- )}-- {/* Table Body */}- {optionsChain.map((option, index) => {- const isITM = option.strike < underlyingPrice;- const isATM = Math.abs(option.strike - underlyingPrice) < 2.5;-- return (- <div key={index}- style={{- display: 'grid',- gridTemplateColumns: showGreeks- ? '80px 70px 70px 70px 80px 60px 60px 60px 60px 60px 80px 70px 70px 70px 80px 60px 60px 60px 60px 60px'- : '100px 80px 80px 80px 100px 80px 100px 80px 80px 80px 100px 80px',- padding: '8px 12px',- backgroundColor: isATM ? 'rgba(255,165,0,0.1)' : (index % 2 === 0 ? 'rgba(255,255,255,0.02)' : 'transparent'),- borderBottom: `1px solid ${colors.textMuted}`,- fontSize: '10px'- }}>- {/* Calls */}- <div style={{ color: colors.secondary }}>${option.callBid.toFixed(2)}</div>- <div style={{ color: colors.secondary }}>${option.callAsk.toFixed(2)}</div>- <div style={{ color: colors.text, fontWeight: 'bold' }}>${option.callLast.toFixed(2)}</div>- <div style={{ color: colors.accent }}>{option.callVolume.toLocaleString()}</div>- <div style={{ color: colors.textMuted }}>{option.callOI.toLocaleString()}</div>- <div style={{ color: colors.purple }}>{(option.callIV * 100).toFixed(1)}%</div>- {showGreeks && (- <>- <div style={{ color: colors.secondary }}>{option.callDelta.toFixed(2)}</div>- <div style={{ color: colors.info }}>{option.callGamma.toFixed(3)}</div>- <div style={{ color: colors.alert }}>{option.callTheta.toFixed(3)}</div>- <div style={{ color: colors.purple }}>{option.callVega.toFixed(3)}</div>- </>- )}-- {/* Strike */}- <div style={{- color: isATM ? colors.primary : colors.text,- fontWeight: isATM ? 'bold' : 'normal',- fontSize: isATM ? '12px' : '10px',- textAlign: 'center',- backgroundColor: isATM ? 'rgba(255,165,0,0.2)' : 'transparent',- padding: '4px'- }}>- ${option.strike.toFixed(2)}- </div>-- {/* Puts */}- <div style={{ color: colors.alert }}>${option.putBid.toFixed(2)}</div>- <div style={{ color: colors.alert }}>${option.putAsk.toFixed(2)}</div>- <div style={{ color: colors.text, fontWeight: 'bold' }}>${option.putLast.toFixed(2)}</div>- <div style={{ color: colors.accent }}>{option.putVolume.toLocaleString()}</div>- <div style={{ color: colors.textMuted }}>{option.putOI.toLocaleString()}</div>- <div style={{ color: colors.purple }}>{(option.putIV * 100).toFixed(1)}%</div>- {showGreeks && (- <>- <div style={{ color: colors.alert }}>{option.putDelta.toFixed(2)}</div>- <div style={{ color: colors.info }}>{option.putGamma.toFixed(3)}</div>- <div style={{ color: colors.alert }}>{option.putTheta.toFixed(3)}</div>- <div style={{ color: colors.purple }}>{option.putVega.toFixed(3)}</div>- </>- )}- </div>- );- })}- </div>- </div>- </div>-- {/* Footer */}- <div style={{- borderTop: `3px solid ${colors.primary}`,- backgroundColor: colors.panel,- padding: '12px 16px',- fontSize: '11px',- color: colors.text,- flexShrink: 0- }}>- <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '8px' }}>- <div style={{ display: 'flex', alignItems: 'center', gap: '16px' }}>- <span style={{ color: colors.primary, fontWeight: 'bold', fontSize: '13px' }}>- OPTIONS ANALYTICS v1.0- </span>- <span style={{ color: colors.textMuted }}>|</span>- <span style={{ color: colors.accent }}>- Real-time options chain with Greeks- </span>- <span style={{ color: colors.textMuted }}>|</span>- <span style={{ color: colors.secondary }}>- {selectedSymbol} • Exp: {selectedExpiry}- </span>- </div>- </div>- <div style={{- display: 'flex',- justifyContent: 'space-between',- fontSize: '10px',- paddingTop: '8px',- borderTop: `1px solid ${colors.textMuted}`- }}>- <div style={{ display: 'flex', gap: '16px' }}>- <span style={{ color: colors.textMuted }}><span style={{ color: colors.info }}>F1</span> Help</span>- <span style={{ color: colors.textMuted }}>|</span>- <span style={{ color: colors.textMuted }}><span style={{ color: colors.info }}>F2</span> Strategy Builder</span>- <span style={{ color: colors.textMuted }}>|</span>- <span style={{ color: colors.textMuted }}><span style={{ color: colors.info }}>F3</span> Risk Analysis</span>- </div>- <div style={{ color: colors.textMuted }}>- © 2025 Fincept Labs • All Rights Reserved- </div>- </div>- </div>- </div>- );-};--export default OptionsTab;\ No newline at end of filediff --git a/fincept-terminal-desktop/src/components/tabs/SettingsTab.tsx b/fincept-terminal-desktop/src/components/tabs/SettingsTab.tsxindex a2b118013..175ac6c1c 100644--- a/fincept-terminal-desktop/src/components/tabs/SettingsTab.tsx+++ b/fincept-terminal-desktop/src/components/tabs/SettingsTab.tsx@@ -635,8 +635,8 @@ export default function SettingsTab() {if (activeSection !== item.id) e.currentTarget.style.background = 'transparent';}}>- <item.icon size={16} color={activeSection === item.id ? colors.primary : colors.textMuted} />- <span style={{ color: activeSection === item.id ? colors.text : colors.textMuted, fontSize: '11px', fontWeight: activeSection === item.id ? 'bold' : 'normal' }}>+ <item.icon size={16} color={activeSection === item.id ? colors.primary : colors.text} />+ <span style={{ color: colors.text, fontSize: '11px', fontWeight: activeSection === item.id ? 'bold' : 'normal' }}>{item.label}</span></div>@@ -655,7 +655,7 @@ export default function SettingsTab() {<h2 style={{ color: colors.primary, fontSize: '14px', fontWeight: 'bold', marginBottom: '8px' }}>API KEY MANAGEMENT</h2>- <p style={{ color: colors.textMuted, fontSize: '10px' }}>+ <p style={{ color: colors.text, fontSize: '10px' }}>Store API keys for services like FRED, Alpha Vantage, Polygon.io, etc. All data is encrypted and stored locally.</p></div>@@ -674,7 +674,7 @@ export default function SettingsTab() {<div style={{ display: 'grid', gridTemplateColumns: '1fr auto', gap: '12px', alignItems: 'end' }}><div>- <label style={{ color: colors.textMuted, fontSize: '9px', display: 'block', marginBottom: '4px' }}>+ <label style={{ color: colors.text, fontSize: '9px', display: 'block', marginBottom: '4px' }}>API KEY *</label><input@@ -716,7 +716,7 @@ export default function SettingsTab() {{loading ? 'SAVING...' : 'SAVE'}</button></div>- <p style={{ color: colors.textMuted, fontSize: '9px', marginTop: '8px' }}>+ <p style={{ color: colors.text, fontSize: '9px', marginTop: '8px' }}>Used for Polygon.io Equities data in the Polygon tab. Get your free API key at <span style={{ color: colors.primary }}>polygon.io</span></p></div>@@ -735,7 +735,7 @@ export default function SettingsTab() {<div style={{ display: 'grid', gridTemplateColumns: '1fr 2fr auto', gap: '12px', alignItems: 'end' }}><div>- <label style={{ color: colors.textMuted, fontSize: '9px', display: 'block', marginBottom: '4px' }}>+ <label style={{ color: colors.text, fontSize: '9px', display: 'block', marginBottom: '4px' }}>SERVICE NAME *</label><input@@ -755,7 +755,7 @@ export default function SettingsTab() {/></div><div>- <label style={{ color: colors.textMuted, fontSize: '9px', display: 'block', marginBottom: '4px' }}>+ <label style={{ color: colors.text, fontSize: '9px', display: 'block', marginBottom: '4px' }}>API KEY *</label><input@@ -813,8 +813,8 @@ export default function SettingsTab() {textAlign: 'center',borderRadius: '4px'}}>- <Lock size={32} color={colors.textMuted} style={{ margin: '0 auto 12px' }} />- <p style={{ color: colors.textMuted, fontSize: '11px' }}>No API keys saved yet</p>+ <Lock size={32} color={colors.text} style={{ margin: '0 auto 12px' }} />+ <p style={{ color: colors.text, fontSize: '11px' }}>No API keys saved yet</p></div>) : (<div style={{ display: 'grid', gap: '12px' }}>@@ -836,7 +836,7 @@ export default function SettingsTab() {{cred.service_name}</h4><div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>- <span style={{ color: colors.textMuted, fontSize: '9px' }}>API Key:</span>+ <span style={{ color: colors.text, fontSize: '9px' }}>API Key:</span><span style={{ color: colors.text, fontFamily: 'monospace', fontSize: '10px' }}>{showPasswords[cred.id!] ? cred.api_key : '•'.repeat(20)}</span>@@ -850,10 +850,10 @@ export default function SettingsTab() {display: 'flex'}}>- {showPasswords[cred.id!] ? <EyeOff size={14} color={colors.textMuted} /> : <Eye size={14} color={colors.textMuted} />}+ {showPasswords[cred.id!] ? <EyeOff size={14} color={colors.text} /> : <Eye size={14} color={colors.text} />}</button></div>- <p style={{ color: colors.textMuted, fontSize: '9px', marginTop: '4px' }}>+ <p style={{ color: colors.text, fontSize: '9px', marginTop: '4px' }}>Added: {cred.created_at ? new Date(cred.created_at).toLocaleDateString() : 'N/A'}</p></div>@@ -890,7 +890,7 @@ export default function SettingsTab() {<h2 style={{ color: colors.primary, fontSize: '14px', fontWeight: 'bold', marginBottom: '8px' }}>LLM CONFIGURATION</h2>- <p style={{ color: colors.textMuted, fontSize: '10px' }}>+ <p style={{ color: colors.text, fontSize: '10px' }}>Configure AI providers for the Chat tab. Changes here are reflected in both Chat and Settings screens.</p></div>@@ -939,7 +939,7 @@ export default function SettingsTab() {<div style={{ display: 'grid', gap: '12px' }}>{getCurrentLLMConfig()!.provider !== 'ollama' && (<div>- <label style={{ color: colors.textMuted, fontSize: '9px', display: 'block', marginBottom: '4px' }}>+ <label style={{ color: colors.text, fontSize: '9px', display: 'block', marginBottom: '4px' }}>API KEY *</label><input@@ -962,7 +962,7 @@ export default function SettingsTab() {{(getCurrentLLMConfig()!.provider === 'ollama' || getCurrentLLMConfig()!.provider === 'deepseek' || getCurrentLLMConfig()!.provider === 'openrouter') && (<div>- <label style={{ color: colors.textMuted, fontSize: '9px', display: 'block', marginBottom: '4px' }}>+ <label style={{ color: colors.text, fontSize: '9px', display: 'block', marginBottom: '4px' }}>BASE URL</label><input@@ -985,7 +985,7 @@ export default function SettingsTab() {<div><div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '4px' }}>- <label style={{ color: colors.textMuted, fontSize: '9px' }}>+ <label style={{ color: colors.text, fontSize: '9px' }}>MODEL</label>{getCurrentLLMConfig()!.provider === 'ollama' && (@@ -1015,7 +1015,7 @@ export default function SettingsTab() {style={{background: 'transparent',border: '1px solid #2a2a2a',- color: colors.textMuted,+ color: colors.text,padding: '4px 8px',fontSize: '9px',cursor: 'pointer',@@ -1121,7 +1121,7 @@ export default function SettingsTab() {<div style={{ display: 'grid', gap: '12px' }}><div>- <label style={{ color: colors.textMuted, fontSize: '9px', display: 'block', marginBottom: '4px' }}>+ <label style={{ color: colors.text, fontSize: '9px', display: 'block', marginBottom: '4px' }}>TEMPERATURE (0.0 - 2.0)</label><input@@ -1144,7 +1144,7 @@ export default function SettingsTab() {</div><div>- <label style={{ color: colors.textMuted, fontSize: '9px', display: 'block', marginBottom: '4px' }}>+ <label style={{ color: colors.text, fontSize: '9px', display: 'block', marginBottom: '4px' }}>MAX TOKENS</label><input@@ -1166,7 +1166,7 @@ export default function SettingsTab() {</div><div>- <label style={{ color: colors.textMuted, fontSize: '9px', display: 'block', marginBottom: '4px' }}>+ <label style={{ color: colors.text, fontSize: '9px', display: 'block', marginBottom: '4px' }}>SYSTEM PROMPT</label><textarea@@ -1216,7 +1216,7 @@ export default function SettingsTab() {{activeSection === 'terminal' && (<div style={{ display: 'flex', flexDirection: 'column', gap: '20px' }}>{/* Font Settings */}- <div style={{ background: colors.panel, border: `1px solid ${colors.textMuted}`, borderRadius: '4px', padding: '16px' }}>+ <div style={{ background: colors.panel, border: `1px solid ${colors.text}`, borderRadius: '4px', padding: '16px' }}><div style={{ display: 'flex', alignItems: 'center', gap: '8px', marginBottom: '16px' }}><Type size={18} color={colors.primary} /><span style={{ color: colors.text, fontSize: '14px', fontWeight: 'bold' }}>FONT SETTINGS</span>@@ -1224,7 +1224,7 @@ export default function SettingsTab() {{/* Font Family */}<div style={{ marginBottom: '16px' }}>- <label style={{ color: colors.textMuted, fontSize: '11px', display: 'block', marginBottom: '6px' }}>Font Family</label>+ <label style={{ color: colors.text, fontSize: '11px', display: 'block', marginBottom: '6px' }}>Font Family</label><select value={fontFamily} onChange={(e) => setFontFamily(e.target.value)} style={{ width: '100%', padding: '8px', background: colors.background, border: '1px solid #444', color: colors.text, borderRadius: '3px' }}>{FONT_FAMILIES.map(f => <option key={f.value} value={f.value}>{f.label}</option>)}</select>@@ -1233,19 +1233,19 @@ export default function SettingsTab() {{/* Base Font Size */}<div style={{ marginBottom: '16px' }}><div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '6px' }}>- <label style={{ color: colors.textMuted, fontSize: '11px' }}>Base Font Size</label>+ <label style={{ color: colors.text, fontSize: '11px' }}>Base Font Size</label><span style={{ color: colors.primary, fontSize: '11px', fontWeight: 'bold' }}>{baseSize}px</span></div><input type="range" min="9" max="18" value={baseSize} onChange={(e) => setBaseSize(Number(e.target.value))} style={{ width: '100%' }} /><div style={{ display: 'flex', justifyContent: 'space-between', marginTop: '4px' }}>- <span style={{ color: colors.textMuted, fontSize: '9px' }}>Small (9px)</span>- <span style={{ color: colors.textMuted, fontSize: '9px' }}>Large (18px)</span>+ <span style={{ color: colors.text, fontSize: '9px' }}>Small (9px)</span>+ <span style={{ color: colors.text, fontSize: '9px' }}>Large (18px)</span></div></div>{/* Font Weight */}<div style={{ marginBottom: '16px' }}>- <label style={{ color: colors.textMuted, fontSize: '11px', display: 'block', marginBottom: '6px' }}>Font Weight</label>+ <label style={{ color: colors.text, fontSize: '11px', display: 'block', marginBottom: '6px' }}>Font Weight</label><select value={fontWeight} onChange={(e) => setFontWeight(e.target.value as FontSettings['weight'])} style={{ width: '100%', padding: '8px', background: colors.background, border: '1px solid #444', color: colors.text, borderRadius: '3px' }}><option value="normal">Normal</option><option value="semibold">Semi-Bold</option>@@ -1257,13 +1257,13 @@ export default function SettingsTab() {<div style={{ marginBottom: '0' }}><label style={{ display: 'flex', alignItems: 'center', gap: '8px', cursor: 'pointer' }}><input type="checkbox" checked={fontItalic} onChange={(e) => setFontItalic(e.target.checked)} />- <span style={{ color: colors.textMuted, fontSize: '11px' }}>Enable Italic</span>+ <span style={{ color: colors.text, fontSize: '11px' }}>Enable Italic</span></label></div></div>{/* Color Theme */}- <div style={{ background: colors.panel, border: `1px solid ${colors.textMuted}`, borderRadius: '4px', padding: '16px' }}>+ <div style={{ background: colors.panel, border: `1px solid ${colors.text}`, borderRadius: '4px', padding: '16px' }}><div style={{ display: 'flex', alignItems: 'center', gap: '8px', marginBottom: '16px' }}><Palette size={18} color={colors.primary} /><span style={{ color: colors.text, fontSize: '14px', fontWeight: 'bold' }}>COLOR THEME</span>@@ -1271,7 +1271,7 @@ export default function SettingsTab() {<div style={{ display: 'flex', flexDirection: 'column', gap: '10px' }}>{Object.entries(COLOR_THEMES).map(([key, themeObj]) => (- <label key={key} style={{ display: 'flex', alignItems: 'center', gap: '12px', padding: '10px', background: selectedTheme === key ? '#1a1a1a' : 'transparent', border: `1px solid ${selectedTheme === key ? colors.primary : colors.textMuted}`, borderRadius: '4px', cursor: 'pointer' }}>+ <label key={key} style={{ display: 'flex', alignItems: 'center', gap: '12px', padding: '10px', background: selectedTheme === key ? '#1a1a1a' : 'transparent', border: `1px solid ${selectedTheme === key ? colors.primary : colors.text}`, borderRadius: '4px', cursor: 'pointer' }}><input type="radio" name="theme" value={key} checked={selectedTheme === key} onChange={() => setSelectedTheme(key)} /><div style={{ display: 'flex', gap: '6px' }}><div style={{ width: '20px', height: '20px', background: themeObj.primary, border: '1px solid #444' }} title="Primary" />@@ -1293,7 +1293,7 @@ export default function SettingsTab() {<div style={{ color: theme.colors.text, fontSize: `${baseSize}px`, fontFamily: `${fontFamily}, monospace`, fontWeight: fontWeight === 'normal' ? '400' : fontWeight === 'semibold' ? '600' : '700', fontStyle: fontItalic ? 'italic' : 'normal', marginBottom: '8px' }}>Body Text: Lorem ipsum dolor sit amet</div>- <div style={{ color: theme.colors.textMuted, fontSize: `${baseSize - 1}px`, fontFamily: `${fontFamily}, monospace`, fontWeight: fontWeight === 'normal' ? '400' : fontWeight === 'semibold' ? '600' : '700', fontStyle: fontItalic ? 'italic' : 'normal', marginBottom: '8px' }}>+ <div style={{ color: theme.colors.text, fontSize: `${baseSize - 1}px`, fontFamily: `${fontFamily}, monospace`, fontWeight: fontWeight === 'normal' ? '400' : fontWeight === 'semibold' ? '600' : '700', fontStyle: fontItalic ? 'italic' : 'normal', marginBottom: '8px' }}>Small Text: Market data and timestamps</div><div style={{ display: 'flex', gap: '12px', marginTop: '12px' }}>@@ -1308,7 +1308,7 @@ export default function SettingsTab() {<button onClick={handleSaveTerminalAppearance} style={{ flex: 1, background: colors.primary, color: colors.background, border: 'none', padding: '12px', fontSize: '12px', fontWeight: 'bold', borderRadius: '4px', cursor: 'pointer', display: 'flex', alignItems: 'center', justifyContent: 'center', gap: '6px' }}><Save size={14} /> SAVE APPEARANCE</button>- <button onClick={handleResetTerminalAppearance} style={{ background: colors.textMuted, color: colors.text, border: 'none', padding: '12px 16px', fontSize: '12px', fontWeight: 'bold', borderRadius: '4px', cursor: 'pointer', display: 'flex', alignItems: 'center', gap: '6px' }}>+ <button onClick={handleResetTerminalAppearance} style={{ background: colors.text, color: colors.text, border: 'none', padding: '12px 16px', fontSize: '12px', fontWeight: 'bold', borderRadius: '4px', cursor: 'pointer', display: 'flex', alignItems: 'center', gap: '6px' }}><RefreshCw size={14} /> RESET</button></div>@@ -1321,8 +1321,8 @@ export default function SettingsTab() {)}{/* Other sections */}- {activeSection === 'profile' && <div style={{ color: colors.textMuted }}>User Profile section (implementation same as before)</div>}- {activeSection === 'notifications' && <div style={{ color: colors.textMuted }}>Notifications section (implementation same as before)</div>}+ {activeSection === 'profile' && <div style={{ color: colors.text }}>User Profile section (implementation same as before)</div>}+ {activeSection === 'notifications' && <div style={{ color: colors.text }}>Notifications section (implementation same as before)</div>}</div></div>@@ -1342,12 +1342,12 @@ export default function SettingsTab() {}}><div style={{ display: 'flex', alignItems: 'center', gap: '16px', fontSize: '9px' }}><span style={{ color: colors.primary, fontWeight: 'bold' }}>SETTINGS v2.0.0</span>- <span style={{ color: colors.textMuted }}>|</span>- <span style={{ color: colors.textMuted }}>Database: SQLite</span>- <span style={{ color: colors.textMuted }}>|</span>- <span style={{ color: colors.textMuted }}>Storage: File-based</span>+ <span style={{ color: colors.text }}>|</span>+ <span style={{ color: colors.text }}>Database: SQLite</span>+ <span style={{ color: colors.text }}>|</span>+ <span style={{ color: colors.text }}>Storage: File-based</span></div>- <div style={{ fontSize: '9px', color: colors.textMuted }}>+ <div style={{ fontSize: '9px', color: colors.text }}>All data stored securely in fincept_terminal.db</div></div>diff --git a/fincept-terminal-desktop/src/components/tabs/node-editor/DataSourceNode.tsx b/fincept-terminal-desktop/src/components/tabs/node-editor/DataSourceNode.tsxindex de2d88a5f..21f45ae3f 100644--- a/fincept-terminal-desktop/src/components/tabs/node-editor/DataSourceNode.tsx+++ b/fincept-terminal-desktop/src/components/tabs/node-editor/DataSourceNode.tsx@@ -1,34 +1,430 @@-import React from 'react';+import React, { useState } from 'react';+import { Handle, Position } from 'reactflow';+import { Database, Play, Settings, Check, AlertCircle } from 'lucide-react';interface DataSourceNodeProps {data: {label: string;selectedConnectionId?: string;query: string;- status: string;+ status: 'idle' | 'running' | 'completed' | 'error';result?: any;error?: string;onConnectionChange: (connectionId: string) => void;onQueryChange: (query: string) => void;onExecute: () => void;};+ selected: boolean;}-const DataSourceNode: React.FC<DataSourceNodeProps> = ({ data }) => {+// Mock available database connections (in real app, fetch from settings/database)+const MOCK_CONNECTIONS = [+ { id: 'postgres_1', name: 'PostgreSQL - Production', type: 'PostgreSQL' },+ { id: 'mysql_1', name: 'MySQL - Analytics', type: 'MySQL' },+ { id: 'mongodb_1', name: 'MongoDB - Orders', type: 'MongoDB' },+ { id: 'sqlite_1', name: 'SQLite - Local', type: 'SQLite' },+];++const DataSourceNode: React.FC<DataSourceNodeProps> = ({ data, selected }) => {+ const [showSettings, setShowSettings] = useState(false);+ const [localQuery, setLocalQuery] = useState(data.query || '');+ const [localConnection, setLocalConnection] = useState(data.selectedConnectionId || '');++ const handleSaveSettings = () => {+ if (localConnection) {+ data.onConnectionChange(localConnection);+ }+ if (localQuery) {+ data.onQueryChange(localQuery);+ }+ setShowSettings(false);+ };++ const getStatusColor = () => {+ switch (data.status) {+ case 'running': return '#3b82f6';+ case 'completed': return '#10b981';+ case 'error': return '#ef4444';+ default: return '#6b7280';+ }+ };++ const getStatusIcon = () => {+ switch (data.status) {+ case 'running': return '🔄';+ case 'completed': return <Check size={14} color="#10b981" />;+ case 'error': return <AlertCircle size={14} color="#ef4444" />;+ default: return <Database size={14} color="#6b7280" />;+ }+ };++ const selectedConnection = MOCK_CONNECTIONS.find(c => c.id === (localConnection || data.selectedConnectionId));+ const isConfigured = data.selectedConnectionId && data.query;+return (<div style={{- background: '#1a1a1a',- border: '2px solid #3b82f6',- borderRadius: '6px',- padding: '12px',- minWidth: '200px'+ background: selected ? '#252525' : '#1a1a1a',+ border: `2px solid ${selected ? '#3b82f6' : getStatusColor()}`,+ borderRadius: '8px',+ minWidth: '280px',+ maxWidth: '400px',+ fontFamily: 'Consolas, monospace',+ boxShadow: selected ? `0 0 16px #3b82f660` : '0 2px 8px rgba(0,0,0,0.3)',+ position: 'relative'}}>- <div style={{ color: '#3b82f6', fontWeight: 'bold', marginBottom: '8px' }}>- {data.label}- </div>- <div style={{ fontSize: '10px', color: '#a3a3a3' }}>- Status: {data.status}+ {/* Output Handle */}+ <Handle+ type="source"+ position={Position.Right}+ style={{+ background: '#3b82f6',+ width: '12px',+ height: '12px',+ border: '2px solid #0a0a0a',+ right: '-6px'+ }}+ />++ {/* Header */}+ <div style={{+ backgroundColor: '#0f0f0f',+ padding: '10px 12px',+ borderTopLeftRadius: '6px',+ borderTopRightRadius: '6px',+ borderBottom: '1px solid #2d2d2d',+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'space-between'+ }}>+ <div style={{+ display: 'flex',+ alignItems: 'center',+ gap: '8px'+ }}>+ <Database size={16} color="#3b82f6" />+ <span style={{+ color: '#fff',+ fontSize: '12px',+ fontWeight: 'bold'+ }}>+ {data.label}+ </span>+ </div>+ <div style={{ display: 'flex', gap: '4px', alignItems: 'center' }}>+ {getStatusIcon()}+ <button+ onClick={() => setShowSettings(!showSettings)}+ style={{+ backgroundColor: showSettings ? '#3b82f6' : 'transparent',+ border: `1px solid ${showSettings ? '#3b82f6' : '#404040'}`,+ color: showSettings ? '#fff' : '#6b7280',+ padding: '4px',+ cursor: 'pointer',+ borderRadius: '3px',+ display: 'flex',+ alignItems: 'center',+ transition: 'all 0.2s'+ }}+ title="Configure data source"+ >+ <Settings size={12} />+ </button>+ </div></div>++ {/* Configuration Panel */}+ {showSettings ? (+ <div style={{+ padding: '12px',+ backgroundColor: '#0a0a0a'+ }}>+ {/* Connection Selector */}+ <div style={{ marginBottom: '12px' }}>+ <label style={{+ display: 'block',+ color: '#a3a3a3',+ fontSize: '10px',+ fontWeight: 'bold',+ marginBottom: '6px',+ textTransform: 'uppercase',+ letterSpacing: '0.5px'+ }}>+ Database Connection+ </label>+ <select+ value={localConnection}+ onChange={(e) => setLocalConnection(e.target.value)}+ style={{+ width: '100%',+ backgroundColor: '#1a1a1a',+ border: '1px solid #404040',+ color: '#fff',+ padding: '8px',+ fontSize: '11px',+ borderRadius: '4px',+ cursor: 'pointer',+ fontFamily: 'Consolas, monospace'+ }}+ >+ <option value="">-- Select Connection --</option>+ {MOCK_CONNECTIONS.map(conn => (+ <option key={conn.id} value={conn.id}>+ {conn.name} ({conn.type})+ </option>+ ))}+ </select>+ </div>++ {/* Query Editor */}+ <div style={{ marginBottom: '12px' }}>+ <label style={{+ display: 'block',+ color: '#a3a3a3',+ fontSize: '10px',+ fontWeight: 'bold',+ marginBottom: '6px',+ textTransform: 'uppercase',+ letterSpacing: '0.5px'+ }}>+ SQL Query+ </label>+ <textarea+ value={localQuery}+ onChange={(e) => setLocalQuery(e.target.value)}+ placeholder="SELECT * FROM table WHERE condition"+ style={{+ width: '100%',+ height: '100px',+ backgroundColor: '#1a1a1a',+ border: '1px solid #404040',+ color: '#fff',+ padding: '8px',+ fontSize: '10px',+ borderRadius: '4px',+ resize: 'vertical',+ fontFamily: 'Consolas, monospace',+ lineHeight: '1.5'+ }}+ />+ </div>++ {/* Action Buttons */}+ <div style={{+ display: 'flex',+ gap: '8px'+ }}>+ <button+ onClick={handleSaveSettings}+ disabled={!localConnection || !localQuery.trim()}+ style={{+ flex: 1,+ backgroundColor: (!localConnection || !localQuery.trim()) ? '#404040' : '#10b981',+ color: '#fff',+ border: 'none',+ padding: '8px',+ fontSize: '11px',+ fontWeight: 'bold',+ cursor: (!localConnection || !localQuery.trim()) ? 'not-allowed' : 'pointer',+ borderRadius: '4px',+ opacity: (!localConnection || !localQuery.trim()) ? 0.5 : 1+ }}+ >+ SAVE CONFIG+ </button>+ <button+ onClick={() => setShowSettings(false)}+ style={{+ backgroundColor: 'transparent',+ color: '#6b7280',+ border: '1px solid #404040',+ padding: '8px 12px',+ fontSize: '11px',+ fontWeight: 'bold',+ cursor: 'pointer',+ borderRadius: '4px'+ }}+ >+ CANCEL+ </button>+ </div>+ </div>+ ) : (+ /* Summary View */+ <div style={{ padding: '12px' }}>+ {/* Connection Info */}+ {selectedConnection ? (+ <div style={{+ backgroundColor: '#0f0f0f',+ border: '1px solid #2d2d2d',+ borderRadius: '4px',+ padding: '8px',+ marginBottom: '8px'+ }}>+ <div style={{+ color: '#3b82f6',+ fontSize: '9px',+ fontWeight: 'bold',+ marginBottom: '4px',+ textTransform: 'uppercase',+ letterSpacing: '0.5px'+ }}>+ Connection+ </div>+ <div style={{+ color: '#fff',+ fontSize: '11px',+ marginBottom: '2px'+ }}>+ {selectedConnection.name}+ </div>+ <div style={{+ color: '#6b7280',+ fontSize: '9px'+ }}>+ {selectedConnection.type}+ </div>+ </div>+ ) : (+ <div style={{+ backgroundColor: '#1a1a1a',+ border: '1px solid #404040',+ borderRadius: '4px',+ padding: '8px',+ marginBottom: '8px',+ textAlign: 'center',+ color: '#6b7280',+ fontSize: '10px'+ }}>+ No connection selected+ </div>+ )}++ {/* Query Preview */}+ {data.query ? (+ <div style={{+ backgroundColor: '#0f0f0f',+ border: '1px solid #2d2d2d',+ borderRadius: '4px',+ padding: '8px',+ marginBottom: '8px'+ }}>+ <div style={{+ color: '#3b82f6',+ fontSize: '9px',+ fontWeight: 'bold',+ marginBottom: '4px',+ textTransform: 'uppercase',+ letterSpacing: '0.5px'+ }}>+ Query+ </div>+ <div style={{+ color: '#d4d4d4',+ fontSize: '9px',+ fontFamily: 'Consolas, monospace',+ lineHeight: '1.4',+ maxHeight: '60px',+ overflow: 'auto',+ whiteSpace: 'pre-wrap',+ wordBreak: 'break-word'+ }}>+ {data.query}+ </div>+ </div>+ ) : (+ <div style={{+ backgroundColor: '#1a1a1a',+ border: '1px solid #404040',+ borderRadius: '4px',+ padding: '8px',+ marginBottom: '8px',+ textAlign: 'center',+ color: '#6b7280',+ fontSize: '10px'+ }}>+ No query defined+ </div>+ )}++ {/* Execute Button */}+ <button+ onClick={data.onExecute}+ disabled={!isConfigured || data.status === 'running'}+ style={{+ width: '100%',+ backgroundColor: (!isConfigured || data.status === 'running') ? '#404040' : '#3b82f6',+ color: '#fff',+ border: 'none',+ padding: '8px',+ fontSize: '11px',+ fontWeight: 'bold',+ cursor: (!isConfigured || data.status === 'running') ? 'not-allowed' : 'pointer',+ borderRadius: '4px',+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ gap: '6px',+ opacity: (!isConfigured || data.status === 'running') ? 0.5 : 1+ }}+ >+ <Play size={12} />+ {data.status === 'running' ? 'EXECUTING...' : 'EXECUTE QUERY'}+ </button>++ {/* Result/Error Display */}+ {data.status === 'completed' && data.result && (+ <div style={{+ marginTop: '8px',+ backgroundColor: '#0f0f0f',+ border: '1px solid #10b981',+ borderRadius: '4px',+ padding: '8px'+ }}>+ <div style={{+ color: '#10b981',+ fontSize: '9px',+ fontWeight: 'bold',+ marginBottom: '4px'+ }}>+ ✓ Query Successful+ </div>+ <div style={{+ color: '#6b7280',+ fontSize: '9px'+ }}>+ {data.result.rowCount || 0} rows returned+ </div>+ </div>+ )}++ {data.status === 'error' && data.error && (+ <div style={{+ marginTop: '8px',+ backgroundColor: '#1a0a0a',+ border: '1px solid #ef4444',+ borderRadius: '4px',+ padding: '8px'+ }}>+ <div style={{+ color: '#ef4444',+ fontSize: '9px',+ fontWeight: 'bold',+ marginBottom: '4px'+ }}>+ ✗ Error+ </div>+ <div style={{+ color: '#d4d4d4',+ fontSize: '9px',+ lineHeight: '1.4',+ wordBreak: 'break-word'+ }}>+ {data.error}+ </div>+ </div>+ )}+ </div>+ )}</div>);};diff --git a/fincept-terminal-desktop/src/components/tabs/node-editor/WorkflowExecutor.ts b/fincept-terminal-desktop/src/components/tabs/node-editor/WorkflowExecutor.tsindex 03db57dac..0a7495cde 100644--- a/fincept-terminal-desktop/src/components/tabs/node-editor/WorkflowExecutor.ts+++ b/fincept-terminal-desktop/src/components/tabs/node-editor/WorkflowExecutor.ts@@ -1,4 +1,5 @@import { Node, Edge } from 'reactflow';+import { workflowService } from '@/services/workflowService';interface ExecuteOptions {name: string;@@ -44,7 +45,17 @@ class WorkflowExecutor {edges: Edge[]): Promise<string> {console.log('[WorkflowExecutor] Saving draft:', name);- return `draft_${Date.now()}`;++ // Actually save the draft to workflowService+ const workflowId = await workflowService.saveDraft(+ name,+ description,+ nodes,+ edges+ );++ console.log('[WorkflowExecutor] Draft saved with ID:', workflowId);+ return workflowId;}}diff --git a/fincept-terminal-desktop/src/components/tabs/node-editor/WorkflowManager.tsx b/fincept-terminal-desktop/src/components/tabs/node-editor/WorkflowManager.tsxindex 2ba87de20..60dfd1062 100644--- a/fincept-terminal-desktop/src/components/tabs/node-editor/WorkflowManager.tsx+++ b/fincept-terminal-desktop/src/components/tabs/node-editor/WorkflowManager.tsx@@ -1,6 +1,7 @@-import React from 'react';+import React, { useState, useEffect } from 'react';import { Node, Edge } from 'reactflow';-import { Workflow } from '@/services/workflowService';+import { Workflow, workflowService } from '@/services/workflowService';+import { Play, Trash2, Edit3, Eye, FileText, Clock, CheckCircle, AlertCircle } from 'lucide-react';interface WorkflowManagerProps {onLoadWorkflow: (nodes: Node[], edges: Edge[], workflowId: string, workflow: Workflow) => void;@@ -9,13 +10,381 @@ interface WorkflowManagerProps {}const WorkflowManager: React.FC<WorkflowManagerProps> = ({ onLoadWorkflow, onViewResults, onEditDraft }) => {+ const [workflows, setWorkflows] = useState<Workflow[]>([]);+ const [loading, setLoading] = useState(true);+ const [filter, setFilter] = useState<'all' | 'draft' | 'completed'>('all');++ // Load workflows on mount+ useEffect(() => {+ loadWorkflows();+ }, []);++ const loadWorkflows = async () => {+ setLoading(true);+ try {+ const allWorkflows = await workflowService.listWorkflows();+ setWorkflows(allWorkflows);+ } catch (error) {+ console.error('[WorkflowManager] Failed to load workflows:', error);+ } finally {+ setLoading(false);+ }+ };++ const handleDelete = async (workflowId: string) => {+ if (!confirm('Are you sure you want to delete this workflow?')) {+ return;+ }++ try {+ await workflowService.deleteWorkflow(workflowId);+ setWorkflows(prev => prev.filter(wf => wf.id !== workflowId));+ } catch (error) {+ console.error('[WorkflowManager] Failed to delete workflow:', error);+ alert('Failed to delete workflow');+ }+ };++ const handlePlay = (workflow: Workflow) => {+ onLoadWorkflow(workflow.nodes, workflow.edges, workflow.id, workflow);+ };++ const handleEdit = (workflow: Workflow) => {+ if (workflow.status === 'draft') {+ onEditDraft(workflow);+ } else {+ onLoadWorkflow(workflow.nodes, workflow.edges, workflow.id, workflow);+ }+ };++ const handleViewResults = (workflow: Workflow) => {+ onViewResults(workflow);+ };++ // Filter workflows+ const filteredWorkflows = workflows.filter(wf => {+ if (filter === 'all') return true;+ if (filter === 'draft') return wf.status === 'draft';+ if (filter === 'completed') return wf.status === 'completed';+ return true;+ });++ const getStatusIcon = (status: string) => {+ switch (status) {+ case 'completed': return <CheckCircle size={14} color="#10b981" />;+ case 'draft': return <FileText size={14} color="#f59e0b" />;+ case 'error': return <AlertCircle size={14} color="#ef4444" />;+ case 'running': return <Clock size={14} color="#3b82f6" />;+ default: return <FileText size={14} color="#6b7280" />;+ }+ };++ const getStatusColor = (status: string) => {+ switch (status) {+ case 'completed': return '#10b981';+ case 'draft': return '#f59e0b';+ case 'error': return '#ef4444';+ case 'running': return '#3b82f6';+ default: return '#6b7280';+ }+ };+return (<div style={{padding: '20px',- color: '#a3a3a3'+ color: '#a3a3a3',+ height: '100%',+ overflow: 'auto'}}>- <h2>Workflow Manager</h2>- <p>No workflows available</p>+ {/* Header */}+ <div style={{+ display: 'flex',+ justifyContent: 'space-between',+ alignItems: 'center',+ marginBottom: '20px',+ paddingBottom: '12px',+ borderBottom: '2px solid #404040'+ }}>+ <h2 style={{+ margin: 0,+ fontSize: '20px',+ color: '#fff',+ fontWeight: 'bold'+ }}>+ 📋 Workflow Manager+ </h2>+ <button+ onClick={loadWorkflows}+ style={{+ backgroundColor: '#3b82f6',+ color: '#fff',+ border: 'none',+ padding: '6px 12px',+ fontSize: '12px',+ fontWeight: 'bold',+ cursor: 'pointer',+ borderRadius: '4px'+ }}+ >+ 🔄 REFRESH+ </button>+ </div>++ {/* Filter Tabs */}+ <div style={{+ display: 'flex',+ gap: '8px',+ marginBottom: '16px',+ borderBottom: '1px solid #404040',+ paddingBottom: '8px'+ }}>+ {['all', 'draft', 'completed'].map(f => (+ <button+ key={f}+ onClick={() => setFilter(f as any)}+ style={{+ backgroundColor: filter === f ? '#3b82f6' : 'transparent',+ color: filter === f ? '#fff' : '#a3a3a3',+ border: `1px solid ${filter === f ? '#3b82f6' : '#404040'}`,+ padding: '6px 16px',+ fontSize: '11px',+ fontWeight: 'bold',+ cursor: 'pointer',+ borderRadius: '4px',+ textTransform: 'uppercase'+ }}+ >+ {f} ({workflows.filter(wf => f === 'all' || wf.status === f).length})+ </button>+ ))}+ </div>++ {/* Loading State */}+ {loading && (+ <div style={{+ textAlign: 'center',+ padding: '40px',+ color: '#6b7280'+ }}>+ Loading workflows...+ </div>+ )}++ {/* Empty State */}+ {!loading && filteredWorkflows.length === 0 && (+ <div style={{+ textAlign: 'center',+ padding: '40px',+ color: '#6b7280'+ }}>+ <FileText size={48} style={{ margin: '0 auto 16px', opacity: 0.5 }} />+ <p style={{ fontSize: '14px', marginBottom: '8px' }}>+ No {filter !== 'all' ? filter : ''} workflows found+ </p>+ <p style={{ fontSize: '12px', opacity: 0.7 }}>+ Create a new workflow in the Editor tab+ </p>+ </div>+ )}++ {/* Workflow List */}+ {!loading && filteredWorkflows.length > 0 && (+ <div style={{+ display: 'grid',+ gap: '12px'+ }}>+ {filteredWorkflows.map(workflow => (+ <div+ key={workflow.id}+ style={{+ backgroundColor: '#1a1a1a',+ border: '1px solid #404040',+ borderRadius: '6px',+ padding: '16px',+ transition: 'all 0.2s',+ cursor: 'pointer'+ }}+ onMouseEnter={(e) => {+ e.currentTarget.style.borderColor = '#3b82f6';+ e.currentTarget.style.backgroundColor = '#252525';+ }}+ onMouseLeave={(e) => {+ e.currentTarget.style.borderColor = '#404040';+ e.currentTarget.style.backgroundColor = '#1a1a1a';+ }}+ >+ {/* Workflow Header */}+ <div style={{+ display: 'flex',+ justifyContent: 'space-between',+ alignItems: 'flex-start',+ marginBottom: '12px'+ }}>+ <div style={{ flex: 1 }}>+ <div style={{+ display: 'flex',+ alignItems: 'center',+ gap: '8px',+ marginBottom: '4px'+ }}>+ {getStatusIcon(workflow.status)}+ <h3 style={{+ margin: 0,+ fontSize: '14px',+ color: '#fff',+ fontWeight: 'bold'+ }}>+ {workflow.name}+ </h3>+ <span style={{+ backgroundColor: getStatusColor(workflow.status),+ color: '#000',+ padding: '2px 8px',+ fontSize: '9px',+ fontWeight: 'bold',+ borderRadius: '3px',+ textTransform: 'uppercase'+ }}>+ {workflow.status}+ </span>+ </div>+ {workflow.description && (+ <p style={{+ margin: '4px 0 0 0',+ fontSize: '11px',+ color: '#6b7280',+ lineHeight: '1.4'+ }}>+ {workflow.description}+ </p>+ )}+ </div>+ </div>++ {/* Workflow Info */}+ <div style={{+ display: 'flex',+ gap: '16px',+ marginBottom: '12px',+ fontSize: '11px',+ color: '#6b7280'+ }}>+ <span>📦 {workflow.nodes?.length || 0} nodes</span>+ <span>🔗 {workflow.edges?.length || 0} connections</span>+ <span style={{ marginLeft: 'auto', fontSize: '10px' }}>+ ID: {workflow.id.substring(0, 12)}...+ </span>+ </div>++ {/* Action Buttons */}+ <div style={{+ display: 'flex',+ gap: '8px',+ paddingTop: '12px',+ borderTop: '1px solid #404040'+ }}>+ <button+ onClick={(e) => {+ e.stopPropagation();+ handlePlay(workflow);+ }}+ style={{+ flex: 1,+ backgroundColor: '#10b981',+ color: '#fff',+ border: 'none',+ padding: '6px 12px',+ fontSize: '11px',+ fontWeight: 'bold',+ cursor: 'pointer',+ borderRadius: '4px',+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ gap: '4px'+ }}+ >+ <Play size={12} />+ LOAD & RUN+ </button>++ <button+ onClick={(e) => {+ e.stopPropagation();+ handleEdit(workflow);+ }}+ style={{+ flex: 1,+ backgroundColor: '#3b82f6',+ color: '#fff',+ border: 'none',+ padding: '6px 12px',+ fontSize: '11px',+ fontWeight: 'bold',+ cursor: 'pointer',+ borderRadius: '4px',+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ gap: '4px'+ }}+ >+ <Edit3 size={12} />+ EDIT+ </button>++ {workflow.results && (+ <button+ onClick={(e) => {+ e.stopPropagation();+ handleViewResults(workflow);+ }}+ style={{+ backgroundColor: '#f59e0b',+ color: '#000',+ border: 'none',+ padding: '6px 12px',+ fontSize: '11px',+ fontWeight: 'bold',+ cursor: 'pointer',+ borderRadius: '4px',+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ gap: '4px'+ }}+ >+ <Eye size={12} />+ RESULTS+ </button>+ )}++ <button+ onClick={(e) => {+ e.stopPropagation();+ handleDelete(workflow.id);+ }}+ style={{+ backgroundColor: '#ef4444',+ color: '#fff',+ border: 'none',+ padding: '6px 12px',+ fontSize: '11px',+ fontWeight: 'bold',+ cursor: 'pointer',+ borderRadius: '4px',+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center'+ }}+ >+ <Trash2 size={12} />+ </button>+ </div>+ </div>+ ))}+ </div>+ )}</div>);};diff --git a/fincept-terminal-desktop/src/services/newsService.ts b/fincept-terminal-desktop/src/services/newsService.tsindex 3b9af4ea7..33a314aea 100644--- a/fincept-terminal-desktop/src/services/newsService.ts+++ b/fincept-terminal-desktop/src/services/newsService.ts@@ -18,22 +18,22 @@ export interface NewsArticle {pubDate?: Date;}-// 20+ RSS Feed Sources - Real working feeds+// Verified working RSS feeds (2025)const RSS_FEEDS = [- // Major Financial News+ // Major Financial News - Tested & Working{- name: 'Reuters Business',- url: 'https://www.reutersagency.com/feed/?taxonomy=best-topics&post_type=best',+ name: 'Yahoo Finance',+ url: 'https://finance.yahoo.com/news/rssindex',category: 'MARKETS',- region: 'GLOBAL',- source: 'REUTERS'+ region: 'US',+ source: 'YAHOO'},{- name: 'CNBC Top News',- url: 'https://www.cnbc.com/id/100003114/device/rss/rss.html',+ name: 'Investing.com',+ url: 'https://www.investing.com/rss/news.rss',category: 'MARKETS',- region: 'US',- source: 'CNBC'+ region: 'GLOBAL',+ source: 'INVESTING.COM'},{name: 'MarketWatch',@@ -43,42 +43,21 @@ const RSS_FEEDS = [source: 'MARKETWATCH'},{- name: 'WSJ Markets',- url: 'https://feeds.a.dj.com/rss/RSSMarketsMain.xml',+ name: 'CNBC Markets',+ url: 'https://www.cnbc.com/id/10000664/device/rss/rss.html',category: 'MARKETS',region: 'US',- source: 'WSJ'- },- {- name: 'Yahoo Finance',- url: 'https://finance.yahoo.com/news/rssindex',- category: 'MARKETS',- region: 'US',- source: 'YAHOO'- },- {- name: 'Seeking Alpha',- url: 'https://seekingalpha.com/feed.xml',- category: 'MARKETS',- region: 'US',- source: 'SEEKING ALPHA'- },- {- name: 'Investing.com',- url: 'https://www.investing.com/rss/news.rss',- category: 'MARKETS',- region: 'GLOBAL',- source: 'INVESTING.COM'+ source: 'CNBC'},{- name: 'Barrons',- url: 'https://www.barrons.com/articles/rss',+ name: 'Benzinga',+ url: 'https://www.benzinga.com/feed',category: 'MARKETS',region: 'US',- source: 'BARRONS'+ source: 'BENZINGA'},- // Cryptocurrency+ // Cryptocurrency - Working feeds{name: 'CoinDesk',url: 'https://www.coindesk.com/arc/outboundfeeds/rss/',@@ -101,7 +80,7 @@ const RSS_FEEDS = [source: 'DECRYPT'},- // Technology+ // Technology - Working feeds{name: 'TechCrunch',url: 'https://techcrunch.com/feed/',@@ -124,9 +103,9 @@ const RSS_FEEDS = [source: 'ARS TECHNICA'},- // Business & Economics+ // Business & Economics - Working feeds{- name: 'Forbes',+ name: 'Forbes Business',url: 'https://www.forbes.com/business/feed/',category: 'MARKETS',region: 'US',@@ -139,52 +118,24 @@ const RSS_FEEDS = [region: 'US',source: 'BUSINESS INSIDER'},- {- name: 'The Economist',- url: 'https://www.economist.com/finance-and-economics/rss.xml',- category: 'ECONOMIC',- region: 'GLOBAL',- source: 'THE ECONOMIST'- },- // Energy & Commodities+ // Energy & Commodities - Working feeds{name: 'Oil Price',url: 'https://oilprice.com/rss/main',category: 'ENERGY',region: 'GLOBAL',source: 'OILPRICE'- },- {- name: 'Rigzone',- url: 'https://www.rigzone.com/news/rss.asp',- category: 'ENERGY',- region: 'GLOBAL',- source: 'RIGZONE'- },-- // Global Markets- {- name: 'FXStreet',- url: 'https://www.fxstreet.com/rss/news',- category: 'MARKETS',- region: 'GLOBAL',- source: 'FXSTREET'- },- {- name: 'Benzinga',- url: 'https://www.benzinga.com/feed',- category: 'MARKETS',- region: 'US',- source: 'BENZINGA'}];// Multiple CORS proxies for fallbackconst CORS_PROXIES = ['https://api.allorigins.win/raw?url=',+ 'https://api.codetabs.com/v1/proxy?quest=','https://corsproxy.io/?',- 'https://api.codetabs.com/v1/proxy?quest='+ 'https://proxy.cors.sh/',+ 'https://api.allorigins.win/get?url='];// Parse RSS XML to articles@@ -300,48 +251,69 @@ function parseRSSFeed(xmlText: string, feedConfig: typeof RSS_FEEDS[0]): NewsArt// Fetch single RSS feed with proxy fallbackasync function fetchRSSFeed(feedConfig: typeof RSS_FEEDS[0]): Promise<NewsArticle[]> {// Try each proxy until one works- for (const proxy of CORS_PROXIES) {+ for (let i = 0; i < CORS_PROXIES.length; i++) {try {+ const proxy = CORS_PROXIES[i];const proxyUrl = `${proxy}${encodeURIComponent(feedConfig.url)}`;+ // Create manual timeout+ const controller = new AbortController();+ const timeoutId = setTimeout(() => controller.abort(), 15000);+const response = await fetch(proxyUrl, {headers: {'Accept': 'application/rss+xml, application/xml, text/xml, */*'},- signal: AbortSignal.timeout(10000) // 10 second timeout per proxy+ signal: controller.signal});+ clearTimeout(timeoutId);+if (!response.ok) {+ console.log(`✗ ${feedConfig.name} via proxy ${i+1}: HTTP ${response.status}`);continue; // Try next proxy}- const xmlText = await response.text();+ let xmlText = await response.text();++ // Handle allorigins JSON wrapper format+ if (proxy.includes('allorigins.win/get')) {+ try {+ const json = JSON.parse(xmlText);+ xmlText = json.contents || xmlText;+ } catch (e) {+ // Not JSON, use as-is+ }+ }// Validate response is XML before parsingif (!xmlText || !xmlText.trim().startsWith('<')) {+ console.log(`✗ ${feedConfig.name} via proxy ${i+1}: Not XML`);continue; // Try next proxy}const articles = parseRSSFeed(xmlText, feedConfig);if (articles.length > 0) {- console.log(`✓ Fetched ${articles.length} articles from ${feedConfig.name}`);+ console.log(`✓ Fetched ${articles.length} articles from ${feedConfig.name} via proxy ${i+1}`);return articles;+ } else {+ console.log(`✗ ${feedConfig.name} via proxy ${i+1}: Parsed 0 articles`);}- } catch (error) {- // Silently try next proxy+ } catch (error: any) {+ console.log(`✗ ${feedConfig.name} via proxy ${i+1}: ${error.message}`);continue;}}- // All proxies failed - don't log to reduce console noise+ console.log(`✗ ${feedConfig.name}: All ${CORS_PROXIES.length} proxies failed`);return [];}// Fetch all RSS feeds with batchingexport async function fetchAllNews(): Promise<NewsArticle[]> {const allArticles: NewsArticle[] = [];- const BATCH_SIZE = 8; // Fetch 8 feeds at a time for better performance+ const BATCH_SIZE = 5; // Reduced batch size for more reliable fetchinglet successfulFeeds = 0;// Process feeds in batches@@ -372,7 +344,7 @@ export async function fetchAllNews(): Promise<NewsArticle[]> {// Fetch news with caching (cache for 5 minutes)let cachedNews: NewsArticle[] = [];let lastFetchTime = 0;-const CACHE_DURATION = 5 * 60 * 1000; // 5 minutes+const CACHE_DURATION = 10 * 60 * 1000; // 10 minutes defaultlet useMockData = false;export async function fetchNewsWithCache(forceRefresh: boolean = false): Promise<NewsArticle[]> {@@ -380,9 +352,12 @@ export async function fetchNewsWithCache(forceRefresh: boolean = false): Promise// Return cached news if still valid and not forcing refreshif (!forceRefresh && cachedNews.length > 0 && (now - lastFetchTime) < CACHE_DURATION) {+ console.log(`📋 Using cached news (${cachedNews.length} articles)`);return cachedNews;}+ console.log(`🔄 Fetching fresh news from ${RSS_FEEDS.length} feeds...`);+// On first load or force refresh, fetch real news immediatelytry {const fetchedNews = await fetchAllNews();@@ -391,6 +366,7 @@ export async function fetchNewsWithCache(forceRefresh: boolean = false): PromisecachedNews = fetchedNews;useMockData = false;lastFetchTime = Date.now();+ console.log(`✅ Cache updated with ${cachedNews.length} articles`);return cachedNews;} else {// Only use mock data if real fetch completely fails and we have no cache@@ -398,19 +374,23 @@ export async function fetchNewsWithCache(forceRefresh: boolean = false): Promiseconsole.log('⚠ Using demo data - no live feeds available');cachedNews = generateMockNews();useMockData = true;+ lastFetchTime = Date.now();+ } else {+ console.log('⚠ Fetch returned 0 articles, keeping cache');}+ return cachedNews;}} catch (err) {+ console.error('❌ Fetch error:', err);// Only use mock data if real fetch completely fails and we have no cacheif (cachedNews.length === 0) {console.log('⚠ Using demo data - fetch failed');cachedNews = generateMockNews();useMockData = true;+ lastFetchTime = Date.now();}+ return cachedNews;}-- lastFetchTime = now;- return cachedNews;}// Check if currently using mock datadiff --git a/fincept-terminal-desktop/src/services/nodeExecutionManager.ts b/fincept-terminal-desktop/src/services/nodeExecutionManager.tsindex 7292503af..f7cbe97f9 100644--- a/fincept-terminal-desktop/src/services/nodeExecutionManager.ts+++ b/fincept-terminal-desktop/src/services/nodeExecutionManager.ts@@ -332,14 +332,23 @@ class NodeExecutionManager {inputs: Record<string, any>): Promise<ExecutionResult> {// Results display just receives and displays data- console.log('[NodeExecutionManager] Results display node receiving data:', JSON.stringify(inputs, null, 2));+ console.log('[NodeExecutionManager] ========================================');+ console.log('[NodeExecutionManager] Results Display Node Execution');+ console.log('[NodeExecutionManager] Node ID:', node.id);+ console.log('[NodeExecutionManager] Raw inputs:', inputs);+ console.log('[NodeExecutionManager] Input keys:', Object.keys(inputs));+ console.log('[NodeExecutionManager] Input type:', typeof inputs);+ console.log('[NodeExecutionManager] ========================================');// Extract actual data if it's wrapped in a success objectlet displayData = inputs;if (inputs.success !== undefined && inputs.data !== undefined) {displayData = inputs.data;+ console.log('[NodeExecutionManager] Unwrapped data from success wrapper');}+ console.log('[NodeExecutionManager] Final display data:', displayData);+return {nodeId: node.id,success: true,diff --git a/fincept-terminal-desktop/src/services/workflowService.ts b/fincept-terminal-desktop/src/services/workflowService.tsindex c78be79b2..51a5e9b3d 100644--- a/fincept-terminal-desktop/src/services/workflowService.ts+++ b/fincept-terminal-desktop/src/services/workflowService.ts@@ -11,12 +11,61 @@ export interface Workflow {class WorkflowService {private workflows: Map<string, Workflow> = new Map();private runningWorkflows: Set<string> = new Set();+ private readonly STORAGE_KEY = 'fincept_workflows';++ constructor() {+ // Load workflows from localStorage on startup+ this.loadFromStorage();+ }++ private loadFromStorage(): void {+ try {+ const stored = localStorage.getItem(this.STORAGE_KEY);+ if (stored) {+ const workflows: Workflow[] = JSON.parse(stored);+ workflows.forEach(wf => this.workflows.set(wf.id, wf));+ console.log(`[WorkflowService] Loaded ${workflows.length} workflows from storage`);+ }+ } catch (error) {+ console.error('[WorkflowService] Failed to load workflows:', error);+ }+ }++ private saveToStorage(): void {+ try {+ const workflows = Array.from(this.workflows.values());+ localStorage.setItem(this.STORAGE_KEY, JSON.stringify(workflows));+ console.log(`[WorkflowService] Saved ${workflows.length} workflows to storage`);+ } catch (error) {+ console.error('[WorkflowService] Failed to save workflows:', error);+ }+ }async saveWorkflow(workflow: Workflow): Promise<void> {this.workflows.set(workflow.id, workflow);+ this.saveToStorage();console.log(`[WorkflowService] Saved workflow: ${workflow.id}`);}+ async saveDraft(+ name: string,+ description: string,+ nodes: any[],+ edges: any[]+ ): Promise<string> {+ const id = `draft_${Date.now()}`;+ const workflow: Workflow = {+ id,+ name,+ description,+ nodes,+ edges,+ status: 'draft'+ };+ await this.saveWorkflow(workflow);+ return id;+ }+async loadWorkflow(id: string): Promise<Workflow | undefined> {return this.workflows.get(id);}@@ -24,6 +73,7 @@ class WorkflowService {async deleteWorkflow(id: string): Promise<void> {this.workflows.delete(id);this.runningWorkflows.delete(id);+ this.saveToStorage();console.log(`[WorkflowService] Deleted workflow: ${id}`);}@@ -85,6 +135,7 @@ class WorkflowService {workflow.edges = edges;workflow.status = 'draft';this.workflows.set(id, workflow);+ this.saveToStorage();console.log(`[WorkflowService] Updated draft: ${id}`);}}