Improve workflow UI, retain stage diffs, and add portable pipeline transfers

Make OpenCode authoring responsive and expand the managed skill references. Add conflict-aware import/export, real-provider reference workflows, and tracked V2 generation for reliable budget accounting.
This commit is contained in:
2026-10-10 20:55:42 +01:00
parent a66d540125
commit c42a19f7d3
81 changed files with 5593 additions and 539 deletions
+33 -14
View File
@@ -87,7 +87,7 @@ func (m Model) runGraphState() (protocol.Graph, string, *graphAppearance) {
}
func (m Model) runsView(height int) string {
if m.runDetail == nil || height < 14 {
if m.runDetail == nil {
return m.runsDetailsView(height)
}
graphHeight, detailHeight := m.runPaneHeights(height)
@@ -95,20 +95,42 @@ func (m Model) runsView(height int) string {
if !m.runGraphFocus {
top, pan = m.runGraphFollow()
}
graph := m.runGraphPanel(graphHeight, top, pan)
graph := ""
if graphHeight > 0 {
if graphHeight <= 2 {
graph = fitBlock([]string{bar("Run graph", "Tab to expand", m.width, false)}, m.width, graphHeight)
} else {
graph = m.runGraphPanel(graphHeight, top, pan)
}
}
details := m.runsDetailsView(detailHeight)
return fitBlock(strings.Split(details+"\n"+graph, "\n"), m.width, height)
parts := []string{}
if detailHeight > 0 {
parts = append(parts, details)
}
if graphHeight > 0 {
parts = append(parts, graph)
}
return fitBlock(strings.Split(strings.Join(parts, "\n"), "\n"), m.width, height)
}
func (m Model) runPaneHeights(height int) (int, int) {
if height < 14 {
if m.runGraphFocus {
details := min(2, max(0, height-6))
return height - details, details
}
if height < 8 {
return 0, height
}
graphHeight := height / 4
if m.runGraphFocus {
graphHeight = height * 3 / 4
lines := m.runGraphLines(max(1, m.width-4))
widest := 0
for _, line := range lines {
widest = max(widest, ansi.StringWidth(line))
}
graphHeight := len(lines) + 5
if graphHeight > height-12 || widest > max(1, m.width-4) {
graphHeight = 2
}
graphHeight = max(6, min(height-8, graphHeight))
return graphHeight, height - graphHeight
}
@@ -121,13 +143,10 @@ func (m Model) runGraphTitle() string {
if r.FinishedAt != "" {
durationLabel = "duration"
}
title := "Run graph · " + durationLabel + " " + runDuration(r.CreatedAt, r.FinishedAt) + " · started " + dateLabel(r.CreatedAt)
title := fmt.Sprintf("Run graph · %d recorded visits · %s %s", len(r.Steps), durationLabel, runDuration(r.CreatedAt, r.FinishedAt))
if m.runGraphFocus {
title = "▸ " + title
}
if r.FinishedAt != "" {
title += " · finished " + dateLabel(r.FinishedAt)
}
return title
}
@@ -162,9 +181,9 @@ func (m Model) runGraphPanel(height, top, pan int) string {
body = append(body, strings.Repeat(" ", leftPad)+ansi.Cut(line, pan, pan+width-leftPad))
}
label := m.runGraphTitle()
footer := "Tab pane · n/p stage · dim = not executed"
footer := "Dimmed stages and routes were not executed."
if widest > width || len(lines) > rows {
footer = "h/j/k/l pan · c center · Tab pane · n/p stage"
footer = "h/j/k/l pan · c center · dim = not executed"
}
header := runPaneTitle(strings.TrimPrefix(label, "▸ "), "", width, m.runGraphFocus)
return panel(m.width, height, []string{header, ""}, body, footer, m.runGraphFocus)