sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: PowerToys
Issue: [FancyZones] Keep more than one zone in the app history
Labels: Idea-Enhancement,Product-FancyZones

The "move newly opened windows to last known zone" option remembers only the last zone for each monitor. 

Probably would be better to have a queue of possible zones (instead of one zone) for each app and if the highest priority zone doesn't contain an app window, place the window in that zone. If all zones contain the app, place all other windows in the zone with the highest priority. In case the app is unsnapped from the zone (manually moved outside the zone, including using keyboard shortcuts), the zone is removed from the history.

Example: if you snap explorer windows to zones 1, 2, 3, after you close and reopen them, the first will be automatically snapped to the 3rd zone, 2nd window to the 2nd zone, and the 3rd window to the 1st zone.

_Originally posted by @SeraphimaZ in https://github.com/microsoft/PowerToys/issues/16328#issuecomment-1046839021_
Repository: TypeScript
Issue: Conditional type evaluation of type aliases produces different result than their equivalent substitution
Labels: Bug,Fix Available,Rescheduled

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms
extends
<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

### 🕗 Version & Regression Information
v4.5.4
<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->


### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.5.4&ssl=4&ssc=20&pln=4&pc=27#code/C4TwDgpgBAygPADQHxQLxTgFSQCgJRoqZQQAewEAdgCYDOUCUA-FAIxQBcUA5AEzcAoUJCgAxAPbi0sON1qtuKIeGgTxvafDn8kykQCUItAK4AbYO3RqS5KnTGSNLYACdj0LgDMAhqdrQBPWhDE3MNdC15RRsKGnpInWYoV3dOKB8-CCA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
type S<X> = <T>() => T extends X ? 1 : '2'
type Foo = S<'s1'> 
type Foo2 = S<'s2'>
type Result1 = Foo extends Foo2 ? true : false 

