Add fold panel:

fold triggers are visible and mouse over are detected.
Add folding panel and fix a few detection bugs