From 1bda2831578cfd1a233aef9d52a09b56cda17510 Mon Sep 17 00:00:00 2001 From: Hona <10430890+Hona@users.noreply.github.com> Date: Thu, 3 Sep 2026 03:37:47 +0000 Subject: [PATCH 1/2] fix(app): remove background running indicator --- .../session-timeline-working.spec.ts | 49 +++++++++++++++++++ packages/app/src/runtime/i18n/en.ts | 1 - .../src/session/timeline/message-timeline.tsx | 23 --------- 3 files changed, 49 insertions(+), 24 deletions(-) diff --git a/packages/app/e2e/regression/session-timeline-working.spec.ts b/packages/app/e2e/regression/session-timeline-working.spec.ts index 17e0cd0df67a..1d224520c38a 100644 --- a/packages/app/e2e/regression/session-timeline-working.spec.ts +++ b/packages/app/e2e/regression/session-timeline-working.spec.ts @@ -10,6 +10,7 @@ import { setupTimeline, status, stepStarted, + textPart, toolPart, userMessage, } from "../performance/timeline-stability/fixture" @@ -190,6 +191,54 @@ for (const grouped of [false, true]) { }) } +for (const name of ["shell", "subagent"] as const) { + for (const placement of ["grouped", "hidden"] as const) { + test(`shows no idle indicator for ${placement} background ${name}`, async ({ page }, testInfo) => { + const timeline = await setupTimeline(page, { + reducedMotion: true, + viewport: { width: name === "shell" ? 1400 : 390, height: 900 }, + settings: { + timelineDetail: { + ...timelinePresets[2].value, + shell: { placement, details: "collapsed" }, + subagents: { placement }, + }, + }, + messages: [ + userMessage(), + assistantMessage([ + toolPart( + "prt_idle_background", + name, + "completed", + name === "shell" + ? { command: "sleep 10" } + : { agent: "general", description: "Inspect the timeline", prompt: "Inspect it." }, + { metadata: { [name === "shell" ? "shellID" : "sessionID"]: "background_task", status: "running" } }, + ), + textPart("prt_idle_answer", "The task is running in the background."), + ]), + ], + }) + const working = page.locator('[data-component="session-working"]') + const running = page.getByRole("status").filter({ hasText: /^Running$/ }) + await expect(page.getByText("The task is running in the background.", { exact: true })).toBeVisible() + await expect(working).toHaveCount(0) + await expect(running).toHaveCount(0) + await page.screenshot({ path: testInfo.outputPath(`idle-background-${name}-${placement}.png`) }) + + await timeline.send(status("busy")) + await expect(working).toHaveCount(1) + await expect(working.locator('[data-component="text-shimmer"]')).toHaveAttribute("aria-label", "Working") + await expect(running).toHaveCount(0) + + await timeline.send(status("idle")) + await expect(working).toHaveCount(0) + await expect(running).toHaveCount(0) + }) + } +} + test("replaces Working with Retry and restores it on recovery", async ({ page }) => { const assistant = assistantMessage([], { completed: false }) const timeline = await setupTimeline(page, { messages: [userMessage(), assistant] }) diff --git a/packages/app/src/runtime/i18n/en.ts b/packages/app/src/runtime/i18n/en.ts index 91f3ddc09754..40e4f407ff41 100644 --- a/packages/app/src/runtime/i18n/en.ts +++ b/packages/app/src/runtime/i18n/en.ts @@ -984,7 +984,6 @@ export const dict = { "settings.timeline.expansion.title": "Details", "settings.timeline.expansion.collapsed": "Collapsed", "settings.timeline.expansion.expanded": "Expanded", - "settings.timeline.running": "Running", "settings.general.row.language.title": "Language", "settings.general.row.language.description": "Change the display language for OpenCode", diff --git a/packages/app/src/session/timeline/message-timeline.tsx b/packages/app/src/session/timeline/message-timeline.tsx index 4af78317b9eb..e2e839540271 100644 --- a/packages/app/src/session/timeline/message-timeline.tsx +++ b/packages/app/src/session/timeline/message-timeline.tsx @@ -33,7 +33,6 @@ import { useCommand } from "@/shell/commands/command" import { useSettings } from "@/settings/model" import { SessionTitleHeader } from "../session-identity-header" import { SessionHeader } from "@/session/header/session-header" -import { SessionProgressIndicatorV2 } from "@opencode-ai/session-ui/v2/session-progress-indicator-v2" type BackgroundTask = { id: string @@ -635,28 +634,6 @@ function MessageTimelineView( - - props.data.timelineDetail()[task.type === "subagent" ? "subagents" : "shell"].placement !== - "separate", - ) - } - > -
- - {language.t("settings.timeline.running")} -
-
} deferred={(row) => { From 2d22a0593030db645e978336b18f9c9bd00a49fd Mon Sep 17 00:00:00 2001 From: Hona <10430890+Hona@users.noreply.github.com> Date: Thu, 3 Sep 2026 05:40:31 +0000 Subject: [PATCH 2/2] test(app): remove added indicator regression tests --- .../session-timeline-working.spec.ts | 49 ------------------- 1 file changed, 49 deletions(-) diff --git a/packages/app/e2e/regression/session-timeline-working.spec.ts b/packages/app/e2e/regression/session-timeline-working.spec.ts index 1d224520c38a..17e0cd0df67a 100644 --- a/packages/app/e2e/regression/session-timeline-working.spec.ts +++ b/packages/app/e2e/regression/session-timeline-working.spec.ts @@ -10,7 +10,6 @@ import { setupTimeline, status, stepStarted, - textPart, toolPart, userMessage, } from "../performance/timeline-stability/fixture" @@ -191,54 +190,6 @@ for (const grouped of [false, true]) { }) } -for (const name of ["shell", "subagent"] as const) { - for (const placement of ["grouped", "hidden"] as const) { - test(`shows no idle indicator for ${placement} background ${name}`, async ({ page }, testInfo) => { - const timeline = await setupTimeline(page, { - reducedMotion: true, - viewport: { width: name === "shell" ? 1400 : 390, height: 900 }, - settings: { - timelineDetail: { - ...timelinePresets[2].value, - shell: { placement, details: "collapsed" }, - subagents: { placement }, - }, - }, - messages: [ - userMessage(), - assistantMessage([ - toolPart( - "prt_idle_background", - name, - "completed", - name === "shell" - ? { command: "sleep 10" } - : { agent: "general", description: "Inspect the timeline", prompt: "Inspect it." }, - { metadata: { [name === "shell" ? "shellID" : "sessionID"]: "background_task", status: "running" } }, - ), - textPart("prt_idle_answer", "The task is running in the background."), - ]), - ], - }) - const working = page.locator('[data-component="session-working"]') - const running = page.getByRole("status").filter({ hasText: /^Running$/ }) - await expect(page.getByText("The task is running in the background.", { exact: true })).toBeVisible() - await expect(working).toHaveCount(0) - await expect(running).toHaveCount(0) - await page.screenshot({ path: testInfo.outputPath(`idle-background-${name}-${placement}.png`) }) - - await timeline.send(status("busy")) - await expect(working).toHaveCount(1) - await expect(working.locator('[data-component="text-shimmer"]')).toHaveAttribute("aria-label", "Working") - await expect(running).toHaveCount(0) - - await timeline.send(status("idle")) - await expect(working).toHaveCount(0) - await expect(running).toHaveCount(0) - }) - } -} - test("replaces Working with Retry and restores it on recovery", async ({ page }) => { const assistant = assistantMessage([], { completed: false }) const timeline = await setupTimeline(page, { messages: [userMessage(), assistant] })