sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: storybook
Issue: [Bug] Selected Theme is not applied to docs page when using `inline:false`
Labels: bug,help wanted,block: source,sev:S3

### Describe the bug

The correct class name is not applied in the docs page when using `inline:false` to have an iframe per block.

### Steps to reproduce the behavior

I setup the decorator as follow:
```
export const decorators = [
  withThemeByClassName({
    themes: {
      light: 'light',
      dark: 'dark',
    },
    defaultTheme: 'light',
    parentSelector: 'body',
  }),
];
```

Then I create a story with the docs parameter setting inline to false:
```
parameters: {
    docs: {
      story: { inline: false }, // render the story in an iframe
    },
 },
```

### Expected behavior

The body element on the docs page has the `dark` css class, when the dark theme is selected. The body element has the `light` css class, when the light theme is selected. At the moment always the defaultTheme class is applied.

Or in other words:
In html one sees the doc iframe with passed style,
`iframe.html?globals=theme:dark&viewMode=docs&id=starratingcomponent--docs`
but this style is then not further passed to the story.
`iframe.html?viewMode=story&id=starratingcomponent--zero-rating-no-rating-text`



### Environment
- Storybook 7.2.2
- @storybook/addon-styling 1.3.6
Repository: next.js
Issue: Suspense boundary behavior for transitions, initial load, and non suspending components.
Labels: bug,Navigation

### 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.6.0: Wed Jul  5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000
    Binaries:
      Node: 18.16.0
      npm: 9.5.1
      Yarn: N/A
      pnpm: 8.6.12
    Relevant Packages:
      next: 13.4.14-canary.2
      eslint-config-next: 13.4.13
      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, Routing (next/router, next/navigation, next/link)

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/ryanto/next-13-suspense-transition

### To Reproduce

The reproduction app contains a `/route1` page that renders a server component in a suspense boundary. When visiting `/route1` directly, the suspense boundary is not shown. However, when transitioning to `/route1` (using `<Link>`), the suspense boundary gets rendered.

1. Visit /route1 directly, reload a few times, no suspense boundary shown.
2. Visit /, and click to the link to /route1. Suspense boundaries are shown.


### Describe the Bug

It seems that a non-suspending component can trigger a suspense boundary during a transition, but not an initial render.

```jsx
async function Page() {
  return (
    <Suspense fallback={<div>Shown for transitions, not initial load</div>}>
      <ServerComponent />
    </Suspense>
  );
}

async function ServerComponent() {
  return <div>I dont suspend</div>;
}
```

This behavior surprised me because I thought the boundary should not be shown when transitioning, but I might be misunderstanding something.

Also, the same behavior happens when awaiting an already resolved promise (suspend boundary is not shown on the initial render, but shown for a transition).

### Expected Behavior

I'm not sure- but I was expecting the suspense boundaries to not be shown.

### Which browser are you using? (if relevant)

Version 1.56.20 Chromium: 115.0.5790.171 (Official Build) (arm64)

### How are you deploying your application? (if relevant)

_No response_
Repository: rust
Issue: Type alias can't access enum variants if the enum is a type parameter default
Labels: T-compiler,A-inference,C-bug,T-types

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

Given an enum and type alias like so:
```rust
type A<T = E> = T;

enum E {
    
    V
    
}
```

I would expect `A::V`, `A::<>::V` and possibly `A::<_>::V` to refer to `E::V`.

However, these all generate the same error message:
```
error[E0599]: no associated item named `V` found for type `_` in the current scope
 --> src/main.rs:2:25
  |
2 |     println!("{:?}", A::V);
  |                         ^ associated item not found in `_`
```

Note that specifying `T` explicitly (e.g. `A::<E>::V`) works as expected.

