[UX Polish] Only show branch switching confirmation modal if changes are detected

MR: !306 (merged)

Description

With feat: Checkout branch (!144 - merged) we can now change branches, but there's a known UX issue:

The "Are you sure?" warning message always shows, even if the user has not made any changes. We'll have to handle improving this in a follow-up MR.

Implementation plan

  • Look at the ps-rx-experiments branch for idea how we'll encapsulate state management in the Web IDE extension.
  • Once we have this in place, we can simplify adding new "hasChanges" state watchers.
Edited by Cindy Halim