helloadhavan/github_issues huggingface dataset:
Repository: electron/electron
Pull request: fix: avoid redundant `page-favicon-updated` events on `setBounds`

Backport of #49464

See that PR for details.


Notes: Fixed an issue where calling `setBounds` on a `WebContentsView` could trigger redundant `page-favicon-updated` events even when the favicon had not changed.

Changed files:
filename: shell/browser/api/electron_api_web_contents.cc
patch: @@ -2201,6 +2201,11 @@ void WebContents::DidUpdateFaviconURL(
         iter->icon_url.is_valid())
       unique_urls.insert(iter->icon_url);
   }
+  // Only emit if favicon URLs actually changed
+  if (unique_urls == last_favicon_urls_)
+    return;
+  last_favicon_urls_ = unique_urls;
+
   Emit("page-favicon-updated", unique_urls);
 }
 

filename: shell/browser/api/electron_api_web_contents.h
patch: @@ -11,6 +11,7 @@
 #include <string>
 #include <vector>
 
+#include "base/containers/flat_set.h"
 #include "base/functional/callback_forward.h"
 #include "base/memory/raw_ptr.h"
 #include "base/memory/raw_ptr_exclusion.h"
@@ -462,6 +463,9 @@ class WebContents final : public ExclusiveAccessContext,
   WebContents& operator=(const WebContents&) = delete;
 
  private:
+  // Store last emitted favicon URLs to avoid duplicate page-favicon-updated
+  // events
+  base::flat_set<GURL> last_favicon_urls_;
   // Does not manage lifetime of |web_contents|.
   WebContents(v8::Isolate* isolate, content::WebContents* web_contents);
   // Takes over ownership of |web_contents|.
Repository: ggml-org/llama.cpp
Pull request: Relax prefill parser to allow space.

## Overview

As in title.

## Additional information

Prefill parser was strictly requiring the reasoning marker at the very start of the message, which interfered with models that liked to insert eg. a newline there.

# Requirements

- I have read and agree with the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md)
- AI usage disclosure: NO


Changed files:
filename: common/chat-auto-parser-generator.cpp
patch: @@ -100,19 +100,22 @@ common_peg_arena autoparser::build_parser(const generation_params & inputs) cons
 
         bool has_tools           = inputs.tools.is_array() && !inputs.tools.empty();
         bool has_response_format = inputs.json_schema.is_object() && !inputs.json_schema.empty();
+        bool pure_content        = reasoning.mode == reasoning_mode::NONE;
 
         if (has_response_format) {
             auto response_format = p.rule("response-format", p.content(p.schema(p.json(), "response-format-schema", inputs.json_schema)));
             parser = ctx.reasoning_parser + p.space() + p.choice({
                 p.literal("```json") + p.space() + response_format + p.space() + p.literal("```"),
                 response_format
             }) + p.end();
+            pure_content = false;
         } else if (has_tools && inputs.tool_choice != COMMON_CHAT_TOOL_CHOICE_NONE && jinja_caps.supports_tool_calls) {
             parser = tools.build_parser(ctx);
+            pure_content = false;
         } else {
             parser = content.build_parser(ctx);
         }
-        return p.prefix(inputs.generation_prompt, reasoning.start) + parser;
+        return pure_content ? p.prefix(inputs.generation_prompt, reasoning.start) + parser : p.prefix(inputs.generation_prompt, reasoning.start) << parser;
     });
 }
 

filename: common/chat.cpp
patch: @@ -1709,7 +1709,7 @@ static common_chat_params common_chat_templates_apply_jinja(const struct common_
         data.format                    = COMMON_CHAT_FORMAT_PEG_NATIVE;
         data.generation_prompt         = params.generation_prompt;
         auto parser                    = build_chat_peg_parser([&params](common_chat_peg_builder &p) {
-            return p.prefix(params.generation_prompt) + p.content(p.rest());
+            return p.prefix(params.generation_prompt) << p.content(p.rest());
         });
         data.parser                    = parser.save();
         return data;
Repository: electron/electron
Pull request: fix: avoid redundant `page-favicon-updated` events on `setBounds`

Backport of #49464

See that PR for details.


Notes: Fixed an issue where calling `setBounds` on a `WebContentsView` could trigger redundant `page-favicon-updated` events even when the favicon had not changed.

Changed files:
filename: shell/browser/api/electron_api_web_contents.cc
patch: @@ -2250,6 +2250,11 @@ void WebContents::DidUpdateFaviconURL(
         iter->icon_url.is_valid())
       unique_urls.insert(iter->icon_url);
   }
+  // Only emit if favicon URLs actually changed
+  if (unique_urls == last_favicon_urls_)
+    return;
+  last_favicon_urls_ = unique_urls;
+
   Emit("page-favicon-updated", unique_urls);
 }
 

filename: shell/browser/api/electron_api_web_contents.h
patch: @@ -11,6 +11,7 @@
 #include <string>
 #include <vector>
 
+#include "base/containers/flat_set.h"
 #include "base/functional/callback_forward.h"
 #include "base/memory/raw_ptr.h"
 #include "base/memory/raw_ptr_exclusion.h"
@@ -462,6 +463,9 @@ class WebContents final : public ExclusiveAccessContext,
   WebContents& operator=(const WebContents&) = delete;
 
  private:
+  // Store last emitted favicon URLs to avoid duplicate page-favicon-updated
+  // events
+  base::flat_set<GURL> last_favicon_urls_;
   // Does not manage lifetime of |web_contents|.
   WebContents(v8::Isolate* isolate, content::WebContents* web_contents);
   // Takes over ownership of |web_contents|.
Repository: ollama/ollama
Pull request: gemma: fix rope scaling for qat models

The rope scaling factor in the gemma3 QAT weights is set to 8 instead of 1. There was an update to read in the scaling factor which caused weird output for the each of the QAT weight models. This change just forces the scaling factor back to 1.


Changed files:
filename: model/models/gemma2/model.go
patch: @@ -128,7 +128,7 @@ func (sa *SelfAttention) Forward(ctx ml.Context, hiddenState, positionIDs ml.Ten
 }
 
 func (m *Model) Shift(ctx ml.Context, layer int, key, shift ml.Tensor) (ml.Tensor, error) {
-	return fast.RoPE(ctx, key, shift, m.Options.attnKeyLen, m.Options.ropeBase, m.Options.ropeScale, rope.WithTypeNeoX()), nil
+	return fast.RoPE(ctx, key, shift, m.Options.attnKeyLen, m.Options.ropeBase, 1/m.Options.ropeScale, rope.WithTypeNeoX()), nil
 }
 
 type MLP struct {

filename: model/models/gemma3/model_text.go
patch: @@ -53,7 +53,10 @@ func newTextModel(c fs.Config) *TextModel {
 			eps:            c.Float("attention.layer_norm_rms_epsilon", 1e-06),
 			ropeLocalBase:  c.Float("rope.local.freq_base", 10000.0),
 			ropeGlobalBase: c.Float("rope.global.freq_base", 1000000.0),
-			ropeScale:      c.Float("rope.scaling.factor", 1.0),
+			ropeScale:      1,
+			// NOTE: the rope.scaling.factor is set incorrectly in the official QAT weights
+			//       (8 instead of 1)
+			// ropeScale:      c.Float("rope.scaling.factor", 1.0),
 		},
 	}
 
@@ -113,7 +116,7 @@ func (m *TextModel) Shift(ctx ml.Context, layer int, key, shift ml.Tensor) (ml.T
 		ropeBase = m.TextConfig.ropeGlobalBase
 	}
 
-	return fast.RoPE(ctx, key, shift, m.TextConfig.attnKeyLen, ropeBase, m.TextConfig.ropeScale, rope.WithTypeNeoX()), nil
+	return fast.RoPE(ctx, key, shift, m.TextConfig.attnKeyLen, ropeBase, 1/m.TextConfig.ropeScale, rope.WithTypeNeoX()), nil
 }
 
 type TextMLP struct {
Repository: facebook/react
Pull request: [DevTools] Disable the tree list for now

When there are no named Activities we should hide the tree side panel (and the button to show it). Since it's not implemented yet there are never any ones so it's always hidden.

Changed files:
filename: packages/react-devtools-shared/src/devtools/views/SuspenseTab/SuspenseTab.js
patch: @@ -117,6 +117,11 @@ function SuspenseTab(_: {}) {
     initLayoutState,
   );
 
+  // If there are no named Activity boundaries, we don't have any tree list and we should hide
+  // both the panel and the button to toggle it. Since we currently don't support it yet, it's
+  // always disabled.
+  const treeListDisabled = true;
+
   const wrapperTreeRef = useRef<null | HTMLElement>(null);
   const resizeTreeRef = useRef<null | HTMLElement>(null);
   const resizeTreeListRef = useRef<null | HTMLElement>(null);
@@ -290,23 +295,31 @@ function SuspenseTab(_: {}) {
   return (
     <div className={styles.SuspenseTab} ref={wrapperTreeRef}>
       <div className={styles.TreeWrapper} ref={resizeTreeRef}>
-        <div
-          className={styles.TreeList}
-          hidden={treeListHidden}
-          ref={resizeTreeListRef}>
-          <SuspenseTreeList />
-        </div>
-        <div className={styles.ResizeBarWrapper} hidden={treeListHidden}>
+        {treeListDisabled ? null : (
           <div
-            onPointerDown={onResizeStart}
-            onPointerMove={onResizeTreeList}
-            onPointerUp={onResizeEnd}
-            className={styles.ResizeBar}
-          />
-        </div>
+            className={styles.TreeList}
+            hidden={treeListHidden}
+            ref={resizeTreeListRef}>
+            <SuspenseTreeList />
+          </div>
+        )}
+        {treeListDisabled ? null : (
+          <div className={styles.ResizeBarWrapper} hidden={treeListHidden}>
+            <div
+              onPointerDown={onResizeStart}
+              onPointerMove={onResizeTreeList}
+              onPointerUp={onResizeEnd}
+              className={styles.ResizeBar}
+            />
+          </div>
+        )}
         <div className={styles.TreeView}>
           <div className={styles.SuspenseTreeViewHeader}>
-            <ToggleTreeList dispatch={dispatch} state={state} />
+            {treeListDisabled ? (
+              <div />
+            ) : (
+              <ToggleTreeList dispatch={dispatch} state={state} />
+            )}
             <div className={styles.SuspenseTreeViewHeaderMain}>
               <div className={styles.SuspenseTimeline}>
                 <SuspenseTimeline />
Repository: electron/electron
Pull request: fix: avoid redundant `page-favicon-updated` events on `setBounds`

Backport of #49464

See that PR for details.


Notes: Fixed an issue where calling `setBounds` on a `WebContentsView` could trigger redundant `page-favicon-updated` events even when the favicon had not changed.

Changed files:
filename: shell/browser/api/electron_api_web_contents.cc
patch: @@ -2176,6 +2176,11 @@ void WebContents::DidUpdateFaviconURL(
         iter->icon_url.is_valid())
       unique_urls.insert(iter->icon_url);
   }
+  // Only emit if favicon URLs actually changed
+  if (unique_urls == last_favicon_urls_)
+    return;
+  last_favicon_urls_ = unique_urls;
+
   Emit("page-favicon-updated", unique_urls);
 }
 

filename: shell/browser/api/electron_api_web_contents.h
patch: @@ -11,6 +11,7 @@
 #include <string>
 #include <vector>
 
+#include "base/containers/flat_set.h"
 #include "base/functional/callback_forward.h"
 #include "base/memory/raw_ptr.h"
 #include "base/memory/raw_ptr_exclusion.h"
@@ -460,6 +461,9 @@ class WebContents final : public ExclusiveAccessContext,
   WebContents& operator=(const WebContents&) = delete;
 
  private:
+  // Store last emitted favicon URLs to avoid duplicate page-favicon-updated
+  // events
+  base::flat_set<GURL> last_favicon_urls_;
   // Does not manage lifetime of |web_contents|.
   WebContents(v8::Isolate* isolate, content::WebContents* web_contents);
   // Takes over ownership of |web_contents|.
Repository: rust-lang/rust
Pull request: Don't emit rustdoc `missing_doc_code_examples` lint on impl items

@lolbinarycat realized in [this comment](https://github.com/rust-lang/rust/pull/153964#discussion_r2953956702) that we weren't testing some cases for the `missing_doc_code_examples` lint. Turns out that it was not handling this case well. =D

So in short: `missing_doc_code_examples` lint should not be emitted on impl items and this PR fixes that.

r? @lolbinarycat 

Changed files:
filename: src/librustdoc/passes/check_doc_test_visibility.rs
patch: @@ -79,8 +79,7 @@ pub(crate) fn should_have_doc_example(cx: &DocContext<'_>, item: &clean::Item) -
                 | clean::ProvidedAssocConstItem(..)
                 | clean::ImplAssocConstItem(..)
                 | clean::RequiredAssocTypeItem(..)
-                // check for trait impl
-                | clean::ImplItem(box clean::Impl { trait_: Some(_), .. })
+                | clean::ImplItem(_)
         )
     {
         return false;

filename: tests/rustdoc-ui/lints/lint-missing-doc-code-example.rs
patch: @@ -78,7 +78,11 @@ impl Clone for Struct {
     }
 }
 
-
+impl Struct { // No doc or code example and it's fine!
+    pub fn bar() {}
+    //~^ ERROR missing code example in this documentation
+    //~| ERROR missing documentation for an associated function
+}
 
 /// doc
 ///

filename: tests/rustdoc-ui/lints/lint-missing-doc-code-example.stderr
patch: @@ -1,3 +1,15 @@
+error: missing documentation for an associated function
+  --> $DIR/lint-missing-doc-code-example.rs:82:5
+   |
+LL |     pub fn bar() {}
+   |     ^^^^^^^^^^^^
+   |
+note: the lint level is defined here
+  --> $DIR/lint-missing-doc-code-example.rs:2:9
+   |
+LL | #![deny(missing_docs)]
+   |         ^^^^^^^^^^^^
+
 error: missing code example in this documentation
   --> $DIR/lint-missing-doc-code-example.rs:38:3
    |
@@ -28,5 +40,11 @@ error: missing code example in this documentation
 LL | /// Doc
    | ^^^^^^^
 
-error: aborting due to 4 previous errors
+error: missing code example in this documentation
+  --> $DIR/lint-missing-doc-code-example.rs:82:5
+   |
+LL |     pub fn bar() {}
+   |     ^^^^^^^^^^^^^^^
+
+error: aborting due to 6 previous errors
Repository: electron/electron
Pull request: fix: FTBFS when printing is disabled

Backport of #50056

See that PR for details.


Notes: Fixed build failure when printing is disabled.

Changed files:
filename: shell/browser/api/electron_api_web_contents.cc
patch: @@ -428,6 +428,7 @@ namespace {
 // Global toggle for disabling draggable regions checks.
 bool g_disable_draggable_regions = false;
 
+#if BUILDFLAG(ENABLE_PRINTING)
 // Constants we use for printing.
 constexpr char kFrom[] = "from";
 constexpr char kTo[] = "to";
@@ -457,6 +458,7 @@ constexpr char kFooterTemplate[] = "footerTemplate";
 constexpr char kPreferCSSPageSize[] = "preferCSSPageSize";
 constexpr char kGenerateTaggedPDF[] = "generateTaggedPDF";
 constexpr char kGenerateDocumentOutline[] = "generateDocumentOutline";
+#endif  // BUILDFLAG(ENABLE_PRINTING)
 
 constexpr std::string_view CursorTypeToString(
     ui::mojom::CursorType cursor_type) {
Repository: vercel/next.js
Pull request: [Instant] export "Instant" config type

We forgot to export a type for the `unstable_instant` config. This works now

```tsx
import type { Instant } from 'next'
export const unstable_instant: Instant = { ... }
```

Changed files:
filename: packages/next/src/build/segment-config/app/app-segment-config.ts
patch: @@ -46,10 +46,8 @@ const InstantConfigSchema = z.union([
   z.literal(false),
 ])
 
-export type InstantConfig = InstantConfigStatic | InstantConfigRuntime | false
-export type InstantConfigForTypeCheckInternal =
-  | __GenericInstantConfig
-  | InstantConfig
+export type Instant = InstantConfigStatic | InstantConfigRuntime | false
+export type InstantConfigForTypeCheckInternal = __GenericInstantConfig | Instant
 // the __GenericPrefetch type is used to avoid type widening issues with
 // our choice to make exports the medium for programming a Next.js application
 // With exports the type is controlled by the module and all we can do is assert on it
@@ -233,7 +231,7 @@ export type AppSegmentConfig = {
   /**
    * How this segment should be prefetched.
    */
-  unstable_instant?: InstantConfig
+  unstable_instant?: Instant
 
   /**
    * The preferred region for the page.

filename: packages/next/src/server/app-render/instant-validation/instant-validation.tsx
patch: @@ -29,7 +29,7 @@ import { parseLoaderTree } from '../../../shared/lib/router/utils/parse-loader-t
 import type { GetDynamicParamFromSegment } from '../app-render'
 import type {
   AppSegmentConfig,
-  InstantConfig,
+  Instant,
 } from '../../../build/segment-config/app/app-segment-config'
 import { Readable } from 'node:stream'
 import {
@@ -84,7 +84,7 @@ export type RouteTree = {
   module: null | {
     type: 'layout' | 'page'
     // TODO(instant-validation): We should know if a layout segment is shared
-    instantConfig: InstantConfig | null
+    instantConfig: Instant | null
     conventionPath: string
   }
 

filename: packages/next/src/types.ts
patch: @@ -40,6 +40,8 @@ export type {
   ResolvedViewport,
 } from './lib/metadata/types/metadata-interface'
 
+export type { Instant } from './build/segment-config/app/app-segment-config'
+
 export type { Instrumentation } from './server/instrumentation/types'
 
 /**
Repository: ggml-org/llama.cpp
Pull request: server: support chunked transfer encoding

This PR fixes #20264. It turns out if client uses chunked transfer encoding, the request hangs there and will timeout. 

E.g. this works:
```bash
curl 'https://llama.home/v1/chat/completions' \
  -X POST \
  --data '{"messages":[{"role":"user","content":[{"type":"text","text":"hello"}]}],"model":"Qwen3.5-4B"}'
```

this **doesn't** work:
```bash
curl 'https://llama.home/v1/chat/completions' \
  -X POST \
  --data '{"messages":[{"role":"user","content":[{"type":"text","text":"hello"}]}],"model":"Qwen3.5-4B"}' -H "Transfer-Encoding: chunked"
```
**Root Cause:**

In `server_http_proxy::server_http_proxy` (tools/server/server-models.cpp), when forwarding proxied requests to upstream servers, the `Transfer-Encoding` header from the original client request is being copied to the outgoing request, causing a protocol mismatch.

1. When the llama.cpp server receives a request with `Transfer-Encoding: chunked`, cpp-httplib correctly decodes the chunked body before passing it to the handler.

2. In the proxy constructor, the request headers are copied to a new `httplib::Request` object (line 1153-1162), including the `Transfer-Encoding: chunked` header.

3. However, the `body` parameter (line 1164) contains the **already-decoded** (non-chunked) body.

4. When `cli->send(req)` sends the request to the upstream server:
   - The httplib client sees the `Transfer-Encoding: chunked` header
   - It expects the body to be in chunked encoding format
   - But the actual body is in regular (non-chunked) format
   - This causes the upstream server to wait indefinitely for chunked data that will never arrive in the expected format




Changed files:
filename: tools/server/server-models.cpp
patch: @@ -1196,6 +1196,10 @@ server_http_proxy::server_http_proxy(
                 // disable Accept-Encoding to avoid compressed responses
                 continue;
             }
+            if (key == "Transfer-Encoding") {
+                // the body is already decoded
+                continue;
+            }
             if (key == "Host" || key == "host") {
                 bool is_default_port = (scheme == "https" && port == 443) || (scheme == "http" && port == 80);
                 req.set_header(key, is_default_port ? host : host + ":" + std::to_string(port));
Repository: ollama/ollama
Pull request: server: add unauthorized error to remote chat handler

Also adds an `error` field to errors returned in this case

Changed files:
filename: server/routes.go
patch: @@ -259,7 +259,10 @@ func (s *Server) GenerateHandler(c *gin.Context) {
 					c.JSON(http.StatusUnauthorized, gin.H{"error": "error getting public key"})
 					return
 				}
-				c.JSON(http.StatusUnauthorized, gin.H{"public_key": pk})
+				c.JSON(http.StatusUnauthorized, gin.H{
+					"error":      "unauthorized",
+					"public_key": pk,
+				})
 				return
 			}
 			c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
@@ -1810,6 +1813,20 @@ func (s *Server) ChatHandler(c *gin.Context) {
 		client := api.NewClient(remoteURL, http.DefaultClient)
 		err = client.Chat(c, &req, fn)
 		if err != nil {
+			var sErr api.AuthorizationError
+			if errors.As(err, &sErr) && sErr.StatusCode == http.StatusUnauthorized {
+				pk, pkErr := auth.GetPublicKey()
+				if pkErr != nil {
+					slog.Error("couldn't get public key", "error", pkErr)
+					c.JSON(http.StatusUnauthorized, gin.H{"error": "error getting public key"})
+					return
+				}
+				c.JSON(http.StatusUnauthorized, gin.H{
+					"error":      "unauthorized",
+					"public_key": pk,
+				})
+				return
+			}
 			c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
 			return
 		}
Repository: electron/electron
Pull request: fix: FTBFS when printing is disabled

#### Description of Change

Fix #49523 regression that breaks the build when printing is disabled. The error happens because there are unused variables and we build with `-Werror,-Wunused`.

#### Checklist

- [x] PR description included
- [x] I have built and tested this PR
- [ ] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: Fixed build failure when printing is disabled.

Changed files:
filename: shell/browser/api/electron_api_web_contents.cc
patch: @@ -429,6 +429,7 @@ namespace {
 // Global toggle for disabling draggable regions checks.
 bool g_disable_draggable_regions = false;
 
+#if BUILDFLAG(ENABLE_PRINTING)
 // Constants we use for printing.
 constexpr char kFrom[] = "from";
 constexpr char kTo[] = "to";
@@ -458,6 +459,7 @@ constexpr char kFooterTemplate[] = "footerTemplate";
 constexpr char kPreferCSSPageSize[] = "preferCSSPageSize";
 constexpr char kGenerateTaggedPDF[] = "generateTaggedPDF";
 constexpr char kGenerateDocumentOutline[] = "generateDocumentOutline";
+#endif  // BUILDFLAG(ENABLE_PRINTING)
 
 constexpr std::string_view CursorTypeToString(
     ui::mojom::CursorType cursor_type) {
Repository: ggml-org/llama.cpp
Pull request: sync : ggml


Changed files:
filename: scripts/sync-ggml.last
patch: @@ -1 +1 @@
-50634c28837c24ac68b380b5750b41e701c87d73
+49f84a924f6ea4fc2ef73dbbd8cc4d734b54bd6d