-
Couldn't load subscription status.
- Fork 2.3k
improvement(dashboard): cleanup execution dashboard UI, fix logs trace, and improve performance #1651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Summary
This PR improves the execution dashboard's performance and UI by implementing dynamic segment counts based on viewport width, removing tooltip component overhead by using custom hover states, and refactoring filter components to use Command UI pattern with search functionality.
Key changes include:
- Implemented
ResizeObserverto dynamically calculate segment counts (36-96) based on available width, replacing the fixed 120-segment approach - Refactored
StatusBarcomponent to replaceTooltipProvider/Tooltipwith lightweight hover state usinguseMemofor better performance - Extracted shared filter styling constants to new
shared.tsfile (following custom instruction 49f7e332-4733-48c6-834e-ec03d4abbeb7) - Updated all filter components (workflow, folder, trigger, timeline) to use Command component with search capabilities
- Improved trace span visualization by moving crosshair rendering from parent to per-row child components
- Adjusted chart dimensions, padding, and overflow behavior for cleaner UI
- Removed extensive code comments throughout for cleaner codebase
Confidence Score: 4/5
- This PR is safe to merge with good confidence, though manual testing is recommended
- The changes are well-structured refactoring focused on performance and UX improvements. The dynamic segment calculation logic is sound, shared constants follow best practices, and the transition from Tooltip to custom hover is a valid optimization. However, the score is 4 rather than 5 because: (1) the ResizeObserver logic adds
segmentCountto the dependency array which triggers API refetches on resize - this could cause excessive API calls during window resizing, and (2) several UI behavior changes (overflow, dimensions, hover interactions) should be manually tested to ensure no visual regressions - Pay close attention to
executions-dashboard.tsxfor potential resize-triggered refetch behavior
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| apps/sim/app/workspace/[workspaceId]/logs/executions-dashboard.tsx | 4/5 | Refactored to use dynamic segment counts based on viewport width (using ResizeObserver), removed numerous code comments, and improved performance by adjusting overflow behavior |
| apps/sim/app/workspace/[workspaceId]/logs/components/filters/components/shared.ts | 5/5 | New file that extracts shared filter styling constants and dropdown styles, following the custom instruction to separate configuration from components |
| apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/status-bar.tsx | 4/5 | Replaced Tooltip components with custom hover state using useMemo for performance, removed TooltipProvider dependency for lighter implementation |
| apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/line-chart.tsx | 4/5 | Adjusted chart dimensions, padding, font sizes, and added special handling for millisecond units; changed overflow from visible to hidden |
| apps/sim/app/workspace/[workspaceId]/logs/components/trace-spans/trace-spans.tsx | 5/5 | Removed global crosshair line rendering from parent, kept only the time label tooltip, delegating per-row crosshair rendering to child components |
Sequence Diagram
sequenceDiagram
participant User
participant Dashboard as ExecutionsDashboard
participant ResizeObs as ResizeObserver
participant API as /api/logs/executions
participant StatusBar as StatusBar Component
participant Filters as Filter Components
participant TraceSpans as TraceSpans/TraceSpanItem
User->>Dashboard: Load dashboard
Dashboard->>ResizeObs: Observe barsAreaRef width
ResizeObs->>Dashboard: Calculate segmentCount (36-96)
Dashboard->>Filters: Render filters (workflow, folder, trigger, timeline)
Filters-->>Dashboard: Return filter selections
Dashboard->>API: Fetch executions with segments, filters, time range
API-->>Dashboard: Return workflow executions & aggregates
Dashboard->>StatusBar: Render status bars with segments
User->>StatusBar: Hover over segment
StatusBar->>StatusBar: Show custom tooltip (useMemo labels)
User->>StatusBar: Click segment
StatusBar->>Dashboard: Trigger onSegmentClick
Dashboard->>API: Fetch workflow details
API-->>Dashboard: Return detailed logs
Dashboard->>TraceSpans: Render trace visualization
User->>TraceSpans: Hover over timeline
TraceSpans->>TraceSpanItem: Forward hover state
TraceSpanItem->>TraceSpanItem: Render per-row crosshair
TraceSpans->>TraceSpans: Show time label at top
User->>Filters: Change filter selection
Filters->>Dashboard: Update filter state
Dashboard->>API: Refetch with new filters
API-->>Dashboard: Return filtered results
Dashboard->>StatusBar: Re-render with new data
No files reviewed, 1 comment
…e, and improve perforamnce
8c5747b to
8a7fc4d
Compare
…e, and improve performance (simstudioai#1651) * improvement(dashboard): cleanup execution dashboard UI, fix logs trace, and improve perforamnce * cleanup * cleaned up * ack PR comments
Summary
Type of Change
Testing
Tested manually.
Checklist