Progress lost after messing around with the undock button

I accidentally pressed something and messing with the undock, and the history tab and consequently resulting in this black screen which confused me greatly.

After using Reset to Saved Layout the screen returned to this.
But this one is my actual original section but after pressing it it resulted in the black empty screen again.
I'm confused to what problem I'm having and is there a way to recover my progress in my original file. Hope you guys could help, thanks!