type Result2 = S<'s1'> extends S<'s2'> ? true : false
```

### 🙁 Actual behavior
For the result2 expression, the only difference from result1 is that result1 uses the type  rather than the specific S<'s1'> ,But they returned a completely different result. Result1 return true,Result2 return false
<!-- What happened, and why it was wrong -->

### 🙂 Expected behavior
type Result1 and  type Result2 should return false 
<!-- What you expected to happen instead, and why -->
Repository: flutter
Issue: [Keyboard] Synchronize keyboard state on defocus and refocus
Labels: a: text input,platform-android,platform-ios,framework,platform-mac,platform-fuchsia,platform-windows,platform-web,platform-linux,a: desktop,f: focus,P2,customer: chilli,team-framework,triaged-framework

We should find ways to synchronize keyboard state when the app loses focus (maybe) and regains focus (definitely). Otherwise apps that display based on keyboard state (instead of key events) might confuse users when the app regains focus.

State:
- [ ] Windows
- [ ] Linux/GTK
- [ ] macOS
- [ ] Web
- [ ] Android 
- [ ] iOS 
- [ ] Fuchsia
  - Probably already done. Fuchsia sends sync/cancel events to mark key events when unfocused.
Repository: PowerToys
Issue: Smaller FancyZones
Labels: Idea-Enhancement,FancyZones-Layouts,Product-FancyZones,Needs-Triage,Needs-Team-Response

### Description of the new feature / enhancement

I'd like to be able to use smaller FancyZones. A software I use opens multiple (popup) windows and has 1 'home' window.
The 'home window' has shortcuts at the top to all features and I want to be able to keep the 'home window' full screen, with a slightly smaller than full screen zone under it. Unfortunately I've run into a height limit for the FancyZones where the min height is still too high. I'd need a zone that's only 70 pix high, which is impossible now. The smallest I can go is 109 pix high.

To be clear: I don't need the small zone, but I can't make the big zone below it tall enough.

### Scenario when this would be used?

For work. I'd be able to allign all my program's windows perfectly to the fancyzone.

### Supporting information

_No response_
Repository: PowerToys
Issue: PowerToys FancyZones should actually snap
Labels: Product-FancyZones,Needs-Triage

### Description of the new feature / enhancement

FancyZones should allow windows to actually snap to the layout in the same way Windows 11 does it, wich makes the corners squared and let's you re-adjust a zone later with just draggin in between the windows.

### Scenario when this would be used?

Every time you want to re-arrange a layout without having to go to the hassle of editing it through the FancyZones settings

### Supporting information

_No response_
Repository: PowerToys
Issue: Allow enabling Override Windows Snap while retaining original Win+arrow behavior
Labels: Idea-Enhancement,Product-FancyZones,Needs-Triage

### Description of the new feature / enhancement

When I use FancyZones, I enjoy the feature that can use Win+arrow to move windows between zones (relative position). But I also use the original win + <arrow> functionality together:

Layout: 3x2 grid
Win+arrow: move the window between zones
Win+ctrl+alt+arrow: enlarge the window across multiple zones
Win+ctrl+up while the window is at the bottom corner: 50% left/right (original windows snap function)
Win+shift+down: minimize the window

But since I upgraded to Windows 11, the Win+Ctrl+up shortcut no longer works. So its not possible for me to achieve 50% left/right with keyboard.


Is it possible to add a toggle, so when the window is snapped to the edge zone, win key + <arrow> towards the edge will behave just like the original Windows snap?
e.g. Assume the window is at the left most zone, and when i press win+left,
* current behavior: the window will move to the right most zone (wrapped)
* suggest behavior: the window will become 50% left of the screen (original windows snap)

So the new behavior will be:
* At the left most zone:
  * Win+Left: become 50% left of current screen
  * Win+Right: move to right zone
* At the top most zone:
  * Win+up: maximize the window
  * Win+down: move to the lower zone
* At the bottom most zone:
  * Win+down: minimize the window
  * Win+up: move to the upper zone

When there are 2 monitors, if the window is at the 50% left of the right screen, press Win+Left will make it 50% right of the left screen (original Windows snap behavior), and press Win+Left again will move the zones in the left screen.

### Scenario when this would be used?

The enhancement allows me to use the original windows snap function, while enjoying to use FancyZone by keyboard.
it allows me to have 33%, 50% or 67% of the screen, while keeping the FancyZones layout simple (3x2)

### Supporting information

_No response_
Repository: TypeScript
Issue: Control Flow Analysis for Destructured Discriminated Unions doesn't work for let variables
Labels: Needs Investigation

# Bug Report

### 🔎 Search Terms

Control flow analysis destructuring assignment
 
### 🕗 Version & Regression Information

This was already there, but I thought it might have been fixed with the introduction of this feature in 4.6.

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.7.0-dev.20220215#code/KYDwDg9gTgLgBAYwgOwM7ysAJgVwcOAXjgB4BlAGjgBU5QZhktU4yA+AClWABsAzAFxwAkgygBDAEY9gJamyoQwwCTACWKIR3EIEQynBhDqASiJtWJ-ebgBvAFBxEKdHDViholeJjQ5VHGQAa2QIAHdkC2JufgBtMgBPAFtJCB4AOndvXygAXQ4TAG5HOBl4WzgAN3EeHGAqLBQCAF8iNzF05HoC4qc1PjgORq6zGAALKHC4LrC4AFEoSagOACI5pLAYBPbvaQIEcWQAcnhJAkxcfCx0laKSsrgdPVY26trgQrgAei+aBOU4EdAiFwsc3CxQvBxKhUGoAObIKQyQwQQz-AhHMhHdIlMJjNTIjgAQmGwDMDicTiebSU2Q0yG0uiobzqd0pgwqLPqcFJcFaxCyUE63RMbL5JUwMBwUGQj10xWaxXsoEgsGcaAw2DwwAATG1yFRaPRGMxWJwYoIRGIkbJ5IplKp6VonvoqEYaGZCBYyFYXl67CUkBqdlA2hb4slUhlBT5oPkxQ9MKgcDx4AKOl0QDAeiV+oMkymYOlSaMJlMZvNFtBVutNtsY3tEIcTnAznALtrrrdeqVgFDdNZiAXU+kuZ8fu3gMmR1zwTRBsamCwfbj8YSicOiyWA+zqcRaY6UIyEFRN6Oaqye05N21BcKszmnM0JX3pbKngqlSroPA+IEEOoKBwHwEAQBwgqeNaOQkMgOApCoVDoFAajIHCbDkvcfZ2FUF7cry-Ihve2ZinmQxNKWkyzBWCxLDWGxbCGNpNscpznFqVw3AmWEutMcFnKGxBjt8vzUOigJIShcJwAAPrx8FQEcc6Qo8MLwoija+GiAJHLB8nYn82kSahilqBCEBQqpCJMZpWzabp-HYi+UoynKCAKvYQA)

### 💻 Code

```ts
export const reduce = <S, T extends S>(self: Iterable<T>, operation: (acc: S, t: T) => S): S => {
  const iter = self[Symbol.iterator]();
  let { value, done }: IteratorResult<T, unknown> = iter.next();
  if (done) throw new Error("Empty iterable can't be reduced.");
  let acc: S = value; // Type 'unknown' is not assignable to type 'S'.
  while (!done) {
    acc = operation(acc, value);
    ({ value, done } = iter.next());
  }
  return acc;
};
```

Note that if you don't upcast `iter.next()`, you won't get errors, but not for good reasons:

```ts
let {value, done} = iter.next(); // type is IteratorResult<T, any>
if (done) throw new Error("Empty iterable can't be reduced.");
// value is any and can be assigned to anything
```

A smaller repo would be:

```ts
export function foo(iter: Iterator<number, string>) {
  let { value, done } = iter.next();
  if (done) return;
  let acc: number = value; // Type 'string | number' is not assignable to type 'number'. Type 'string' is not assignable to type 'number'.
  return acc;
}
```

### 🙁 Actual behavior

`value` above in the last example is inferred as `number | string`, it should be `number`

### 🙂 Expected behavior

I expect the same inference as without destructuring:

```ts
export const reduce2 = <S, T extends S>(self: Iterable<T>, operation: (acc: S, t: T) => S): S => {
  const iter = self[Symbol.iterator]();
  let result: IteratorResult<T, unknown> = iter.next();
  if (result.done) throw new Error("Empty iterable can't be reduced.");
  let acc: S = result.value; // result.value is T (extends S)
  while (!result.done) {
    acc = operation(acc, result.value);
    result = iter.next();
  }
  return acc;
};
```
Repository: flutter
Issue: Exposing control of shadow light
Labels: c: new feature,framework,f: material design,c: proposal,a: layout,team-design,triaged-design

## Use case

I would like to avoid the animation connected to a device orientation change. Instead, I am locking the app to one preferred orientation and detect orientation changes using the accelerometer. Then, only the necessary widgets are rotated as necessary.

Now, I have the little aesthetic problem that Material shadows are cast in a way that is connected to the current device orientation: They always point downwards.

![Shadows correct](https://i.stack.imgur.com/aZ5yP.jpg)

However, if the orientation is locked to one side and I rotate the screen by 180°, my widgets rotate as wanted, but the shadows are now pointing upwards instead of downwards.

![Shadows incorrect](https://i.stack.imgur.com/F2VTX.jpg)

Now, I would like to adjust the position of the light to change the shadow for all widgets and avoid having to implement custom shadows for every widget. However, as far as my research brought me, is the position of the shadow light hardcoded in [this](https://github.com/flutter/engine/blob/dbe4cc89ba335057d8492d9a2583cac8ffd9ce12/display_list/display_list_canvas_dispatcher.cc#L277) line of code.

```cpp
SkShadowUtils::DrawShadow(canvas, path, SkPoint3::Make(0, 0, dpr * elevation),
                            SkPoint3::Make(0, -1, 1),
                            kLightRadius / kLightHeight, ambientColor,
                            spotColor, flags);
