Skip to content

improvement(cleanup): remove unused old ui components#3589

Merged
waleedlatif1 merged 1 commit intostagingfrom
improvement/cleanup
Mar 14, 2026
Merged

improvement(cleanup): remove unused old ui components#3589
waleedlatif1 merged 1 commit intostagingfrom
improvement/cleanup

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • remove unused old ui components in favor of emcn counterpart for skeleton
  • move scrollbar one inline since its only used in one place

Type of Change

  • Code Hygiene

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 Mar 14, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Mar 14, 2026 10:04pm

Request Review

@cursor
Copy link

cursor bot commented Mar 14, 2026

PR Summary

Low Risk
Low risk cleanup that primarily changes component imports/exports and removes unused files; main functional change is replacing one ScrollArea wrapper with a plain scrollable div, which could subtly affect scrollbar behavior.

Overview
Standardizes loading/placeholder UI by switching Skeleton usage throughout the app to import from @/components/emcn instead of the legacy @/components/ui modules.

Removes unused legacy UI component implementations (Card, Collapsible, DropdownMenu, ScrollArea, Separator, Skeleton, TagInput, ToolCall) and prunes their exports from components/ui/index.ts. LogDetails also replaces the lone ScrollArea usage with an inline scrollable div.

Written by Cursor Bugbot for commit 0345ffb. Configure here.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 14, 2026

Greptile Summary

This PR completes a code hygiene pass by removing 8 legacy shadcn-style component files from apps/sim/components/ui/ and migrating all 30+ consumers to the project's canonical @/components/emcn library. It also inlines the single usage of ScrollArea directly as a div in log-details.tsx.

Key changes:

  • Deleted skeleton.tsx, tag-input.tsx, tool-call.tsx, card.tsx, collapsible.tsx, dropdown-menu.tsx, scroll-area.tsx, and separator.tsx from components/ui/
  • Updated components/ui/index.ts barrel to remove the corresponding exports (Card, Collapsible, DropdownMenu, ScrollArea, Separator, Skeleton, TagInput, ToolCallCompletion, ToolCallExecution)
  • Migrated every Skeleton import from @/components/ui or @/components/ui/skeleton to @/components/emcn across 20+ files
  • Replaced the <ScrollArea> wrapper in log-details.tsx with a plain <div className='overflow-y-auto'> — note that the scrollAreaRef now correctly references the scrollable element rather than Radix's non-scrollable Root wrapper (an incidental fix)
  • The new emcn Skeleton uses bg-[var(--surface-active)] instead of the old bg-muted, aligning it with the project's design token system
  • No orphaned imports remain — all deleted exports were verified to have zero remaining consumers after the migration

Confidence Score: 5/5

  • This PR is safe to merge — it is a pure import-migration and dead-code removal with no logic changes.
  • All deleted files have been confirmed to have zero remaining consumers in the codebase. The import migrations are mechanical (same component API, different source path). The only behavioural difference is the Skeleton background colour token (bg-mutedbg-[var(--surface-active)]) and the loss of Radix's custom scrollbar styling in the log-details panel, both of which are intentional cosmetic changes. No tests were needed since this is a pure refactor.
  • No files require special attention.

Important Files Changed

Filename Overview
apps/sim/components/ui/skeleton.tsx Old shadcn-style Skeleton deleted; all consumers migrated to @/components/emcn. Minor visual difference: old used bg-muted, new uses bg-[var(--surface-active)] (intentional design-token alignment).
apps/sim/components/ui/tool-call.tsx 469-line legacy tool-call component deleted. No remaining imports in the codebase; the copilot has its own purpose-built tool-call.tsx at the feature level.
apps/sim/components/ui/scroll-area.tsx Custom Radix-based ScrollArea deleted. Its single consumer (log-details.tsx) was inlined to a plain div with overflow-y-auto, which is functionally cleaner and fixes a subtle ref-pointing-to-root rather than viewport issue.
apps/sim/components/ui/index.ts Barrel cleaned up: Card, Collapsible, DropdownMenu, ScrollArea, Separator, Skeleton, TagInput, and ToolCallCompletion/Execution exports removed. All affected consumers were verified to have migrated to emcn imports.
apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx ScrollArea replaced with a plain div. The ref now correctly targets the scrollable element rather than Radix's non-scrollable Root wrapper. Custom scrollbar styling is dropped in exchange for code simplicity.
apps/sim/components/ui/dropdown-menu.tsx Legacy dropdown-menu deleted. Equivalent (and extended) DropdownMenu components are available via @/components/emcn. No remaining consumers of the old file.
apps/sim/components/ui/collapsible.tsx Thin Radix Collapsible wrapper deleted. Its only consumer was the also-deleted tool-call.tsx. No other files were using it.
apps/sim/components/ui/card.tsx Old shadcn Card and sub-components deleted. No remaining imports after the index.ts barrel was updated.
apps/sim/components/ui/tag-input.tsx Legacy TagInput deleted. The emcn TagInput is a richer replacement with a more complete API (FileInputOptions, TagItem type, CVA variants). All consumers were already migrated.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph Before["Before (legacy ui/ components)"]
        A["@/components/ui/skeleton"] -->|"imported by 20+ files"| C["Feature Components"]
        B["@/components/ui/scroll-area"] -->|"imported by log-details"| C
        D["@/components/ui/tag-input"] -->|"imported by notifications etc."| C
        E["@/components/ui/tool-call"] -->|"exported ToolCallCompletion/Execution"| C
        F["@/components/ui/dropdown-menu"] -->|"exported DropdownMenu*"| C
        G["@/components/ui/card, collapsible, separator"] --> C
    end

    subgraph After["After (emcn library)"]
        H["@/components/emcn → Skeleton"] -->|"single source of truth"| I["Feature Components"]
        J["@/components/emcn → TagInput"] --> I
        K["@/components/emcn → DropdownMenu*"] --> I
        L["plain div overflow-y-auto"] -->|"log-details scrollable area"| I
    end

    Before -->|"This PR"| After
Loading

Last reviewed commit: 0345ffb

@waleedlatif1 waleedlatif1 merged commit cbc9f42 into staging Mar 14, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the improvement/cleanup branch March 14, 2026 22:08
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