sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: Router issue
Labels: examples

### 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 23.1.0: Mon Oct  9 21:28:12 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T8103
Binaries:
  Node: 18.17.1
  npm: 9.6.7
  Yarn: 1.22.21
  pnpm: 8.7.6
Relevant Packages:
  next: 14.0.3
  eslint-config-next: 14.0.3
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.2
Next.js Config:
  output: N/A
```


### Which example does this report relate to?

app router

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

_No response_

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

_No response_

### Describe the Bug

There is 1 route with 2 different query params:

`http://localhost:3000/games?activeTab=trendy`
`http://localhost:3000/games?activeTab=all`

only `activeTab` is different, activeTab is managed by `Link` and query params are read trough `searchParams` as prop on page server component

when user is on `http://localhost:3000/games?activeTab=trendy` and refresh the page initially `trendy` is passed as query param but second later is changes to `all` automatically so basically after every refresh all is opened

Why is happening that what could cause such a behaviour

### Expected Behavior

Not changing query params and stick to the one that is used when app is opened

### To Reproduce

```
import Link from 'next/link';

const tabs = ['top', 'trending', 'new', 'all'];

interface TrendsTableTabsProps {
  activeTab: string;
}

function TrendsTableTabs({ activeTab }: TrendsTableTabsProps) {
  return (
    <div className='flex gap-[9px]'>
      {tabs.map((tab) => (
        <TabItem key={tab} tab={tab} activeTab={activeTab} />
      ))}
    </div>
  );
}

interface TabItemProps {
  tab: string;
  activeTab: string;
}

function TabItem({ tab, activeTab }: TabItemProps) {
  return (
    <div
      key={tab}
      className={`flex h-[45px] w-[102px] items-center justify-center gap-2 rounded-lg border bg-zinc-900 text-zinc-400 ${
        activeTab === tab ? 'border-sky-500' : 'border-neutral-800'
      }`}
    >
      <Link
        href={`?activeTab=${tab}`}
        className='h-full flex-1 pt-2 text-center align-middle capitalize'
        scroll={false}
        prefetch={false}
      >
        {tab}
      </Link>
    </div>
  );
}

export default TrendsTableTabs;

```

import it somewhere, navigate between different tabs and refresh the page `all` is being triggered all the time
Repository: ollama
Issue: Override SYSTEM parameter by commandline
Labels: feature request

According to the [documentation](https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md), the only way to change the SYSTEM is to create a new model with modelfile using an existing LLM model already downloaded as template:

`ollama create choose-a-model-name -f <location of the file e.g. ./Modelfile>'`

But this will copy and duplicate the model file (often bigger than 20 GB)

But using oTerm is possible to change the SYSTEM, please refer to this screenshot for visual reference:
![image](https://github.com/jmorganca/ollama/assets/18162107/42d7b3b6-3e3c-46f1-859d-29755e97ef2a)

REQUEST:
**Please add the --system command line to force system, example usage:**
ollama run codeup:13b-llama2-chat-q4_K_M --verbose **--system** "Roleplay as Matrix movie operator before answering the question." "Write Python code to loop for 1 to 10"
Repository: kubernetes
Issue: "/dev/termination-log must have noexec so unpriviledged user cannot exec from it"
Labels: kind/bug,priority/backlog,sig/node,sig/security,triage/accepted

### What happened?

An unprivileged process/user running inside of a pod is able to write to `/dev/termination-log` file.

I thought this was preventable with both pod/container `securityContext` but that didn't turn out to be the case.

I didn't test it till the end but I tried redirecting the output of `/dev/urandom` from within the container to `/dev/termination-log` and filled it with gibberish until it reached the size of 2GB.

I suspect this is a way to compromise/crash node.

Is this an exploitable scenario and what can be done to mount the termination log in a way that doesn't allow unprivileged user/process to write arbitrary stuff to it?

### What did you expect to happen?

Permissions to be denied when attempting to write `/dev/termination-log` file.

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

Exec pod container with maximally unprivileged securityContext and write `/dev/termination-log` file with:
`cat /dev/urandom > /dev/termination-log`

### Anything else we need to know?

_No response_

### Kubernetes version

Any

### Cloud provider

N/A

### OS version

Any

### Install tools

N/A

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

N/A

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

N/A
Repository: neovim
Issue: build: use zig toolchain to build Nvim
Labels: enhancement,build

This is only a tracking issue to discuss pros/cons, not an endorsement.

### Problem

Our build system is very cool, but maybe it could be cooler.

### Expected behavior

Use zig for our build system?

From https://news.ycombinator.com/item?id=30488979 :

> "So, a clang wrapper?" is a common thought, so here's how Zig differs from clang out of the box:
>
> * Links MachO binaries for Apple Silicon via the custom zld linker it ships. LLVM cannot do this currently.
> * Provides (deduplicated) libc headers for pretty much every platform, including macOS and glibc/musl. https://github.com/ziglang/zig/tree/master/lib/libc/include
> * Provides a libc implementation (libSystem for macOS, musl and glibc, mingw for Windows, and WASI)
> * Deals with lots of the deep depths of hell, like enabling you to target any version of glibc out of the box by building symbol mappings: https://github.com/ziglang/glibc-abi-tool/
> 
> And that doesn't mention the most important part, IMO, which is that it lets you cross compile _out of the box_. No fiddling with sysroots, system packages, etc. to get a cross compiling toolchain working.
Repository: tauri
Issue: [feat] AbortController support for `invoke` Promises
Labels: type: feature request

### Describe the problem

I was looking into a way to cancel/abort the async Rust code I am running in tauri. My use case is that I have operations which could take up to a couple of minutes, and if the user realises they set some parameter wrong they would like to cancel to start the operation again. But the exact use case does not necessarily matter, there are many reasons to want to abort a called function.

### Describe the solution you'd like

I was reading up on the `AbortController`/`AbortSignla` API that is implemented for many basal JS promises (like fetch amongst others). I tried to use this with the build in Promise from tauri `invoke` but this did not respond to the abort request. Slimmed down my code looks like to following:
```js
// Some basic setup
const controller = new AbortController();

// The time intensive operation, started by pressing a button in the interface
async function annotate_spectrum() {
    let promise = invode("annotate_spectrum"), {..arguments});
    promise.then((result) => /* on success */).catch((result)=>/*on error*/);
    promise.signal = controller.signal;
}

// A separate function to abort the running operation, for now started by using a different button
function abort() {
  controller.abort("User manual abort");
}
```
This above code runs, the `AbortController` responds correctly to the abort() command, and even the promise itself stores the abortion signal correctly in its state. 

My feature suggestion is for the promise to abort in response to this `AbortSignal`. 

### Alternatives considered

_No response_

### Additional context

It could very well be that this is already possible if I rewrite my current code, if so I am sorry for raising the issue, but would greatly appreciate if someone could point me in the correct direction. Also I would be happy to help if any substantial dev work is needed. I am quite well versed in Rust, but my JS skills are a bit lacking.

While searching for solutions I found this [question from another user with AbortController in the answer](https://flapr.io/topic/details/abort-invoke-promises-in-tauri/25175) (this question was cross posted to stackoverflow).
Repository: puppeteer
Issue: [Bug]: SVG QR code broken with headless: 'new' and headful
Labels: bug,upstream,confirmed

### Minimal, reproducible example

```TypeScript
const qrcode = require('qrcode')
const puppeteer = require('puppeteer')
const fs = require('fs')

const test = () => 
  qrcode
    .toString("https://www.google.fi/search?q=puppeteer&sca_esv=588752686&source=hp&ei=19lxZZ-yBJGVxc8P-KWYiAQ&iflsig=AO6bgOgAAAAAZXHn55RLfglY39cPP620BGg0ivzW-cov&ved=0ahUKEwjf-efRx_2CAxWRSvEDHfgSBkEQ4dUDCAo&uact=5&oq=puppeteer&gs_lp=Egdnd3Mtd2l6IglwdXBwZXRlZXIyBRAAGIAEMgUQABiABDIFEAAYgAQyBRAAGIAEMgUQABiABDIFEAAYgAQyBRAAGIAEMgUQABiABDIFEAAYgAQyBRAAGIAESLgKUABYjglwAHgAkAEAmAFroAHLBaoBAzguMbgBA8gBAPgBAcICCxAuGIAEGMcBGNEDwgIFEC4YgATCAg4QLhiABBjHARivARiOBcICCxAuGIAEGMcBGK8B&sclient=gws-wiz", {type: 'svg', width: 200})
    .then((svgString) => Buffer.from(svgString).toString("base64"))
    .then((b64string) => {
      puppeteer
        .launch({ headless: 'new', args: ["--no-sandbox", "--disable-setuid-sandbox"] })
        .then((browser) => 
          browser
            .newPage()
            .then((page) => 
              page
                .setContent(
                  `<html><body><img src="data:image/svg+xml;base64,${b64string}" style="height: 100px" /></body></html>`, 
                  { waitUntil: "networkidle0" }
                )
                .then(() => page.pdf({ format: 'a4', printBackground: true }))
            )
            .then((buffer) => fs.writeFileSync('pdf.pdf', buffer))
            .finally(() => browser.close())
        )
    })


test().then(() => console.log('ok')).catch(console.error)
```


### Error string

no error

### Bug behavior

- [ ] Flaky
- [X] PDF

### Background

Use `headless: 'new'`

### Expectation

Print a QR code that can be read like it does when using `headless: true`

[pdf.pdf](https://github.com/puppeteer/puppeteer/files/13601524/pdf.pdf)

<img width="151" alt="image" src="https://github.com/puppeteer/puppeteer/assets/738763/a4ec7d8c-9aa5-4d3a-98ad-a5c3d0268d3c">

### Reality

Prints gibberish when using `headless: 'new'`

[pdf-new.pdf](https://github.com/puppeteer/puppeteer/files/13601521/pdf-new.pdf)

<img width="151" alt="image" src="https://github.com/puppeteer/puppeteer/assets/738763/4b4c33b7-56da-453e-96b7-01c0cdd18b2a">

### Puppeteer configuration file (if used)

_No response_

### Puppeteer version

21.6.0

### Node version

20.9.0

### Package manager

npm

### Package manager version

10.1.0

### Operating system

Windows
Repository: pytorch
Issue: [Functorch] vmap over index_select expands the output
Labels: high priority,triaged,actionable,module: functorch

### 🐛 Describe the bug

When calling `torch.vmap` over `torch.index_select` with a batched index, the result does not match Jax's results:

**Expected**
```python
from jax import numpy as jnp
import jax
jax.vmap(lambda x, y: x[y], [None, 0])(jnp.arange(3), jnp.array([0, 2]))
# Array([0, 2], dtype=int32)
```

PyTorch
```python
torch.vmap(lambda x, y: torch.index_select(x, 0, y), (None, 0))(torch.arange(3), torch.tensor([0, 2]))
# tensor([[0, 0, 0],
#              [2, 2, 2]])
```

### Versions

PT '2.2.0.dev20231128'


cc @ezyang @gchanan @zou3519 @kadeng @Chillee @samdow @kshitij12345 @janeyx99
Repository: godot
Issue: Texture2DArray per tile mipmap generation causes bleeding
Labels: bug,topic:rendering

### Tested versions

Tested in 4.1.3 stable

### System information

Win 10,  Godot 4.1.3 stable, F+, RTX 4070

### Issue description

Texture2DArray generated mipmapaps are done per entire image. While should be treated per tile basis.
This causes quite early mipmap bleeding.

https://github.com/godotengine/godot/assets/23294139/e156aefd-847a-4805-bdb9-9368f4eaa033

```
Calinou 14:15
it sounds like texture array mipmap generation should not care about other tiles. This is the whole point of using texture arrays (as opposed to Texture3D) – each tile is independent and you can't interpolate between those with a single texture sample
```

### Steps to reproduce

Generate mipmaps for Texture2DArray.

### Minimal reproduction project (MRP)

3 textures 64x64:
circle 62 diameter with 1px transparent margin
circle 60 diameter with 2px transparent margin
circle 58 diameter with 3px transparent margin

[MRP_Texture2DArray.zip](https://github.com/godotengine/godot/files/13601540/MRP_Texture2DArray.zip)
Repository: pytorch
Issue: Enable skipped MPS OptimizerInfo tests
Labels: module: optimizer,triaged,actionable,module: mps

### 🚀 The feature, motivation and pitch

I've started migrating tests to a newer infrastructure using OptimizerInfo and _TestParametrizer. Part of this means that we can automatically enable other devices (including MPS!).

I'm starting this tracker to highlight the tests that will start off skipped but _should_ be enabled. cc @vincentqb @jbschlosser @albanD @crcrpar @kulinseth @malfet @DenisVieriu97 @razarmehr 
- [ ] test_foreach_matches_forloop (in https://github.com/pytorch/pytorch/pull/115025)
- [ ] All tests that are onlyCUDA (there are many of these specifically for fused and foreach optimizers)


### Alternatives

_No response_

### Additional context

Related issue: https://github.com/pytorch/pytorch/issues/105382

We should enable testing optimizers on MPS
Repository: PowerToys
Issue: Mouse Without Borders - Clipboard copy randomly stops working, File copy and drag and drop not working at all
Labels: Issue-Bug,Status-In progress,Product-Mouse Without Borders

### Microsoft PowerToys version

0.76.0

### Installation method

PowerToys auto-update

### Running as admin

None

### Area(s) with issue?

Mouse Without Borders

### Steps to reproduce

1. Log in in after a restart, try to copy and paste some text.  It works great for a few hours.  Copy and paste for files does not do anything.  2. After a few hours, copy and paste for text is no longer working.  3.  Open Task Manager and realize PowerToys.MouseWithoutBordersHelper.exe is not running.  4. Restart PowerToys.MouseWithoutBordersHelper.exe on both computers. 5. Look at Task Manager and verify PowerToys.MouseWithoutBordersHelper.exe is running. 6. Copy and Paste for Text starts working again.  Copy and Paste for Files is still not working.

### ✔️ Expected Behavior

As long as Mouse Without Borders is running on both computers (Or Service is running), it should continually be able to copy and paste text to and from either computer connected.  Using CTRL + C on a file on Computer A then CTRL + V on Computer B should copy the file over.

### ❌ Actual Behavior

After a set amount of time, clipboard copy and paste stops working between computers.  Copying files is not working at all.

### Other Software

_No response_
Repository: deno
Issue: [KV] Provide more feedback for atomic check failures
Labels: suggestion,ext/kv

At the moment if an atomic check fails, the only feedback you get is that the transaction failed.  If possible it would be good to get more feedback.  E.g.
```ts
const result = await kv.atomic()
        .check({ key: ["asdf"], versionstamp: "0000000000002e990000" })
        .set(["asdf"], "2")
        .commit();
console.log(result);
```
If the check above fails, the response is `{ ok: false }`.  This works fine in the above scenario where you have a single check.  However, imagine you are committing 100 keys of data with corresponding 100 checks, one for each key being committed.  If only 1 of the 100 checks fails you still only get the feedback `{ ok: false }` without knowing which check(s) failed (or if it was even the check which caused the failure?).

Suggestion:  If one or more checks fail, add the failed key(s) to the response under `failedChecks` property so the user can take more targeted action afterwards (e.g. in the example above retrying with the other 99 keys, handling the one failed key separately).
Repository: puppeteer
Issue: [Feature]: support AbortSignal in launch
Labels: feature,good first issue,@puppeteer/browsers

### Feature description

My application will launch new browser  each http request, I want close it when request connection is gone
Repository: next.js
Issue: css from dependencies get higher priority over local css
Labels: bug

### Link to the code that reproduces this issue

https://github.com/poulet42/repro-vendor-css-next

### To Reproduce

## Context 

The reproduction repository uses turborepo to highlight the issue with an external package.

in packages/ui/button.module.css, the background of the button is set to red. 
in apps/web/app/page.module.css, the background of the button is set to blue. The class is passed to the button with a className prop. 

## Reproduction instructions
#### with app router
1. start the "web" application (pnpm dev --filter=web)
2. the button appears to be red, inspect the page.css file, the style from ui appears after the page style
--
#### with pages router
1. start the "docs" application (pnpm dev --filter=docs)
2. the button appears to be blue, inspect the style, the style from ui appears before the page style

### Current vs. Expected behavior

Style from "vendors" should not take precedence over local app style, or at least there should be a way to control the order.

So vendor styles should appear **before** the app styles.

<img width="1009" alt="Screenshot 2023-12-07 at 17 41 56" src="https://github.com/vercel/next.js/assets/16135480/d66d6d1f-7542-4afa-ae83-313a90b6fb6b">


### 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 23.2.0: Thu Nov  9 06:29:23 PST 2023; root:xnu-10002.60.71.505.1~3/RELEASE_ARM64_T6000
Binaries:
  Node: 21.2.0
  npm: 10.2.3
  Yarn: N/A
  pnpm: 8.9.0
Relevant Packages:
  next: 14.0.4-canary.47
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

App Router

### Additional context

Can't say which canary introduced this, but it does work with the page router.
Repository: godot
Issue: Changing the 'Import As' of a PNG file to 'AtlasTexture' not working cleanly post 4.2
Labels: bug,topic:import,regression

### Tested versions

Reproducible in 4.2

### System information

Windows 10 - Godot 4.2

### Issue description

In 4.1, changing the 'Import as' of a Texture to an AtlasTexture, would restart the editor, and everything would work post restart. 

Now, doing this does not restart the editor, and the new atlas file does not show up in the filesystem until a forced restart. 

Post restart, the atlas file shows up, but any place the Texture was used pre change of 'Import as' gets corrupted, and you have to remake the animations. 

### Steps to reproduce

1) Import few png images into a fresh project
2) Create an AnimatedSprite node, and add these png images into an animation
3) Select all the png images, and change the 'Import As' to 'AtlasTexture', and follow the remaining steps to do so
4) The images will no longer be visible with the node, and post editor restart, the sprite frames resource will have no images in it. 



### Minimal reproduction project (MRP)

It will only reproduce once. Difficult to create an MRP. 

*Edit(lyuma): MRP was attached by KoBeWi to #85977 : https://github.com/godotengine/godot/files/13625635/AtlasTest.zip
Instructions: "Select both icon files and change import type to TextureAtlas, then save the scene."*
Repository: PowerToys
Issue: PT causes COM Surrogate to eat a lot of CPU and makes File Explorer hang and die
Labels: Issue-Bug,Status-In progress,Severity-High,Product-File Explorer,Needs-Triage,Needs-Team-Response

### Microsoft PowerToys version

0.76.0

### Installation method

PowerToys auto-update

### Running as admin

No

### Area(s) with issue?

File Explorer: Thumbnail preview

### Steps to reproduce

There are no distinct steps to reproduce. The bug started appearing by itself at random moments of time.

Probably related to the fact I'm having laptop (14", 3000 by 2000 px, scaling 250%) + external display (27", 2560 by 1440 px, scaling 125%), they are at different resolution, different DPI, different scaling.

### ✔️ Expected Behavior

Previews for images and pdf files are generated and shown without issues. No extra CPU is eaten by the "COM Surrogate" process. 

### ❌ Actual Behavior

At some moment of time images (jpg, png and others) simultaneously with PDF files stop showing their thumbnails in the File Explorer (Win 11, 23h2, 22631.2792). When containing folder is opened, the explorer's tab shows rotating wheel (a throbber), no thumbs are shown, at the same time in the Task Manager the "COM Surrogate" process continuously starts eating about 25..30% of the CPU, laptop's temperature increases dramatically, fans are working at full pace and are very noisy.

When the issue described above happens, if I use the right-mouse-click to an image whose thumb is not shown, then the context menu fails to appear, the File Explorer hangs indefinitely and then dies (crashes), and all of the opened folders die without re-opening.

Only full restart of the laptop helps to get rid of the issue.   

### Other Software

_No response_
Repository: vscode
Issue: Copy&Paste work not expected when open ipynb file
Labels: bug,notebook-clipboard

<!-- Please search existing issues to avoid creating duplicates. -->

## Environment data


    VS Code version: 1.84.2
    Jupyter Extension version (available under the Extensions sidebar): v2023.6.1101941928
    Python Extension version (available under the Extensions sidebar): v2023.12.0
    OS (Windows | Mac | Linux distro) and version: Windows 11
    Python and/or Anaconda version: 3.11.4
    Jupyter server running: Local


## Behaviour

When I open ipynb with Copilot Chat or some AI Chat extensions, I am unable to copy the AI's response, whether it's using keyboard shortcuts, right-clicking, or any other method.

Please do not close this issue, as it is likely not specific to a particular extension. I have encountered this problem with multiple extensions.

Related extensions:
- Copilot Chat
- Genie AI
- Codeium
- Bito AI Code Assistant

Related Issue: https://github.com/microsoft/vscode-jupyter/issues/13939
Repository: deno
Issue: Add support for TLS Client certificate and key to startTls
Labels: suggestion

`Deno.connectTls` supports client certificates and keys but `Deno.startTls` only supports Certificate Authority certificates. This prevents upgrading plain sockets with TLS where client certificates are needed for authentication. For instance, I am affected by this as a user of the [NATS Deno package](https://github.com/nats-io/nats.deno).