add section to show valiaton check feedback

This commit is contained in:
Robin Olsen
2026-03-11 14:49:55 +01:00
parent 0a004af359
commit 8f40a4c9a3
2 changed files with 14 additions and 3 deletions

View File

@@ -220,7 +220,19 @@ func RenderFooter(width int, helpBar *HelpBar, feedback models.ValidationFeedbac
feedbackStatus := feedback.Message
// Ensure the feedback message does not exceed the total available width.
feedbackStatus = truncateToWidth(feedbackStatus, width)
if feedback.Message != "" {
feedbackStatus = truncateToWidth(feedbackStatus+" [Press Shift+S to re-submit]", width)
if helpBar.IsExpanded() && feedbackStatus != "" {
for _, check := range feedback.Checks {
if check.Valid {
feedbackStatus += "\n✅ " + check.Message
} else {
feedbackStatus += "\n❌ " + check.Message
}
}
}
}
if feedbackStatus == "" {
return helpBar.View()
@@ -234,4 +246,3 @@ func RenderFooter(width int, helpBar *HelpBar, feedback models.ValidationFeedbac
helpBar.SetWidth(helpWidth)
return lipgloss.JoinHorizontal(lipgloss.Left, helpBar.View(), feedbackStatus)
}

View File

@@ -21,7 +21,7 @@ var (
)
const (
ListViewRatio = 70 // Percentage of total width allocated to the list view
ListViewRatio = 45 // Percentage of total width allocated to the list view
LabelWidth = 14
MarginBottomSmall = 1
)