I can't find an official Twitter forum. Someone has asked this question in Reddit. I tried posting my own question but it was removed without explanatian.
The expanded and collapsed sidebar is displayed based on the screen size. If the available width is > 1280px, it shows the sidebar with icons and names. On smaller screens, it just shows the icons. You can test it by opening twitter on desktop and slowly minimizing the window.
Here's screenshots of custom device width in developer tools