GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(web): background work line reads "Running in background <name>" · pingdotgg/t3code@0dd2985

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/web/src/components/chat
    • ThreadActivityBanners.tsx
  • packages/client-runtime/src/state
    • threadExecution.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/web/src/components/chat/ThreadActivityBanners.tsx‎

Copy file name to clipboardExpand all lines: apps/web/src/components/chat/ThreadActivityBanners.tsx
+8-17Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ export function backgroundWorkNowItem(input: {
139139
.toSorted((left, right) => right.updatedAtMs - left.updatedAtMs)[0];
140140
const label = (row: (typeof rows)[number]) =>
141141
row.isRawCommand ? <span className="font-mono">{row.task.label}</span> : row.task.label;
142-
const showsRunningState =
143-
only !== undefined && only.task.named && only.activity === null && !presentation.waiting;
144142
const onlyThreadId = only?.childThreadId;
145143
const startedAtMs = only?.startedAtMs ?? null;
146144
return {
@@ -150,15 +148,14 @@ export function backgroundWorkNowItem(input: {
150148
) : (
151149
<CircleDashedIcon />
152150
),
153-
title:
154-
only?.task.named === true ? (
155-
<>
156-
{presentation.waiting ? "Waiting on " : null}
157-
<span className="text-foreground/80">{label(only)}</span>
158-
</>
159-
) : (
160-
<span className="text-foreground/80">{presentation.title}</span>
161-
),
151+
title: (
152+
<>
153+
{presentation.waiting ? "Waiting on " : "Running in background "}
154+
<span className="text-foreground/80">
155+
{only?.task.named === true ? label(only) : presentation.subject}
156+
</span>
157+
</>
158+
),
162159
description: only
163160
? only.activity
164161
: newest
@@ -171,12 +168,6 @@ export function backgroundWorkNowItem(input: {
171168
)),
172169
actions: (
173170
<>
174-
{/* Outside the truncating title, so a long name cannot cut the state off. */}
175-
{showsRunningState ? (
176-
<span className="text-muted-foreground/60 light:text-muted-foreground/80">
177-
running in background
178-
</span>
179-
) : null}
180171
{startedAtMs === null ? null : (
181172
<>
182173
<span
Collapse file

‎packages/client-runtime/src/state/threadExecution.ts‎

Copy file name to clipboardExpand all lines: packages/client-runtime/src/state/threadExecution.ts
+8-6Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,8 @@ export interface PendingBackgroundWorkItem {
304304

305305
export interface PendingBackgroundWorkPresentation {
306306
readonly title: string;
307+
/** What is running or waited on: a label, "a command", or "2 commands". */
308+
readonly subject: string;
307309
readonly items: ReadonlyArray<PendingBackgroundWorkItem>;
308310
readonly waiting: boolean;
309311
}
@@ -343,14 +345,13 @@ export function presentPendingBackgroundWork(
343345
if (items.length === 1 && only !== undefined) {
344346
const noun = BACKGROUND_WORK_KINDS[only.kind].singular;
345347
const { named } = only;
348+
const subject = named ? only.label : `a ${noun}`;
346349
const title = waiting
347350
? named
348351
? `${only.kind === "monitor" ? "" : `Waiting on ${noun} `}${only.label}`
349-
: `Waiting on a ${noun}`
350-
: named
351-
? `Running in background: ${only.label}`
352-
: `A ${noun} running in background`;
353-
return { title, items, waiting };
352+
: `Waiting on ${subject}`
353+
: `Running in background: ${subject}`;
354+
return { title, subject, items, waiting };
354355
}
355356
const counts = new Map<BackgroundWorkKind, number>();
356357
for (const item of items) counts.set(item.kind, (counts.get(item.kind) ?? 0) + 1);
@@ -360,7 +361,8 @@ export function presentPendingBackgroundWork(
360361
});
361362
const groupsText = joinWithAnd(groups);
362363
return {
363-
title: waiting ? `Waiting on ${groupsText}` : `${groupsText} running in background`,
364+
title: waiting ? `Waiting on ${groupsText}` : `Running in background: ${groupsText}`,
365+
subject: groupsText,
364366
items,
365367
waiting,
366368
};

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.