feat: 前端 Error Boundary + 体验改进

- 新增 ErrorBoundary 组件: 捕获组件崩溃,显示友好错误页+重试按钮
- App: 用 ErrorBoundary 包裹,标题改为「先知 Profeto」
- Matches 页面:
  - 预测模式切换 (单次/多 Agent)
  - 加载中动画指示
  - 预测中状态提示
  - 错误提示可关闭
This commit is contained in:
shangfangjian
2026-09-09 21:58:57 +08:00
parent 494751bbb0
commit 3071ffd533
4 changed files with 2825 additions and 12 deletions
+12 -9
View File
@@ -1,15 +1,18 @@
import { ErrorBoundary } from './components/ErrorBoundary'
import Matches from './pages/Matches'
export default function App() {
return (
<div className="min-h-screen bg-gray-50">
<header className="bg-white border-b px-6 py-3 flex items-center justify-between">
<h1 className="text-xl font-bold text-blue-700"> Profeto</h1>
<span className="text-sm text-gray-500"> LLM </span>
</header>
<main className="max-w-5xl mx-auto p-6">
<Matches />
</main>
</div>
<ErrorBoundary>
<div className="min-h-screen bg-gray-50">
<header className="bg-white border-b px-6 py-3 flex items-center justify-between">
<h1 className="text-xl font-bold text-blue-700"> Profeto</h1>
<span className="text-sm text-gray-500"> LLM </span>
</header>
<main className="max-w-5xl mx-auto p-6">
<Matches />
</main>
</div>
</ErrorBoundary>
)
}