"Switch to preview" in the delete flow read its refs from the selected
project, so on the branching overview `parent_project_ref` was undefined
and the handler bailed with a `console.error` — persistent branches
couldn't be deleted.
Both refs now come from the `branch` prop, and the not-ready state shows
on the confirm button instead of the console. Covered by a new MSW test
that fails against the old code.
Fixes FE-4219
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved switching branches to Preview mode by using the selected
branch’s project information.
* Prevented confirmation when no branch is available.
* Preserved success notifications and modal closing after a successful
switch.
* **Tests**
* Added coverage for successful updates, API failures, error feedback,
request details, and disabled confirmation states.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->