Commit 4345438
Reset merge conflicts state on repo change to prevent cross-repo blocking
Summary:
When ISL is backed by multiple repositories and the user switches between them
via the CWD selector, the merge conflicts UI from the previous repo would persist
and block the smartlog UI (disabling submit, rebase, split, land buttons, etc.)
for the new repo that has no conflicts.
Root cause: the \`mergeConflicts\` atom was a plain \`atom\` that was never reset on
repo/cwd change. When switching from a repo with conflicts to one without, the
server's merge conflict subscription only sends data when conflicts exist, so the
stale state was never cleared.
Fix: use \`atomResetOnRepoChange\` (new helper) instead of plain \`atom\` for the
\`mergeConflicts\` state. This resets the atom to \`undefined\` when the repo root
changes, but preserves it when only the subdirectory changes within the same repo
(since merge conflicts are repo-scoped, not cwd-scoped).
Reviewed By: evangrayk
Differential Revision: D99821803
fbshipit-source-id: 0475d3730d7fea4623c0a44629fa0ea00b623edc1 parent f664d4f commit 4345438
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
0 commit comments