sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: ToggleButtons states can't report selected AND disabled at the same time
Labels: c: new feature,framework,f: material design,c: proposal,has reproducible steps,P3,found in release: 3.10,found in release: 3.12,team-design,triaged-design

### 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)

### Steps to reproduce

1. Create a `ToggleButtons` with 2 children and one selected child and with a null `onPressed` 
2. Use `MaterialStateColor.resolveWith` for the `fillColor` and return any `Color` and `print` the current `states`

### Expected results

For the first child, the print output should be `{MaterialState.disabled, MaterialState.selected}`, whereas the second should be `{MaterialState.disabled}`.

### Actual results

The output print is `{MaterialState.disabled}`!

### Code sample

```dart
 Widget build(BuildContext context) {
  return ToggleButtons(
    isSelected: [true, false],
    onPressed: null,
    fillColor: MaterialStateColor.resolveWith((states) {
        print(states);
        return Colors.green;
    }),
    children: [
        Text('TB1'),
        Text('TB2'),
    ],
  );
}
```

**Analysis**

When computing the current `states` https://github.com/flutter/flutter/blob/ce9a604a3bad2c56067d8fac2a5251d17c312fbf/packages/flutter/lib/src/material/toggle_buttons.dart#L700-L703
`MaterialState.disabled` and `MaterialState.selected` are mutually exclusive because they use both `onPressed` but with opposite condition.


**Proposal to fix the issue:**

To set `Material.selected` state, the code should not look to `onPressed` but only to `isSelected[index]`.

```dart
final Set<MaterialState> states = <MaterialState>{ 
     if (isSelected[index] MaterialState.selected, 
     if (onPressed == null) MaterialState.disabled, 
 }; 
```

### Screenshots or Video

_No response_

### Logs

<details><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[Paste your output here]
```

</details>
Repository: electron
Issue: [Feature Request]: Add custom labels to BrowserWindow instances
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

When creating an Electron app with multiple windows, it can be difficult to differentiate between the windows. 

The Electron API provides no way to identify an Electron window other than its id (which is just a number), its title (which might change with i18n or app state), or some aspect of its webContents (such as URL, which may change).

### Proposed Solution

Adding a simple "label" (string) property to the BrowserWindow options would allow developers to identify and differentiate windows in their app.

```TS
function createWindows() {
  const win = new BrowserWindow({
    label: 'first_window',
  })
  win.loadURL('https://example.com')

  const win2 = new BrowserWindow({
    label: 'second_window',
  })
  win2.loadURL('https://example2.com')

  const win3 = new BrowserWindow({
    label: 'third_window',
  })
  win3.loadURL('https://example3.com')
}

createWindows()

function updateWindow1(state: State) {
  const windows = BrowserWindow.getAllWindows()
  const win1 = windows.find((w) => w.label === 'first_window'))
  if (win1) {
    win1.webContents.send('state', state)
  }
}
```

### Alternatives Considered

A more flexible solution would be a "labels" property which takes an array of strings. This could be a way to "tag" windows with both unique and non-unique identifiers.

```TS
function createWindows() {
  const win = new BrowserWindow({
    labels: ['first_window', 'controller'],
  })
  win.loadURL('https://example.com')

  const win2 = new BrowserWindow({
    labels: ['second_window', 'output'],
  })
  win2.loadURL('https://example2.com')

  const win3 = new BrowserWindow({
    labels: ['third_window', 'output'],
  })
  win3.loadURL('https://example3.com')
}

createWindows()

function updateWindow1(state: State) {
  const windows = BrowserWindow.getAllWindows()
  const win1 = windows.find((w) => w.labels.includes('first_window'))
  if (win1) {
    win1.webContents.send('state', state)
  }
}
```

### Additional Information

_No response_
Repository: PowerToys
Issue: Peek: Define the maximum preview window size
Labels: Needs-Triage,Product-Peek

### Description of the new feature / enhancement

As seen in issue #26535, [it's not always obvious](https://github.com/microsoft/PowerToys/issues/26535#issuecomment-1574155557) what the pin button does at first glance. I also thought that it would pin the window on top of others (since that what the terminology of pinning usually does) and so I overlooked it. After coming here to make a feature request for remembering Peek's window size, I found out that the pin button was what I was actually looking for, but only partially.

### Scenario when this would be used?

In my case, I mostly preview text files and I want the window to open smaller than the default size, not necessarily also open in the same location every time. In other words, I want to trigger Peek, and have the window be a reasonable size always open on the same screen as the item being previewed.

### Supporting information

After some thought, it's not the default size that I'm looking to define, but the _maximum allowable size_ of the preview window. In such a case, a user could confine the preview to mostly opening within the centre of their vision, without ever needing to shift their eye's to the corners of their screen (which is what I find to be the case for text files).

Should a max size be handled separately for different categories of files (pictures, videos, text, etc), or be a value that affects all files without discretion? Possibly: Text / Markdown file previews in particular are too large for me, but I do not have an issue with pictures or videos being at their currently coded maximum preview size.

Finally, about the pin button: Its tooltip could also mention size, not only location, but I think the bigger issues is that the pin icon can be misinterpreted and thereby overlooked. That said, pinning _is_ what it does, just not the type of pinning that someone may conflate it with, so I'm not sure if a different term and icon would fit any better. It's also possible to assume pinning will cause the preview window not to close once focus is lost.

Thanks.

(I see there is also an open issue regarding the minimum window size #26831.)
Repository: godot
Issue: AssetLib is sluggish
Labels: bug,topic:editor,topic:assetlib,needs testing

### Godot version

4.1 stable

### System information

Windows 11 - Godot 4.1

### Issue description

AssetLib wouldnt load for some reason, and if it loads, I cannot even download the assets that I wanted because of a bug probably. As you can see, it just shows like that. Also I should mention that the Steam Godot 4.1 version is buggy, I tried playing the main scene for the first time and the Godot exited himself completely.

![Screenshot 2023-07-07 185850](https://github.com/godotengine/godot/assets/61660636/a81940d1-6c36-499c-8cf4-ab2ddbc36948)


### Steps to reproduce

Open AssetLib and try to download something. Also download steam, and make a main scene and play it, mine crashed.

### Minimal reproduction project

No need
Repository: rust
Issue: name mangling and `TypeId` should not pass for aliases and generic params
Labels: C-cleanup

Name mangling currently succeeds even if the mangled type contains projections or opaque types. I am not sure whether `TypeId` has the same issue.

This can result in linking errors or potential UB (cc #97156) and we should guard against this by failing to mangle in this case. This change is non-trivial as we currently have name mangling tests which mangle generic modules. These tests should be changed.

cc @michaelwoerister @eddyb
Repository: TypeScript
Issue: Type instantiation is excessively deep with tuple spread
Labels: Help Wanted,Possible Improvement

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

- 2889 spread

### 🕗 Version & Regression Information

- This is the behavior in every version I tried (4.1.5 to 5.2.0 nightly), and I reviewed the FAQ for entries about: recursion

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=5.1.6#code/C4TwDgpgBAcgKgVzAGwgHjgGllCAPYCAOwBMBnKIhAWwCMIAnbAQQGNXcDjyo4BtALpQAvFEEA+EQFgAUFBz5CpCm1Z8A5KiIBzYAAt1A2fID8UVcagAuWIhTossbHwB0b1djgDxs2aEhQAAoAhgCWDCK2SKhoVHSM2ABM4gDcsgD06fJQAHomvjL+0ADKYAwQwSQwaMycSjxx9AySoq5u8NHowUQgLOJGMpnZwyOjY6MAflPTM7MzGVlw4NChRGTA3cChwVsA9kRQoRT4rBBkZKEAbhDIIFAkEBBgUN0kUGC756G0t4dEAGarUKEFxQAAUiQArAAOACcAEoCkMABIAeQA6gBRABqmIASgUilF7IkMNgYHVuBRGglzOxKcpeIJIhJpHI6WpNMRdAYhIoqTgoEMiLtCFB9DtxXpoKxpawANaHCjla4MMgQEiWMwWdk2DokslOMRuFweXjeQnLKClcqVGCk2r8xk05osk36mLdXrmfryIa7eWyIA)

### 💻 Code

```ts
type NTuple<T, N extends number, Acc extends T[] = []> =
  N extends Acc['length']
  ? Acc
  : NTuple<T, N, [...Acc, T]>

type Pair = NTuple<number, 2>;
//   ^? type Pair = [number, number]

type SpreadN<A extends number> = [...NTuple<any, A>]
//                               ~~~~~~~~~~~~~~~~~~~
// Type instantiation is excessively deep and possibly infinite. (2589)
```

### 🙁 Actual behavior

I'm getting the "Type instantiation is excessively deep and possibly infinite. (2589)" error on what should be the identity.

### 🙂 Expected behavior

I'd expect this to just work. `SpreadN` should produce the same results as `NTuple`. It's surprising to me that this error is produced on the definition of `SpreadN`, rather than when it's instantiated with an overly large value of `N`.

I think this may have something to do with distribution over unions because when I reverse the conditional, the code works fine:

```ts
type NTuple2<T, N extends number, Acc extends T[] = []> =
  Acc['length'] extends N  // note that the check is reversed
  ? Acc
  : NTuple2<T, N, [...Acc, T]>

type SpreadN2<A extends number> = [...NTuple<any, A>]  // ok
type Pair2 = SpreadN2<2>;
//   ^? type Pair2 = [any, any]
```

It's not clear to me why reversing that conditional would matter, but it does have the effect of preventing distribution over unions, which is not desirable:

```ts
type T1 = NTuple<string, 2 | 3>;
//   ^? type T1 = [string, string] | [string, string, string]
type T2 = NTuple2<string, 2 | 3>;
//   ^? type T2 = [string, string]
```
Repository: flutter
Issue: [video_player] Flaky integration test failure on web
Labels: a: tests,platform-web,p: video_player,package,P2,c: flake,team-web,triaged-web

While converting web platform tests to LUCI, I'm seeing frequent failures in one test:

```
Failure in method: stay paused when seeking after video completed
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞═════════════════
The following TestFailure was thrown running a test:
Expected: Duration:<0:00:07.534000>
  Actual: Duration:<0:00:07.544000>

When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 294:49  throw_
packages/matcher/src/expect/prints_matcher.dart.js 433:22                     fail
packages/matcher/src/expect/prints_matcher.dart.js 430:12                     _expect
packages/matcher/src/expect/prints_matcher.dart.js 365:12                     expect$
packages/flutter_test/src/test_text_input_key_handler.dart.js 7284:12         expect$
video_player_test.dart.js 257:23                                              <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50            <fn>
...
```

It wasn't happening in Cirrus, but I could repro it locally in 2/4 runs. Either Cirrus for some reason didn't trip the flake, or the flake only happens in newer versions of Chrome (I believe the LUCI config has a newer Chrome version than our last update to the one pulled in our Cirrus tests).

I'm going to mark this as flaky to unblock the migration.
Repository: next.js
Issue: Next caches `POST` , `PUT` and `DELETE` requests  if the request returns a `200 OK` status code even with `Authorization` header present
Labels: bug,Runtime

### Verify canary release

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

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.5.0: Thu Jun  8 22:22:19 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T8103
    Binaries:
      Node: 18.16.0
      npm: 9.5.1
      Yarn: 1.22.19
      pnpm: 8.6.2
    Relevant Packages:
      next: 13.4.10-canary.0
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.6
    Next.js Config:
      output: N/A
```


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

App Router, Data fetching (gS(S)P, getInitialProps), Middleware / Edge (API routes, runtime)

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

https://github.com/Fredkiss3/next-fetch-post-cache-edge-bug

### To Reproduce

1. clone and run the server
2. Go to `/`  in your browser and refresh the browser at least twice  
3. You will see that the data shown in the section `POST /api/cache` do not change after reloads
4. You can also see your terminal, the object `{ cache: ... }` will always show the same value
5. You can also go to the folder `.next/cache/fetch-cache/` you will see an entry for the cached data 

