chore(cleanup): react-doctor dead code elimination, landing + docs overhaul, component modernization#4544
chore(cleanup): react-doctor dead code elimination, landing + docs overhaul, component modernization#4544waleedlatif1 merged 19 commits intostagingfrom
Conversation
… missing, a11y fixes
… stores, and components Remove export keyword from type/interface declarations confirmed to have zero importers across lib/api/contracts/tools/aws/, lib/api/contracts/*.ts, lib/copilot/generated/, stores/workflows/workflow/types.ts, ee/access-control, ee/data-retention, lib/logs/types.ts, and app/workspace component files. TypeScript and API validation both pass clean. Reduces unused-types count from 394 → 181 and fully eliminates the ✗ critical dead-code categories (exports, types, files now show as ⚠ warnings not ✗ errors).
…components, stale utilities) Remove confirmed-unused barrel index.ts files across stores/, connectors/, executor/, lib/, and app/workspace/ that had zero importers. Also delete unreachable components (chat-history-skeleton, trace-spans, logs-list, template-profile, enterprise landing sections), stale utilities (buffered-stream, blob-to-data-url, queued-workflow-execution, compute-edit-sequence), and obsolete generated/contract files. TypeScript passes clean.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Reworks the docs search endpoint to accept Polishes docs UI behavior and styling: sidebar folder open/close becomes manually toggled per-path (removing Reviewed by Cursor Bugbot for commit e76dec8. Configure here. |
…_PAGE_CONTENT_OUTPUT_PROPERTIES
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit e76dec8. Configure here.
Co-authored-by: Cursor <cursoragent@cursor.com>

Summary
Dead code elimination (react-doctor)
exportkeyword from 500+ unused type aliases and interfaces across contracts, tools, stores, copilot, and component files — zero external importers confirmedindex.tsfiles (stores/chat,stores/folders,stores/logs,stores/modals/search,stores/operation-queue,stores/sidebar,stores/variables,connectors,executor/handlers,lib/a2a,lib/invitations,lib/pptx-renderer,lib/core/async-jobs/backends, etc.)snapshot-context-menu.tsx,chat-history-skeleton.tsx,logs-list.tsx,trace-spans.tsx(UI layer — thelib/logs/execution/trace-spansutility is kept),template-profile.tsxhooks/use-stream-cleanup.ts,hooks/queries/status.ts,hooks/queries/a2a/tasks.tslib/execution/buffered-stream.ts,lib/workflows/executor/queued-workflow-execution.ts,lib/workflows/training/compute-edit-sequence.ts,lib/uploads/utils/blob-to-data-url.ts,lib/copilot/generated/mothership-stream-v1-schema.ts,lib/api/contracts/boundary-exceptions.tsapp/_types/creator-profile.ts(type now lives in contracts)content/blog/enterprise/components.tsx,content/blog/v0-5/components.tsx,content/blog/v0-5/components/diff-controls-demo.tsxLanding page
LazyMotion+domAnimationfor smaller initial bundlemotion.Xwithm.Xinside LazyMotion boundariesh-X w-Xpairs withsize-Xshorthand across landing componentsuseEffecttouseSyncExternalStore— fixes SSR hydration mismatchDocs app
apps/docs/components/ui/button.tsx— zero usages in docs appdropdown-menu.tsxfromReact.forwardRefto function-with-ref pattern (React 19)inline-blockwithblock w-fullin image/video lightbox wrappers — more predictable layoutuseEffectEventin lightbox for stable event handlers — eliminates staleonCloseclosureO(n) .find()→O(1)Map lookups on large result setssim-logo.tsxSVG paths rounded to 2 decimal places — 24% smaller path strings, visually identicalapps/sim component modernization
playground/page.tsx: ReplaceduseState+useEffectdark mode withuseSyncExternalStore— eliminates hydration flashresume-page-client.tsx: Moved non-render input cache fromuseStatetouseRef— removes unnecessary re-renderscomponents/emcn/icons/wordmark.tsx+components/ui/verified-badge.tsx: SVG coordinate precision rounded to 2dp — same path command sequence, smaller stringslib/academy/local-progress.ts: localStorage bridge usinguseSyncExternalStorefor lesson completion tracking...→…(proper ellipsis) across loading states and UI copypx-N py-N→p-N,space-x-N→gap-x-Nconsolidations (equivalent classes)useGeneralSettings()always warms cache on workspace entry — removed unnecessary session guardType of Change
Testing
Tested manually — type-check passes clean (source-only), lint passes with zero warnings.
Safety audit
All 7 commits were audited by parallel agents across 6 categories:
forwardRef→ function-with-ref,useEffectEvent,useSyncExternalStore— all correct and idiomaticChecklist