sidebar: Fix cmd-click in the header not taking to the last workspace (#54128)

Fixes a bug where we weren't properly recording the last active
workspace to power the cmd-click interaction in the sidebar's header.
This PR introduces a field in the sidebar struct for that, allowing to
store that value and to come back to it when clicking on the header,
which is the single caller of the function introduced here.

Release Notes:

- Agent: Fixed a bug where cmd-clicking on the project header wouldn't
actually take you to the last active workspace.
9fbe317588Danilo Leal committed on 4/16/2026, 10:38:01 PM· committed by GitHubparente92a40a
3 files changedLine totals unavailable