sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: svelte
Issue: Incorrect derived type of store with optional content
Labels: types / typescript

### Describe the bug

If the content of a store is optional (e. g. is `Something | undefined`), the derived type of the store does not keep it. As a result, there is an exception in runtime, instead of error on compile/linting time.

### Reproduction

1. Add this content to a typescript file:
```ts
let myVar: Date | undefined
const myStore = writable(myVar)
$myStore.toString() // for a svelte component
get(myStore).toString() // for a plain typescript file
```
2. Check the type of `myStore` in your editor. It is `Date`. No error highlighted on `$myStore.toString()` despite it is undefined.
3. Run eslint and svelte-check. No errors reported.
4. Run the code. It fails with `TypeError: can't access property "toString", (intermediate value)(...) is undefined` exception.

Workaround: 
```ts
let myVar: Date | undefined
const myStore = writable<typeof myVar>(myVar)
```

### Logs

_No response_

### System Info

```shell
% pnpm dlx envinfo --system --npmPackages svelte,rollup,webpack --binaries --browsers
Packages: +1
+
Progress: resolved 1, reused 0, downloaded 1, added 1, done

  System:
    OS: macOS 14.4
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 42.17 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.14.0 - ~/.nvm/versions/node/v18.14.0/bin/node
    Yarn: 1.22.21 - ~/.nvm/versions/node/v18.14.0/bin/yarn
    npm: 9.3.1 - ~/.nvm/versions/node/v18.14.0/bin/npm
    pnpm: 8.15.4 - ~/.nvm/versions/node/v18.14.0/bin/pnpm
  Browsers:
    Chrome: 122.0.6261.112
    Chrome Canary: 112.0.5582.0
    Safari: 17.4
  npmPackages:
    svelte: ^4.2.12 => 4.2.12
```


### Severity

annoyance
Repository: godot
Issue: Noticable rendering errors when using a projector texture with an OmniLight. 
Labels: bug,topic:rendering,confirmed,topic:3d

### Tested versions

v4.2.1.stable.official [b09f793f5]
v4.3.dev4.official [df78c0636]

### System information

Tested on 2 seperate systems:
Godot v4.2.1.stable - Fedora Linux 39 (KDE Plasma) - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 580 Series (RADV POLARIS10) - Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz (8 Threads)

Godot v4.3.dev4 - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1660 Ti with Max-Q Design (NVIDIA; 31.0.15.5152) - AMD Ryzen 7 4800HS with Radeon Graphics (16 Threads)

### Issue description

