Skip to content
Merged
Show file tree
Hide file tree
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
23 changes: 23 additions & 0 deletions internal/web/server_additional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,29 @@ func TestEmbeddedPromptActionStylesCoverPasteWidthAndStatusFade(t *testing.T) {
}
}

func TestEmbeddedTaskNoChangesUsesSuccessTone(t *testing.T) {
t.Parallel()

data, err := fs.ReadFile(staticFiles, "static/style.css")
if err != nil {
t.Fatalf("read embedded style.css: %v", err)
}
css := string(data)

for _, want := range []string{
".badge.no_changes {\n background: var(--good);",
".task-result.no_changes {\n color: var(--surface-success);",
} {
if !strings.Contains(css, want) {
t.Fatalf("embedded style.css missing %q", want)
}
}
if strings.Contains(css, ".badge.no_changes,\n.badge.duplicate") ||
strings.Contains(css, ".task-result.no_changes,\n.task-result.duplicate") {
t.Fatalf("embedded style.css should not group no-change tasks with warning/duplicate styles")
}
}

func TestEmbeddedChatPromptLogStylesHideEmptyAndScrollHistory(t *testing.T) {
t.Parallel()

Expand Down
4 changes: 4 additions & 0 deletions internal/web/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,10 @@ func TestHandlerIndexServesHTML(t *testing.T) {
if !strings.Contains(markup, `if (status === "stopped") {`) || !strings.Contains(markup, `if (status === "error" || status === "invalid") {`) {
t.Fatalf("expected index html to separate stopped status icon handling from error/invalid handling")
}
if !strings.Contains(markup, `if (status === "completed" || status === "no_changes") {`) ||
strings.Contains(markup, `status === "no_changes" || status === "duplicate" || status === "paused"`) {
t.Fatalf("expected index html to render no-change completions with the completed status icon instead of warning")
}
if strings.Contains(markup, `status === "error" || status === "invalid" || status === "duplicate" || status === "stopped"`) || !strings.Contains(markup, `status === "error" || status === "invalid" || status === "duplicate"`) {
t.Fatalf("expected index html to avoid playing the error sound for user-stopped tasks")
}
Expand Down
4 changes: 2 additions & 2 deletions internal/web/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1003,13 +1003,13 @@ <h2 id="hub-setup-title">Connect to Hub</h2>
}

function taskStatusIconKey(status) {
if (status === "completed") {
if (status === "completed" || status === "no_changes") {
return "completed";
}
if (status === "stopped") {
return "stopped";
}
if (status === "no_changes" || status === "duplicate" || status === "paused") {
if (status === "duplicate" || status === "paused") {
return "warning";
}
if (status === "error" || status === "invalid") {
Expand Down
11 changes: 9 additions & 2 deletions internal/web/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2757,7 +2757,10 @@ body[data-app-display="studio"][data-prompt-mode="library"] .library-task-list {
background: var(--good);
}

.badge.no_changes,
.badge.no_changes {
background: var(--good);
}

.badge.duplicate,
.badge.paused {
background: var(--warn);
Expand Down Expand Up @@ -4281,12 +4284,16 @@ html.pink .task-progress-step.current .task-progress-step-icon.is-agent-logo {
background: rgba(43, 182, 115, 0.1);
}

.task-result.no_changes,
.task-result.duplicate {
color: var(--surface-warning);
background: rgba(245, 158, 11, 0.1);
}

.task-result.no_changes {
color: var(--surface-success);
background: rgba(43, 182, 115, 0.1);
}

.task-result.stopped {
color: var(--surface-badge-idle);
background: rgba(113, 136, 177, 0.13);
Expand Down