b05ac91aa7d408bd0f2c9f4d6057dfa4ec36f678
The orderedIds state was initialized at mount time when companies was still an empty array (React Query hadn't resolved yet). When companies data arrived, orderedIds remained empty so the sidebar fell back to API-returned order, ignoring the user's saved drag order. Add a useEffect that re-derives orderedIds from localStorage whenever the companies array changes, ensuring the user's custom sort order persists across data refetches and live update invalidations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Description
Languages
TypeScript
96.8%
Shell
1.7%
JavaScript
1%
CSS
0.3%
HTML
0.2%