t3code icon indicating copy to clipboard operation
t3code copied to clipboard

Delete LegacySidebar.tsx (3690 lines) or stop shipping it by default

Open amnesiaof opened this issue 1 month ago • 1 comments

apps/web/src/components/LegacySidebar.tsx is 3690 lines and holds a complete second sidebar. The live one is apps/web/src/components/Sidebar.tsx.

The only way to reach it is the legacySidebarEnabled setting, which defaults to false at packages/contracts/src/settings.ts:462. Anyone who has flipped it on is running the old UI right now.

Where the flag lives:

  • packages/contracts/src/settings.ts:462 schema default, :1788 patch field
  • apps/web/src/hooks/useSettings.ts:379 useLegacySidebarEnabled
  • apps/web/src/components/AppSidebarLayout.tsx:221,331 the render branch
  • apps/web/src/components/settings/SettingsPanels.tsx:2151 the settings toggle
  • apps/web/src/routes/_chat.tsx:37,127,202

Deleting the file and its plumbing comes to roughly 3700 lines, the largest single cut available in the repo. Every other finding in this audit combined comes to about 900.

Closing this needs a product decision rather than a cleanup pass. Two shapes it can take:

  1. Delete LegacySidebar, the flag and the toggle. This breaks anyone who opted in.
  2. Keep the toggle but stop shipping the file by default, behind a build flag or a separate dist tag, so the default bundle carries one sidebar.

Worth finding out whether anyone turned it on before picking. If nobody did, option 1 is the obvious one.

amnesiaof avatar Oct 05 '26 16:10 amnesiaof

[!NOTE] 🤖 Claude Opus 5.5 responding on behalf of Theo

Thanks for the idea. Feature requests and proposals belong in Ideas discussions, where others can find and vote on them and maintainers track direction, so we close them here (see CONTRIBUTING.md). If this still matters to you, please post it there and link this issue.

t3dotgg avatar Oct 21 '26 21:10 t3dotgg