```

## Proposal

I would like Flutter to give control over the light that is casting the shadows. Currently, I have three conceptual ideas on how to do that:

1) Using an asynchronous call to `SystemChrome`, for example ```SystemChrome.setShadowLight(lightPos, lightRadius);```

2) Introducing a widget (animated or not) that sets the shadow light parameters for its child's widget tree. I think, I would prefer this over an asynchronous `SystemChrome` call, because it would allow selective application and easier animation. Using such a widget might look like this:
```dart
AnimatedPhysicalLight(
  position: lightPos,
  radius: lightRadius,
  child: MyApp(),
)
```

3) Integrating the light parameters into the `Theme` class. This might also allow selective application and animation. Additionally, the light parameters would then be semantically in a place where they belong to. However, this solution does not seem as "nice" to me as the second.

One question to clarify is, in which coordinate space the position of the light should be defined. Using a simple `[0, 1]` ranged coordinate system with the origin in the top left corner might be well for the x and y-axis, but for the z axis this might be insufficient.
Repository: storybook
Issue: Mono Repo: Add `preserveSymlinks` feature to SB Angular Builder
Labels: feature request,needs triage

**Is your feature request related to a problem?**
After upgrading to Angular 13 and Storybook 6.4, the symlinks to another angular library in the same mono repository doesn't work anymore.

Repository to analyse the error => https://github.com/keth-dev/lerna-storybook-ng-libs

**Describe the solution you'd like**
Add `preserveSymlinks` options to `@storybook/angular:start-storybook` just like angular builder supports.

**Describe alternatives you've considered**
Alternatively, customizing webpack config not to resolve symlinks works. However, it is better to configure using SB angular builder.
https://webpack.js.org/configuration/resolve/#resolvesymlinks
```
module.exports = {
  webpackFinal: (config) => {
    return {
      ...config,
      resolve: {
        ...config.resolve,
        // Preserve symlinks (i.e. DO NOT resolve).
        // // When enabled, symlinked resources are resolved to their real path, not their symlinked location. This causes module resolution to fail when using 'npm link'
        symlinks: false
      }
    }
  },
```

**Are you able to assist to bring the feature to reality?**
No
Repository: flutter
Issue: Release typed data before calling Dart_ThrowException()
Labels: engine,P3,c: tech-debt,team-engine,triaged-engine

This mirrors the issue described by @mkustermann in https://github.com/dart-lang/sdk/issues/48488#issuecomment-1055414139. Typed data that has been acquired needs to be released before throwing a Dart exception.

Solving this issue should include a unit test that runs under asan with leak checking on that triggers the exception path.

/cc @dnfield @chinmaygarde @rmacnak-google @a-siva
Repository: pytorch
Issue: conv with padding='same' fails on lazy torchscript nvfuser
Labels: oncall: jit

If you have a question or would like help and support, please ask at our
[forums](https://discuss.pytorch.org/).

If you are submitting a feature request, please preface the title with [feature request].
If you are submitting a bug report, please fill in the following details.

## Issue description

Provide a short description.

## Code example

Please try to provide a minimal example to repro the bug.
Error messages and stack traces are also helpful.

## System Info
Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

- PyTorch or Caffe2:
- How you installed PyTorch (conda, pip, source):
- Build command you used (if compiling from source):
- OS:
- PyTorch version:
- Python version:
- CUDA/cuDNN version:
- GPU models and configuration:
- GCC version (if compiling from source):
- CMake version:
- Versions of any other relevant libraries:
Repository: material-ui
Issue: Failed prop type: Invalid prop `children` supplied to `ForwardRef(Tooltip)`. Expected an element that can hold a ref
Labels: component: tooltip,status: expected behavior

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Current behavior 😯

Tooltip component emits an error on children reporting that a plain function component was used instead of a react element. But a react element was passed. Using a react fragment as a children wrapper is the current workaround

Sample here

https://codesandbox.io/s/compassionate-wave-59d138?file=/src/App.js

Error should show in console

### Expected behavior 🤔

When a react component and a ref can be used in the tooltip's children no error should be emitted.

### Steps to reproduce 🕹

Steps:

1. Setup a Tooltip component with your own react component as it's child for example

2. Examine the console's errors
3.
4.
5.


### Context 🔦

Also related with this issue

https://github.com/mui/material-ui/issues/15911

It's pretty much the same, so a common workaround could be made perhaps. Wrapping tooltip's children in a fragment gets rid of the error.

FYI @oliviertassinari

### Your environment 🌎

<details>
  <summary>`npx @mui/envinfo`</summary>

```
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
```
</details>
Repository: terminal
Issue: Terminal does not come to foreground to present the "Do you want to close all tabs?" dialog
Labels: Help Wanted,Product-Terminal,Issue-Task,In-PR,Priority-3,Area-Windowing

### Windows Terminal version

1.12.10393.0

### Windows build number

10.0.22000.493

### Other Software

_No response_

### Steps to reproduce

1) Open Terminal
2) Open a second tab
3) Minimize Terminal
4) Right click Terminal on the taskbar and select "Close all Windows"

This _might_ be a bigger issue than just Terminal.  I recall mspaint doing this, but it doesn't anymore.  Notepad does properly reappear out of nowhere to ask me to save my work, so it does seem _possible_.

### Expected Behavior

Terminal opens and comes to foreground to present the "Do you want to close all tabs?" dialog

### Actual Behavior

Nothing happens.  Presumably the dialog shows but restoring the window closes the dialog, so I never see it.
Repository: PowerToys
Issue: Sometimes Fancy Zones not working at all
Labels: Issue-Bug,Product-FancyZones,Needs-Repro,Needs-Triage,Needs-Team-Response

### Microsoft PowerToys version

0.56.1

### Running as admin

- [X] Yes

### Area(s) with issue?

FancyZones

### Steps to reproduce

Sometimes after long sessions on my pc (like 8hours )

### ✔️ Expected Behavior

Fancy zones should work alaways if activated LOL

### ❌ Actual Behavior

Sometimes just out of nowhere fancy zones doesn't work anymore, then i have to start the power toys settings and disable and reenable then it works again.
i don't know how to explain more ut does just happen sometimes out of nowhere.

### Other Software

_No response_
Repository: pytorch
Issue: Add optional log_scale argument for torch.distributions.Normal
Labels: module: distributions,triaged

### 🚀 The feature, motivation and pitch

Currently our torch.distributions.Normal received scale as the stddev for normal distribution. While when computing log_prob and entropy, what we actually uses is `torch.log(self.scale)`.  In RL practice, we usually generate mean and std for a Normal distribution from a neural network and do autograd on that. Then we have to do something below. The log_std can be directly generated from a linear layer. Then we have to exp or relu to make it positive as the std. Then in log_prob and entropy we have to log it again. If we can receive log_scale as an optional param, it will improve both the efficiency and numerical stability. So I'm wondering if we can do that in normal distributions.

mean, log_std = net(x)
std = log_std.exp()
dist = torch.distributions.Normal(mean, std)
act = dist.sample()
log_prob = dist.log_prob(act)
entropy = dist.entropy()

vs

mean, log_std = net(x)
dist = torch.distributions.Normal(mean, log_scale=log_std)
act = dist.sample()
log_prob = dist.log_prob(act)
entropy = dist.entropy()

### Alternatives

_No response_

### Additional context

_No response_

cc @fritzo @neerajprad @alicanb @nikitaved
Repository: vscode
Issue: No feedback when it takes a long time to save a good-size notebook in remote scenarios.
Labels: under-discussion,notebook-serialization

I have a sample notebook in this repo: https://github.com/greazer/covid-19-data in SampleNbsAndScripts called myanalysis_plotly.ipynb.

1. Open that notebook in a remote scenario (vscode-server). I was using an Azure ML compute, but I believe using an SSH remote connection will repro.
2. Make a minor change to the first cell.
3. Save the ipynb file. 

In my case, it could take 50s for the save to occur. A second save sometimes seemed faster, but not by much. Clearing the outputs of the cells greatly reduces that time. BUT...

- During that 50 seconds, I have no feedback as to what's happening. 
- Should it really take 50 seconds in a remote scenario? I mean the notebooks is loaded and running on the remote compute. AFAIK, there's no data uploading from my local machine that should be occurring.
Repository: pytorch
Issue: Add a section in DDP tutorial to explain why DDP sometimes is slower than local training and how to improve it
Labels: oncall: distributed,triaged,module: ddp

### 📚 The doc issue

Add a section in DDP tutorial to explain why DDP sometimes is slower than local training and how to improve it

### Suggest a potential alternative/fix

_No response_

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang
Repository: pytorch
Issue: Report DDP efficiency metric to users and guide them for setting up DDP correctly
Labels: high priority,triage review,oncall: distributed,triaged

### 🚀 The feature, motivation and pitch

Report DDP efficiency metric to users and guide them for setting up DDP correctly

### Alternatives

_No response_

### Additional context

_No response_

cc @ezyang @gchanan @zou3519 @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang
Repository: PowerToys
Issue: The problem with keyboard shortcut hints.
Labels: Issue-Bug,Product-Shortcut Guide,Needs-Repro

### Microsoft PowerToys version

0.56.1

### Running as admin

- [ ] Yes

### Area(s) with issue?

Shortcut Guide

### Steps to reproduce

1. Disable Keyboard Shortcut Suggestions.
2. Activate suggestions by holding down the Win key.

This doesn't always work.

![Tyt1Bv4CFJ](https://user-images.githubusercontent.com/73221647/156246500-744bb35c-ae7b-43c6-8431-e98a782d3e59.gif)



### ✔️ Expected Behavior

_No response_

### ❌ Actual Behavior

_No response_

### Other Software

_No response_