diff --git a/cmd/lk/simulate_report.go b/cmd/lk/simulate_report.go index b4557b75..b357877d 100644 --- a/cmd/lk/simulate_report.go +++ b/cmd/lk/simulate_report.go @@ -277,6 +277,9 @@ func writeRunSummary(w io.Writer, run *livekit.SimulationRun, summary *livekit.S fmt.Fprintln(w, "Issues:") for i, issue := range summary.Issues { fmt.Fprintf(w, " %d. %s\n", i+1, stripSummaryRefs(issue.Description)) + if seen := issueRecurrence(issue); seen != "" { + fmt.Fprintf(w, " %s\n", seen) + } if issue.Suggestion != "" { fmt.Fprintf(w, " Suggestion: %s\n", stripSummaryRefs(issue.Suggestion)) } @@ -286,6 +289,19 @@ func writeRunSummary(w io.Writer, run *livekit.SimulationRun, summary *livekit.S fmt.Fprintln(w, "::endgroup::") } +// issueRecurrence says whether the project's earlier runs reported issue too. +// Empty for runs summarized before issues were tracked. +func issueRecurrence(issue *livekit.SimulationRunSummary_Issue) string { + switch { + case issue.Id == "": + return "" + case issue.RunCount <= 1: + return "New issue" + default: + return fmt.Sprintf("Seen in %d runs", issue.RunCount) + } +} + func writeChatHistory(w io.Writer, chatCtx *agent.ChatContext) { if chatCtx == nil || len(chatCtx.Items) == 0 { return diff --git a/cmd/lk/simulate_tui.go b/cmd/lk/simulate_tui.go index 947e4a39..88123b3e 100644 --- a/cmd/lk/simulate_tui.go +++ b/cmd/lk/simulate_tui.go @@ -2041,6 +2041,9 @@ func (m *simulateModel) renderSummary() string { b.WriteString(strings.Repeat(" ", len(prefix)) + line + "\n") } } + if seen := issueRecurrence(issue); seen != "" { + b.WriteString(dimStyle.Render(strings.Repeat(" ", len(prefix))+seen) + "\n") + } if issue.Suggestion != "" { sugWrapped := lipgloss.NewStyle().Width(issueWrap).Render("Suggestion: " + link(issue.Suggestion)) for line := range strings.SplitSeq(sugWrapped, "\n") { diff --git a/go.mod b/go.mod index 71cfb20e..d83275f6 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 github.com/joho/godotenv v1.5.1 github.com/klauspost/compress v1.20.1 - github.com/livekit/protocol v1.52.2-0.20261008051848-8c1250755780 + github.com/livekit/protocol v1.53.1-0.20261020135657-6800e770be2c github.com/livekit/server-sdk-go/v2 v2.19.0 github.com/mattn/go-isatty v0.0.22 github.com/moby/moby/client v0.4.1 diff --git a/go.sum b/go.sum index 255293c6..19ee9970 100644 --- a/go.sum +++ b/go.sum @@ -364,8 +364,8 @@ github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731 h1:9x+U2HGLrSw5AT github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ= github.com/livekit/mediatransportutil v0.0.0-20260821083140-f234b534b095 h1:BcliKAXoMhl/nWmzQweQ5kmh4Qqagxl4s3Z5pvM/7AY= github.com/livekit/mediatransportutil v0.0.0-20260821083140-f234b534b095/go.mod h1:o8CFmAdrVwzJNOCsQCLUzXRjokkufNshnQHOe4fRaqU= -github.com/livekit/protocol v1.52.2-0.20261008051848-8c1250755780 h1:7T5JGMTDLcbI/emnTcrspygdWlVepIdHYA54um4v6Qo= -github.com/livekit/protocol v1.52.2-0.20261008051848-8c1250755780/go.mod h1:k7v95/DNhMkslMeBxdQ+lQ6gKc8hMNGYB7t0+6sEGU4= +github.com/livekit/protocol v1.53.1-0.20261020135657-6800e770be2c h1:F0XNCHzA1zQIJ0urensL1sWLInVxgma3h6YFmKYKfLc= +github.com/livekit/protocol v1.53.1-0.20261020135657-6800e770be2c/go.mod h1:kUTAI2TrTngGOiWP6MTAOkJpru6YYGd0MP9wzlDATy4= github.com/livekit/psrpc v0.8.2 h1:7tbkhBJoYlK5Csfkdv1XYbZjyAQeaEZgupvIXNCv7Dc= github.com/livekit/psrpc v0.8.2/go.mod h1:6KnU8vULoizX0Er9NNfeKJDV8ug87j3fuo19M0bhj6Q= github.com/livekit/server-sdk-go/v2 v2.19.0 h1:fZ0zmeC/5V+rXiI/MeC05EjwTfXmpaGkr/DXLG3EzgA=