### Meta
`rustc --version --verbose`:
```
rustc 1.71.1 (eb26296b5 2023-08-03)
binary: rustc
commit-hash: eb26296b556cef10fb713a38f3d16b9886080f26
commit-date: 2023-08-03
host: x86_64-pc-windows-msvc
release: 1.71.1
LLVM version: 16.0.5
```
I also got the same behavior on stable, beta and nightly in the [playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=640189870316de9ff990bd24c4ef29fd).

</p>
</details>
Repository: pytorch
Issue: I want to calculate the matrix multiplication of two Boolean matrices, but torch.mm will report an error. Is there any more efficient alternative?
Labels: triaged,module: boolean tensor

### 🚀 The feature, motivation and pitch

I want to calculate the multiplication of two Boolean matrices, but torch.mm will report an error. Is there any more efficient alternative?

### Alternatives

_No response_

### Additional context

_No response_
Repository: rust
Issue: `std::process::Command::env_clear` is unusable on Windows
Labels: O-windows,T-libs-api,A-process

Followed from the [issue](https://github.com/rust-lang/rust/issues/31259) that was closed without an actual solution.

# Problem

Windows requires some system envs in order to work and be able to run most of the programs and services. Without them they will fail like mentioned [here](https://travis-ci.community/t/socket-the-requested-service-provider-could-not-be-loaded-or-initialized/1127)

# Possible solution

As described in [comments to previous issue](https://github.com/rust-lang/rust/issues/31259#issuecomment-298684889) rust std could provide that system required envs in order to make `env_clear` more usable as it has done in [libuv](https://github.com/libuv/libuv/blob/76da68ea04b9ceebfa428b30f62c2fdd592c43dd/src/win/process.c#L661-L676) and [go](https://go-review.googlesource.com/c/go/+/174318/4/src/os/exec/exec.go#780)
Repository: go
Issue: x/pkgsite: navigating to elements with anchors breaks depending on page width
Labels: pkgsite

### What is the URL of the page with the issue?

I first noticed it with, https://pkg.go.dev/bufio#Scanner, but quick check shows the same behaviour with any module and any symbol.

### What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36

### Screenshot

About 1000 pixels wide, opening the url shows content just below the anchor:

![SCR-20230811-lvyk](https://github.com/golang/go/assets/187738/86a8fa82-5580-460c-aebb-744b0c6538ad)

And a narrower window just goes to the top of the page:

![SCR-20230811-lwat](https://github.com/golang/go/assets/187738/142b6a98-cf9a-4c65-9d68-c2ca3a01a659)

### What did you do?

just tried navigating to symbol documentation with narrow enough window. I think navigation starts to break down when window is narrow enough that left hand side menu is collapsed.

Incognito mode makes no difference.

### What did you expect to see?

![SCR-20230811-lvvb](https://github.com/golang/go/assets/187738/541be205-992f-4c5f-819d-aae7c180615f)

### What did you see instead?

See the screenshots above.
Repository: godot
Issue: Calling PhysicsServer2D body_test_motion multiple times a frame produces unreliable results
Labels: bug,topic:physics,topic:2d

### Godot version

v4.1.stable.official [970459615]

### System information

Windows 10

### Issue description

When testing a bunch of simple circular collisions with body_test_motion the results are somewhat correct up until an amount of collisions but quickly become unreliable. They're sometimes slightly more correct if the motion is non-zero but still very wrong.

The setup is 50 small circles arranged in a circle and a while loop gathering all the collisions the body_test_motion returns true for against a larger circle. Each iteration of the loop adds the previous hit to an exclusions array which is used to get a new collision next time. The use case is getting a list of every physics body that is colliding with the test shape in any given frame.

I've yet to find any combination of settings that make the result consistently accurate and body_test_motion doesn't return more than one collision at a time. It's not in the MRP but I've also tested using a convex polygon instead of a circle and the results are more consistent but still wrong.

By comparison using PhysicsDirectSpaceState2D's intersect_shape function works perfectly fine including motion. If the code to test collisions exists and works I can't see why body_test_motion would have such unreliable results.

I made a similar MRP for 3.5 stable and had similar results with body_test_motion so I assume it's the same issue.

### Steps to reproduce

I've attached an MRP but this video of it is a decent visual example.

https://github.com/godotengine/godot/assets/3820082/edb2ac61-16ff-4369-9818-0b3a51a10952



### Minimal reproduction project

[test-motion-mrp.zip](https://github.com/godotengine/godot/files/12323843/test-motion-mrp.zip)
Repository: deno
Issue: Deno panic in stdout.write in REPL when writing non-utf8 byte sequences
Labels: bug,windows,runtime

In scripts if you run `await Deno.stdout.write(new Uint8Array([128]));`, an error throws in JS, but if you do it in the REPL, it panics.
Repository: vscode
Issue: Editor Playground
Labels: bug,interactive-playground

Type: <b>Bug</b>

I'm reviewing the features in the Editor Playground. In the "Errors and Warnings" section, there are no "suiggles" highlighting errors and warnings in the sample code. F8 does not navigate through the code either. It could be my native settings, but this is a brand new install of VS Code, and I haven't configured any custom settings.

VS Code version: Code 1.81.1 (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:22:42.175Z)
OS version: Windows_NT x64 10.0.22621
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|12th Gen Intel(R) Core(TM) i9-12900H (20 x 2918)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled|
|Load (avg)|undefined|
|Memory (System)|31.62GB (16.15GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|
</details>Extensions: none<details>
<summary>A/B Experiments</summary>


```
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263:30335439
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263cf:30792227
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30803844
3biah626:30602489
89544117:30613380
2i9eh265:30646982
showlangstatbar:30737416
vsctsb:30748421
03d35959:30757346
pythonfmttext:30731395
pythoncmvfstrcf:30756944
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
gsofa:30804715
pythonnosmt12:30797651
pythonidxptcf:30805731
pythonnoceb:30805159
dsvsc013:30795093
dsvsc014:30804076

```
</details>
<img width="443" alt="VS Code Errors and Highlighting" src="https://github.com/microsoft/vscode/assets/80650528/54cd917d-2585-4ebf-929d-9396b98ed2d5">


<!-- generated by issue reporter -->
Repository: ollama
Issue: Model import/export
Labels: feature request

When using large models like Llama2:70b, the download files are quite big.
As a user with multiple local systems, having to `ollama pull` on every device means that much more bandwidth and time spent.
It would be great if we could download the model once and then export/import it to other ollama clients in the office without pulling it from the internet.

Example:
On the first device, we would do:

`ollama pull llama2:70b`

`ollama export llama2:70b /Volumes/MyUSB/llama2_70b-local.ollama_model` 



Then we would take MyUSB over to another device and do:

`ollama import /Volumes/MyUSB/llama2_70b-local.ollama_model` 

`ollama run llama2:local-70b` or `ollama run llama2-local:70b` or even just `ollama run llama2_70b-local`

I'm obviously not sure about the naming structure here, but I hope I've conveyed the problem and thought process.

Thanks for the fantastic project!
Repository: vscode
Issue: [docs] Add `isComposing` to list of `when` keys in docs
Labels: feature-request,context-keys

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

Would be great to add `isComposing` to https://code.visualstudio.com/api/references/when-clause-contexts. I am guessing I understand what it means, but better to know for sure from docs.

Thanks!
Repository: bitcoin
Issue: getJsonToken assumes underlying string is null-terminated but requires end pointer
Labels: Utils/log/libs

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current behaviour

When a function requires a `const char *end`, one might assume that the string doesn't need to be null terminated. `getJsonToken` requires this parameter:
```
enum jtokentype getJsonToken(std::string& tokenVal, unsigned int& consumed,
                            const char *raw, const char *end)
```

However, the function does assume that the underlying memory block is null-terminated as is visible here:
```
        if (!strncmp(raw, "null", 4)) {
            //...
        } else if (!strncmp(raw, "true", 4)) {
            //...
        } else if (!strncmp(raw, "false", 5)) {
            //...
```
and here:
```
if ((*firstDigit == '0') && json_isdigit(firstDigit[1]))
```
and possibly others.

If the string isn't null terminated, then we run risk of reading uninitialized memory, which could lead to a crash.

In practice this currently does not seem to lead to any issues, as all usages that I could find used underlying null-terminated blocks. It is however an uncomfortable pitfall for future development.

### Expected behaviour

The function should either make sure to never access anything beyond or at the end pointer, or should document this requirement properly.

### Steps to reproduce

```
char innocentChar = 'n';
getJsonToken(/*...*/, &innocentChar, (&innocentChar) + 1);
```

### Relevant log output

_No response_

### How did you obtain Bitcoin Core

Other

### What version of Bitcoin Core are you using?

master@3654d84

### Operating system and version

Common code issue, os irrelevant

### Machine specifications

_No response_
Repository: flutter
Issue: Linux shell/embedder do not shutdown Dart root isolate when exiting
Labels: engine,platform-linux,a: desktop,P3,team-linux,triaged-linux

### 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 base project with `flutter create --platform=linux`
2. Run the app
3. Close the application by closing button of the window

(This works also when calling `SystemNavigator.pop()`

### Expected results

Window is properly detached from flutter view and root isolate is properly shut down.

### Actual results

GTK runloop (`g_application_run` in `main.cc` of standard linux embedder of application)  returns directly and the process exits immediately without the window to be properly detached.

Sometimes, this causes an abort before process exit and this is considered as an abnormal exit of the program.

### Code sample

This is reproducible using template project created with `flutter create`.

### Screenshots or Video

_No response_

### Logs

_No response_

### Flutter Doctor output

[✓] Flutter (Channel stable, 3.10.6, on Arch Linux 6.4.8-arch1-1, locale en_US.UTF-8)
    • Flutter version 3.10.6 on channel stable at /opt/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f468f3366c (4 weeks ago), 2023-07-12 15:19:05 -0700
    • Engine revision cdbeda788a
    • Dart version 3.0.6
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /opt/android-sdk/
    • Platform android-33, build-tools 33.0.2
    • ANDROID_HOME = /opt/android-sdk
    • Java binary at: /opt/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = chromium

[✓] Linux toolchain - develop for Linux desktop
    • clang version 15.0.7
    • cmake version 3.27.1
    • ninja version 1.11.1
    • pkg-config version 1.8.1

[✓] Android Studio (version 2022.2)
    • Android Studio at /opt/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] Connected device (3 available)
    • Pixel 7 (mobile) • 29261FDH2000H5 • android-arm64  • Android 13 (API 33)
    • Linux (desktop)  • linux          • linux-x64      • Arch Linux 6.4.8-arch1-1
    • Chrome (web)     • chrome         • web-javascript • Chromium 115.0.5790.170 Arch Linux

[✓] Network resources
    • All expected network resources are available.

• No issues found!
Repository: TypeScript
Issue: Incorrectly reported `TS2322` error on array items after spread
Labels: Bug,Help Wanted

### 🔎 Search Terms

"array spread", "TS2322"

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about 

### ⏯ Playground Link

https://www.typescriptlang.org/play?#code/MYewdgzgLgBAhgLhgQQE6rgTwDxgK4C2ARgKaowA+M0qAlmAOYB8MAvDANoC6A3AFChIsIkjQYc+YmRbsOAOgVwANDACMvIA

### 💻 Code

```ts
const a: Array<number | string> = [];
const b: Array<number> = [...a, 1];
```


### 🙁 Actual behavior

The compiler gives the following two errors, of which only one is appropriate:
```
~/prog/typescript ❯ tsc ./array-spread-error.ts
array-spread-error.ts:2:27 - error TS2322: Type 'string | number' is not assignable to type 'number'.
  Type 'string' is not assignable to type 'number'.

2 const b: Array<number> = [...a, 1];
                            ~~~~

array-spread-error.ts:2:33 - error TS2322: Type 'string | number' is not assignable to type 'number'.
  Type 'string' is not assignable to type 'number'.

2 const b: Array<number> = [...a, 1];
                                  ~
```

### 🙂 Expected behavior

The spread is clearly incorrect, as the original array could potentially contain strings as well, but the number literal should not be marked with the same error.
Repository: PowerToys
Issue: enhancement: allow rebinding of alt menu hotkey globally
Labels: Product-Keyboard Shortcut Manager,Needs-Triage,Needs-Team-Response

### Description of the new feature / enhancement

powertoys has some neat features so Thanks for making it. 

I use alt as a modifier for hotkeys/shortcuts, but the way it currently works requires me to hold alt to use it as a modifier. If I press it, it defaults to menu select. depending on how fast I hit the keys it will glitch out into the menu.

I have underline setting off in windows accessibility settings, and I thought that would resolve it, but it didn't.

I have tried a few methods of bypassing this, through rebinds & various macros, but all of these require changing the alt key to something else, or reducing the functionality of the alt key. (If I'm missing a perfect solution please enlighten me)

If possible could you provide a way to change this(and maybe other, similar)commands? 

It is useful that I can grab the menu with a key, I just wish I could change the binding to a key I use less frequently.

I thought I could do it with powertoys but I guess not.

cheers

### Scenario when this would be used?

its a modifier for shortcuts/macros, so pretty often.

### Supporting information

many threads regarding this dating back to 2016

https://answers.microsoft.com/en-us/windows/forum/all/i-want-to-disable-the-menu-activation-via-the-alt/6bc632fa-61ee-4b95-b1d8-b0718266c7a6

https://www.voidtools.com/forum/viewtopic.php?t=11159

https://answers.microsoft.com/en-us/msoffice/forum/all/how-to-turn-off-altkeytip/254ef99e-b1ed-4363-a1dc-2cec224dc682

from 2016 : https://answers.microsoft.com/en-us/windows/forum/all/how-to-disable-the-left-alt-key-as-the-menu-bar/8d10daec-98b1-425f-9f08-1ae0d77db231



Thanks
Repository: angular
Issue: Angular PWA and offline server
Labels: area: service-worker

### Which @angular/* package(s) are the source of the bug?

service-worker

### Is this a regression?

Yes

### Description

I utilize the PWA functionality to enable offline capabilities for my application. This involves executing the command ng add @angular/pwa. Initially, everything functions as intended. However, upon testing a scenario where the server experiences an outage or is offline, I observed that the cache storage is being cleared and the service worker is removed.

It's worth noting that there are no problems when the client is in an offline state. After investigating the ngsw-worker.js file, I identified a specific code segment responsible for triggering this cache clearance. The code is within the fetchLatestManifest function:

```
async fetchLatestManifest(ignoreOfflineError = false) {
  const res = await this.safeFetch(this.adapter.newRequest("ngsw.json?ngsw-cache-bust=" + Math.random()));
  if (!res.ok) {
    if (res.status === 404) {
      await this.deleteAllCaches();
      await this.scope.registration.unregister();
    } else if ((res.status === 503 || res.status === 504) && ignoreOfflineError) {
      return null;
    }
    throw new Error(`Manifest fetch failed! (status: ${res.status})`);
  }
  this.lastUpdateCheck = this.adapter.time;
  return res.json();
}
```

This behavior seems counterintuitive, as cache deletion shouldn't occur when the server is offline. Ideally, the service worker should cache the ngsw.json and rely on it, rather than deleting caches when the server experiences downtime. I'm seeking advice on potential solutions to this issue. Should I modify the code to resolve this problem? If so, what changes are recommended to ensure caches are retained even when the server is offline?


### Please provide a link to a minimal reproduction of the bug

_No response_

### Please provide the exception or error you saw

_No response_

### Please provide the environment you discovered this bug in (run `ng version`)

_No response_

### Anything else?

_No response_