Skip to content

Conversation

@icecrasher321
Copy link
Collaborator

Summary

The skeleton loading state check was too restrictive before loading dashboard skeleton.

Type of Change

  • Bug fix

Testing

Tested manually

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)

@vercel
Copy link

vercel bot commented Dec 23, 2025

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

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Dec 23, 2025 2:41am

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 23, 2025

Greptile Summary

Simplified the loading state condition from if (isLoading && Object.keys(allWorkflows).length === 0) to if (isLoading). This prevents a UI flash where stale dashboard data would briefly appear when isLoading is true but allWorkflows is populated from a previous load.

The empty workflows state is still properly handled by a separate check at line 556, so this change only affects the loading behavior without breaking the "No workflows" message display.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a simple, well-targeted bug fix that removes an overly restrictive condition causing UI flashing. The logic is straightforward, the empty state handling is preserved in a separate check, and the fix directly addresses the described issue without introducing side effects.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/dashboard.tsx simplified loading condition to always show skeleton when loading, preventing flash of stale data

Sequence Diagram

sequenceDiagram
    participant User
    participant Dashboard
    participant WorkflowRegistry
    participant DashboardSkeleton
    
    User->>Dashboard: Navigate to logs/dashboard
    Dashboard->>Dashboard: Receive props (logs, isLoading, error)
    
    alt isLoading === true
        Dashboard->>DashboardSkeleton: Render skeleton UI
        DashboardSkeleton-->>User: Display loading state
    else isLoading === false && error exists
        Dashboard-->>User: Display error message
    else isLoading === false && no workflows
        Dashboard->>WorkflowRegistry: Check allWorkflows
        WorkflowRegistry-->>Dashboard: Object.keys(allWorkflows).length === 0
        Dashboard-->>User: Display "No workflows" message
    else isLoading === false && workflows exist
        Dashboard->>Dashboard: Calculate executions & segments
        Dashboard-->>User: Display dashboard with data
    end
Loading

@icecrasher321 icecrasher321 merged commit be9ab4c into staging Dec 23, 2025
11 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/dashboard-load branch December 23, 2025 08:28
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.

2 participants