Skip to content

Commit 7f1c93f

Browse files
committed
fix(webapp): prevent dashboard crash when span accessory text is not a string
fix: update stale default timeout comment
1 parent 0c33de8 commit 7f1c93f

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: fix
4+
---
5+
6+
Prevent dashboard crash (React error #31) when span accessory item text is not a string. Filters out malformed accessory items in SpanCodePathAccessory instead of passing objects to React as children.

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,18 @@ export function SpanCodePathAccessory({
104104
className
105105
)}
106106
>
107-
{accessory.items.map((item, index) => (
108-
<Fragment key={index}>
109-
<span className={cn("truncate", "text-text-dimmed")}>{item.text}</span>
110-
{index < accessory.items.length - 1 && (
111-
<span className="text-text-dimmed">
112-
<ChevronRightIcon className="size-4" />
113-
</span>
114-
)}
115-
</Fragment>
116-
))}
107+
{accessory.items
108+
.filter((item) => typeof item.text === "string")
109+
.map((item, index, filtered) => (
110+
<Fragment key={index}>
111+
<span className={cn("truncate", "text-text-dimmed")}>{item.text}</span>
112+
{index < filtered.length - 1 && (
113+
<span className="text-text-dimmed">
114+
<ChevronRightIcon className="size-4" />
115+
</span>
116+
)}
117+
</Fragment>
118+
))}
117119
</code>
118120
);
119121
}

apps/webapp/app/services/realtime/redisRealtimeStreams.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export type RealtimeStreamsOptions = {
77
redis: RedisOptions | undefined;
88
logger?: Logger;
99
logLevel?: LogLevel;
10-
inactivityTimeoutMs?: number; // Close stream after this many ms of no new data (default: 60000)
10+
inactivityTimeoutMs?: number; // Close stream after this many ms of no new data (default: 15000)
1111
};
1212

1313
// Legacy constant for backward compatibility (no longer written, but still recognized when reading)

0 commit comments

Comments
 (0)