opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: add draggable sidebar resize functionality

Open agustif opened this issue 2 months ago • 3 comments

Summary

  • Add draggable resize handle for the TUI sidebar
  • Sidebar width is now adjustable and persists in key-value storage
  • Visual feedback with hover and drag states
  • Proper clamping between min/max width limits

Changes

  • Modified session layout to include resize handle
  • Added mouse event handlers for drag functionality
  • Updated sidebar component to accept dynamic width prop
  • Added width persistence to KV storage

Screenshot

this is with hw = 3 (px) image

this with hw = 1 (px) (current PR status) Screenshot 2025-12-22 at 00 41 00

agustif avatar Dec 21 '25 23:12 agustif

should it be an option to have this enabled or not from config/settings/command like show/hide sidebar or just be on for everyone? idk

should it be just 1px regular bar instead of 3 to differentiate from non draggable?

agustif avatar Dec 21 '25 23:12 agustif

This is cool! I sent to rest of the team to ask for their opinions

rekram1-node avatar Dec 22 '25 03:12 rekram1-node

love it. merged into shuvcode!

shuv1337 avatar Dec 22 '25 09:12 shuv1337

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

github-actions[bot] avatar Feb 27 '26 06:02 github-actions[bot]