Skip to content

Making agent timeout more noticeable in trace conversation view#2908

Merged
shagun-singh-inkeep merged 2 commits intomainfrom
TI-31
Mar 30, 2026
Merged

Making agent timeout more noticeable in trace conversation view#2908
shagun-singh-inkeep merged 2 commits intomainfrom
TI-31

Conversation

@shagun-singh-inkeep
Copy link
Copy Markdown
Collaborator

No description provided.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 30, 2026

🦋 Changeset detected

Latest commit: d18a932

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@inkeep/agents-manage-ui Patch
@inkeep/agents-api Patch
@inkeep/agents-cli Patch
@inkeep/agents-core Patch
@inkeep/agents-email Patch
@inkeep/agents-mcp Patch
@inkeep/agents-sdk Patch
@inkeep/agents-work-apps Patch
@inkeep/ai-sdk-provider Patch
@inkeep/create-agents Patch

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

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agents-api Building Building Preview, Comment Mar 30, 2026 8:08pm
agents-manage-ui Building Building Preview, Comment Mar 30, 2026 8:08pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
agents-docs Skipped Skipped Mar 30, 2026 8:08pm

Request Review

@pullfrog
Copy link
Copy Markdown
Contributor

pullfrog Bot commented Mar 30, 2026

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

  • Add stream timeout alert to Alerts card — when a conversation's activities include a STREAM_LIFETIME_EXCEEDED event, a red banner with a Timer icon and the exceeded duration is displayed at the top of the Alerts card; the "0 warnings" empty state is hidden when a timeout is present.

Summary | 2 files | 2 commits | base: mainTI-31


Before: Stream timeouts were recorded as activity events but had no dedicated visual indicator in the Alerts card — a conversation that timed out could still show "0 warnings or errors."
After: A red Stream timed out banner (with the exceeded limit in seconds) appears at the top of the Alerts card whenever a STREAM_LIFETIME_EXCEEDED activity exists. The "No warnings or errors" empty state is suppressed when a timeout is present.

The component finds the first STREAM_LIFETIME_EXCEEDED activity, renders a styled div with the Timer icon from lucide-react, and conditionally displays the streamMaxLifetimeMs converted to seconds. The CardContent also gains overflow-y-auto for scrollable content when both a timeout banner and error/warning counts are present.

page.tsx · types.ts (via ACTIVITY_TYPES import)

Pullfrog  | View workflow run | Triggered by Pullfrog | Using Claude Opus𝕏

Copy link
Copy Markdown
Contributor

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Pullfrog  | View workflow run | Using Claude Opus𝕏

Comment on lines +470 to +471
{streamTimeoutActivity.streamMaxLifetimeMs &&
streamTimeoutActivity.streamMaxLifetimeMs > 0 && (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 > 0

Not blocking — current code works correctly.

Copy link
Copy Markdown
Contributor

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review Summary

(2) Total Issues | Risk: Low

🟡 Minor (2) 🟡

Inline Comments:

  • 🟡 Minor: page.tsx:464 Missing ARIA role for alert notification
  • 🟡 Minor: page.tsx:465 Decorative 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">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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)

Suggested change
<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" />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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)

Suggested change
<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:

@github-actions github-actions Bot deleted a comment from claude Bot Mar 30, 2026
@shagun-singh-inkeep shagun-singh-inkeep added this pull request to the merge queue Mar 30, 2026
Merged via the queue into main with commit 4fa11aa Mar 30, 2026
28 checks passed
@shagun-singh-inkeep shagun-singh-inkeep deleted the TI-31 branch March 30, 2026 20:49
@inkeep
Copy link
Copy Markdown
Contributor

inkeep Bot commented Mar 30, 2026

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.

@itoqa
Copy link
Copy Markdown

itoqa Bot commented Mar 30, 2026

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)
Category Summary Screenshot
Adversarial Invalid timeout activity type variants do not trigger the timeout banner due to exact type matching. ADV-1
Adversarial Timeout-related XSS payload handling validated as safe with no executable HTML/JS rendering path found. ADV-2
Adversarial Rapid back/forward navigation and refresh preserved correct timeout state per conversation with no stale banner leakage. ADV-3
Adversarial Unauthenticated deep-link access resolved to login-gated or safe error behavior without conversation data disclosure. ADV-4
Edge Duration subtext is correctly suppressed when timeout max lifetime is 0 or missing. EDGE-1
Edge With timeout present and warning/error counts forced to zero, timeout UI remains visible and zero-state text stays hidden. EDGE-2
Edge Alerts card consistently uses the first timeout activity; swapping activity order updates the displayed limit accordingly. EDGE-3
Edge Mobile conversation details remained usable in portrait and landscape with timeout banner visible and Alerts content scrollable. EDGE-4
Happy-path Baseline conversation renders Alerts without a timeout banner after local environment repair and deterministic payload validation. ROUTE-1
Happy-path Timeout-positive conversation correctly shows the red Stream timed out banner with Exceeded 45s limit while preserving warning/error metrics. ROUTE-2
Happy-path Timeout-positive conversation continues to expose the View in SigNoz escalation path in non-cloud mode. ROUTE-3

Commit: d18a932

View Full Run


Tell us how we did: Give Ito Feedback

tim-inkeep pushed a commit that referenced this pull request Mar 31, 2026
* Making agent timeout more noticeable in trace conversation view

* typed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant