Repository: vscode
Issue: activeEditor == 'multiDiffEditor' and multiDiffEditorAllCollapsed not set when expected (context keys)
Labels: bug,multi-diff-editor

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: Version: 1.92.0 (system setup)
Commit: b1c0a14de1414fcdaa400695b4db1c0799bc3124
Date: 2024-07-31T23:26:45.634Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631
- OS Version: Windows 11 Pro 23H2

Steps to Reproduce:

I was trying to bind `multiDiffEditor.expandAll` and `multiDiffEditor.collapseAll` to the same keybind by using `"when": "multiDiffEditorAllCollapsed"`. But it seems to only work when a collapsible arrow is left "selected" as shown here:

![2024-08-02_(091906)_Code](https://github.com/user-attachments/assets/14651dfd-b251-4cbe-89db-e381a78fe068)

Its weird because if I inspect the context keys by clicking in the editor background with no collapsible arrow left "selected" I can see `multiDiffEditorAllCollapsed` value assigned properly. 

    // keybinds for test (generated with right-click configure keybind on the UI buttons)
    {
        "key": "shift+alt+s shift+alt+c",
        "command": "multiDiffEditor.expandAll",
        "when": "multiDiffEditorAllCollapsed && activeEditor == 'multiDiffEditor'"
    },
    {
        "key": "shift+alt+s shift+alt+c",
        "command": "multiDiffEditor.collapseAll",
        "when": "!multiDiffEditorAllCollapsed && activeEditor == 'multiDiffEditor'"
    },

**EDIT:** Probably also related that `activeEditor == 'multiDiffEditor'` is ***not set*** when you click the editor background. The UI buttons do not appear until I click inside a diff, also note that clicking on a filename is not enough too (only the arrow). Commands do nothing unless the UI buttons are visible i.e. you cannot collapse either (even with no "when" clause in the keybind). I guess both are tied to `activeEditor == 'multiDiffEditor'` internally or smth:

![2024-08-02_(094047)_Code](https://github.com/user-attachments/assets/faa9cf4c-0efb-41b3-858f-6553568f3c6a)

## FIX?
Both the `activeEditor` and `multiDiffEditorAllCollapsed` should be set whenever the user focus is inside the editor tab container, even if all diffs are collapsed.