### Describe the Bug

When using edge runtime POST requests are cached if the response returns a `200 OK` status code, even if the request contains an `Authorization`  header.  This issue do not happen if the request returns a different status code (like `201` for ex). 
 



### Expected Behavior

I may understand why this behavior has been introduced (maybe to help people cache graphql queries), but using an `Authorization` header should opt the fetch out of caching, as it is said in the docs :

> Requests are not cached if:
> - Dynamic methods (next/headers, export const POST, or similar) are used and the fetch is a POST request (or uses Authorization or cookie headers)

I also thought that POST requests would not automatically be cached but there is not a clear message in the docs as to wether POST are also cached or are not cached by default. I don't know what the desired behavior is supposed to be, but if you want the user to cache their POST request, they can still manually add a `cache` field to the fetch i think ? 

This issue is particularly annoying as it is difficult to spot if you are using a data-fetching or database library (in my case `turso` with the HTTP client), most of these librairies use `POST` requests and return 200 OK as statuses. I think it could cause the same frustration if used with appolo.


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

_No response_

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

_No response_
Repository: vscode
Issue: Unlock keyring showing up at startup
Labels: debt,cloud-changes

> Since the 'Unlock keyring' dialog on startup really sucks (**even if no file/project is opened and no extension installed**!!!), I use `code --password-store=basic` on Ubuntu 20.04 to disable this non-sense. Before I found this solution I used `mv /usr/libexec/gcr-prompter /usr/libexec/gcr-prompter.disabled` (part of the gcr package) to get rid off it. Not sure, whether this helps, but yes, code should use lazy initialization (i.e. ask when secrets are actually needed) as well as make it customizable, what kind of store (if any) to use.

_Originally posted by @jelmd in https://github.com/microsoft/vscode/issues/187271#issuecomment-1625621830_
Repository: PowerToys
Issue: Spelling Error in Chinese Translation
Labels: Issue-Bug,Area-Localization,Loc-Sent To Team,Issue-Translation

### Microsoft PowerToys version

0.71.0

### Utility with translation issue

Mouse Utilities

### 🌐 Language affected

Chinese

### ❌ Actual phrase(s)

The sentences in the red box selection area are not very smooth.
Even when I first saw this feature, I didn't understand what it was all about.

![image](https://github.com/microsoft/PowerToys/assets/20153492/78f5c05d-68cc-4df5-b2b0-d6f13b94ff13)


### ✔️ Expected phrase(s)

Excepted: 在屏幕上超远距离的两点间快速移动鼠标指针
![image](https://github.com/microsoft/PowerToys/assets/20153492/6dbbbed7-1242-4a5b-a9f3-a92f01598c5c)


### ℹ Why is the current translation wrong

I grew up speaking Chinese, and this sentence does not allow me to easily understand what this feature is, unless I consult the official documentation.
Repository: PowerToys
Issue: Keyboard shortcut to handling windows in a multiple monitor setup
Labels: Needs-Triage

### Description of the new feature / enhancement

I think it could be a useful enhancement if PowerTools natively incorporated the features provided by that third-party application.

"Swap Screen uses hotkeys to simplify the process of handling windows in a multiple monitor setup. This includes features such as moving the current window to the next screen and minimising all windows on a single screen only. It also includes mouse/cursor control option allowing you to lock the mouse onto a single screen or providing resistance to moving between screens."

https://dualmonitortool.sourceforge.net/swapscreen.html

### Scenario when this would be used?

To easily switch an application between computer monitors.

### Supporting information

_No response_
Repository: rust
Issue: min_specialization on local types should take impls into account to determine whether a trait can be specialized on
Labels: C-enhancement,T-compiler,A-specialization,requires-nightly

```rust
#![feature(min_specialization)]

trait Read {}

struct BufReader<I> {
    inner: I 
}

impl<I: Read> Read for BufReader<I> {}

trait SpecUsingRead {
    fn use_it(self);
}

impl<T> SpecUsingRead for T where Self: Read {
    default fn use_it(self) {}
}

// impl<I> SpecUsingRead for BufReader<I> where Self: Read {   // <- works
impl<I> SpecUsingRead for BufReader<I> where Self: Read, I: Read { // <- doesn't
    fn use_it(self) {}
}
```

[Playground link](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=67b86c2026374fe0e7859ab485add8ce)

```
error: cannot specialize on trait `Read`
  --> src/lib.rs:20:61
   |
20 | impl<I> SpecUsingRead for BufReader<I> where Self: Read, I: Read { // <- doesn't
   |                                                             ^^^^
```

Since all types are owned by the same crate it should be possible for the compiler to see that `BufReader<I> where Self: Read` can only be true if `I: Read` because there exists no other `impl Read for BufReader` that could satisfy the `Self` clause without satisfying the `I` one.

This is useful when combining a public trait that isn't `#[rustc_specialization_trait]` and wrapper structs for those traits. The wrappers often place the bounds on the impls but not on the struct itself. Having that extra bound in the specialization can unlock additional methods.
Repository: godot
Issue: Separate windows and drop-down menus cause display issues in the main editor window
Labels: bug,platform:windows,topic:rendering

### Godot version

4.1

### System information

Godot v4.1.stable - Windows 10.0.19045 - Vulkan (Compatibility) - AMD Radeon HD 8400 / R3 Series () - AMD A6-5200 APU with Radeon(TM) HD Graphics (4 Threads)

### Issue description

When clicking on "create new project", the window to create a new project will display the contents of the project manager and not the main window. Interacting with the new project window will briefly make the project manager display the current stateof the new project window.

Drop-down menus have a similar issue. They display the engine's main editor window, but hovering on them will cause the main window to display the contents of the menu for a brief moment

### Steps to reproduce

For the create new project window:
- Open godot
- Create new project

For the menus:
- Create a godot project using a Godot 4.0 alpha (this bug was probably introduced in the later alphas, when I stopped trying them out)
- Open that project in godot
- Use any of the editor's drop-down menu (Scene / Project / Debug / Edit / Help)

### Minimal reproduction project

N/A. I don't even get to create a project before the issue shows up.
Repository: godot
Issue: As of 4.1, Adding an EditorSpinSlider to the scene crashes.
Labels: bug,topic:dotnet,crash

### Godot version

4.1

### System information

Win10, .Net 6

### Issue description

Adding an EditorSpinSlider to the scene crashes. This seems to be new in 4.1. Tested in C#.

    using Godot;
    public partial class Control : Godot.Control
    {
        public override void _Ready()
        {
            AddChild(new SpinBox());	//works
            AddChild(new EditorSpinSlider());	//crashes
        }
    }

gives this error:

> Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
>    at Godot.NativeInterop.NativeFuncs.godotsharp_method_bind_ptrcall(IntPtr, IntPtr, Void**, Void*)
>    at Godot.NativeCalls.godot_icall_3_673(IntPtr, IntPtr, IntPtr, Godot.NativeInterop.godot_bool, Int32)
>    at Godot.Node.AddChild(Godot.Node, Boolean, InternalMode)
>    at Control._Ready()
>    at Godot.Node.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name ByRef, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant ByRef)
>    at Godot.CanvasItem.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name ByRef, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant ByRef)
>    at Godot.Control.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name ByRef, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant ByRef)
>    at Control.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name ByRef, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant ByRef)
>    at Godot.Bridge.CSharpInstanceBridge.Call(IntPtr, Godot.NativeInterop.godot_string_name*, Godot.NativeInterop.godot_variant**, Int32, Godot.NativeInterop.godot_variant_call_error*, G
> odot.NativeInterop.godot_variant*)


(If the editor controls are not intended to work in non-editor projects I can understand that, but this worked in 4.0.3 and it would be nice if I could use it.)

### Steps to reproduce

1. Create an EditorSpinSlider
2. Add it to the scene via AddChild()

(tested with C# only)

### Minimal reproduction project

[EditorSpinSlider.zip](https://github.com/godotengine/godot/files/11984693/EditorSpinSlider.zip)