From baa74c6a8c9e511496f50931092080e3c1b0aa1e Mon Sep 17 00:00:00 2001 From: KaifAhmad1 Date: Sun, 26 Apr 2026 15:35:33 +0530 Subject: [PATCH] feat(explorer): add welcome screen and fix root path Invalid path error - Add WelcomeScreen shown on app load; SKE brand button navigates back - Fix serve_spa: empty root path was hitting dot-guard returning 400 Invalid path instead of index.html or a welcome JSON response Co-Authored-By: Claude Sonnet 4.6 --- explorer/src/App.tsx | 31 ++++++++++++++++++++++++++++--- semantica/server.py | 18 +++++++++++++++--- 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/explorer/src/App.tsx b/explorer/src/App.tsx index 17d8bc78..6218ba85 100644 --- a/explorer/src/App.tsx +++ b/explorer/src/App.tsx @@ -15,7 +15,7 @@ const EntityResolutionTab = lazy(() => import('./workspaces/EnrichWorkspace/Enti const KGOverviewTab = lazy(() => import('./workspaces/ManageWorkspace/KGOverviewTab').then((module) => ({ default: module.KGOverviewTab }))); const OntologySummaryTab = lazy(() => import('./workspaces/ManageWorkspace/OntologySummaryTab').then((module) => ({ default: module.OntologySummaryTab }))); -type WorkspaceId = 'explore' | 'analyze' | 'decisions' | 'enrich' | 'manage'; +type WorkspaceId = 'welcome' | 'explore' | 'analyze' | 'decisions' | 'enrich' | 'manage'; type ExploreView = 'graph' | 'vocabulary'; type AnalyzeView = 'sparql' | 'reasoning'; type EnrichView = 'import' | 'merge' | 'registry' | 'resolve'; @@ -311,14 +311,39 @@ function WorkspaceFallback() { return
Loading workspace…
; } +function WelcomeScreen() { + return ( +
+

+ Welcome to Semantica +

+

+ Select a workspace from the sidebar to get started. +

+
+ ); +} + export default function App() { - const [activeWorkspace, setActiveWorkspace] = useState('explore'); + const [activeWorkspace, setActiveWorkspace] = useState('welcome'); const [exploreView, setExploreView] = useState('graph'); const [analyzeView, setAnalyzeView] = useState('reasoning'); const [enrichView, setEnrichView] = useState('import'); const [manageView, setManageView] = useState('lineage'); const renderWorkspace = () => { + if (activeWorkspace === 'welcome') { + return ; + } + if (activeWorkspace === 'explore') { return ( {shellStyles}