fix: check wizard config for initialized flag instead of backend health

- App checks wizard API for harborforge.json config with initialized=true
- If not initialized, show embedded setup wizard (talks to wizard API via CORS)
- Setup saves config with initialized:true to wizard config volume
- After restart, backend reads config and starts, frontend sees initialized=true
- Remove VITE_API_BASE build arg (not needed, api.ts uses /api relative path)
- Fix Object.entries null crash in DashboardPage
This commit is contained in:
zhi
2026-03-11 10:09:33 +00:00
parent f8fac48fcc
commit c92e399218
4 changed files with 30 additions and 34 deletions

View File

@@ -28,7 +28,7 @@ export default function DashboardPage() {
<span className="stat-number">{stats.total_issues}</span>
<span className="stat-label"> Issues</span>
</div>
{Object.entries(stats.by_status).map(([k, v]) => (
{Object.entries(stats.by_status || {}).map(([k, v]) => (
<div className="stat-card" key={k} style={{ borderLeftColor: statusColors[k] || '#ccc' }}>
<span className="stat-number">{v}</span>
<span className="stat-label">{k}</span>
@@ -39,7 +39,7 @@ export default function DashboardPage() {
<div className="section">
<h3></h3>
<div className="bar-chart">
{Object.entries(stats.by_priority).map(([k, v]) => (
{Object.entries(stats.by_priority || {}).map(([k, v]) => (
<div className="bar-row" key={k}>
<span className="bar-label">{k}</span>
<div className="bar" style={{