| // src/components/FloatingWorkspaceLayer.tsx | |
| import React, { Suspense } from "react"; | |
| import FloatingWindowRenderer from "./floating/FloatingWindow"; | |
| import FloatingWindowBar from "./floating/FloatingWindowBar"; | |
| import { useWindowStore } from "../store/windowStore"; | |
| import { DockableWindow } from "./DockableWindow"; | |
| import { WindowLauncher } from "./WindowLauncher"; | |
| import { WorkspaceManager } from "./WorkspaceManager"; | |
| import { Toaster } from "./ui/Toast"; | |
| import { ErrorBoundary } from "./ui/ErrorBoundary"; | |
| import { Spinner } from "./ui/Spinner"; | |
| // ======================== | |
| // 1. Floating Windows (used in DockableWindow componentMap) | |
| // ======================== | |
| // Terminal & Chat | |
| import TerminalPanel from "../features/terminal/components/TerminalPanel"; | |
| import { ChatPanel } from "../features/chat/components/ChatPanel"; | |
| import FloatingNotesEditor from "../features/notes/components/FloatingNotesEditor"; | |
| import PaperEditorPanel from "../features/paper/components/PaperEditorPanel"; | |
| // Marketplace & GPU | |
| import GPUMarketplacePage from "../features/marketplace/pages/GPUMarketplacePage"; | |
| import GPUTradingTerminal from "../features/marketplace/pages/GPUTradingTerminal"; | |
| import AgenticMarketplacePage from "../features/marketplaceAI/pages/AgenticMarketplacePage"; | |
| import ComparisonBuilder from "../features/marketplaceAI/pages/ComparisonBuilder"; | |
| import ProviderDashboardPage from "../features/marketplace/pages/ProviderDashboardPage"; | |
| import DisputeHandlingPage from "../features/marketplace/pages/DisputeHandlingPage"; | |
| // Experiments & Analysis | |
| import ExperimentListWindow from "../features/experiments/pages/ExperimentListPage"; | |
| import ResearchAnalysisPage from "../features/analysis/pages/ResearchAnalysisPage"; | |
| import AdvancedAnalyticsPage from "../features/analytics/pages/AdvancedAnalyticsPage"; | |
| import AcceleratorDashboard from "../features/accelerator/pages/AcceleratorDashboard"; | |
| import HPODashboard from "../features/hpo/pages/HPODashboard"; | |
| import SweepDetailPage from "../features/hpo/pages/SweepDetailPage"; | |
| import RecommendationListPage from "../features/recommender/pages/RecommendationListPage"; | |
| import FailureAnalysisPage from "../features/forensics/pages/FailureAnalysisPage"; | |
| // AI & Research Co-pilot | |
| import IdeaTournamentPage from "../features/coscientist/pages/IdeaTournamentPage"; | |
| import HypothesisBrowser from "../features/coscientist/pages/HypothesisBrowser"; | |
| import DeepResearchPage from "../features/research/pages/DeepResearchPage"; | |
| import AutonomousPipelineMonitor from "../features/autonomous/pages/AutonomousPipelineMonitor"; | |
| import StepEditor from "../features/autonomous/pages/StepEditor"; | |
| import CodeAssistantPage from "../features/codingAssistant/pages/CodeAssistantPage"; | |
| // Literature & Discovery | |
| import LiteratureMapPage from "../features/literature/pages/LiteratureMapPage"; | |
| import CitationGraphViewer from "../features/literature/pages/CitationGraphViewer"; | |
| import LiteratureSynthesizer from "../features/researchDiscovery/pages/LiteratureSynthesizer"; | |
| import HypothesisGenerator from "../features/researchDiscovery/pages/HypothesisGenerator"; | |
| import ResearchDatabaseExplorer from "../features/researchDiscovery/pages/ResearchDatabaseExplorer"; | |
| import GrantMatcher from "../features/researchDiscovery/pages/GrantMatcher"; | |
| // Impact Predictor | |
| import ImpactScorePage from "../features/impactPredictor/pages/ImpactScorePage"; | |
| import ProjectLeaderboard from "../features/impactPredictor/pages/ProjectLeaderboard"; | |
| // Collaborator Matching & Expert Wall | |
| import CollaboratorSuggestionPage from "../features/collaborator/pages/CollaboratorSuggestionPage"; | |
| import MatchHistoryList from "../features/collaborator/pages/MatchHistoryList"; | |
| import ExpertDirectoryPage from "../features/expertWall/pages/ExpertDirectoryPage"; | |
| import ProjectApplicationPanel from "../features/expertWall/pages/ProjectApplicationPanel"; | |
| // Gamification & Streaks | |
| import StreakHeatmapPage from "../features/streaks/pages/StreakHeatmapPage"; | |
| import WeeklySummaryViewer from "../features/streaks/pages/WeeklySummaryViewer"; | |
| import BadgeWallPage from "../features/gamification/pages/BadgeWallPage"; | |
| import ContributionLeaderboard from "../features/gamification/pages/ContributionLeaderboard"; | |
| // Admin, Organizations, Community (Floating versions - reuse pages) | |
| import AdminDashboard from "../features/admin/pages/AdminDashboard"; | |
| import ClusterOverviewPage from "../features/cluster/pages/ClusterOverviewPage"; | |
| import OrganizationListPage from "../features/organizations/pages/OrganizationListPage"; | |
| import QuestionListPage from "../features/community/pages/QuestionListPage"; | |
| import UserProfileWindow from "../features/profile/pages/UserProfilePage"; | |
| // 3D Model Viewer & Federated Learning | |
| import ModelViewerPage from "../features/modelViewer/pages/ModelViewerPage"; | |
| import FLRunPage from "../features/federated/pages/FLRunPage"; | |
| // Anomaly & HPO (floating versions) | |
| import AnomalyListPage from "../features/anomaly/pages/AnomalyListPage"; | |
| import AnomalyDetailPage from "../features/anomaly/pages/AnomalyDetailPage"; | |
| import HPORunsPage from "../features/hpo/pages/HPORunsPage"; | |
| // Community Lab | |
| import LabsListPage from "../features/communityLab/pages/LabsListPage"; | |
| import LabDetailPage from "../features/communityLab/pages/LabDetailPage"; | |
| // Datasets | |
| import DatasetListPage from "../features/datasets/pages/DatasetListPage"; | |
| import DatasetDetailPage from "../features/datasets/pages/DatasetDetailPage"; | |
| // LLM Hub | |
| import LLMProviderList from "../features/llmHub/pages/LLMProviderList"; | |
| import LLMPlayground from "../features/llmHub/pages/LLMPlayground"; | |
| import PromptLibrary from "../features/llmHub/pages/PromptLibrary"; | |
| import EvaluationSuiteRunner from "../features/llmHub/pages/EvaluationSuiteRunner"; | |
| import CostDashboard from "../features/llmHub/pages/CostDashboard"; | |
| import MemoryManager from "../features/llmHub/pages/MemoryManager"; | |
| import ToolCatalog from "../features/llmHub/pages/ToolCatalog"; | |
| import ArenaBattlePage from "../features/llmHub/pages/ArenaBattlePage"; | |
| import GuardrailEditor from "../features/llmHub/pages/GuardrailEditor"; | |
| // MLOps | |
| import FeatureStoreBrowser from "../features/mlops/pages/FeatureStoreBrowser"; | |
| import DriftMonitorList from "../features/mlops/pages/DriftMonitorList"; | |
| import AlertDashboard from "../features/mlops/pages/AlertDashboard"; | |
| import PerformanceSnapshotView from "../features/mlops/pages/PerformanceSnapshotView"; | |
| // Governance | |
| import AuditLogDashboard from "../features/governance/pages/AuditLogDashboard"; | |
| import ComplianceReportView from "../features/governance/pages/ComplianceReportView"; | |
| import ContractSigningUI from "../features/governance/pages/ContractSigningUI"; | |
| import SecurityScanResults from "../features/governance/pages/SecurityScanResults"; | |
| import AccessPolicyEditor from "../features/governance/pages/AccessPolicyEditor"; | |
| // Integrations | |
| import CloudConnectionWizard from "../features/integrations/pages/CloudConnectionWizard"; | |
| import WebhookListPage from "../features/integrations/pages/WebhookListPage"; | |
| import SandboxSessionView from "../features/integrations/pages/SandboxSessionView"; | |
| import PluginMarketplace from "../features/integrations/pages/PluginMarketplace"; | |
| // Experiment Explorer | |
| import HyperparameterExplorer from "../features/experimentExplorer/pages/HyperparameterExplorer"; | |
| import CustomDashboardBuilder from "../features/experimentExplorer/pages/CustomDashboardBuilder"; | |
| import SQLQueryEditor from "../features/experimentExplorer/pages/SQLQueryEditor"; | |
| // Live Dashboards | |
| import LiveDashboardList from "../features/liveDashboards/pages/LiveDashboardList"; | |
| import DashboardBuilder from "../features/liveDashboards/pages/DashboardBuilder"; | |
| // Model Hub | |
| import ModelRegistryList from "../features/modelHub/pages/ModelRegistryList"; | |
| import ApprovalRequestView from "../features/modelHub/pages/ApprovalRequestView"; | |
| import PromotionPanel from "../features/modelHub/pages/PromotionPanel"; | |
| import ModelAccessManager from "../features/modelHub/pages/ModelAccessManager"; | |
| import ModelCatalogSearch from "../features/modelHub/pages/ModelCatalogSearch"; | |
| // Playground (prompt/model/tool testing) | |
| import PromptPlayground from "../features/playground/pages/PromptPlayground"; | |
| import ModelComparisonView from "../features/playground/pages/ModelComparisonView"; | |
| import ToolTestConsole from "../features/playground/pages/ToolTestConsole"; | |
| // Health Monitor | |
| import DriftMonitorSetup from "../features/healthMonitor/pages/DriftMonitorSetup"; | |
| import AlertHistory from "../features/healthMonitor/pages/AlertHistory"; | |
| import HealthDashboard from "../features/healthMonitor/pages/HealthDashboard"; | |
| // Annotation | |
| import AnnotationProjectList from "../features/annotation/pages/AnnotationProjectList"; | |
| import LabelingInterface from "../features/annotation/pages/LabelingInterface"; | |
| import AIPreLabelingPanel from "../features/annotation/pages/AIPreLabelingPanel"; | |
| import ReviewQueue from "../features/annotation/pages/ReviewQueue"; | |
| // Inference | |
| import InferenceEndpointManager from "../features/inference/pages/InferenceEndpointManager"; | |
| import PipelineRunner from "../features/inference/pages/PipelineRunner"; | |
| import CTCDTrigger from "../features/inference/pages/CTCDTrigger"; | |
| import ModelDistillationWizard from "../features/inference/pages/ModelDistillationWizard"; | |
| import MultiNodeTrainingLauncher from "../features/inference/pages/MultiNodeTrainingLauncher"; | |
| // Protocols | |
| import ProtocolListPage from "../features/protocols/pages/ProtocolListPage"; | |
| import ProtocolBuilder from "../features/protocols/pages/ProtocolBuilder"; | |
| // GPU Finance | |
| import FuturesTradingPage from "../features/gpuFinance/pages/FuturesTradingPage"; | |
| import ComputeIndexPage from "../features/gpuFinance/pages/ComputeIndexPage"; | |
| import InvoiceManager from "../features/gpuFinance/pages/InvoiceManager"; | |
| import PayoutRequestsPage from "../features/gpuFinance/pages/PayoutRequestsPage"; | |
| import SubscriptionPlansPage from "../features/gpuFinance/pages/SubscriptionPlansPage"; | |
| // Social (extra) | |
| import GroupDiscussionPage from "../features/social/pages/GroupDiscussionPage"; | |
| import SuggestedResearchersPage from "../features/social/pages/SuggestedResearchersPage"; | |
| import SupportHubPage from "../features/support/pages/SupportHubPage"; | |
| // ======================== | |
| // 2. Component Map for DockableWindow | |
| // ======================== | |
| const componentMap: Record<string, React.ComponentType<any>> = { | |
| // Core | |
| terminal: TerminalPanel, | |
| chat: ChatPanel, | |
| notes: FloatingNotesEditor, | |
| "paper-editor": PaperEditorPanel, | |
| marketplace: GPUMarketplacePage, | |
| gpumarket: GPUTradingTerminal, | |
| "marketplace-ai": AgenticMarketplacePage, | |
| "comparison-builder": ComparisonBuilder, | |
| "provider-dashboard": ProviderDashboardPage, | |
| disputes: DisputeHandlingPage, | |
| support: SupportHubPage, | |
| // Experiments & Analysis | |
| experiments: ExperimentListWindow, | |
| analysis: ResearchAnalysisPage, | |
| analytics: AdvancedAnalyticsPage, | |
| accelerator: AcceleratorDashboard, | |
| hpo: HPODashboard, | |
| sweeps: HPORunsPage, | |
| sweep_detail: SweepDetailPage, | |
| recommendations: RecommendationListPage, | |
| forensics: FailureAnalysisPage, | |
| anomaly: AnomalyListPage, | |
| anomaly_detail: AnomalyDetailPage, | |
| hpo_runs: HPORunsPage, | |
| // AI & Research | |
| tournament: IdeaTournamentPage, | |
| hypotheses: HypothesisBrowser, | |
| research: DeepResearchPage, | |
| "pipeline-monitor": AutonomousPipelineMonitor, | |
| "step-editor": StepEditor, | |
| "coding-assistant": CodeAssistantPage, | |
| // Literature | |
| "literature-map": LiteratureMapPage, | |
| "citation-graph": CitationGraphViewer, | |
| "literature-synthesizer": LiteratureSynthesizer, | |
| "hypothesis-generator": HypothesisGenerator, | |
| "database-explorer": ResearchDatabaseExplorer, | |
| "grant-matcher": GrantMatcher, | |
| // Impact | |
| "impact-score": ImpactScorePage, | |
| "project-leaderboard": ProjectLeaderboard, | |
| leaderboard: ContributionLeaderboard, | |
| // Collaboration | |
| "collaborator-suggestions": CollaboratorSuggestionPage, | |
| "match-history": MatchHistoryList, | |
| "expert-directory": ExpertDirectoryPage, | |
| "project-application": ProjectApplicationPanel, | |
| "group-discussions": GroupDiscussionPage, | |
| "suggested-researchers": SuggestedResearchersPage, | |
| // Gamification & Streaks | |
| "streak-heatmap": StreakHeatmapPage, | |
| "weekly-summary": WeeklySummaryViewer, | |
| "badge-wall": BadgeWallPage, | |
| // Admin & Org | |
| admin: AdminDashboard, | |
| cluster: ClusterOverviewPage, | |
| organizations: OrganizationListPage, | |
| community: QuestionListPage, | |
| profile: UserProfileWindow, | |
| // 3D & Federated | |
| model3d: ModelViewerPage, | |
| federated: FLRunPage, | |
| // Community Lab | |
| labs: LabsListPage, | |
| lab_detail: LabDetailPage, | |
| // Datasets | |
| datasets: DatasetListPage, | |
| dataset_detail: DatasetDetailPage, | |
| // LLM Hub | |
| "llm-providers": LLMProviderList, | |
| playground: LLMPlayground, | |
| prompts: PromptLibrary, | |
| evaluations: EvaluationSuiteRunner, | |
| costs: CostDashboard, | |
| memory: MemoryManager, | |
| tools: ToolCatalog, | |
| arena: ArenaBattlePage, | |
| guardrails: GuardrailEditor, | |
| // MLOps | |
| "feature-store": FeatureStoreBrowser, | |
| "drift-monitors": DriftMonitorList, | |
| alerts: AlertDashboard, | |
| performance: PerformanceSnapshotView, | |
| // Governance | |
| "audit-logs": AuditLogDashboard, | |
| compliance: ComplianceReportView, | |
| contracts: ContractSigningUI, | |
| "security-scans": SecurityScanResults, | |
| "access-policies": AccessPolicyEditor, | |
| // Integrations | |
| "cloud-connection": CloudConnectionWizard, | |
| webhooks: WebhookListPage, | |
| sandbox: SandboxSessionView, | |
| plugins: PluginMarketplace, | |
| // Experiment Explorer | |
| "hyperparameter-explorer": HyperparameterExplorer, | |
| "dashboard-builder": CustomDashboardBuilder, | |
| "sql-editor": SQLQueryEditor, | |
| // Live Dashboards | |
| "live-dashboards": LiveDashboardList, | |
| "live-dashboard-builder": DashboardBuilder, | |
| // Model Hub | |
| "model-registry": ModelRegistryList, | |
| approvals: ApprovalRequestView, | |
| promotions: PromotionPanel, | |
| "access-manager": ModelAccessManager, | |
| catalog: ModelCatalogSearch, | |
| // Playground (prompt/model/tool) | |
| "prompt-playground": PromptPlayground, | |
| "model-comparison": ModelComparisonView, | |
| "tool-test-console": ToolTestConsole, | |
| // Health Monitor | |
| "drift-monitor": DriftMonitorSetup, | |
| "alert-history": AlertHistory, | |
| "health-dashboard": HealthDashboard, | |
| // Annotation | |
| "annotation-projects": AnnotationProjectList, | |
| labeling: LabelingInterface, | |
| "pre-label": AIPreLabelingPanel, | |
| "review-queue": ReviewQueue, | |
| // Inference | |
| "inference-endpoints": InferenceEndpointManager, | |
| "pipeline-runner": PipelineRunner, | |
| "ctc-triggers": CTCDTrigger, | |
| distillation: ModelDistillationWizard, | |
| "multi-node-training": MultiNodeTrainingLauncher, | |
| // Protocols | |
| protocols: ProtocolListPage, | |
| "protocol-builder": ProtocolBuilder, | |
| // GPU Finance | |
| futures: FuturesTradingPage, | |
| "compute-index": ComputeIndexPage, | |
| invoices: InvoiceManager, | |
| payouts: PayoutRequestsPage, | |
| subscriptions: SubscriptionPlansPage, | |
| }; | |
| export function FloatingWorkspaceLayer() { | |
| const { windows, removeWindow } = useWindowStore(); | |
| return ( | |
| <div className="fixed inset-0 z-50 overflow-hidden pointer-events-none"> | |
| <div className="pointer-events-auto"> | |
| {windows.map((win) => { | |
| const Component = componentMap[win.type]; | |
| if (!Component) return null; | |
| return ( | |
| <DockableWindow key={win.id} window={win}> | |
| <ErrorBoundary title={`Error in ${win.title || "Window"}`}> | |
| <Suspense | |
| fallback={ | |
| <div className="w-full h-full min-h-[220px] flex flex-col items-center justify-center m-auto p-6 text-center"> | |
| <Spinner size="lg" label="Loading window module..." /> | |
| </div> | |
| } | |
| > | |
| <Component onClose={() => removeWindow(win.id)} /> | |
| </Suspense> | |
| </ErrorBoundary> | |
| </DockableWindow> | |
| ); | |
| })} | |
| <WindowLauncher /> | |
| <WorkspaceManager /> | |
| <FloatingWindowRenderer /> | |
| <FloatingWindowBar /> | |
| <Toaster /> | |
| </div> | |
| </div> | |
| ); | |
| } | |
| export default FloatingWorkspaceLayer; | |
Xet Storage Details
- Size:
- 16.1 kB
- Xet hash:
- 5a457c237eca6148d2d394f4cb1350b3e1949f5d9184e3f62e6db233e42f288c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.