[BUG,IMP] more rigorous processes when close a tab
[IMP] auto open the opened tabs of last workspace