Skip to content

Commit 42d6b54

Browse files
committed
chore(webapp): narrow scope to copy removal only
Restore the allowArbitraryQueues flag on the test-task and replay paths. The queue dropdown is fed by a query that hard-filters version "V2", so a V1 environment sees an empty list; the free-text input is the only way those users can set a queue. Removing it was a functional regression and out of scope for a copy cleanup. Also drop QueuesHasNoTasks, which lost its only renderer along with the V1 queues failure UI, and the now-unreferenced queues-dashboard.png asset. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 42836c0 commit 42d6b54

6 files changed

Lines changed: 154 additions & 144 deletions

File tree

-185 KB
Binary file not shown.

apps/webapp/app/components/BlankStatePanels.tsx

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
PlusIcon,
88
QuestionMarkCircleIcon,
99
RectangleGroupIcon,
10-
RectangleStackIcon,
1110
SparklesIcon,
1211
Squares2X2Icon,
1312
} from "@heroicons/react/20/solid";
@@ -474,36 +473,6 @@ export function AlertsNoneDeployed() {
474473
);
475474
}
476475

477-
export function QueuesHasNoTasks() {
478-
const organization = useOrganization();
479-
const project = useProject();
480-
const environment = useEnvironment();
481-
482-
return (
483-
<InfoPanel
484-
title="You don't have any queues"
485-
icon={RectangleStackIcon}
486-
iconClassName="text-queues"
487-
panelClassName="max-w-md"
488-
accessory={
489-
<LinkButton
490-
to={v3EnvironmentPath(organization, project, environment)}
491-
variant="primary/small"
492-
>
493-
Create a task
494-
</LinkButton>
495-
}
496-
>
497-
<Paragraph spacing variant="small">
498-
Queues will appear here when you have created a task in this environment. Follow the
499-
instructions on the{" "}
500-
<TextLink to={v3EnvironmentPath(organization, project, environment)}>Tasks page</TextLink>{" "}
501-
to create a task, then return here to see its queue.
502-
</Paragraph>
503-
</InfoPanel>
504-
);
505-
}
506-
507476
export function NoWaitpointTokens() {
508477
return (
509478
<InfoPanel

apps/webapp/app/components/runs/v3/ReplayRunDialog.tsx

Lines changed: 45 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -388,43 +388,51 @@ function ReplayForm({
388388
<Label htmlFor={queue.id} variant="small">
389389
Queue
390390
</Label>
391-
<Select
392-
name={queue.name}
393-
id={queue.id}
394-
placeholder="Select queue"
395-
heading="Filter queues"
396-
variant="tertiary/small"
397-
dropdownIcon
398-
items={queueItems}
399-
filter={{ keys: ["label"] }}
400-
defaultValue={replayData.queue}
401-
>
402-
{(matches) =>
403-
matches.map((queueItem) => (
404-
<SelectItem
405-
key={queueItem.value}
406-
value={queueItem.value}
407-
className="max-w-(--popover-anchor-width)"
408-
icon={
409-
queueItem.type === "task" ? (
410-
<TaskIcon className="size-4 shrink-0 text-blue-500" />
411-
) : (
412-
<RectangleStackIcon className="size-4 shrink-0 text-purple-500" />
413-
)
414-
}
415-
>
416-
<div className="flex w-full min-w-0 items-center justify-between">
417-
<span className="truncate">{queueItem.label}</span>
418-
{queueItem.paused && (
419-
<Badge variant="extra-small" className="ml-1 text-warning">
420-
Paused
421-
</Badge>
422-
)}
423-
</div>
424-
</SelectItem>
425-
))
426-
}
427-
</Select>
391+
{replayData.allowArbitraryQueues ? (
392+
<Input
393+
{...getInputProps(queue, { type: "text" })}
394+
variant="small"
395+
defaultValue={replayData.queue}
396+
/>
397+
) : (
398+
<Select
399+
name={queue.name}
400+
id={queue.id}
401+
placeholder="Select queue"
402+
heading="Filter queues"
403+
variant="tertiary/small"
404+
dropdownIcon
405+
items={queueItems}
406+
filter={{ keys: ["label"] }}
407+
defaultValue={replayData.queue}
408+
>
409+
{(matches) =>
410+
matches.map((queueItem) => (
411+
<SelectItem
412+
key={queueItem.value}
413+
value={queueItem.value}
414+
className="max-w-(--popover-anchor-width)"
415+
icon={
416+
queueItem.type === "task" ? (
417+
<TaskIcon className="size-4 shrink-0 text-blue-500" />
418+
) : (
419+
<RectangleStackIcon className="size-4 shrink-0 text-purple-500" />
420+
)
421+
}
422+
>
423+
<div className="flex w-full min-w-0 items-center justify-between">
424+
<span className="truncate">{queueItem.label}</span>
425+
{queueItem.paused && (
426+
<Badge variant="extra-small" className="ml-1 text-warning">
427+
Paused
428+
</Badge>
429+
)}
430+
</div>
431+
</SelectItem>
432+
))
433+
}
434+
</Select>
435+
)}
428436
<Hint>Assign run to a specific queue.</Hint>
429437
<FormError id={queue.errorId}>{queue.errors}</FormError>
430438
</InputGroup>

apps/webapp/app/presenters/v3/TestTaskPresenter.server.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export type TestTaskResult =
9393
runs: StandardRun[];
9494
latestVersions: string[];
9595
disableVersionSelection: boolean;
96+
allowArbitraryQueues: boolean;
9697
taskRunTemplates: TaskRunTemplate[];
9798
}
9899
| {
@@ -104,6 +105,7 @@ export type TestTaskResult =
104105
runs: ScheduledRun[];
105106
latestVersions: string[];
106107
disableVersionSelection: boolean;
108+
allowArbitraryQueues: boolean;
107109
taskRunTemplates: TaskRunTemplate[];
108110
}
109111
| {
@@ -210,6 +212,7 @@ export class TestTaskPresenter {
210212
},
211213
select: {
212214
version: true,
215+
engine: true,
213216
},
214217
orderBy: {
215218
createdAt: "desc",
@@ -232,6 +235,7 @@ export class TestTaskPresenter {
232235
const latestVersions = backgroundWorkers.map((v) => v.version);
233236

234237
const disableVersionSelection = environment.type === "DEVELOPMENT";
238+
const allowArbitraryQueues = backgroundWorkers[0]?.engine === "V1";
235239

236240
// Get the latest runs, for the payloads
237241
const runsRepository = new RunsRepository({
@@ -313,6 +317,7 @@ export class TestTaskPresenter {
313317
),
314318
latestVersions,
315319
disableVersionSelection,
320+
allowArbitraryQueues,
316321
taskRunTemplates: await Promise.all(
317322
taskRunTemplates.map(async (t) => ({
318323
...t,
@@ -359,6 +364,7 @@ export class TestTaskPresenter {
359364
).filter(Boolean),
360365
latestVersions,
361366
disableVersionSelection,
367+
allowArbitraryQueues,
362368
taskRunTemplates: await Promise.all(
363369
taskRunTemplates.map(async (t) => {
364370
const scheduledTaskPayload = t.payload

0 commit comments

Comments
 (0)