Skip to content

Commit a1851f1

Browse files
nextlevelshitclaude
andcommitted
feat(webui): nav enhancement — Bridge link, Schedules placeholder, proposal badge, in-flight pulse, repo/forge meta
Nav now shows: Bridge link, in-flight count with green pulse (CSS animation keyframe added to style.css), pending proposal count badge (yellow) on Proposals link, repo name + forge host in meta bar, Admin link on right. BridgeData exposes InFlightCount, PendingProposalCount, RepoName, ForgeHost from runtime. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 372984e commit a1851f1

3 files changed

Lines changed: 48 additions & 26 deletions

File tree

internal/webui/handlers_bridge.go

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ import (
1313
type BridgeData struct {
1414
ActivePage string
1515

16+
// Nav meta (exposed so nav partial can read them)
17+
InFlightCount int
18+
PendingProposalCount int
19+
RepoName string
20+
ForgeHost string
21+
1622
// Hero stats
1723
RunningCount int
1824
ImplCount int // running impl-issue pipelines
@@ -34,9 +40,6 @@ type BridgeData struct {
3440
HealthHints int
3541
BudgetWarning bool
3642

37-
// Proposals
38-
PendingProposalCount int
39-
4043
// Heatmap (24 cells for last 24h, each 0-4 activity level)
4144
Heatmap [24]int
4245

@@ -150,25 +153,28 @@ func (s *Server) handleBridge(w http.ResponseWriter, r *http.Request) {
150153
}
151154

152155
data := BridgeData{
153-
ActivePage: "bridge",
154-
RunningCount: runningCount,
155-
ImplCount: implCount,
156-
ReviewCount: reviewCount,
157-
CompletedToday: completedToday,
158-
Spend: "$0.00", // TODO: wire from run cost tracking when available
159-
BudgetCap: "$10.00", // TODO: wire from config
160-
JudgeAvg: "—", // TODO: compute from run verdict aggregates
161-
JudgeTrend: "", // TODO: compute from 7d trend
162-
InFlightStats: inFlightStats,
163-
RunningRuns: runningRuns,
164-
RecentLandings: recentLandings,
165-
OpenWorkItems: openWorkItems,
166-
StaleBranches: 0, // TODO: wire from forge client
167-
HealthHints: 0, // TODO: wire from health checks
168-
BudgetWarning: false, // TODO: compare spend vs cap
156+
ActivePage: "bridge",
157+
InFlightCount: runningCount,
169158
PendingProposalCount: pendingProposals,
170-
Heatmap: heatmap,
171-
ActivityStream: []ActivityEvent{}, // SSE-powered live stream
159+
RepoName: s.runtime.repoSlug,
160+
ForgeHost: s.runtime.forgeHost,
161+
RunningCount: runningCount,
162+
ImplCount: implCount,
163+
ReviewCount: reviewCount,
164+
CompletedToday: completedToday,
165+
Spend: "$0.00", // TODO: wire from run cost tracking when available
166+
BudgetCap: "$10.00", // TODO: wire from config
167+
JudgeAvg: "—", // TODO: compute from run verdict aggregates
168+
JudgeTrend: "", // TODO: compute from 7d trend
169+
InFlightStats: inFlightStats,
170+
RunningRuns: runningRuns,
171+
RecentLandings: recentLandings,
172+
OpenWorkItems: openWorkItems,
173+
StaleBranches: 0, // TODO: wire from forge client
174+
HealthHints: 0, // TODO: wire from health checks
175+
BudgetWarning: false, // TODO: compare spend vs cap
176+
Heatmap: heatmap,
177+
ActivityStream: []ActivityEvent{}, // SSE-powered live stream
172178
}
173179

174180
w.Header().Set("Content-Type", "text/html; charset=utf-8")

internal/webui/static/style.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3850,3 +3850,8 @@ pre.w-diff-block {
38503850
.w-empty svg { width: 40px; height: 40px; margin: 0 auto 12px; opacity: 0.4; }
38513851
.w-empty h3 { font-size: 15px; font-weight: 500; margin: 0 0 4px; color: var(--color-text); }
38523852
.w-empty p { font-size: 13px; margin: 0; max-width: 400px; margin-left: auto; margin-right: auto; }
3853+
3854+
/* Bridge — pulsing indicator for in-flight count */
3855+
@keyframes bridge-pulse { 0% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.6); } 100% { box-shadow: 0 0 0 8px rgba(63, 185, 80, 0); } }
3856+
3857+
.bridge-pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--color-success, #3fb950); vertical-align: middle; margin-right: 4px; animation: bridge-pulse 1.6s infinite; }

internal/webui/templates/partials/nav_main.html

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
Wave
99
</a>
1010
<div class="w-nav-links">
11+
<a href="/"{{if eq .ActivePage "bridge"}} class="active"{{end}}>
12+
<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
13+
Bridge
14+
</a>
1115
<a href="/work"{{if eq .ActivePage "work"}} class="active"{{end}}>
1216
<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>
1317
Work
@@ -22,7 +26,7 @@
2226
</a>
2327
<a href="/proposals"{{if eq .ActivePage "proposals"}} class="active"{{end}}>
2428
<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg>
25-
Proposals
29+
Proposals{{if gt .PendingProposalCount 0}}<span style="font-size: 10px; padding: 1px 6px; background: #d29922; color: #0d1117; border-radius: 10px; margin-left: 4px;">{{.PendingProposalCount}}</span>{{end}}
2630
</a>
2731
<a href="/issues"{{if eq .ActivePage "issues"}} class="active"{{end}}>
2832
<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>
@@ -36,10 +40,17 @@
3640
<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg>
3741
Onboard
3842
</a>
39-
<a href="/health" style="margin-left: auto;"{{if eq .ActivePage "health"}} class="active"{{end}}>
40-
<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg>
41-
Health
43+
<a href="/admin"{{if eq .ActivePage "admin"}} class="active"{{end}} style="margin-left: auto;">
44+
<svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09a1.65 1.65 0 0 0-1-1.51 1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09a1.65 1.65 0 0 0 1.51-1 1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33h0a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51h0a1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82v0a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>
45+
Admin
4246
</a>
4347
</div>
48+
{{if or .InFlightCount .RepoName}}
49+
<div class="w-nav-meta">
50+
{{if .InFlightCount}}<span class="bridge-pulse" style="display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--color-success,#3fb950);vertical-align:middle;margin-right:4px;"></span>{{.InFlightCount}} in flight{{end}}
51+
{{if .RepoName}}<span>{{.RepoName}}</span>{{end}}
52+
{{if .ForgeHost}}<span>{{.ForgeHost}}</span>{{end}}
53+
</div>
54+
{{end}}
4455
</nav>
45-
{{end}}
56+
{{end}}

0 commit comments

Comments
 (0)