From 49c36fef497a4a41327fbeb739890d474ce1da1c Mon Sep 17 00:00:00 2001 From: AlexRV12 <71396855+AlexRV12@users.noreply.github.com> Date: Wed, 2 Sep 2026 10:41:03 +0200 Subject: [PATCH] fix: align the run form with the rest of the chat's styling --- .../copilot/chat/RunArgsFormDisplay.svelte | 34 ++++++--- .../copilot/chat/RunScriptCard.svelte | 76 ++++++++++--------- .../sessions/RunFormPreviewSlot.svelte | 4 +- 3 files changed, 67 insertions(+), 47 deletions(-) diff --git a/frontend/src/lib/components/copilot/chat/RunArgsFormDisplay.svelte b/frontend/src/lib/components/copilot/chat/RunArgsFormDisplay.svelte index 57a4e2270b..05a53906f5 100644 --- a/frontend/src/lib/components/copilot/chat/RunArgsFormDisplay.svelte +++ b/frontend/src/lib/components/copilot/chat/RunArgsFormDisplay.svelte @@ -115,19 +115,23 @@ class={twMerge('flex flex-col', layout === 'pane' ? 'h-full min-h-0' : 'pt-3')} data-chat-keyboard-scope="run-args-form" > - -
Not an input of this script, so it will not be sent:
diff --git a/frontend/src/lib/components/copilot/chat/RunScriptCard.svelte b/frontend/src/lib/components/copilot/chat/RunScriptCard.svelte
index a1ac7c92ae..74240c3291 100644
--- a/frontend/src/lib/components/copilot/chat/RunScriptCard.svelte
+++ b/frontend/src/lib/components/copilot/chat/RunScriptCard.svelte
@@ -3,8 +3,6 @@
import { twMerge } from 'tailwind-merge'
import { Button, Tab, Tabs } from '$lib/components/common'
import Toggle from '$lib/components/Toggle.svelte'
- import JobStatusIcon from '$lib/components/runs/JobStatusIcon.svelte'
- import type { Job } from '$lib/gen'
import DisplayResult from '$lib/components/DisplayResult.svelte'
import { msToReadableTime } from '$lib/utils'
import JobArgs from '$lib/components/JobArgs.svelte'
@@ -170,27 +168,35 @@
chatJob?.durationMs !== undefined ? msToReadableTime(chatJob.durationMs, 2) : ''
)
- // The card outlives its job, and sometimes precedes it: a call cancelled before Run never
- // had one, and one that failed to start has none either. Synthesizing the shape
- // JobStatusIcon discriminates on keeps a single vocabulary of status badges rather than a
- // second one for the states only the card knows about.
- const statusJob = $derived(
- chatJob?.job ??
- ((canceled
- ? { canceled: true, success: false }
- : failed
- ? { success: false, canceled: false }
- : { running: false }) as unknown as Job)
- )
- // The badge carries the outcome, so this is only ever how long it took, and 'Not run' where
- // there is no time to give because nothing ran.
- const statusTime = $derived(
- running
- ? elapsed
- : ran
- ? duration || (failed ? 'Failed' : canceled ? 'Cancelled' : 'Done')
- : 'Not run'
- )
+ // The colours the jobs tray paints its status dots (JobsSegment's dotClass), as ink on a
+ // row that stays transparent: blue running, violet approval, orange queued, green ok, red
+ // fail. The card outlives its job and sometimes precedes it, so the states only it knows
+ // about — cancelled before Run, failed to start — read off its own flags instead.
+ const statusClass = $derived.by(() => {
+ if (canceled) return 'text-tertiary'
+ if (failed) return 'text-red-500'
+ if (!ran) return 'text-tertiary'
+ switch (chatJob?.status) {
+ case 'running':
+ return 'text-blue-500'
+ case 'suspended':
+ return 'text-violet-500'
+ case 'queued':
+ case 'scheduled':
+ return 'text-orange-500'
+ case 'failure':
+ return 'text-red-500'
+ case 'success':
+ return 'text-green-500'
+ default:
+ return settled ? 'text-green-500' : 'text-blue-500'
+ }
+ })
+ // How long it took, which is the one thing the colour cannot say. A run that never started
+ // has no time to give, so its outcome takes the slot — as a word, never "Not run", which
+ // stutters against the "Run
Run {message.runForm.summary || message.runForm.path}
+