Commit Graph

5 Commits

Author SHA1 Message Date
OG T
540602fd63 fix(web): Phase 17 審核卡片 UI/UX 修復 - SlidePanel → ApprovalModal
問題:
- SlidePanel 側邊滑入與右側 OpenClaw 固定面板衝突
- 480px 寬度不足,內容被擠壓截斷
- 標題「審核詳情」只顯示「情」

解決方案:
- 新建 ApprovalModal 全屏 Modal 組件
- 居中對話框 (max-width: 672px)
- 深色遮罩 (60%) 強制用戶聚焦
- 符合 Nothing.tech「一次專注一件事」設計哲學

設計參考: GitHub PR Review, AWS IAM Console

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-26 13:26:05 +08:00
OG T
170102a4ee feat(#15): Approval Polling → SSE 即時更新
Phase 15: 將 Approval 輪詢機制改為 Server-Sent Events

後端變更:
- 新增 /api/v1/approvals/stream SSE 端點
- 建立/簽核/拒絕時發布 SSE 事件
- 使用現有 EventPublisher 基礎設施

前端變更:
- 新增 useApprovalSSE hook (自動連線/斷線管理)
- approval.store 新增 connectSSE/disconnectSSE actions
- 更新三個組件使用 SSE 取代 setInterval polling:
  - LiveApprovalPanel
  - AICommandPanel
  - HITLSection

效益:
- 即時推送 (延遲 ~0ms vs polling 5s)
- 減少 API 請求 (僅變更時推送)
- 自動重連 + Fallback to polling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-25 09:54:02 +08:00
OG T
8b7a1186ab feat(web): Professional UX for approval workflow
Industry-standard AIOps UX patterns:
- Compact approval list in right panel
- SlidePanel for details (PagerDuty/ServiceNow style)
- Keyboard navigation (←/→ for prev/next, ESC to close)
- Quick access to approve/reject
- Maintains context while reviewing details

Fixes large empty space issue and endless scrolling.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-25 00:22:35 +08:00
OG T
9bff46a1b0 feat: integrate Sentry + fix CI/CD issues
Sentry Integration (補強 SignOz):
- Add @sentry/nextjs for frontend error tracking + session replay
- Add sentry-sdk[fastapi] for backend error tracking
- Create sentry.client/server/edge.config.ts
- Integrate with next.config.js + instrumentation.ts
- Add Sentry exception capture in FastAPI error handler
- Create deployment scripts for Self-Hosted @ 192.168.0.110

CI/CD Fixes:
- Fix F821 Undefined name 'Field' in incidents.py
- Add NEXT_PUBLIC_API_URL env var to CI build step
- Add build-arg to Docker build verification

E2E Test Improvements:
- Fix strict mode violations in dashboard-acceptance tests
- Add timeout increase for Phase 4 demo tests
- Make tests more resilient to UI variations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-24 15:19:52 +08:00
OG T
196d269b92 feat: add all application source code
- apps/api: FastAPI backend with Dockerfile
- apps/web: Next.js frontend with Dockerfile
- apps/sensor: Signal collection agent
- packages: shared packages

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-22 18:57:44 +08:00