Skip to content

Commit cd7d759

Browse files
authored
fix(webapp): Only show bright title text on the right hand inspector titles (#3276)
Only makes the span title text brighter when it's shown in the right hand side inspector (in the spans list it stays dimmed)
1 parent 922a852 commit cd7d759

File tree

2 files changed

+9
-4
lines changed
  • apps/webapp/app
    • components/runs/v3
    • routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam

2 files changed

+9
-4
lines changed

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ChevronRightIcon } from "@heroicons/react/20/solid";
2-
import { type TaskEventStyle } from "@trigger.dev/core/v3";
2+
import { TaskEventStyle } from "@trigger.dev/core/v3";
33
import type { TaskEventLevel } from "@trigger.dev/database";
44
import { Fragment } from "react";
55
import { cn } from "~/utils/cn";
@@ -14,12 +14,17 @@ type SpanTitleProps = {
1414
isPartial: boolean;
1515
size: "small" | "large";
1616
hideAccessory?: boolean;
17+
overrideDimmed?: boolean;
1718
};
1819

1920
export function SpanTitle(event: SpanTitleProps) {
21+
const textClass = eventTextClassName(event);
22+
const finalTextClass =
23+
event.overrideDimmed && textClass === "text-text-dimmed" ? "text-text-bright" : textClass;
24+
2025
return (
21-
<span className={cn("flex items-center gap-x-2 overflow-x-hidden", eventTextClassName(event))}>
22-
<span className="truncate text-text-bright">{event.message}</span>{" "}
26+
<span className={cn("flex items-center gap-x-2 overflow-x-hidden", finalTextClass)}>
27+
<span className="truncate">{event.message}</span>{" "}
2328
{!event.hideAccessory && (
2429
<SpanAccessory accessory={event.style.accessory} size={event.size} />
2530
)}

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ function SpanBody({
276276
className="size-5 min-h-5 min-w-5"
277277
/>
278278
<Header2 className={cn("overflow-x-hidden")}>
279-
<SpanTitle {...span} size="large" hideAccessory />
279+
<SpanTitle {...span} size="large" hideAccessory overrideDimmed />
280280
</Header2>
281281
</div>
282282
{runParam && closePanel && (

0 commit comments

Comments
 (0)