Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(chat): a finished plan is its count and the greyed list, no tick and no sentence (CA)

purpleab13c665597b
diff --git a/e2e/ca-shots.spec.ts b/e2e/ca-shots.spec.ts
index d98fc7ef..ff48f55f 100644
--- a/e2e/ca-shots.spec.ts
+++ b/e2e/ca-shots.spec.ts
@@ -221,7 +221,10 @@ test.describe('CA shots: pinned plan', () => {
await page.getByRole('button', { name: 'Code', exact: true }).click()
await openNewChat(page)
await send(page, 'median() in src/math.ts is missing, implement it and run the tests')
- await expect(page.getByTestId('plan-all-done')).toBeVisible({ timeout: 60_000 })
+ // David, 14.11.2026: finished is the count and the greyed list, nothing more.
+ await expect(page.getByTestId('plan-count')).toHaveText(/^(\d+) of \1 done$/, { timeout: 60_000 })
+ await expect(page.getByTestId('plan-pinned').locator('.animate-spin')).toHaveCount(0, { timeout: 60_000 })
+ await expect(page.getByTestId('plan-pinned')).not.toContainText(/every step done/i)
await shot(page, `plan-${theme}-1280-5-all-done`)
})
diff --git a/src/components/chat/PlanBar.tsx b/src/components/chat/PlanBar.tsx
index c465b6c4..844417ff 100644
--- a/src/components/chat/PlanBar.tsx
+++ b/src/components/chat/PlanBar.tsx
@@ -42,7 +42,7 @@
// "Continue" and "Clear plan".
import { useState, type ReactNode } from 'react'
-import { AlertCircle, Check, CheckCircle2, Circle, ChevronDown, ChevronRight, Loader2, X } from 'lucide-react'
+import { AlertCircle, Check, Circle, ChevronDown, ChevronRight, Loader2, X } from 'lucide-react'
import { useTodoStore, type TodoItem } from '../../stores/todoStore'
import { useCodexStore } from '../../stores/codexStore'
import { useGenerationStore } from '../../stores/generationStore'
@@ -54,11 +54,13 @@ import { isActiveCodexStatus } from '../../types/codex'
import { HINWEIS_TEXT } from '../../lib/hinweis'
import { ICON_SM } from '../ui/icon-size'
-/** What the closing box says once the model ticked off every step. Ticking
- * off a step is not the same as the change being on disk. */
-export function planDoneLabel(pendingChanges: number): string {
- if (pendingChanges <= 0) return 'every step done'
- return `every step done, ${pendingChanges} change${pendingChanges === 1 ? '' : 's'} still waiting for your approval`
+/** The line under a finished plan, and only while changes wait for approval:
+ * ticking off a step is not the same as the change being on disk. A plan
+ * that is through with nothing waiting says nothing more than its count and
+ * the greyed list (David, 14.11.2026: no tick, no "every step done"). */
+export function planDoneLabel(pendingChanges: number): string | null {
+ if (pendingChanges <= 0) return null
+ return `${pendingChanges} change${pendingChanges === 1 ? '' : 's'} still waiting for your approval`
}
/**
@@ -166,6 +168,7 @@ export function PlanBar({ conversationId, onContinue }: Props) {
const done = todos.filter((t) => t.status === 'completed').length
const allDone = done === todos.length
const stoppedShort = !allDone && !runActive
+ const waiting = planDoneLabel(pending)
const runningIdx = states.indexOf('running')
// Collapsed, the one line that matters is what is happening NOW, else the
// first step still open, else the last one.
@@ -236,14 +239,14 @@ export function PlanBar({ conversationId, onContinue }: Props) {
</ul>
)}
- {!runActive && allDone && (
- <Abschluss testid="plan-all-done" Symbol={CheckCircle2} ton={pending > 0 ? 'ruhig' : 'gut'}>
- {planDoneLabel(pending)}.
+ {!runActive && allDone && waiting && (
+ <Abschluss testid="plan-changes-waiting" Symbol={AlertCircle}>
+ {waiting}.
</Abschluss>
)}
{stoppedShort && (
- <Abschluss testid="plan-run-stopped" Symbol={AlertCircle} ton="ruhig">
+ <Abschluss testid="plan-run-stopped" Symbol={AlertCircle}>
{planStoppedLabel(done, todos.length)}.
{nextOpen && <span> Next: {nextOpen.content}</span>}
<div className="mt-1.5 flex flex-wrap gap-1.5">
@@ -273,26 +276,23 @@ export function PlanBar({ conversationId, onContinue }: Props) {
}
/**
- * The closing line under the list once the run is over, in two tones: `gut`
- * (the plan is through) and `ruhig`. Neither a run that ends nor a change that
- * waits for approval is an error, so no amber (`lib/hinweis.ts`). It is a row
- * like the steps above it, glyph and sentence, with no frame of its own.
+ * The closing line under the list once the run is over: a run that ended with
+ * steps open, or changes that still wait for approval. Neither is an error, so
+ * no amber (`lib/hinweis.ts`). It is a row like the steps above it, glyph and
+ * sentence, with no frame of its own. A plan that is simply through gets none.
*/
function Abschluss({
testid,
Symbol,
- ton,
children,
}: {
testid: string
- Symbol: typeof CheckCircle2
- ton: 'gut' | 'ruhig'
+ Symbol: typeof AlertCircle
children: ReactNode
}) {
- const farbe = ton === 'gut' ? 'text-emerald-600 dark:text-emerald-400' : HINWEIS_TEXT.ruhig
return (
<div className="mt-1.5 flex items-start gap-2" data-testid={testid}>
- <Symbol size={ICON_SM} className={`${GLYPH} ${farbe}`} />
+ <Symbol size={ICON_SM} className={`${GLYPH} ${HINWEIS_TEXT.ruhig}`} />
{/* The labels are written mid-sentence (they are tested as such); the
capital is drawn here, on the first letter of the line. */}
<div className={`${LINE} min-w-0 break-words text-gray-800 dark:text-gray-200 first-letter:uppercase`}>{children}</div>
diff --git a/src/components/chat/__tests__/plan-done-vs-applied.test.ts b/src/components/chat/__tests__/plan-done-vs-applied.test.ts
index 7a12c8d3..fd4f0345 100644
--- a/src/components/chat/__tests__/plan-done-vs-applied.test.ts
+++ b/src/components/chat/__tests__/plan-done-vs-applied.test.ts
@@ -25,13 +25,15 @@ const here = dirname(fileURLToPath(import.meta.url))
const read = (rel: string) => readFileSync(resolve(here, rel), 'utf8')
describe('planDoneLabel', () => {
- it('says done, plainly, when nothing is waiting', () => {
- expect(planDoneLabel(0)).toBe('every step done')
+ // David, 14.11.2026: a plan that is through shows its count and the greyed
+ // list, no tick and no "every step done". The Morgan line stays.
+ it('says nothing more when nothing is waiting', () => {
+ expect(planDoneLabel(0)).toBeNull()
})
it('names the changes that still need approval', () => {
- expect(planDoneLabel(1)).toBe('every step done, 1 change still waiting for your approval')
- expect(planDoneLabel(6)).toBe('every step done, 6 changes still waiting for your approval')
+ expect(planDoneLabel(1)).toBe('1 change still waiting for your approval')
+ expect(planDoneLabel(6)).toBe('6 changes still waiting for your approval')
})
})
@@ -46,7 +48,7 @@ describe('the bar reads the staging queue', () => {
const src = read('../PlanBar.tsx')
// Collapsed-only once hid the Morgan line where the list started open.
// Since CA (13.11.2026) the closing box hangs on the run, not on the fold.
- expect(src).toMatch(/\{!runActive && allDone && \(/)
+ expect(src).toMatch(/\{!runActive && allDone && waiting && \(/)
})
})
diff --git a/src/components/chat/__tests__/plan-pinned-under-the-newest-message.test.tsx b/src/components/chat/__tests__/plan-pinned-under-the-newest-message.test.tsx
index a3c07998..c7ec6bef 100644
--- a/src/components/chat/__tests__/plan-pinned-under-the-newest-message.test.tsx
+++ b/src/components/chat/__tests__/plan-pinned-under-the-newest-message.test.tsx
@@ -140,12 +140,24 @@ describe('PlanBar, pinned in the transcript', () => {
expect(v.getByTestId('plan-steps')).toBeTruthy()
})
- it('a finished run gets a closing box, and names changes still waiting', () => {
+ it('a finished plan is its count and the greyed list, no tick, no sentence', () => {
+ // David, 14.11.2026, on the live build: drop the tick and "every step done".
+ writeTodos(CONV, PLAN.map((t) => ({ ...t, status: 'completed' as const })))
+ const v = render(<PlanBar conversationId={CONV} />)
+ expect(v.getByTestId('plan-count').textContent).toBe('3 of 3 done')
+ expect([...v.getByTestId('plan-steps').querySelectorAll('li')].map((r) => r.getAttribute('data-state')))
+ .toEqual(['done', 'done', 'done'])
+ expect(v.getByTestId('plan-pinned').textContent).not.toMatch(/every step done/i)
+ expect(v.queryByTestId('plan-changes-waiting')).toBeNull()
+ expect(v.container.innerHTML).not.toMatch(/emerald/)
+ })
+
+ it('changes still waiting for approval are named under a finished plan', () => {
writeTodos(CONV, PLAN.map((t) => ({ ...t, status: 'completed' as const })))
const v = render(<PlanBar conversationId={CONV} />)
- expect(v.getByTestId('plan-all-done').textContent).toContain('every step done')
act(() => { useStagedChangesStore.setState({ byChat: { [CONV]: [{}, {}] } } as never) })
- expect(v.getByTestId('plan-all-done').textContent).toContain('2 changes still waiting for your approval')
+ expect(v.getByTestId('plan-changes-waiting').textContent).toContain('2 changes still waiting for your approval')
+ expect(v.getByTestId('plan-changes-waiting').textContent).not.toMatch(/every step done/i)
})
it('a run that ended with steps open says so, with Continue and Clear plan', () => {
diff --git a/src/components/chat/__tests__/plan-sagt-wann-der-lauf-endete.test.ts b/src/components/chat/__tests__/plan-sagt-wann-der-lauf-endete.test.ts
index 8f1c5e07..4b9ad77b 100644
--- a/src/components/chat/__tests__/plan-sagt-wann-der-lauf-endete.test.ts
+++ b/src/components/chat/__tests__/plan-sagt-wann-der-lauf-endete.test.ts
@@ -73,7 +73,7 @@ describe('die Leiste fragt beide Laufquellen, nicht nur eine', () => {
// abzuschreiben. Zwei Abschriften laufen auseinander, die Typo-Klinke
// in `die-typo-leiter-und-ihre-umgehung.test.ts` hat genau das schon
// einmal aufgefangen.
- expect(src).toMatch(/testid="plan-all-done"/)
+ expect(src).toMatch(/testid="plan-changes-waiting"/)
expect(src.match(/function Abschluss\(/g) ?? []).toHaveLength(1)
})
@@ -98,12 +98,13 @@ describe('die Leiste fragt beide Laufquellen, nicht nur eine', () => {
expect(src.match(/animate-spin/g) ?? []).toHaveLength(1)
})
- it('die Schlusszeile kennt zwei Toene und keinen dritten', () => {
+ it('die Schlusszeile hat einen Ton, den ruhigen', () => {
// Der dritte hiess `warnung` und war bernsteinfarben. Weder ein Lauf, der
// endet, noch eine Aenderung, die auf Freigabe wartet, ist ein Fehler;
- // beides ist ruhig, und fertig ist gruen.
- expect(src).toMatch(/ton: 'gut' \| 'ruhig'/)
- expect(src).not.toMatch(/(?:amber|yellow)-/)
+ // beides ist ruhig. Das Gruen fuer "fertig" ist seit 14.11.2026 weg
+ // (David: kein Haken, kein "every step done").
+ expect(src).toMatch(/HINWEIS_TEXT\.ruhig/)
+ expect(src).not.toMatch(/(?:amber|yellow|emerald)-/)
})
})