Skip to content

refactor(ui): shared StreamingIndicator and workspace route loading skeletons#3482

Open
adithyaakrishna wants to merge 5 commits intosimstudioai:feat/mothership-copilotfrom
adithyaakrishna:feat/loading-states
Open

refactor(ui): shared StreamingIndicator and workspace route loading skeletons#3482
adithyaakrishna wants to merge 5 commits intosimstudioai:feat/mothership-copilotfrom
adithyaakrishna:feat/loading-states

Conversation

@adithyaakrishna
Copy link

@adithyaakrishna adithyaakrishna commented Mar 9, 2026

Summary

  • StreamingIndicator: Use the shared StreamingIndicator from @/components/ui/streaming-indicator in copilot and chat message UIs
  • Loading skeletons: Add or update loading.tsx for workspace routes so Suspense shows route specific skeletons instead of a blank or generic state.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: Refactor (UI consolidation) + loading UX

Testing

  • Copilot panel and chat: streaming dots still appear when a message is streaming.
  • Workspace routes: navigate to files, home, knowledge, logs, schedules, settings, tables and confirm loading skeletons show during navigation (no blank flash).

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)

@cursor
Copy link

cursor bot commented Mar 9, 2026

PR Summary

Low Risk
Low risk UI-only changes: adds Suspense loading.tsx skeletons and centralizes a small streaming indicator component; main risk is minor visual/layout regressions during loading/streaming states.

Overview
Improves workspace navigation/loading UX by adding route-level loading.tsx skeletons for key workspace pages (home, files, knowledge, logs, schedules, settings, tables), so Suspense shows page-specific placeholders instead of blank/generic states.

Consolidates streaming UI by moving the animated dots StreamingIndicator into a shared @/components/ui/streaming-indicator (with optional label) and updating both copilot and chat message components to use it, removing the inline implementation from smooth-streaming.

Written by Cursor Bugbot for commit 65564fe. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Mar 9, 2026

@adithyaakrishna is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 9, 2026

Greptile Summary

This PR consolidates the StreamingIndicator component and adds loading skeletons for workspace routes.

Consolidation: Moves StreamingIndicator from smooth-streaming.tsx to a shared location at @/components/ui/streaming-indicator, with both dots (default) and pulse variants. Both consumers (copilot-message.tsx and chat-message.tsx) import the shared component with identical behavior. However, the new component is not re-exported from the @/components/ui/index.ts barrel file—inconsistent with all other components in that directory—and the label prop is silently ignored for the default dots variant, which could confuse future API users.

Loading skeletons: Adds route-level loading.tsx files for seven workspace routes (files, home, knowledge, logs, schedules, settings, tables) so Next.js Suspense boundaries show relevant skeleton UIs during navigation. All layouts match their respective page shapes. However, tables/loading.tsx uses Tailwind shorthand spacing aliases while all other new skeleton files consistently use explicit bracket notation—a minor style inconsistency within the PR.

Confidence Score: 4/5

  • Safe to merge with three minor style issues in the shared component and one spacing consistency issue.
  • The refactoring is straightforward and low-risk—moving an existing component to a shared location and adding pure skeleton UIs introduces no logic changes or breaking changes. The only concerns are: (1) missing barrel export for consistency, (2) a silently-ignored label prop that could confuse API users, and (3) inconsistent spacing notation in one skeleton file. All are non-breaking and relatively easy to fix.
  • apps/sim/components/ui/streaming-indicator.tsx (missing barrel export, label prop API clarity) and apps/sim/app/workspace/[workspaceId]/tables/loading.tsx (spacing notation consistency).

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["@/components/ui/streaming-indicator.tsx\n(StreamingIndicator — shared)"] --> B["copilot-message.tsx\n(dots variant, no props)"]
    A --> C["chat-message.tsx\n(dots variant, no props)"]
    D["smooth-streaming.tsx\n(StreamingIndicator REMOVED)"] -.->|"was source before PR"| B
    D -.->|"was source before PR"| C
    E["workspace routes\nloading.tsx x7"] --> F["Next.js Suspense boundary\n(route-level loading UI)"]
    subgraph "New loading skeletons"
        G[files/loading.tsx]
        H[home/loading.tsx]
        I[knowledge/loading.tsx]
        J[logs/loading.tsx]
        K[schedules/loading.tsx]
        L[settings/loading.tsx]
        M[tables/loading.tsx]
    end
    E --- G
    E --- H
    E --- I
    E --- J
    E --- K
    E --- L
    E --- M
Loading

Comments Outside Diff (1)

  1. apps/sim/components/ui/index.ts, line 54 (link)

    Every other component in apps/sim/components/ui/ is re-exported from the barrel index (e.g. Skeleton, Button, ToolCallCompletion). StreamingIndicator is missing, so consumers must use the direct file path instead. For consistency, add:

    Rule Used: Import patterns for the Sim application (source)

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Last reviewed commit: 6cb3d4f

@vercel
Copy link

vercel bot commented Mar 9, 2026

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Mar 9, 2026 5:59am

Request Review

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