Add shared live run graphs, debugging, editor choice and draft cleanup

This commit is contained in:
2026-10-09 19:17:43 +01:00
parent 9b8afc874f
commit 0f80ff4e95
33 changed files with 1162 additions and 72 deletions
+10 -2
View File
@@ -13,7 +13,7 @@ import (
"git.a-wan.net/alan/pipelines/internal/protocol"
)
var commands = []string{":logs", ":new", ":drafts", ":templates", ":refresh", ":ping", ":edit", ":submit", ":versions", ":run", ":runs", ":retry", ":pipeline", ":home", ":quit"}
var commands = []string{":logs", ":new", ":drafts", ":templates", ":refresh", ":ping", ":edit", ":submit", ":versions", ":run", ":runs", ":retry", ":debug", ":pipeline", ":home", ":quit"}
func (m Model) footerContent() string {
label := fmt.Sprintf(" LOGS %d · :logs ", len(m.lines))
@@ -31,7 +31,9 @@ func (m Model) footerContent() string {
available := m.width - lipgloss.Width(label) - 1
left := ""
if available > 0 {
left = ansi.Truncate(m.help.View(m.keys), available, "…")
keys := m.keys
keys.retryAvailable = m.selectedFailedRun() > 0
left = ansi.Truncate(m.help.View(keys), available, "…")
}
return left + strings.Repeat(" ", max(0, m.width-lipgloss.Width(left)-lipgloss.Width(label))) + label
}
@@ -83,6 +85,10 @@ func (m Model) pageCommands() []string {
detailPage := m.keys.detail && !m.runOpen
for _, command := range commands {
switch command {
case ":debug":
if m.selectedRunID() <= 0 {
continue
}
case ":retry":
if m.selectedFailedRun() <= 0 {
continue
@@ -150,6 +156,8 @@ func (m Model) updatePalette(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
m.paletteOpen = false
m.keys.palette = false
switch command {
case ":debug":
return m.debugRun()
case ":retry":
return m.retrySelectedRun()
case ":pipeline":