How to hide completed projects in side bar?

Sorry, there isn’t a way to do this.

Your best bet is to just move your completed projects to a separate “archive” file. You can do this manually with copy/paste, or use a script such as:

http://support.hogbaysoftware.com/t/script-to-move-archived-tasks-to-an-archive-file