![projector_bug_1](https://github.com/godotengine/godot/assets/781121/430deecc-2649-4174-a6a9-5db2038ab372)

![projector_bug_2](https://github.com/godotengine/godot/assets/781121/df44e9a2-8aab-48f1-9ba2-e899141705fd)
The same thing happens when I use a pure white texture for the projection.
Both Forward+ and Mobile are affected.

MRP Screenshot:
![Screenshot_20240313_192632](https://github.com/godotengine/godot/assets/781121/b74768f0-41bd-41c6-b27f-7d12e39519e4)

### Steps to reproduce

1. Open the MRP
2. Open the main.tscn scene if godot doesn't open it on load.
3. Select the OmniLight node and switch between the two different projector textures provided.
4. Observe results, using the 8x8 white.png texture results in bigger rendering errors.

### Minimal reproduction project (MRP)

[projector_bug.zip](https://github.com/godotengine/godot/files/14591961/projector_bug.zip)
Repository: next.js
Issue: The icon does not appear on the home screen PWA app within startup
Labels: bug

### Link to the code that reproduces this issue

https://github.com/uigywnkiub/diet-me/blob/main/app/layout.tsx

### To Reproduce

In metadata object the startupImage key does not work. By the way, other keys are works.

appleWebApp: {
    capable: true,
    statusBarStyle: "black-translucent",
    title: "test title",
    **startupImage: {
      url: "/icons/apple-touch-icon.png",
    },**
  },
  

### Current vs. Expected behavior

**Current**: I open my bookmark site app from Home Screen but I see only a white screen without any icon.
**Expected**: After adding the image URL it must be as an icon when app openning

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 21.6.0: Mon Feb 19 20:24:34 PST 2024; root:xnu-8020.240.18.707.4~1/RELEASE_X86_64
Binaries:
  Node: 20.10.0
  npm: 10.2.3
  Yarn: 1.22.21
  pnpm: N/A
Relevant Packages:
  next: 14.1.2
  eslint-config-next: 14.1.2
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

App Router

### Which stage(s) are affected? (Select all that apply)

next dev (local)

### Additional context

I use [next-pwa](https://ducanh-next-pwa.vercel.app/) to create PWA behavior and test it from my iPhone 12 mini on IOS 17.4 from localhost network.
Repository: go
Issue: x/tools/gopls: extract function on `if err != nil` is unidiomatic 
Labels: gopls,Tools,Refactoring

### gopls version

golang.org/x/tools/gopls v0.15.2

### go env

```shell
.
```


### What did you do?

Perform extract function code action on the block enclosed by `// selection start` and `// selection end`
```go
func F() error {
	// selection start
	a, err := json.Marshal(0)
	if err != nil {
		return fmt.Errorf("1: %w", err)
	}
	b, err := json.Marshal(0)
	if err != nil {
		return fmt.Errorf("2: %w", err)
	}
	// selection end
	fmt.Println(a, b)
	return nil
}

```

### What did you see happen?

```go
func F() error {
	// selection start
	a, b, shouldReturn, returnValue := newFunction()
	if shouldReturn {
		return returnValue
	}
	// selection end
	fmt.Println(a, b)
	return nil
}

func newFunction() ([]byte, []byte, bool, error) {
	a, err := json.Marshal(0)
	if err != nil {
		return nil, nil, true, fmt.Errorf("2: %w", err)
	}
	b, err := json.Marshal(0)
	if err != nil {
		return nil, nil, true, fmt.Errorf("2: %w", err)
	}
	return a, b, false, nil
}
```

### What did you expect to see?

```go
func F() error {
	// selection start
	a, b, err := newFunction()
	if err != nil {
		return err
	}
	// selection end
	fmt.Println(a, b)
	return nil
}

func newFunction() ([]byte, []byte, error) {
	a, err := json.Marshal(0)
	if err != nil {
		return nil, nil, fmt.Errorf("2: %w", err)
	}
	b, err := json.Marshal(0)
	if err != nil {
		return nil, nil, fmt.Errorf("2: %w", err)
	}
	return a, b, nil
}
```

The heuristic is to special case when every return statement in selection is an error handling return.

The detailed heuristic:

Let f be the function in scope which has an error return value as the last return value. special case if every return statement is of the form `return zeros..., expr`, where `expr` is known to be non-nil. In this case the modified call site is `values..., err := newFunction(...); if err != nil { return zeros..., err }`, and the extracted function should add a `return values..., nil` at the end.

This refactor would return the same value as before, because when it does return, the value is correct, and when it does not return, the `if err != nil` would ensure that return return statement is not executed.

### Editor and settings

_No response_

### Logs

_No response_
Repository: vscode
Issue: Unable to update VS Code if authentication is previously canceled
Labels: bug,install-update,macos

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.88 Insiders / 1.87 Stable
- OS Version: MacOS

Steps to Reproduce:

1. Start VS Code
2. Let it automatically check for update
3. When the MacOS authentication window is displayed, cancel it
4. In VS Code, try checking for update, using the `Check for Updates...` command
5. The Gear icon receives a progress badge and the `Check for Updates...` item changes to _(disabled)_ `Downloading Update`  because it should be downloading the update
6. But, the update will get stuck, with no feedback

Looking at `Developer Tools`, I didn't noticed any error in `Console`. 

On the other hand, if I properly authenticate in the MacOS window in the first place, or if I run the `Check for Updates` myself right after VS Code starts, and authenticate, the update occurs perfectly. Both in stable and insiders release.

Thank you
Repository: angular
Issue: Button doesn't display in component
Labels: help wanted,good first issue,P3,area: docs

### Which @angular/* package(s) are the source of the bug?

common, Don't known / other

### Is this a regression?

Yes

### Description

I am following the instructions for the housing tutorial.
I got to the end of lesson 3 but there are important differences between what I see in the browser and what I should be seeing. 

1. The button that is supposed to be in the home component doesn't show at all
2. There is supposed to be a border around the input box but that also doesn't show.

The same result in edge, firefox and chrome
![angular_screen](https://github.com/angular/angular/assets/10349413/266ca9cb-195c-43f4-ab17-3d05e81e9c46)


### Please provide a link to a minimal reproduction of the bug

Install versions as below. Follow instructions to the end of part 3.

### Please provide the exception or error you saw

```true
1. The button that is supposed to be in the home component doesn't show at all
2. There is supposed to be a border around the input box but that also doesn't show.
```


### Please provide the environment you discovered this bug in (run `ng version`)

```true
Node v20.11.0
Angular cli 17.2.3
Schematics/Angular 17.2.3
Typescript 5.3.3
```


### Anything else?

_No response_
Repository: flutter
Issue: [go_router] onExit doesn't inform of navigation type
Labels: c: new feature,package,c: proposal,P2,p: go_router,team-go_router,triaged-go_router

### Use case

Hi,
When using the onExit feature it would be useful to know what type of navigation is taking place (forwards/backwards, go/push/pop, etc).

We're looking at a use case whereby we want to intercept the back functionality of the browser but any forward or push/go functionality is ignored.

### Proposal

Some way of accessing this information.  Either through another parameter to onExit or something attached to the context that is passed to onExit currently.
Repository: storybook
Issue: [Bug]: Syntax highlighting breaks due to multiple version of mdx-js/react in Storybook v7 using `legacyMdx1`
Labels: bug,help wanted,mdx,block: source

### Describe the bug

First of all, thank you for this plugin. It simplifies a lot of issues with building a centralised component library.

I recently upgraded storybook to v7 and opted for the legacy `mdx@1` version using `mdx1-csf` plugin as I wanted to first push the major updates on priority and want to avoid massive number of file changes when moving to mdx2.

This broke the syntax highlighting of code snippets. On digging further, I found out that `mdx1-csf` installs v1 version of `mdx-js/react` while `@storybook/addon-docs` v7 part of `@storybook/addon-essentials` is adding `mdx-js/react` v2 in the dependencies. Due to this conflicting version, the syntax highlighting seems to be breaking.

Is there a way to work around this without setting a module resolution?

<img width="507" alt="Screenshot 2024-03-13 at 5 26 38 PM" src="https://github.com/storybookjs/storybook/assets/19742306/064602dc-3e0e-41b4-9cdc-0ed343783e67">


### To Reproduce

Upgrade storybook to v7 using the `legacyMdx1` boolean set to `true` in `./storybook/main.js`. Create a sample `.stories.mdx` file with code snippet added and run the dev server.



### System

```bash
System:
    OS: macOS 14.3.1
    CPU: (12) arm64 Apple M3 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
    Yarn: 1.22.17 - ~/node_modules/.bin/yarn <----- active
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
  Browsers:
    Chrome: 122.0.6261.129
    Safari: 17.3.1
```


### Additional context

_No response_
Repository: PowerToys
Issue: Make it possible to use FancyZones only for specific apps and windows
Labels: Needs-Triage

### Description of the new feature / enhancement

I think many people need the functionality of FancyZones only for a few apps, so instead of making a huge list of excluded apps, alternatively it would be great to have the possibility to make a short list of included apps and windows by their titles with a possibility of using something like RegEx, for example:

App1
App2: "App2WindowType1 -\*", "App2WindowType2 -\*"

So, FancyZones would apply to all windows of App1, but only to windows of App2 with titles like "App2WindowType1 - Some Other Text" and "App2WindowType2 - Some Other Text". All the other windows of App2, including the main window, would not interact with the FancyZones.

### Scenario when this would be used?

It would be very useful for people who work with multi-windows software, for example, professional poker players, who often play at more than 6 tables simultaneously. This means they have opened at least one poker room lobby (there's no need to use FancyZones for it) and 6+ windows of poker tables (it's useful to use FancyZones for them).

### Supporting information

There is one software for poker players called "StarsCaption" which has similar functionality and an interesting realization of picking types of windows (it is called "Table types") with which it should work. Here's a link to a manual, maybe it'll be interesting:
https://sites.google.com/site/starscaption/table-manager-2?authuser=0#h.f9kpr9yphosf
Repository: pytorch
Issue: DISABLED test_autocast_rnn (__main__.TestCuda)
Labels: module: cuda,module: rocm,triaged,module: flaky-tests,skipped

Platforms: rocm

This test was disabled because it is failing in CI. See [recent examples](https://hud.pytorch.org/flakytest?name=test_autocast_rnn&suite=TestCuda&limit=100) and the most recent trunk [workflow logs](https://github.com/pytorch/pytorch/runs/22598123837).

Over the past 3 hours, it has been determined flaky in 2 workflow(s) with 2 failures and 2 successes.

**Debugging instructions (after clicking on the recent samples link):**
DO NOT ASSUME THINGS ARE OKAY IF THE CI IS GREEN. We now shield flaky tests from developers so CI will thus be green but it will be harder to parse the logs.
To find relevant log snippets:
1. Click on the workflow logs linked above
2. Click on the Test step of the job so that it is expanded. Otherwise, the grepping will not work.
3. Grep for `test_autocast_rnn`
4. There should be several instances run (as flaky tests are rerun in CI) from which you can study the logs.


Test file path: `test_cuda.py`

cc @ptrblck @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang @clee2000
Repository: vscode
Issue: Support controlling whether edits are pre-ticked in WorkspaceEdits with needsConfirmation=true
Labels: feature-request,ux,workspace-edit

It's sometimes useful to force the user to review a preview of refactor changes before applying. This can be done with `needsConfirmation`:

```ts
const edit = new vscode.WorkspaceEdit();
const doc = await vscode.workspace.openTextDocument({ language: "text", content: "" });
edit.insert(doc.uri, new vscode.Position(0, 0), "This is inserted text", {
	label: "Insert imports",
	needsConfirmation: true, // Show preview, but also requires ticking
});
edit.insert(doc.uri, new vscode.Position(0, 0), "This is inserted text", {
	label: "Update code",
	needsConfirmation: true, // Show preview, but also requires ticking
});
vscode.workspace.applyEdit(edit);
```

![image](https://github.com/microsoft/vscode/assets/1078012/b71cc538-2c66-4de2-ab26-98f43bd051b5)

However, the user needs to tick each change (at least the unique labels, which have a "Toggle Change" option on the context menu) which can be a pain if the edit is making a lot of changes that are grouped (for example fixing lint failures across a workspace, with each lint being a group).

It would be a much nicer experience if we could trigger the preview, but with everything _ticked_ by default. In many cases we know the user is _likely_ to apply all of the changes, but we still want to trigger a preview to be shown.
Repository: vscode
Issue: Refactor preview is missing checkboxes on groups
Labels: feature-request,tree-widget,editor-refactor-preview

When viewing these changes grouped, there's no checkbox on the top level, even though you can toggle it with space/context menu:


https://github.com/microsoft/vscode/assets/1078012/a93b5f34-cfd5-412d-b48b-d0a2c13a84c6
Repository: vscode
Issue: Allow WorkspaceEditMetadata to control whether changes are grouped by label by default
Labels: feature-request,workspace-edit

Using `WorkspaceEditEntryMetadata` (to set `needsConfirmation`) _requires_ setting a string label on the changes, but by default these labels are not visible in the UI. You have to explicitly toggle on grouping:

https://github.com/microsoft/vscode/assets/1078012/d792a85b-055e-473e-b6fd-9c1613fd6bd5

It would be nice if we could set the default behaviour on the `WorkspaceMetadata` because some kinds of edits are much better grouped together (for example fixing multiple lints in a single action, grouped by lint name).

VS Code's LSP client is already telling servers that changes will be grouped (although the spec is a bit vague about whether this is default or just an option):

https://github.com/microsoft/vscode-languageserver-node/blob/691fd5d3fabeed5ed8ff9c3608f2d306cb07717e/client/src/common/client.ts#L1837
Repository: godot
Issue: Images imported with WebP enabled editor build fail loading with confusing error in export template with `module_webp_enabled=no`
Labels: bug,topic:core,documentation

### Tested versions

Reproducible in: [master](https://github.com/godotengine/godot/commit/61282068f4d59cb48f35ad95391728c58d9008ab), [4.2 branch](2a8c429fcc19b042aaf43a51060c571d42ca2e39), [4.2.1-sable](https://github.com/godotengine/godot/tree/4.2.1-stable)

### Notes

1. I built the 4.2.1 with many other disabled options so I am not so sure about it
2. When I exported the projects I used standard 4.2.1-stable editor because it just packs `.pck` file and place it near the pre-compiled export template...?
3. Tested with and without SCU
4. Tested with mold and partially with default gcc linker

### System information

Godot v4.2.1.stable - Debian GNU/Linux testing (gcc12) - Wayland - GLES3 (Compatibility)

### Issue description

Compiling export_template with `module_webp_enabled="no"` doesn't throw any compilation errors but when I try to export project that use svg it suddenly crash with following erros:

```error
ERROR: Condition "img.is_null() || img->is_empty()" is true. Returning: Ref<Image>()
   at: load_image_from_file (./scene/resources/compressed_texture.cpp:344)
ERROR: Failed loading resource: res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:277)
ERROR: Failed loading resource: res://icon.svg. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:277)
ERROR: Can't load dependency: res://icon.svg.
   at: parse_variant (./core/io/resource_format_binary.cpp:459)
ERROR: Error when trying to parse Variant.
   at: parse_variant (./core/io/resource_format_binary.cpp:503)
ERROR: Error when trying to parse Variant.
   at: parse_variant (./core/io/resource_format_binary.cpp:490)
ERROR: Failed loading resource: res://.godot/exported/133200997/export-523cfd0014c18c3c941ab60c4947535f-icon.scn. Make sure resources have been imported by opening the project in the editor at least once.
   at: _load (./core/io/resource_loader.cpp:277)
ERROR: Failed loading scene: res://icon.tscn.
   at: start (main/main.cpp:3800)
```

### Steps to reproduce

Compile export template with `module_webp_enabled="no"` and export project that use svg

### Minimal reproduction project (MRP)

### Project for export:

1. Create new project
2. Drag default godot svg icon to create new scene from this icon

### `custom.py` script:

```python
target="template_release"
debug_symbols="no"
lto="full"

linker="mold"

platform="linuxbsd"
arch="x86_64"

module_webp_enabled="no"
```
Repository: storybook
Issue: [Bug]: Didn't find 'checkboxgroup--checkbox-group-arg-data' in CSF file, this is unexpected
Labels: bug,needs triage

### Describe the bug

After migrating to storybook 7 in React Native the error **Didn't find 'checkboxgroup--checkbox-group-arg-data' in CSF file, this is unexpected** appears 

```
import { CheckboxGroup } from './index';
import { Meta, StoryObj } from '@storybook/react';
import { currentInboundQueues } from './index.fixtures';
import type { CheckboxGroupProps } from './index.types';

const meta: Meta<typeof CheckboxGroup> = {
  component: CheckboxGroup,
  includeStories: ['DefaultStory'],
  excludeStories: ['CheckboxGroupArgData'],
};

export default meta;

type Story = StoryObj<typeof CheckboxGroup>;

export const CheckboxGroupArgData: CheckboxGroupProps = {
  label: 'Inbound Queues',
  items: currentInboundQueues,
};

export const DefaultStory: Story = {
  args: CheckboxGroupArgData,
};
```

### To Reproduce

_No response_

### System

_No response_

### Additional context

_No response_
Repository: ui
Issue: [Bug] Tooltip opening on click on touch device 
Labels: bug

### Describe the bug

`<Tooltip />` and `<Hovercard />` are opening on click on touch device, they shouldn't...

If you use https://www.radix-ui.com/primitives/docs/components/tooltip , the tooltip does not open on click on touch devices.

After some investigation this is caused by the animation set on `<TooltipPrimitive.Content>` 

```animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2```

If you remove the animation it works as expected... I didn't find a better fix though

### Affected component/components

Tooltip, Hovercard

### How to reproduce

1. Open https://ui.shadcn.com/docs/components/tooltip
2. Open dev tools, choose any mobile device to emulate touch event
3. Click on the button "Hover" , the tooltip shows up 

### Codesandbox/StackBlitz link

https://ui.shadcn.com/docs/components/tooltip

### Logs

_No response_

### System Info

```bash
Chrome / Firefox on Windows
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues