sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: drag and dropping operations don't mix up well with multi-window mode
Labels: bug,topic:editor,usability

### Godot version

4.1

### System information

Ubuntu 23.04, GNOME 44.2

### Issue description

When dragging something (file, node, etc.) from a window to another, the operation breaks if the focused window changes while the item is dragged.

This can happen:
 - naturally, on my setup: the focus is given to any window I *hover*. 
 - manually, by alt-tabbing while dragging and focusing another godot window. (at least on my setup)

I want to drag and drop a mesh resource to my `MeshInstance`:

[simplescreenrecorder-2023-07-09_21.32.21.webm](https://github.com/godotengine/godot/assets/71937306/aabc54a1-da18-4125-b6f4-e97b4fa4866c)

Notice:
- how the focused window changes while I hover (expected from my setup),
- how the inspector gets focused but isn't aware that some file is being dragged,
- how when I hover the FileSystem again without releasing LMB, it is aware of the drag operation,

Additionally, while not showcased in this video, this happens too:
 - when I hover the FileSystem again after releasing LMB outside of it, it still shows the tooltip as if I was dragging the file (visually the same as the previous bullet point).

### Steps to reproduce

 - detach the FileSystem,
 - drag some file from the FileSystem to the godot editor,
 - focus the godot editor, either thanks to your desktop config or by alt-tabbing to it.


### Minimal reproduction project

editor related, any project works
Repository: godot
Issue: Incorrect global_position of Control (Panel) node before twice input event
Labels: enhancement,documentation

### Godot version

4.1.stable

### System information

Godot v4.1.stable - Windows 10.0.19045 - Vulkan (Mobile) - integrated AMD Radeon(TM) R3 Graphics (Advanced Micro Devices, Inc.; 27.20.20913.2000) - AMD A4-9120 RADEON R3, 4 COMPUTE CORES 2C+2G (2 Threads)

### Issue description

"global_position" is calculated incorrectly for Panel2 until the moment when "enter" is pressed twice. 
![debug](https://github.com/godotengine/godot/assets/113201012/4f1b49a4-4344-4cd1-9d63-df5918cb55a1)
"global_position" of Panel2 should be correct before and after you double-click on "enter" and its parent node GridContainer appears.

### Steps to reproduce

1. Create a node tree like here:
![tree](https://github.com/godotengine/godot/assets/113201012/01122bc2-07a6-4fd9-adaf-ee7c6eea7b96)
2. GridContainer must contain 2 columns
3. Panel and Panel2 size should be 64x64
4. Add script (Control.gd) to Control node
5. Control.gd must contain the following code:
![code](https://github.com/godotengine/godot/assets/113201012/2390184a-dced-470a-a646-fd49c9930213)
6. After double-clicking on "enter", the debug window should look like this:
![debug](https://github.com/godotengine/godot/assets/113201012/45109809-1be5-46ea-9edd-2c6a915b71ca)


### Minimal reproduction project

* [global_position_bug.zip](https://github.com/godotengine/godot/files/11995989/global_position_bug.zip)
Repository: terminal
Issue: Wrap double-height text properly
Labels: Product-Conhost,Help Wanted,Area-Output,Issue-Task

### Windows Terminal version

_No response_

### Windows build number

_No response_

### Other Software

_No response_

### Steps to reproduce

Create double-height text and then use it to write a line longer than the width of the current console window/pane

### Expected Behavior

that it would wrap into another double-height line

### Actual Behavior

It actually breaks the double-height line into two and ruins the effect, and then wraps the remainder twice as single height lines

![image](https://github.com/microsoft/terminal/assets/789591/93c6b66b-0857-4f94-aff8-12d975e7c0ac)


Perhaps the wrapped text of a "big" line can be buffered and if it matches the wrapped text of the next line and that line is also "big", then a new "big" line can be created with the wrapped text and inserted after?
Repository: excalidraw
Issue: fix `NonDeleted` type
Labels: bug,good first issue

the type should use `isDeleted: false`:

https://github.com/excalidraw/excalidraw/blob/49e4289878bdf120ae5e8275ff4ac0f8c01c3c72/src/element/types.ts#L129-L131

Will require lots of code refactor I imagine.
Repository: vscode
Issue: Move chat session history to file storage, not the storage service
Labels: under-discussion,panel-chat

> Moved from https://github.com/microsoft/vscode-copilot/issues/153

This may be too much data for the storageService's intended usecases
Repository: pytorch
Issue: [feature request] torch.mix function to generalize/symmetrize addcmul
Labels: feature,triaged,needs research,module: python frontend

### 🚀 The feature, motivation and pitch

I propose to introduce a convenience/ux function in core:
`mix = lambda a = 1, b = 1, c = 1, A = 1, B = 1, C = 1: a*b*c + A*B*C` in one go where all a,b,c,A,B,C can be scalars or tensors. The most frequent cases would be:
- a, A, b, B are scalars, c and C are tensors
- a, A, b are scalars, c, B, C are tensors

This would generalize/symmetrize torch.addcmul, and could be used in optimizers to make second moment calculations more idiomatic and clear. This function could be implemented using torch.compile in core. Also an inplace version is needed (kind of generalization of torch.lerp_)

Instead of `mix` (as `mix` in graphics context often means lerp: https://registry.khronos.org/OpenGL-Refpages/gl4/html/mix.xhtml) , the name could also be `linear_combination` (?) (although if B=C or other cases, it would not actually be a linear combination) Or maybe existing `addcmul` could be extended to support more arguments. The inplace mode of mix would be different from existent addcmul in that it should allow inplace multiplication of the accumulator by scalar/tensor prior to adding the rhs summand.

Some older context: https://github.com/pytorch/pytorch/issues/71683#issuecomment-1379058082 https://github.com/pytorch/pytorch/issues/79352#issuecomment-1152946076 https://github.com/pytorch/pytorch/pull/104781#issuecomment-1625709917

Here is that line from Adam https://github.com/pytorch/pytorch/blob/main/torch/optim/adam.py#L363:
```python
exp_avg_sq.mul_(beta2).addcmul_(grad, grad.conj(), value=1 - beta2)
# exp_avg.lerp_(grad, 1 - beta1)
```

Maybe another alternative for design is `lerp2` : `exp_avg_sq.lerp2_(grad, grad.conj(), 1 - beta2)`, but IMO generalized `addcmul`/`addcmul2`/`linear_combination` is still better


cc @albanD
Repository: next.js
Issue: Layout re-renders with each page in same dynamic route segment when middleware rewrite and prefetch={false}
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Home
    Binaries:
      Node: 18.16.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant Packages:
      next: 13.4.10-canary.0
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 4.9.5
    Next.js Config:
      output: N/A
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App Router

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/p00000001/next-routing-issue

### To Reproduce

- The app uses the dynamic route segment `/[locale]/*` to support different languages.
- The default language "en" is supported on the browser under /* so the middleware rewrites the next.js path to `/en/*`
- Each layout and page render is logged to the server console.

1. Click Page A (browser path "/a" | rewrites to "/en/a")
2. Click Page B (browser path "/b" | rewrites to "/en/b")
3. Click Page C (browser path "/c" | rewrites to "/en/c")
4. Click Page D (browser path "/d" | rewrites to "/en/d")
5. [wait 30 seconds for client cache to expire]
6. Click Page A

### Describe the Bug

The layout and all pages are located under the same route segment:

 `/[locale]/layout.js`
 `/[locale]/a/page.js`
 `/[locale]/b/page.js`
 `/[locale]/c/page.js`
 `/[locale]/d/page.js`

When Page A is requested, as expected both `/[locale]/layout.js` and  `/[locale]/a/page.js` are rendered.

However, when Page B/C/D are requested  `/[locale]/layout.js` is rendered again each time, despite all pages being under the same route segment.

This only happens the first time the pages are requested. Subsequent requests to a previously loaded page, performs as expected and only renders the page and not the layout again. This can be seen in step (6) when Page A is revisited.

It should be noted that two condition appear to be required for the bug to occur:

1.  On the `Link` component `prefetch={false}`. Setting `prefetch={true}` seems to resolve it but this is not suitable for our project. 
2. The middleware rewrites the browser URL. For example, when explicitly including the locale in the browser URL e.g. `/fr/a` then the issue does not occur. However, this would mean we cannot support a default locale URL

### Expected Behavior

Page A/B/C/D are all under the same route segment and share the same layout. Therefore `/[locale]/layout.js` should only be rendered with the first page request and not subsequent ones.

Particularly as out layouts require API fetches, it can slow down page transitions.

### Which browser are you using? (if relevant)

Chrome latest

### How are you deploying your application? (if relevant)

Next start
Repository: rust
Issue: A bound on the associated type is not recognized as satisfied
Labels: A-trait-system,A-inference,C-bug,T-types,fixed-by-next-solver

Consider this code:
```rust
fn foo<T>(val: &[u8]) -> Result<T, String>
where
    for<'a> T: TryFrom<&'a [u8]>,
    for<'a> <T as TryFrom<&'a [u8]>>::Error: core::fmt::Display,
{
    T::try_from(val).map_err(|err| format!("{}", err))
}

fn main() {
    let b = b"abcd";
    let a: [u8; 4] = foo(b).unwrap();
}
```

The compilation fails (both on stable and nightly):
```
error[E0277]: `<_ as TryFrom<&'a [u8]>>::Error` doesn't implement `std::fmt::Display`
  --> src/main.rs:11:22
   |
11 |     let a: [u8; 4] = foo(b).unwrap();
   |                      ^^^ `<_ as TryFrom<&'a [u8]>>::Error` cannot be formatted with the default formatter
   |
   = help: the trait `for<'a> std::fmt::Display` is not implemented for `<_ as TryFrom<&'a [u8]>>::Error`
   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
note: required by a bound in `foo`
  --> src/main.rs:4:46
   |
1  | fn foo<T>(val: &[u8]) -> Result<T, String>
   |    --- required by a bound in this function
...
4  |     for<'a> <T as TryFrom<&'a [u8]>>::Error: core::fmt::Display,
   |                                              ^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
```

This is despite the fact that `<[u8; 4] as TryFrom<&'a [u8]>>::Error` is [`TryFromSliceError`](https://doc.rust-lang.org/core/array/struct.TryFromSliceError.html) that implements `Display`, so this should compile fine. 

From the error it looks like the compiler cannot pin the type the trait is used with (`[u8; 4]`) and therefore cannot see that the error implements `Display` in the `impl` for that type, but I am not sure why it is happening. The compilation succeeds if I fix `T` manually: 
```rust
let a: [u8; 4] = foo::<[u8; 4]>(b).unwrap();
```

It seems that since `T` is only present in the return type, Rust checks the bounds before monomorphizing the type, despite an explicit target type annotation being present? Is that an expected behavior?

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.70.0 (90c541806 2023-05-31)
binary: rustc
commit-hash: 90c541806f23a127002de5b4038be731ba1458ca
commit-date: 2023-05-31
host: aarch64-apple-darwin
release: 1.70.0
LLVM version: 16.0.2
```
```
rustc 1.72.0-nightly (83964c156 2023-07-08)
binary: rustc
commit-hash: 83964c156db1f444050a38b2498dbd0da6d5d503
commit-date: 2023-07-08
host: aarch64-apple-darwin
release: 1.72.0-nightly
LLVM version: 16.0.5
```
Repository: svelte
Issue: Allow css variables in transitions
Labels: transition/animation

### Describe the problem

Some transitions already allow the use of values in css units like vh and vw. But that value needs to be declared as a javascript string, which creates the need for variable manipulation and the creation of multiple event handlers to react to states that could be easily observable with css

### Describe the proposed solution

Detect javascript variables, extract using getComputedStyle and use the css values

### Alternatives considered

In this example I added the following lines in the split_css_unit function, and added the computed style as a second parameter
```javascript
const cssVariableName = typeof value === 'string' && value.match(/var\((--(.*))\)/);
if (cssVariableName) value = style.getPropertyValue(cssVariableName[1]);
```
In the example the changes occur only with the size of the viewport, but considering the possible combinations of css selectors it is something much more convenient to react using css than javascript

![Code_EmBfg8vhEq](https://github.com/sveltejs/svelte/assets/84819630/92a48c85-12da-4909-aa46-8593f976f400)

### Importance

would make my life easier
Repository: pytorch
Issue: torch.norm inconsistency?
Labels: module: numerical-stability,triaged,module: norms and normalization

### 🐛 Describe the bug

```
import torch as ch

a = ch.randn(2, int(1e6))
# The following should be equivalent
print(a[0].norm())
print(a.norm(dim=1)[0])

```
===

```
tensor(999.3896)
tensor(999.1658)
```

### Versions

Collecting environment information...
PyTorch version: 1.12.0
Is debug build: No
CUDA used to build PyTorch: 10.2

OS: Ubuntu 16.04.6 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
CMake version: version 3.5.1

Python version: 3.9
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration: 
GPU 0: NVIDIA Quadro K620
GPU 1: NVIDIA TITAN X (Pascal)
GPU 2: NVIDIA TITAN X (Pascal)
GPU 3: NVIDIA TITAN X (Pascal)
GPU 4: NVIDIA TITAN X (Pascal)

Nvidia driver version: 465.19.01
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] numpy==1.22.3
[pip3] torch==1.12.0
[pip3] torchaudio==0.12.0
[pip3] torchvision==0.13.0
[conda] blas                      1.0                         mkl    anaconda
[conda] ffmpeg                    4.3                  hf484d3e_0    pytorch
[conda] libblas                   3.9.0            12_linux64_mkl    conda-forge
[conda] libcblas                  3.9.0            12_linux64_mkl    conda-forge
[conda] liblapack                 3.9.0            12_linux64_mkl    conda-forge
[conda] mkl                       2021.4.0           h06a4308_640    anaconda
[conda] mkl-service               2.4.0            py39h7e14d7c_0    conda-forge
[conda] pytorch                   1.12.0          py3.9_cuda10.2_cudnn7.6.5_0    pytorch
[conda] pytorch-mutex             1.0                        cuda    pytorch
[conda] torchaudio                0.12.0               py39_cu102    pytorch
[conda] torchvision               0.13.0               py39_cu102    pytorch
Repository: PowerToys
Issue: Power Rename Numerical Editing
Labels: Idea-Enhancement,Product-PowerRename,Needs-Triage

### Description of the new feature / enhancement

In power rename, have the ability to make a group of files named in sequential order. Ex: 000, 001, 002, 003, 004, Etc. Or add the ability to remove the ( ) around the numbers it applies already.
![Example](https://github.com/microsoft/PowerToys/assets/83755079/317da6c7-506c-413a-bfa1-86834fc5c2eb)


### Scenario when this would be used?

Making a gif or avi or needing a specific formatting for a program/script. Ex: custom boot animation for a rooted android device.

### Supporting information

boot animations require the files to be numbered 0 - _insert number here_ ![main_ boot animation folder](https://github.com/microsoft/PowerToys/assets/83755079/507ca44f-9f8d-443f-ad74-41551ec9be7a)
![boot animation txt](https://github.com/microsoft/PowerToys/assets/83755079/2383a030-0a7d-452c-b650-dc0d4cd4db83)
Repository: kubernetes
Issue: [FG:InPlacePodVerticalScaling] In place update trigger container restart when upgrade k8s cluster
Labels: kind/bug,sig/node,triage/needs-information,needs-triage

### What happened?

1. Old pod created by old version k8s will restart when to resize the pod spec after upgrade k8s cluster version and enable the specified feature gate
2. pod which have do some resize operations will restart when disable the in place update feature gate


### What did you expect to happen?

container not restart always

### How can we reproduce it (as minimally and precisely as possible)?

case1：
1. create a pod with k8s version 1.20 or with latest version with in place update feature gate disabled
2. enable the feature gate
3. resize the pod
4. container restarted

case2:
1. create a pod with in place update feature gate enabled
2. do resize
3. close the feature gate when resize succeed
4. update pod annotation or what else can update
5. container restarted

### Anything else we need to know?

Is this a feature or bug?

### Kubernetes version

<details>

```console
$ kubectl version
# paste output here
```
master branch
</details>


### Cloud provider

<details>
NONE
</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>
Repository: excalidraw
Issue: `fileSave` does not work when used inside of Electron
Labels: bug,filesystem

# Description of the Issue

When trying to do actions that save files (like export PNG to file or export JSON to file), it fails when the application is being used from inside of an Electron application. We can get two errors:

1. (This might happen only in MacOS, I'm not sure). The default save location is set to "Macintosh HD" and when clicking on "Save", it fails silently with a "DOMException: Failed to create or truncate file" in the console: 
<img width="430" alt="image" src="https://github.com/excalidraw/excalidraw/assets/23657255/515e7566-10d7-4635-8747-7ef9db79966f">

2. When choosing a "normal" save location like "Downloads", it fails and one gets the following error: "The request is not allowed by the user agent or the platform in the current context."
<img width="557" alt="image" src="https://github.com/excalidraw/excalidraw/assets/23657255/cf75c1fd-94ac-4554-b848-28b930008dcf">

# Reproducing the issue

Reproducing the issue is trivial: 
1. Open any Electron app
2. Get to the console (Right click, Inspect Element, then go to "Console" tab)
3. Enter `window.location.href="https://excalidraw.com/"`
4. Then excalidraw opens. Try to "Export Image"

# Findings from brief look into the code

I see that Excalidraw uses [browser-fs-access](https://github.com/GoogleChromeLabs/browser-fs-access) which might be the place where the issue is originating from.
More relevant hooks into the source code: in the source, `App.onExportImage` which uses `src/data/index`'s `exportCanvas` which uses `src/data/filesystem`'s `fileSave`

# Proposed solution

Since it seems to be working in browsers and because electron apps are probably a minority use-case (unless Excalidraw.com is thinking of making an electron app of their own), 
Simplest/easiest solution would be to expose a callback in `exportProps` similar to `onExportToBackend` : https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props/ui-options#exportopts. 
The expectation is that, when the callback is passed by the user of the API, it will be used instead of `browser-fs-access`'s  `fileSave` (it could be used in `src/data/filesystem`'s `fileSave`).

That way, in Electron apps (on in other cases where current approach might not be working), one can send their own fileSave function
Repository: PowerToys
Issue: Fanzy Zones snap to grid startup problem
Labels: Issue-Bug,Product-FancyZones,Needs-Triage

### Microsoft PowerToys version

.71

### Installation method

PowerToys auto-update

### Running as admin

Yes

### Area(s) with issue?

FancyZones

### Steps to reproduce

I snap two windows in place (side by side) according to the grid I created. After a restart, the window on the right side will not stay in that position. When it opens up, it is automatically moved up and to the left, leaving a port of my desktop wallpaper visible on the bottom and right side of my open windows. I am then forced to re-snap that window in order for it to properly take up 50% of my screen.

### ✔️ Expected Behavior

I was hoping that after the restart, the two windows would remain in place, where they had been previously "snapped".

### ❌ Actual Behavior

Despite running version .71 I continue to have the issue described in Issue #24114 (though that discussion indicates the issue was resolved in version .68). I set up the zone layout in zone editor, and snap my windows into place (two windows side by side with each taking up 50% of my single ultrawide screen). After the restart, when I open up those windows, the window on the left of the screen is in place. The window on the right side of the screen is out of position, and I can see a portion of the desktop wallpaper below the window and to the right of the window. If I then re-snap the window to the zone, it will take up the full 50% of the screen on the right-hand side. 

Please let me know if further info is needed.

### Other Software

_No response_
Repository: flutter
Issue: [quick_action] [ios] 3d touch only working when app is active, not works on cold start
Labels: platform-ios,p: quick_actions,package,P2,team-ios,triaged-ios

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case


 callback for quick options not working from app cold start from home quick options


### Proposal

current implementation of iOS different with what[ apple guideline](https://developer.apple.com/documentation/uikit/menus_and_shortcuts/add_home_screen_quick_actions#3701696) tells to do
can we change ios implementation to use [scene(_:willConnectTo:options:)](https://developer.apple.com/documentation/uikit/uiscenedelegate/3197914-scene) function.