Expand focused run panes and prioritize graph height

This commit is contained in:
2026-10-10 00:47:51 +01:00
parent 977af96e23
commit 2cc703b8a5
5 changed files with 93 additions and 5 deletions
+16 -3
View File
@@ -90,16 +90,28 @@ func (m Model) runsView(height int) string {
if m.runDetail == nil || height < 14 {
return m.runsDetailsView(height)
}
graphHeight := height / 2
graphHeight, detailHeight := m.runPaneHeights(height)
top, pan := m.runGraphTop, m.runGraphPan
if !m.runGraphFocus {
top, pan = m.runGraphFollow()
}
graph := m.runGraphPanel(graphHeight, top, pan)
details := m.runsDetailsView(height - graphHeight)
details := m.runsDetailsView(detailHeight)
return fitBlock(strings.Split(graph+"\n"+details, "\n"), m.width, height)
}
func (m Model) runPaneHeights(height int) (int, int) {
if height < 14 {
return 0, height
}
graphHeight := height / 4
if m.runGraphFocus {
graphHeight = height * 3 / 4
}
graphHeight = max(6, min(height-8, graphHeight))
return graphHeight, height - graphHeight
}
func (m Model) runGraphTitle() string {
r := m.runDetail
if r == nil {
@@ -124,7 +136,8 @@ func (m Model) runGraphFollow() (int, int) {
if len(graph.Stages) == 0 {
return 0, 0
}
rows := max(1, (m.height-4)/2-5)
graphHeight, _ := m.runPaneHeights(max(0, m.height-4))
rows := max(1, graphHeight-5)
layout := layoutGraphAppearance(graph, appearance)
for _, node := range layout.nodes {
if node.key == selected {