Skip to content
Prev Previous commit
Next Next commit
fix(team): satisfy turn lint and join desktop fixture teardown
  • Loading branch information
SivanCola committed Nov 3, 2026
commit c8522bce86de05d6d2d01432ded48971702e1299
3 changes: 3 additions & 0 deletions desktop/app_session_dedup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,9 @@ func TestEnsureBlankTabOpensExistingProjectSidebarBlankTopic(t *testing.T) {

func TestEnsureBlankTabDoesNotReuseProjectTopicWithSession(t *testing.T) {
app, root, refs := canonicalOrganizationFixture(t, "existing")
// This case creates a live Controller in addition to the fixture's store.
// Join runtime teardown before the fixture shuts down its session service.
t.Cleanup(func() { app.shutdown(context.Background()) })
before := refs["existing"]
installNoopRuntimeEvents(app)
app.readyHook = func() {}
Expand Down
4 changes: 2 additions & 2 deletions internal/control/team_turn.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package control
import (
"context"
"errors"
"slices"
"strings"
"time"

Expand Down Expand Up @@ -116,8 +117,7 @@ func (c *Controller) runTeamInbox(ctx context.Context, env sessioninbox.PromptEn
}

func teamFinalAnswer(messages []provider.Message) (string, string) {
for i := len(messages) - 1; i >= 0; i-- {
m := messages[i]
for _, m := range slices.Backward(messages) {
if m.Role == provider.RoleUser {
return "", ""
}
Expand Down
Loading