fix: graceful HTTP shutdown, add ErrorBoundary, fix chart responsive height

- main.go: call server.Shutdown() on SIGTERM/SIGINT to drain in-flight requests
- Add React ErrorBoundary component (catches render crashes, shows retry UI)
- Wrap main content area and settings page with ErrorBoundary
- Fix ChartTabs.tsx: replace runtime window.innerWidth check with Tailwind responsive class (h-[500px] md:h-[600px])
- Restarted backend with latest build (health endpoint now returns proper timestamp)
This commit is contained in:
shinchan-zhai
2026-03-23 12:58:38 +08:00
parent e65093f35e
commit 8fbbaad670
4 changed files with 74 additions and 3 deletions

View File

@@ -181,6 +181,12 @@ func main() {
<-quit
logger.Info("📴 Shutdown signal received, closing system...")
// Gracefully shutdown HTTP server (drain in-flight requests)
if err := server.Shutdown(); err != nil {
logger.Warnf("⚠️ HTTP server shutdown error: %v", err)
}
logger.Info("✅ HTTP server stopped")
// Stop all traders
traderManager.StopAll()
logger.Info("✅ System shut down safely")