Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TUI fixes #30

Merged
merged 2 commits into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions cli/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ func (t *TUI) functionCallsView(now time.Time) string {
for i := range rows.rows {
maxFunctionWidth = max(maxFunctionWidth, ansi.PrintableRuneWidth(rows.rows[i].function))
}
functionColumnWidth := max(9, min(50, maxFunctionWidth))
functionColumnWidth := max(20, min(50, maxFunctionWidth))

// Render the table.
b.WriteString(tableHeaderView(functionColumnWidth))
Expand Down Expand Up @@ -561,7 +561,15 @@ func (t *TUI) buildRows(now time.Time, id DispatchID, isLast []bool, rows *rowBu
spinner = spinnerStyle.Render(t.spinner.View())
}

attempts := n.failures + 1
attempts := n.failures
if n.running {
attempts++
} else if n.done && n.status == sdkv1.Status_STATUS_OK {
attempts++
} else if n.responses > n.failures {
attempts++
}
attempts = max(attempts, 1)

var elapsed time.Duration
if !n.creationTime.IsZero() {
Expand Down
Loading