Making agent timeout more noticeable in trace conversation view#2908
Making agent timeout more noticeable in trace conversation view#2908shagun-singh-inkeep merged 2 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: d18a932 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
TL;DR — Surfaces stream timeout events as a prominent red alert banner in the trace conversation detail view, so timeouts are immediately visible instead of buried in activity data. Key changes
Summary | 2 files | 2 commits | base:
The component finds the first
|
There was a problem hiding this comment.
Clean, focused change. The timeout banner integrates well with the existing Alerts card and follows established patterns (dark mode support, existing type constants, consistent icon usage). The overflow-y-auto + flex layout changes are a good defensive addition for the constrained card height. One minor suggestion inline.
Claude Opus | 𝕏
| {streamTimeoutActivity.streamMaxLifetimeMs && | ||
| streamTimeoutActivity.streamMaxLifetimeMs > 0 && ( |
There was a problem hiding this comment.
Nit: the truthiness check on line 470 is redundant — > 0 alone already handles undefined, null, and 0 (all produce false). The existing pattern in timeline-item.tsx:569 uses != null && > 0, but even simpler:
streamTimeoutActivity.streamMaxLifetimeMs > 0Not blocking — current code works correctly.
There was a problem hiding this comment.
PR Review Summary
(2) Total Issues | Risk: Low
🟡 Minor (2) 🟡
Inline Comments:
- 🟡 Minor:
page.tsx:464Missing ARIA role for alert notification - 🟡 Minor:
page.tsx:465Decorative Timer icon should be hidden from screen readers
💭 Consider (1) 💭
💭 1) page.tsx:508 Show SigNoz link for timeout-only scenarios
Issue: The "View in SigNoz" button only appears when total > 0, so users won't see it when there's only a stream timeout but no other errors/warnings.
Why: When debugging a timeout issue, access to the SigNoz trace view would be valuable even when there are no additional errors or warnings to investigate.
Fix: Consider extending the condition to also show for timeout scenarios:
{(total > 0 || streamTimeoutActivity) && !isCloudDeployment && (💡 APPROVE WITH SUGGESTIONS
Summary: This is a clean, focused UI improvement that makes stream timeouts more visible in the trace conversation view. The implementation follows existing patterns in the codebase and includes proper dark mode support. The two accessibility improvements (ARIA role + aria-hidden on icon) are quick 1-click fixes. The SigNoz button consideration is optional UX polish. Nice work! 🎉
Discarded (5)
| Location | Issue | Reason Discarded |
|---|---|---|
page.tsx:453 |
Extract IIFE logic into separate component | Pre-existing pattern used throughout the file; out of scope for this PR |
page.tsx:474 |
Magic number division by 1000 | Low value nitpick; the ms-to-seconds conversion is clear in context |
page.tsx:470 |
Sub-second timeout display format | Speculative edge case; timeouts are typically configured in whole seconds |
page.tsx:502 |
Ternary chain readability | Valid but minor; the logic is correct and the behavior is intentional |
page.tsx:457 |
Activities array undefined handling | Code already handles this correctly via optional chaining |
Reviewers (2)
| Reviewer | Returned | Main Findings | Consider | While You're Here | Inline Comments | Pending Recs | Discarded |
|---|---|---|---|---|---|---|---|
pr-review-frontend |
5 | 0 | 0 | 0 | 2 | 0 | 3 |
pr-review-standards |
5 | 0 | 1 | 0 | 0 | 0 | 4 |
| Total | 10 | 0 | 1 | 0 | 2 | 0 | 7 |
| return ( | ||
| <> | ||
| {streamTimeoutActivity && ( | ||
| <div className="flex items-center gap-2 rounded-md border border-red-200 bg-red-50 px-3 py-2 mb-3 dark:border-red-900 dark:bg-red-950/50"> |
There was a problem hiding this comment.
🟡 Minor: Missing ARIA role for alert notification
Issue: The stream timeout alert box lacks proper ARIA attributes to convey its semantic meaning to assistive technologies.
Why: Screen reader users won't be notified that this is an important alert/error message. The visual styling (red colors, warning icon) conveys urgency that is lost without semantic markup.
Fix: (1-click apply)
| <div className="flex items-center gap-2 rounded-md border border-red-200 bg-red-50 px-3 py-2 mb-3 dark:border-red-900 dark:bg-red-950/50"> | |
| {streamTimeoutActivity && ( | |
| <div role="alert" className="flex items-center gap-2 rounded-md border border-red-200 bg-red-50 px-3 py-2 mb-3 dark:border-red-900 dark:bg-red-950/50"> |
Refs:
| <> | ||
| {streamTimeoutActivity && ( | ||
| <div className="flex items-center gap-2 rounded-md border border-red-200 bg-red-50 px-3 py-2 mb-3 dark:border-red-900 dark:bg-red-950/50"> | ||
| <Timer className="h-4 w-4 text-red-500 flex-shrink-0" /> |
There was a problem hiding this comment.
🟡 Minor: Decorative icon should be hidden from screen readers
Issue: The Timer icon is decorative (the text already conveys the meaning) but may be announced by screen readers as "timer".
Why: Screen readers might announce the icon before the actual message, creating a confusing experience for users relying on assistive technology.
Fix: (1-click apply)
| <Timer className="h-4 w-4 text-red-500 flex-shrink-0" /> | |
| <Timer className="h-4 w-4 text-red-500 flex-shrink-0" aria-hidden="true" /> |
Refs:
|
No documentation updates needed. This is a UI visual enhancement to the trace conversation view that doesn't introduce new features or change existing workflows. |
Ito Test Report ✅11 test cases ran. 11 passed. All 11 test cases passed, confirming the Alerts-card timeout feature behaved correctly across baseline, timeout-positive, edge, mobile, and security/resilience scenarios with no production-code defects identified. The most important findings were that timeout rendering is strictly and correctly gated (including exact activity-type matching, first-timeout selection, conditional duration text, zero-state suppression, and preserved warning/error metrics), the SigNoz escalation path and mobile usability remained intact, and no stale-state leakage, unauthenticated data exposure, or XSS execution path was observed. ✅ Passed (11)Commit: Tell us how we did: Give Ito Feedback |
* Making agent timeout more noticeable in trace conversation view * typed
No description provided.