Skip to content

fix(trace-spans): fixed small styling bugs - #1900

Merged
aadamgough merged 2 commits into
stagingfrom
fix/trace-spans
Nov 11, 2025
Merged

fix(trace-spans): fixed small styling bugs#1900
aadamgough merged 2 commits into
stagingfrom
fix/trace-spans

Conversation

@aadamgough

Copy link
Copy Markdown
Contributor

Summary

Trace span styling has small bug for highlighting logs and the millisecond tag as well. In the video attached, the styling is fixed.

Type of Change

  • Bug fix

Testing

See video

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

Screen.Recording.2025-11-11.at.1.24.22.PM.mov

@vercel

vercelBot commented Nov 11, 2025

Copy link
Copy Markdown

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

1 Skipped Deployment
ProjectDeploymentPreviewCommentsUpdated (UTC)
docsSkippedSkippedNov 11, 2025 9:31pm

@greptile-apps

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This PR fixes styling bugs in the trace span timeline visualization. The changes refactor hover interaction handling and correct visual issues with the timeline elements.

Key improvements:

  • Fixed timeline overflow from overflow-visible to overflow-hidden to prevent hover line from extending beyond timeline bounds
  • Refactored hover tracking from global window listener to component-scoped callbacks, improving performance and reducing unnecessary re-renders
  • Improved hover tooltip positioning by moving it outside the scrollable container and tracking Y-axis position
  • Fixed hover line styling to use inset-y-0 instead of negative margins for proper containment
  • Simplified prop interface by replacing hoveredPercent, hoveredWorkflowMs, and forwardHover with cleaner onTimelineHover and onTimelineLeave callbacks
  • Enhanced tooltip styling with border and shadow-lg for better visibility

Confidence Score: 5/5

  • This PR is safe to merge with no risk - purely cosmetic styling fixes with improved architecture
  • The changes are well-structured refactoring that improves code quality and fixes visual bugs. The modifications are isolated to timeline hover interactions, use proper React patterns (local state and callbacks), and maintain backward compatibility with the component API
  • No files require special attention

Important Files Changed

File Analysis

FilenameScoreOverview
apps/sim/app/workspace/[workspaceId]/logs/components/trace-spans/components/trace-span-item.tsx5/5Refactored hover handling to use local state and improved timeline overflow styling; fixed hover line positioning from extending beyond timeline to constraining within bounds
apps/sim/app/workspace/[workspaceId]/logs/components/trace-spans/trace-spans.tsx5/5Simplified hover tracking by removing global window listener and hitbox ref; moved tooltip outside scrollable container for better positioning with Y-axis tracking

Sequence Diagram

sequenceDiagram
participant User
participant TraceSpans
participant TraceSpanItem
participant DOM
User->>TraceSpanItem: Hover over timeline
TraceSpanItem->>TraceSpanItem: onPointerMove event
TraceSpanItem->>TraceSpanItem: Calculate clamped percent
TraceSpanItem->>TraceSpanItem: setLocalHoveredPercent
TraceSpanItem->>TraceSpans: onTimelineHover(clientX, clientY, rect)
TraceSpans->>TraceSpans: Calculate workflow time & position
TraceSpans->>TraceSpans: setHoveredWorkflowMs, setHoveredX, setHoveredY
TraceSpans->>DOM: Render tooltip at calculated position
TraceSpanItem->>DOM: Render hover line at localHoveredPercent
User->>TraceSpanItem: Move pointer away
TraceSpanItem->>TraceSpanItem: onPointerLeave event
TraceSpanItem->>TraceSpanItem: setLocalHoveredPercent(null)
TraceSpanItem->>TraceSpans: onTimelineLeave()
TraceSpans->>TraceSpans: Clear hover states (null)
TraceSpans->>DOM: Remove tooltip
TraceSpanItem->>DOM: Remove hover line
Loading

@greptile-appsgreptile-appsBot left a comment

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.

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@aadamgough
aadamgough merged commit 831ce91 into stagingNov 11, 2025
9 checks passed
@aadamgough
aadamgough deleted the fix/trace-spans branch November 12, 2025 02:21
waleedlatif1 pushed a commit that referenced this pull request Nov 12, 2025
* fix trace spands timeline styling and hover tooltip
* fixed invalid dom properties
waleedlatif1 pushed a commit that referenced this pull request Nov 12, 2025
* fix trace spands timeline styling and hover tooltip
* fixed invalid dom properties
@waleedlatif1waleedlatif1 mentioned this pull request Nov 12, 2025
10 tasks
Sign up for freeto 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

@aadamgough