diff --git a/.gemini/docs/unified-resource-architecture.md b/.gemini/docs/unified-resource-architecture.md index aa87657..b7ce652 100644 --- a/.gemini/docs/unified-resource-architecture.md +++ b/.gemini/docs/unified-resource-architecture.md @@ -544,10 +544,11 @@ The dedicated `/resources` unified view was abandoned in favor of migrating exis - WebSocket state now includes resources array - All pages can consume from unified model with legacy fallback -4. **Future Cleanup (Phase 6):** +4. **Cleanup (Phase 6) - COMPLETED:** - [x] Remove debug console.log statements from frontend routes - - [ ] Remove legacy arrays from State once migration is verified stable (keep fallback for safety) - - [ ] Remove legacy AI context fallback + - [x] Remove legacy fallback code from route components (Docker, Hosts, Dashboard) + - [ ] Remove unused legacy arrays from backend StateFrontend (optional - still broadcast for API compatibility) + - [ ] Remove legacy AI context fallback (optional - verify AI uses unified model first) - [ ] Simplify route components to use resources directly (remove adapter layer) --- diff --git a/frontend-modern/src/App.tsx b/frontend-modern/src/App.tsx index 2689971..bfa9c84 100644 --- a/frontend-modern/src/App.tsx +++ b/frontend-modern/src/App.tsx @@ -184,8 +184,8 @@ function DockerRoute() { }); } - // Fall back to legacy data - return state.dockerHosts ?? []; + // Return empty array if no unified resources available + return []; }); return ; @@ -249,8 +249,8 @@ function HostsRoute() { }); } - // Fall back to legacy data - return state.hosts ?? []; + // Return empty array if no unified resources available + return []; }); return ( @@ -913,7 +913,8 @@ function App() { }; }); } - return state().vms ?? []; + // Return empty array if no unified resources available + return []; }); const containers = createMemo(() => { @@ -956,7 +957,8 @@ function App() { }; }); } - return state().containers ?? []; + // Return empty array if no unified resources available + return []; }); const nodes = createMemo(() => { @@ -998,7 +1000,8 @@ function App() { }; }); } - return state().nodes ?? []; + // Return empty array if no unified resources available + return []; }); return (