It's also not clear to me why we need to check for `id !== Commands.SHOW_CODE_HINTS`.  I assume CLOSE_CODE_HINTS is synchronous, so running a no-op close command right before running the open command shouldn't break anything.