helloadhavan/github_issues huggingface dataset:
Repository: electron/electron
Pull request: fix: check screen capture permissions in `desktopCapturer`

Backport of #43080

See that PR for details.


Notes: Resolved an issue where `desktopCapturer.getSources` never fulfilled its promise in some cases.

Changed files:
filename: shell/browser/api/electron_api_desktop_capturer.cc
patch: @@ -41,6 +41,10 @@
 #include "ui/gfx/x/randr.h"
 #endif
 
+#if BUILDFLAG(IS_MAC)
+#include "ui/base/cocoa/permissions_utils.h"
+#endif
+
 #if BUILDFLAG(IS_LINUX)
 // Private function in ui/base/x/x11_display_util.cc
 base::flat_map<x11::RandR::Output, int> GetMonitors(
@@ -294,6 +298,13 @@ void DesktopCapturer::StartHandling(bool capture_window,
   capture_window_ = capture_window;
   capture_screen_ = capture_screen;
 
+#if BUILDFLAG(IS_MAC)
+  if (!ui::TryPromptUserForScreenCapture()) {
+    HandleFailure();
+    return;
+  }
+#endif
+
   {
     // Initialize the source list.
     // Apply the new thumbnail size and restart capture.
@@ -430,21 +441,25 @@ void DesktopCapturer::UpdateSourcesList(DesktopMediaList* list) {
               std::back_inserter(captured_sources_));
   }
 
-  if (!capture_window_ && !capture_screen_) {
-    v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
-    v8::HandleScope scope(isolate);
-    gin_helper::CallMethod(this, "_onfinished", captured_sources_);
+  if (!capture_window_ && !capture_screen_)
+    HandleSuccess();
+}
+
+void DesktopCapturer::HandleSuccess() {
+  v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
+  v8::HandleScope scope(isolate);
+  gin_helper::CallMethod(this, "_onfinished", captured_sources_);
 
-    screen_capturer_.reset();
-    window_capturer_.reset();
+  screen_capturer_.reset();
+  window_capturer_.reset();
 
-    Unpin();
-  }
+  Unpin();
 }
 
 void DesktopCapturer::HandleFailure() {
   v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
   v8::HandleScope scope(isolate);
+
   gin_helper::CallMethod(this, "_onerror", "Failed to get sources.");
 
   screen_capturer_.reset();

filename: shell/browser/api/electron_api_desktop_capturer.h
patch: @@ -90,6 +90,7 @@ class DesktopCapturer : public gin::Wrappable<DesktopCapturer>,
 
   void UpdateSourcesList(DesktopMediaList* list);
   void HandleFailure();
+  void HandleSuccess();
 
   std::unique_ptr<DesktopListListener> window_listener_;
   std::unique_ptr<DesktopListListener> screen_listener_;
Repository: ggml-org/llama.cpp
Pull request: ci : no curl on ggml-ci

Fix ggml-ci failing on `master`

<img width="644" alt="image" src="https://github.com/user-attachments/assets/c47d02d5-16d1-479c-8c1e-08cdbd2f93ea" />



Changed files:
filename: ci/run.sh
patch: @@ -39,7 +39,7 @@ sd=`dirname $0`
 cd $sd/../
 SRC=`pwd`
 
-CMAKE_EXTRA="-DLLAMA_FATAL_WARNINGS=ON"
+CMAKE_EXTRA="-DLLAMA_FATAL_WARNINGS=ON -DLLAMA_CURL=OFF"
 
 if [ ! -z ${GG_BUILD_METAL} ]; then
     CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_METAL=ON -DGGML_METAL_USE_BF16=ON"
Repository: vercel/next.js
Pull request: fix: apply Geist fonts correctly on default cna template

# Summary

The [Geist Fonts](https://vercel.com/font) in [default-tw template](https://github.com/vercel/next.js/tree/canary/packages/create-next-app/templates/default-tw) doesn't load due to missing classname declaration.

This PR fixed this issue.

## Before

![before](https://github.com/user-attachments/assets/c45f1b9d-6141-485e-bff1-ec0f7f03f7e8)

---

## After

![after](https://github.com/user-attachments/assets/6bafab0f-a8e7-4df7-a31f-0a27b252bb8b)

CC: @samcx 

Changed files:
filename: packages/create-next-app/templates/default-tw/js/pages/index.js
patch: @@ -13,7 +13,9 @@ const geistMono = Geist_Mono({
 
 export default function Home() {
   return (
-    <div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
+    <div
+      className={`${geistSans.className} ${geistMono.className} grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]`}
+    >
       <main className="flex flex-col gap-[32px] row-start-2 items-center sm:items-start">
         <Image
           className="dark:invert"

filename: packages/create-next-app/templates/default-tw/ts/pages/index.tsx
patch: @@ -13,7 +13,9 @@ const geistMono = Geist_Mono({
 
 export default function Home() {
   return (
-    <div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
+    <div
+      className={`${geistSans.className} ${geistMono.className} grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]`}
+    >
       <main className="flex flex-col gap-[32px] row-start-2 items-center sm:items-start">
         <Image
           className="dark:invert"
Repository: denoland/deno
Pull request: fix(repl): prevent panic when deleting globalThis.closed property

This PR fixes #23422.

When the user deletes the **globalThis.closed** property, a panic occurs due to the closing function iteratively reading **this.closed** value in the REPL. This pull request prevents such panics by adding a reference for the closed property in the **get_prelude()** function for the **REPL_INTERNALS_NAME** object. The closing function now reads this property from the **REPL_INTERNALS_NAME** object instead of directly from **this.closed**.


Changed files:
filename: cli/tools/repl/session.rs
patch: @@ -99,6 +99,9 @@ Object.defineProperty(globalThis, "{0}", {{
     lastThrownError: undefined,
     inspectArgs: Deno[Deno.internal].inspectArgs,
     noColor: Deno.noColor,
+    get closed() {{
+      return typeof globalThis.closed === 'undefined' ? false : globalThis.closed;
+    }}
   }},
 }});
 Object.defineProperty(globalThis, "_", {{
@@ -299,8 +302,9 @@ impl ReplSession {
   }
 
   pub async fn closing(&mut self) -> Result<bool, AnyError> {
+    let expression = format!(r#"{}.closed"#, *REPL_INTERNALS_NAME);
     let closed = self
-      .evaluate_expression("(this.closed)")
+      .evaluate_expression(&expression)
       .await?
       .result
       .value
Repository: huggingface/transformers
Pull request: fix XPU UT error case brough by RNG difference btw XPU and CUDA

**Symptom**

`pytest -rA tests/generation/test_logits_process.py::LogitsProcessorTest::test_watermarking_processor` will assert out with below logs while running on XPU.

> elf.assertTrue((out[:, 1] == scores_wo_bias + watermark.bias).all())
> E       AssertionError: tensor(False, device='xpu:0') is not true

**Root cause**
`WatermarkLogitsProcessor` uses device RNG `self.rng = torch.Generator(device=device)` to generate random numbers, this leads to different generated random number even with same seed, since RNG is device-dependent. 
In this case, CUDA's generated greenlist_ids is:  `greenlist_ids: tensor([19, 10,  8,  9,  1], device='cuda:0')` while XPU's greenlist_ids is `greenlist_ids: tensor([10, 17,  5,  4,  3], device='xpu:0')`. But the UT only check id 0, which leads to failure on XPU

**How to Fix**
set to-be-checked `greenlist_id` on XPU to 3, as `greenlist_id = 3 if torch_device == "xpu" else 1`. 
 

Changed files:
filename: tests/generation/test_logits_process.py
patch: @@ -976,7 +976,8 @@ def test_watermarking_processor(self):
         input_ids[:, -1] = 10
         scores_wo_bias = scores[:, -1].clone()
         out = watermark(input_ids=input_ids, scores=scores)
-        self.assertTrue((out[:, 1] == scores_wo_bias + watermark.bias).all())
+        greenlist_id = 3 if torch_device == "xpu" else 1
+        self.assertTrue((out[:, greenlist_id] == scores_wo_bias + watermark.bias).all())
 
     @parameterized.expand([(5, 3, 10000), (10, 5, 1000)])
     def test_synthidtext_watermarking_processor_bias_uniformity(self, ngram_len, num_layers, vocab_size):
Repository: huggingface/transformers
Pull request: enable test_assisted_decoding_in_different_gpu UT on XPU

pytest -rA tests/generation/test_utils.py::GenerationIntegrationTests::test_assisted_decoding_in_different_gpu  **passed**


Changed files:
filename: tests/generation/test_utils.py
patch: @@ -3748,11 +3748,13 @@ def test_return_unprocessed_logit_scores(self):
         self.assertTrue(y_prob <= 1.0 and n_prob <= 1.0)
 
     @slow
-    @require_torch_multi_gpu
+    @require_torch_multi_accelerator
     def test_assisted_decoding_in_different_gpu(self):
-        model = AutoModelForCausalLM.from_pretrained("hf-internal-testing/tiny-random-MistralForCausalLM").to("cuda:0")
+        device_0 = f"{torch_device}:0" if torch_device != "cpu" else "cpu"
+        device_1 = f"{torch_device}:1" if torch_device != "cpu" else "cpu"
+        model = AutoModelForCausalLM.from_pretrained("hf-internal-testing/tiny-random-MistralForCausalLM").to(device_0)
         assistant = AutoModelForCausalLM.from_pretrained("hf-internal-testing/tiny-random-MistralForCausalLM").to(
-            "cuda:1"
+            device_1
         )
         tokenizer = AutoTokenizer.from_pretrained("hf-internal-testing/tiny-random-MistralForCausalLM")
         model.config.pad_token_id = tokenizer.eos_token_id
Repository: facebook/react
Pull request: replace-fork should not clear uncommitted changes

The replace-fork script depends on ESLint to fix the reconciler imports — `.old` -> `.new` or vice versa. If ESLint crashes, it can leave the imports in an incorrect state.

As a convenience, @bvaughn updated the script to automatically run `git checkout -- .` if the ESLint command fails. An unintended consequence of the strategy is that if the working directory is not clean, then any uncommitted changes will be lost.

We need a better strategy for this that prevents the accidental loss of work. One option is to exit early if the working directory is not clean before you run the script, though that affects the usability of the script.

An ideal solution would reset the working directory back to whatever state it was in before the script ran, perhaps by stashing all the changes and restoring them if the script aborts.

Until we think of something better, I've commented out the branch.

Changed files:
filename: scripts/merge-fork/replace-fork.js
patch: @@ -22,15 +22,27 @@ async function main() {
   await Promise.all(oldFilenames.map(unforkFile));
 
   // Use ESLint to autofix imports
-  const spawn = spawnSync('yarn', ['linc', '--fix'], {
+  spawnSync('yarn', ['linc', '--fix'], {
     stdio: ['inherit', 'inherit', 'pipe'],
   });
-  if (spawn.stderr.toString() !== '') {
-    spawnSync('git', ['checkout', '.']);
+  // TODO: If eslint crashes, it may not have successfully fixed all
+  // the imports, which would leave the reconciler files in an inconsistent
+  // state. So we used to crash and reset the working directory. But that
+  // solution assumed that the working directory was clean before you run the
+  // command — if it wasn't, it'll not only reset the synced reconciler files,
+  // but all the other uncommitted changes.
+  //
+  // We need a different strategy to prevent loss of work. For example, we could
+  // exit early if the working directory is not clean before you run the script.
+  //
+  // Until we think of something better, I've commmented out this branch to
+  // prevent work from accidentally being lost.
+  // if (spawn.stderr.toString() !== '') {
+  //   spawnSync('git', ['checkout', '.']);
 
-    console.log(Error(spawn.stderr));
-    process.exitCode = 1;
-  }
+  //   console.log(Error(spawn.stderr));
+  //   process.exitCode = 1;
+  // }
 }
 
 async function unforkFile(oldFilename) {
Repository: denoland/deno
Pull request: fix(ext/node): use `Deno.FsFile.statSync()`


Changed files:
filename: tests/unit_node/_fs/_fs_fstat_test.ts
patch: @@ -1,7 +1,5 @@
 // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
 
-// deno-lint-ignore-file no-deprecated-deno-api
-
 import { fstat, fstatSync } from "node:fs";
 import { fail } from "@std/assert/mod.ts";
 import { assertStats, assertStatsBigInt } from "./_fs_stat_test.ts";
@@ -83,7 +81,7 @@ Deno.test({
       //
       assertStatsBigInt(
         fstatSync(file.rid, { bigint: true }),
-        Deno.fstatSync(file.rid),
+        file.statSync(),
       );
       //main
     } finally {
Repository: nodejs/node
Pull request: stream: handle undefined chunks correctly in decode stream

Align TextDecoderStream behavior with WPT requirements by treating undefined chunks as errors. This change ensures that TextDecoderStream properly handles unexpected chunk types and throws an error when receiving undefined input.

This update addresses the failing WPT for decode stream error handling.

Changed files:
filename: lib/internal/webstreams/encoding.js
patch: @@ -20,6 +20,7 @@ const { customInspect } = require('internal/webstreams/util');
 
 const {
   codes: {
+    ERR_INVALID_ARG_TYPE,
     ERR_INVALID_THIS,
   },
 } = require('internal/errors');
@@ -133,6 +134,9 @@ class TextDecoderStream {
     this.#handle = new TextDecoder(encoding, options);
     this.#transform = new TransformStream({
       transform: (chunk, controller) => {
+        if (chunk === undefined) {
+          throw new ERR_INVALID_ARG_TYPE('chunk', 'string', chunk);
+        }
         const value = this.#handle.decode(chunk, { stream: true });
         if (value)
           controller.enqueue(value);

filename: test/wpt/status/encoding.json
patch: @@ -66,13 +66,6 @@
   "streams/decode-utf8.any.js": {
     "requires": ["small-icu"]
   },
-  "streams/decode-bad-chunks.any.js": {
-    "fail": {
-      "expected": [
-        "chunk of type undefined should error the stream"
-      ]
-    }
-  },
   "streams/decode-non-utf8.any.js": {
     "requires": ["full-icu"]
   },
Repository: denoland/deno
Pull request: fix(ext/http): actually await `goAhead` promise

Ref https://github.com/denoland/deno/issues/22333#issuecomment-1942424802

Changed files:
filename: ext/http/00_serve.ts
patch: @@ -225,7 +225,7 @@ class InnerRequest {
           const wsRid = await wsPromise;
 
           // We have to wait for the go-ahead signal
-          await goAhead;
+          await goAhead.promise;
 
           ws[_rid] = wsRid;
           ws[_readyState] = WebSocket.OPEN;
Repository: ggml-org/llama.cpp
Pull request: vulkan: fix NaN issue in flash attention shader

I was seeing corruption when using llama-3 with flash attention (started with #12627.):

```
llama-cli -no-cnv -p "The Peninsular War (1807–1814) was fought in the Iberian Peninsula by Portugal, Spain and the United Kingdom against the invading and occupying forces of the First French Empire during the Napoleonic Wars." -c 2048 -n 150 --ignore-eos -ngl 99 -fa -m C:\models\meta-llama-3-8b-instruct.Q4_K_M.gguf
...
The Peninsular War (1807�1814) was fought in the Iberian Peninsula by Portugal, Spain and the United Kingdom against the invading and occupying forces of the First French Empire during the Napoleonic Wars. TheGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
```

The corruption was caused by NaNs. Use -FLT_MAX/2 rather than -inf as the initial value for computing the maximum. This is consistent with what the cuda shader does.


Changed files:
filename: ggml/src/ggml-vulkan/vulkan-shaders/flash_attn_cm2.comp
patch: @@ -227,8 +227,11 @@ void main() {
 
     coopmat<ACC_TYPE, gl_ScopeWorkgroup, Br, Bc, gl_MatrixUseAccumulator> L, M;
 
+    // Use -FLT_MAX/2 rather than -inf to reduce the possibility of NaNs, e.g. when computing Mold-M.
+    const float NEG_FLT_MAX_OVER_2 = uintBitsToFloat(0xFEFFFFFF);
+
     L = coopmat<ACC_TYPE, gl_ScopeWorkgroup, Br, Bc, gl_MatrixUseAccumulator>(0);
-    M = coopmat<ACC_TYPE, gl_ScopeWorkgroup, Br, Bc, gl_MatrixUseAccumulator>(-1.0/0.0);
+    M = coopmat<ACC_TYPE, gl_ScopeWorkgroup, Br, Bc, gl_MatrixUseAccumulator>(NEG_FLT_MAX_OVER_2);
 
     coopmat<ACC_TYPE, gl_ScopeWorkgroup, Br, Bc, gl_MatrixUseAccumulator> slopeMat = coopmat<ACC_TYPE, gl_ScopeWorkgroup, Br, Bc, gl_MatrixUseAccumulator>(1.0);
 
@@ -278,7 +281,7 @@ void main() {
             uint R = ((i + 1) * Br >  N) ?  (N % Br) : Br;
             uint C = ((j + 1) * Bc > KV) ? (KV % Bc) : Bc;
 
-            coopMatPerElementNV(S, S, replacePadding, ACC_TYPE(-1.0/0.0), R, C);
+            coopMatPerElementNV(S, S, replacePadding, ACC_TYPE(NEG_FLT_MAX_OVER_2), R, C);
         }
 
         coopmat<ACC_TYPE, gl_ScopeWorkgroup, Br, Bc, gl_MatrixUseAccumulator> rowmax, P, rowsum, eM;
Repository: nodejs/node
Pull request: test_runner: avoid spread operator on arrays

<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->


Changed files:
filename: lib/internal/test_runner/runner.js
patch: @@ -158,7 +158,8 @@ function getRunArgs(path, { forceExit,
   ArrayPrototypePushApply(argv, execArgv);
 
   if (path === kIsolatedProcessName) {
-    ArrayPrototypePush(argv, '--test', ...ArrayPrototypeSlice(process.argv, 1));
+    ArrayPrototypePush(argv, '--test');
+    ArrayPrototypePushApply(argv, ArrayPrototypeSlice(process.argv, 1));
   } else {
     ArrayPrototypePush(argv, path);
   }

filename: lib/internal/test_runner/test.js
patch: @@ -8,6 +8,7 @@ const {
   ArrayPrototypeSome,
   ArrayPrototypeSplice,
   ArrayPrototypeUnshift,
+  ArrayPrototypeUnshiftApply,
   FunctionPrototype,
   MathMax,
   Number,
@@ -735,9 +736,9 @@ class Test extends AsyncResource {
 
   computeInheritedHooks() {
     if (this.parent.hooks.beforeEach.length > 0) {
-      ArrayPrototypeUnshift(
+      ArrayPrototypeUnshiftApply(
         this.hooks.beforeEach,
-        ...ArrayPrototypeSlice(this.parent.hooks.beforeEach),
+        ArrayPrototypeSlice(this.parent.hooks.beforeEach),
       );
     }
Repository: huggingface/transformers
Pull request: [doc] Fix link for Quark quantization page

# What does this PR do?

Fixes link to Quark page in quantization docs, the previous link shows 404.


## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [x] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

cc @SunMarc @MekkCyber for review


Changed files:
filename: docs/source/en/quantization/overview.md
patch: @@ -40,7 +40,7 @@ Use the Space below to help you pick a quantization method depending on your har
 | [VPTQ](./vptq)                             | 🔴                   | 🔴              |     🟢     | 🟡        | 🔴                                 | 🔴              | 🟢              | 1/8         | 🔴               | 🟢                          | 🟢                      | https://github.com/microsoft/VPTQ            |
 | [FINEGRAINED_FP8](./finegrained_fp8)                 | 🟢                   | 🔴              | 🟢        | 🔴        | 🔴                                 | 🔴              | 🔴              | 8             | 🔴               | 🟢                          | 🟢                      |        |
 | [SpQR](./spqr)                          | 🔴                       |  🔴   | 🟢        | 🔴              |    🔴    | 🔴         |         🟢              | 3              |              🔴                     | 🟢           | 🟢                      | https://github.com/Vahe1994/SpQR/       |
-| [Quark](./quark.md)                           | 🔴                       | 🟢 | 🟢      | 🟢      | 🟢                   | 🟢       | ?               | 2/4/6/8/9/16 | 🔴                | 🔴                               | 🟢                       | https://quark.docs.amd.com/latest/                      |
+| [Quark](./quark)                           | 🔴                       | 🟢 | 🟢      | 🟢      | 🟢                   | 🟢       | ?               | 2/4/6/8/9/16 | 🔴                | 🔴                               | 🟢                       | https://quark.docs.amd.com/latest/                      |
 
 ## Resources
Repository: denoland/deno
Pull request: fix(ext/permissions): add correct feature flags to winapi

Adds 3 new feature flags to `runtime/permissions/winapi` to close issue #24212

Changed files:
filename: runtime/permissions/Cargo.toml
patch: @@ -24,4 +24,4 @@ serde.workspace = true
 which = "4.2.5"
 
 [target.'cfg(windows)'.dependencies]
-winapi = { workspace = true, features = ["commapi", "knownfolders", "mswsock", "objbase", "psapi", "shlobj", "tlhelp32", "winbase", "winerror", "winuser", "winsock2"] }
+winapi = { workspace = true, features = ["commapi", "knownfolders", "mswsock", "objbase", "psapi", "shlobj", "tlhelp32", "winbase", "winerror", "winuser", "winsock2", "processenv", "wincon", "wincontypes"] }
Repository: facebook/react
Pull request: DevTools: Fix memory leak via alternate Fiber pointer

DevTools delays untracking Fibers to support a Fast Refresh edge case. React may detach alternate pointers during unmount though (related to deletedTreeCleanUpLevel). Because DevTools untracking is async, it needs to explicily store the pending alternate Fiber as well. Otherwise by the time the untracking code runs, the alternate pointer may be nulled out, leading to a leak.

Resolves #17624

Changed files:
filename: packages/react-devtools-shared/src/backend/renderer.js
patch: @@ -1140,6 +1140,13 @@ export function attach(
 
     untrackFibersSet.add(fiber);
 
+    // React may detach alternate pointers during unmount;
+    // Since our untracking code is async, we should explicily track the pending alternate here as well.
+    const alternate = fiber.alternate;
+    if (alternate !== null) {
+      untrackFibersSet.add(alternate);
+    }
+
     if (untrackFibersTimeoutID === null) {
       untrackFibersTimeoutID = setTimeout(untrackFibers, 1000);
     }