how to apply .active class to only one menu item that uses optional filters
A page with optional filters set in the url is not treated as a new different page, hence the .active class is applied on all pages with the same pattern. Use of a contextual filter such that the path changes to something like:


  http://example.com/user/1 


will fix this problem, since each new url will be pointing to a new page.