helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: feat(cli): support `--single-threaded` v8 flag

Issue #20602
Builds on top of #29064

For now it is just looking at the DENO_SINGLE_THREADED env var. When set it adds `--single-threaded` to the default v8 flags and runs `init_platform` with `v8::Platform::new_single_threaded(true)`.

Enabling could rely on just the v8 flags `--single-threaded` but I guess it should probably be a cli flag as there are other deno features that rely on threads and these should likely be either disabled or run from the main thread when in single threaded mode.

Changed files:
filename: cli/main.rs
patch: @@ -516,10 +516,21 @@ fn resolve_flags_and_init(
     _ => get_default_v8_flags(),
   };
 
-  init_v8_flags(&default_v8_flags, &flags.v8_flags, get_v8_flags_from_env());
+  let env_v8_flags = get_v8_flags_from_env();
+  let is_single_threaded = env_v8_flags
+    .iter()
+    .chain(&flags.v8_flags)
+    .any(|flag| flag == "--single-threaded");
+  init_v8_flags(&default_v8_flags, &flags.v8_flags, env_v8_flags);
+  let v8_platform = if is_single_threaded {
+    Some(::deno_core::v8::Platform::new_single_threaded(true).make_shared())
+  } else {
+    None
+  };
   // TODO(bartlomieju): remove last argument once Deploy no longer needs it
   deno_core::JsRuntime::init_platform(
-    None, /* import assertions enabled */ false,
+    v8_platform,
+    /* import assertions enabled */ false,
   );
 
   Ok(flags)

filename: cli/rt/run.rs
patch: @@ -988,8 +988,16 @@ pub async fn run(
 
   // Initialize v8 once from the main thread.
   v8_set_flags(construct_v8_flags(&[], &metadata.v8_flags, vec![]));
+  let is_single_threaded = metadata
+    .v8_flags
+    .contains(&String::from("--single-threaded"));
+  let v8_platform = if is_single_threaded {
+    Some(::deno_core::v8::Platform::new_single_threaded(true).make_shared())
+  } else {
+    None
+  };
   // TODO(bartlomieju): remove last argument once Deploy no longer needs it
-  deno_core::JsRuntime::init_platform(None, true);
+  deno_core::JsRuntime::init_platform(v8_platform, true);
 
   let main_module = match NpmPackageReqReference::from_specifier(&main_module) {
     Ok(package_ref) => {
Repository: ggml-org/llama.cpp
Pull request: fix: resolve unsigned integer initialization warnings in gguf.cpp

Fix warnings caused by initializing unsigned integers (`uint32_t n_dims` and `uint64_t size`) with negative values.

- Changed `uint32_t n_dims = -1` to `0` in tensor shape parsing.
- Changed `uint64_t size = -1` to `0` in string reading logic.

These values are overwritten by subsequent `gr.read(...)` calls, so using `0` as an initial placeholder eliminates unsigned integer underflow warnings without affecting runtime behavior.

Changed files:
filename: ggml/src/gguf.cpp
patch: @@ -273,7 +273,7 @@ struct gguf_reader {
     }
 
     bool read(std::string & dst) const {
-        uint64_t size = -1;
+        uint64_t size = 0;
         if (!read(size)) {
             return false;
         }
@@ -523,7 +523,7 @@ struct gguf_context * gguf_init_from_file_impl(FILE * file, struct gguf_init_par
 
         // tensor shape
         {
-            uint32_t n_dims = -1;
+            uint32_t n_dims = 0;
             ok = ok && gr.read(n_dims);
             if (n_dims > GGML_MAX_DIMS) {
                 GGML_LOG_ERROR("%s: tensor '%s' has invalid number of dimensions: %" PRIu32 " > %" PRIu32 "\n",
Repository: denoland/deno
Pull request: fix(ext/node): don't use user manipulated Response objects, use correct `rawHeaders` structure

Fixes https://github.com/denoland/deno/issues/28022

Previously, when a user manipulated the global `Response` object, we
would use that object when passing the response from the Node shim to
`Deno.serve`. This caused issues when the user manipulated the
`Response` object in a way that would break `Deno.serve`.

The raw headers bug is that we were exposing the `rawHeaders` field on
`Incoming` as a `Headers` object, instead it's supposed to be a flat
array of the header keys + values. I.e. `["Content-Type:",
"application/json", "Host:", "http://localhost"]`

Changed files:
filename: ext/http/00_serve.ts
patch: @@ -59,7 +59,6 @@ import {
   ResponsePrototype,
   toInnerResponse,
 } from "ext:deno_fetch/23_response.js";
-import { headerListFromHeaders } from "ext:deno_fetch/20_headers.js";
 import {
   abortRequest,
   fromInnerRequest,
@@ -502,15 +501,8 @@ function fastSyncResponseOrStream(
     return;
   }
 
-  let stream;
-  let body;
-  if (respBody.streamOrStatic) {
-    stream = respBody.streamOrStatic;
-    body = stream.body;
-  } else {
-    stream = respBody;
-    body = respBody;
-  }
+  const stream = respBody.streamOrStatic;
+  const body = stream.body;
   if (body !== undefined) {
     // We ensure the response has not been consumed yet in the caller of this
     // function.
@@ -641,19 +633,8 @@ function mapToCallback(context, callback, onError) {
       return;
     }
 
-    let status;
-    let headers;
-    let body;
-    if (inner) {
-      status = inner.status;
-      headers = inner.headerList;
-      body = inner.body;
-    } else {
-      status = response.status;
-      headers = headerListFromHeaders(response.headers);
-      body = response.body;
-    }
-
+    const status = inner.status;
+    const headers = inner.headerList;
     if (headers && headers.length > 0) {
       if (headers.length == 1) {
         op_http_set_response_header(req, headers[0][0], headers[0][1]);
@@ -662,7 +643,7 @@ function mapToCallback(context, callback, onError) {
       }
     }
 
-    fastSyncResponseOrStream(req, body, status, innerRequest);
+    fastSyncResponseOrStream(req, inner.body, status, innerRequest);
   };
 
   if (TRACING_ENABLED) {

filename: ext/node/polyfills/http.ts
patch: @@ -67,6 +67,7 @@ import {
 import { getTimerDuration } from "ext:deno_node/internal/timers.mjs";
 import { serve, upgradeHttpRaw } from "ext:deno_http/00_serve.ts";
 import { headersEntries } from "ext:deno_fetch/20_headers.js";
+import { Response } from "ext:deno_fetch/23_response.js";
 import {
   builtinTracer,
   ContextManager,
Repository: denoland/deno
Pull request: v2.3.1

Fixes wrong version printed with `deno --version`.

Closes https://github.com/denoland/deno/issues/29108

Changed files:
filename: Cargo.lock
patch: @@ -1451,7 +1451,7 @@ dependencies = [
 
 [[package]]
 name = "deno"
-version = "2.3.0"
+version = "2.3.1"
 dependencies = [
  "anstream",
  "async-trait",
@@ -2138,7 +2138,7 @@ dependencies = [
 
 [[package]]
 name = "deno_lib"
-version = "2.4.0"
+version = "2.3.1"
 dependencies = [
  "capacity_builder",
  "deno_error",
@@ -2939,7 +2939,7 @@ dependencies = [
 
 [[package]]
 name = "denort"
-version = "2.3.0"
+version = "2.3.1"
 dependencies = [
  "async-trait",
  "bincode",

filename: Cargo.toml
patch: @@ -110,7 +110,7 @@ denort_helper = { version = "0.2.0", path = "./ext/rt_helper" }
 # workspace libraries
 deno_bench_util = { version = "0.198.0", path = "./bench_util" }
 deno_features = { version = "0.1.0", path = "./runtime/features" }
-deno_lib = { version = "2.4.0", path = "./cli/lib" }
+deno_lib = { version = "2.3.1", path = "./cli/lib" }
 deno_npm_cache = { version = "0.23.0", path = "./resolvers/npm_cache" }
 deno_permissions = { version = "0.63.0", path = "./runtime/permissions" }
 deno_resolver = { version = "0.35.0", path = "./resolvers/deno" }

filename: cli/Cargo.toml
patch: @@ -2,7 +2,7 @@
 
 [package]
 name = "deno"
-version = "2.3.0"
+version = "2.3.1"
 authors.workspace = true
 default-run = "deno"
 edition.workspace = true

filename: cli/lib/Cargo.toml
patch: @@ -2,7 +2,7 @@
 
 [package]
 name = "deno_lib"
-version = "2.4.0"
+version = "2.3.1"
 authors.workspace = true
 edition.workspace = true
 license.workspace = true

filename: cli/rt/Cargo.toml
patch: @@ -2,7 +2,7 @@
 
 [package]
 name = "denort"
-version = "2.3.0"
+version = "2.3.1"
 authors.workspace = true
 default-run = "denort"
 edition.workspace = true
Repository: ggml-org/llama.cpp
Pull request: llama: -fa 1/0/-1 aliases for -fa on/off/auto

Out of habit from `llama-bench` I'm trying to set FlashAttention via e.g. `-fa 0`. This PR adds numeric aliases for on/off/auto.

Changed files:
filename: common/arg.cpp
patch: @@ -1548,11 +1548,11 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
         {"-fa", "--flash-attn"}, "FA",
         string_format("set Flash Attention use ('on', 'off', or 'auto', default: '%s')", llama_flash_attn_type_name(params.flash_attn_type)),
         [](common_params & params, const std::string & value) {
-            if (value == "on" || value == "enabled") {
+            if (value == "on" || value == "enabled" || value == "1") {
                 params.flash_attn_type = LLAMA_FLASH_ATTN_TYPE_ENABLED;
-            } else if (value == "off" || value == "disabled") {
+            } else if (value == "off" || value == "disabled" || value == "0") {
                 params.flash_attn_type = LLAMA_FLASH_ATTN_TYPE_DISABLED;
-            } else if (value == "auto") {
+            } else if (value == "auto" || value == "-1") {
                 params.flash_attn_type = LLAMA_FLASH_ATTN_TYPE_AUTO;
             } else {
                 throw std::runtime_error(string_format("error: unkown value for --flash-attn: '%s'\n", value.c_str()));
Repository: facebook/react
Pull request: fix[devtools/e2e]: add fallback for act in integration tests

https://github.com/facebook/react/pull/27805 broke integration tests for React DevTools with React 17, these changes introduce a fallback for such case when `act` is not available in `react`, but available in `react-dom`, like before.

Changed files:
filename: packages/react-devtools-shared/src/__tests__/utils.js
patch: @@ -19,7 +19,9 @@ export function act(
   recursivelyFlush: boolean = true,
 ): void {
   const {act: actTestRenderer} = require('react-test-renderer');
-  const actDOM = require('react').unstable_act;
+  // Use `require('react-dom/test-utils').act` as a fallback for React 17, which can be used in integration tests for React DevTools.
+  const actDOM =
+    require('react').unstable_act || require('react-dom/test-utils').act;
 
   actDOM(() => {
     actTestRenderer(() => {
@@ -44,7 +46,9 @@ export async function actAsync(
   recursivelyFlush: boolean = true,
 ): Promise<void> {
   const {act: actTestRenderer} = require('react-test-renderer');
-  const actDOM = require('react').unstable_act;
+  // Use `require('react-dom/test-utils').act` as a fallback for React 17, which can be used in integration tests for React DevTools.
+  const actDOM =
+    require('react').unstable_act || require('react-dom/test-utils').act;
 
   await actDOM(async () => {
     await actTestRenderer(async () => {
Repository: ggml-org/llama.cpp
Pull request: vulkan: fix shaders gen when no integer dot is available

Fixes #15737

Changed files:
filename: ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp
patch: @@ -854,7 +854,13 @@ void write_output_files() {
         fputs(len.c_str(), src);
     }
 
-    for (const std::string& btype : {"f16", "f32", "q8_1"}) {
+    std::vector<std::string> btypes = {"f16", "f32"};
+
+#if defined(GGML_VULKAN_INTEGER_DOT_GLSLC_SUPPORT)
+    btypes.push_back("q8_1");
+#endif
+
+    for (const std::string& btype : btypes) {
     for (const auto& tname : type_names) {
         if (btype == "q8_1" && !is_legacy_quant(tname)) {
             continue;
Repository: facebook/react
Pull request: Remove WARNINGS file from FB

The test was migrated to the generated JS file that allows Jest to track the dependencies, we can now remove this file generation.

Changed files:
filename: .circleci/config.yml
patch: @@ -107,8 +107,7 @@ jobs:
       - run:
           command: |
             mkdir -p ./build/__test_utils__
-            node ./scripts/print-warnings/print-warnings.js > build/WARNINGS
-            node ./scripts/print-warnings/print-warnings.js --js > build/__test_utils__/ReactAllWarnings.js
+            node ./scripts/print-warnings/print-warnings.js > build/__test_utils__/ReactAllWarnings.js
       - persist_to_workspace:
           root: .
           paths:

filename: .github/workflows/commit_artifacts.yml
patch: @@ -123,9 +123,8 @@ jobs:
           mkdir ./compiled
           mv build/facebook-www ./compiled
 
-          # Move WARNINGS to facebook-www
+          # Move ReactAllWarnings.js to facebook-www
           mkdir ./compiled/facebook-www/__test_utils__
-          mv build/WARNINGS ./compiled/facebook-www/WARNINGS
           mv build/__test_utils__/ReactAllWarnings.js ./compiled/facebook-www/__test_utils__/ReactAllWarnings.js
 
           # Move eslint-plugin-react-hooks into facebook-www

filename: scripts/print-warnings/print-warnings.js
patch: @@ -75,11 +75,10 @@ gs([
   '!**/node_modules/**/*.js',
 ]).pipe(
   through.obj(transform, cb => {
-    if (process.argv[2] === '--js') {
-      const warningsArray = Array.from(warnings);
-      warningsArray.sort();
-      process.stdout.write(
-        `/**
+    const warningsArray = Array.from(warnings);
+    warningsArray.sort();
+    process.stdout.write(
+      `/**
  * Copyright (c) Meta Platforms, Inc. and affiliates.
  *
  * This source code is licensed under the MIT license found in the
@@ -92,14 +91,7 @@ gs([
 
 export default ${JSON.stringify(warningsArray, null, 2)};
 `
-      );
-    } else {
-      process.stdout.write(
-        Array.from(warnings, warning => JSON.stringify(warning))
-          .sort()
-          .join('\n') + '\n'
-      );
-    }
+    );
     cb();
   })
 );
Repository: denoland/deno
Pull request: feat(check): support erasableSyntaxOnly for type checking

Only when using `--check` or `deno check`. Doesn't have this hooked up as part of the swc emit.

* https://github.com/denoland/deno_config/pull/166 (deno_config upgrade happened in a separate PR)

Finishes adding it to the json schema and adds a test to ensure it continues to work.

Closes https://github.com/denoland/deno/issues/28936

Changed files:
filename: cli/schemas/config-file.v1.json
patch: @@ -42,6 +42,12 @@
           "deprecated": true,
           "markdownDescription": "Emit design-type metadata for decorated declarations in source files.\n\nSee more: https://www.typescriptlang.org/tsconfig/#emitDecoratorMetadata"
         },
+        "erasableSyntaxOnly": {
+          "description": "Do not allow runtime constructs that are not part of ECMAScript.",
+          "type": ["boolean", "null"],
+          "default": false,
+          "markdownDescription": "Do not allow runtime constructs that are not part of ECMAScript.\n\nSee more: https://www.typescriptlang.org/tsconfig#erasableSyntaxOnly"
+        },
         "exactOptionalPropertyTypes": {
           "description": "Interpret optional property types as written, rather than adding 'undefined'.",
           "type": "boolean",

filename: tests/specs/check/erasable_syntax_only/__test__.jsonc
patch: @@ -0,0 +1,5 @@
+{
+  "args": "check main.ts",
+  "output": "error.out",
+  "exitCode": 1
+}

filename: tests/specs/check/erasable_syntax_only/deno.json
patch: @@ -0,0 +1,5 @@
+{
+  "compilerOptions": {
+    "erasableSyntaxOnly": true
+  }
+}

filename: tests/specs/check/erasable_syntax_only/error.out
patch: @@ -0,0 +1,7 @@
+Check file:///[WILDLINE]/main.ts
+TS1294 [ERROR]: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.
+namespace Test {
+          ~~~~
+    at file:///[WILDLINE]/main.ts:1:11
+
+error: Type checking failed.

filename: tests/specs/check/erasable_syntax_only/main.ts
patch: @@ -0,0 +1,7 @@
+namespace Test {
+  export function sayHi() {
+    console.log("hi");
+  }
+}
+
+Test.sayHi();
Repository: huggingface/transformers
Pull request: Fix typo in `/v1/models` output payload

# What does this PR do?

This PR fixes a typo affecting the output payload of the `/v1/models` endpoint in `transformers serve`.

## Before submitting

- [X] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request), Pull Request section?
- [ ] Was this discussed/approved via a GitHub issue or the [forum](https://discuss.huggingface.co/)? Please add a link to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?

## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@ArthurZucker or @gante

Changed files:
filename: src/transformers/commands/serving.py
patch: @@ -366,7 +366,7 @@ def get_all_models():
                         {
                             "id": model.id,
                             "object": "model",
-                            "crated": model.created_at.timestamp(),
+                            "created": model.created_at.timestamp(),
                             "owned_by": model.author,
                         }
                         for model in get_text_gen_models()
Repository: ggml-org/llama.cpp
Pull request: vulkan: Fix macro parameter order for f32 matmul shaders

Fixes #15678.

This inadvertently disabled robustness, which could lead to OOB accesses in the shader.


Changed files:
filename: ggml/src/ggml-vulkan/ggml-vulkan.cpp
patch: @@ -2778,11 +2778,11 @@ static void ggml_vk_load_shaders(vk_device& device) {
         // Create 6 variants, {s,m,l}x{unaligned,aligned}
 #define CREATE_MM(TYPE, PIPELINE_NAME, NAMELC, F16ACC, WG_DENOMS, WARPTILE, PUSHCONST, PARAMCOUNT, ID, REQSUBGROUPSIZE) \
         if (device->mul_mat ## ID ## _l[TYPE]) \
-            ggml_vk_create_pipeline(device, device-> PIPELINE_NAME ->l, #NAMELC #F16ACC "_l", NAMELC ## F16ACC ## _fp32_len, NAMELC ## F16ACC ## _fp32_data, "main", PARAMCOUNT, sizeof(PUSHCONST), l_ ## WG_DENOMS, l_ ## WARPTILE, 1, REQSUBGROUPSIZE > 0, false, REQSUBGROUPSIZE);   \
+            ggml_vk_create_pipeline(device, device-> PIPELINE_NAME ->l, #NAMELC #F16ACC "_l", NAMELC ## F16ACC ## _fp32_len, NAMELC ## F16ACC ## _fp32_data, "main", PARAMCOUNT, sizeof(PUSHCONST), l_ ## WG_DENOMS, l_ ## WARPTILE, 1, false, REQSUBGROUPSIZE > 0, REQSUBGROUPSIZE);   \
         if (device->mul_mat ## ID ## _m[TYPE]) \
-            ggml_vk_create_pipeline(device, device-> PIPELINE_NAME ->m, #NAMELC #F16ACC "_m", NAMELC ## F16ACC ## _fp32_len, NAMELC ## F16ACC ## _fp32_data, "main", PARAMCOUNT, sizeof(PUSHCONST), m_ ## WG_DENOMS, m_ ## WARPTILE, 1, REQSUBGROUPSIZE > 0, false, REQSUBGROUPSIZE);   \
+            ggml_vk_create_pipeline(device, device-> PIPELINE_NAME ->m, #NAMELC #F16ACC "_m", NAMELC ## F16ACC ## _fp32_len, NAMELC ## F16ACC ## _fp32_data, "main", PARAMCOUNT, sizeof(PUSHCONST), m_ ## WG_DENOMS, m_ ## WARPTILE, 1, false, REQSUBGROUPSIZE > 0, REQSUBGROUPSIZE);   \
         if (device->mul_mat ## ID ## _s[TYPE]) \
-            ggml_vk_create_pipeline(device, device-> PIPELINE_NAME ->s, #NAMELC #F16ACC "_s", NAMELC ## F16ACC ## _fp32_len, NAMELC ## F16ACC ## _fp32_data, "main", PARAMCOUNT, sizeof(PUSHCONST), s_ ## WG_DENOMS, s_ ## WARPTILE, 1, REQSUBGROUPSIZE > 0, false, REQSUBGROUPSIZE);   \
+            ggml_vk_create_pipeline(device, device-> PIPELINE_NAME ->s, #NAMELC #F16ACC "_s", NAMELC ## F16ACC ## _fp32_len, NAMELC ## F16ACC ## _fp32_data, "main", PARAMCOUNT, sizeof(PUSHCONST), s_ ## WG_DENOMS, s_ ## WARPTILE, 1, false, REQSUBGROUPSIZE > 0, REQSUBGROUPSIZE);   \
         if (device->mul_mat ## ID ## _l[TYPE]) \
             ggml_vk_create_pipeline(device, device-> PIPELINE_NAME ->a_l, #NAMELC #F16ACC "_aligned_l", NAMELC ## _aligned ## F16ACC ## _fp32_len, NAMELC ## _aligned ## F16ACC ## _fp32_data, "main", PARAMCOUNT, sizeof(PUSHCONST), l_ ## WG_DENOMS, l_ ## WARPTILE, l_align, false, REQSUBGROUPSIZE > 0, REQSUBGROUPSIZE);   \
         if (device->mul_mat ## ID ## _m[TYPE]) \
Repository: vercel/next.js
Pull request: [test] Skip flaky cdn-cache-busting test

https://vercel.slack.com/archives/C07UCHRBWGK/p1752001887137129

Changed files:
filename: test/e2e/app-dir/segment-cache/cdn-cache-busting/cdn-cache-busting.test.ts
patch: @@ -101,7 +101,8 @@ describe('segment cache (CDN cache busting)', () => {
     }
   )
 
-  it(
+  // 50% failure rate of this test in CI.
+  it.skip(
     'perform fully prefetched navigation when a third-party proxy ' +
       'performs a redirect',
     async () => {
Repository: vercel/next.js
Pull request: [segment explorer] trigger the actual same level boundary

When you click trigger boundary is not triggering the upper layer boundary but the defined boundaries in the current layer.

https://github.com/user-attachments/assets/6c24caa5-36fc-46db-9e0f-f8753391c541



Changed files:
filename: packages/next/src/client/components/layout-router.tsx
patch: @@ -615,6 +615,21 @@ export default function OuterLayoutRouter({
       ? RenderChildren
       : ErrorBoundary
 
+    let segmentBoundaryTriggerNode: React.ReactNode = null
+    if (
+      process.env.NODE_ENV !== 'production' &&
+      process.env.__NEXT_DEVTOOL_SEGMENT_EXPLORER
+    ) {
+      const { SegmentBoundaryTriggerNode } =
+        require('../../next-devtools/userspace/app/segment-explorer-node') as typeof import('../../next-devtools/userspace/app/segment-explorer-node')
+
+      segmentBoundaryTriggerNode = (
+        <>
+          <SegmentBoundaryTriggerNode />
+        </>
+      )
+    }
+
     // TODO: The loading module data for a segment is stored on the parent, then
     // applied to each of that parent segment's parallel route slots. In the
     // simple case where there's only one parallel route (the `children` slot),
@@ -647,6 +662,7 @@ export default function OuterLayoutRouter({
                       cacheNode={cacheNode}
                       segmentPath={segmentPath}
                     />
+                    {segmentBoundaryTriggerNode}
                   </RedirectBoundary>
                 </HTTPAccessFallbackBoundary>
               </LoadingBoundary>

filename: packages/next/src/next-devtools/userspace/app/segment-explorer-node.tsx
patch: @@ -76,6 +76,19 @@ export function SegmentViewStateNode({ page }: { page: string }) {
   return null
 }
 
+export function SegmentBoundaryTriggerNode() {
+  const { boundaryType } = useSegmentState()
+  let segmentNode: React.ReactNode = null
+  if (boundaryType === 'loading') {
+    segmentNode = <LoadingSegmentNode />
+  } else if (boundaryType === 'not-found') {
+    segmentNode = <NotFoundSegmentNode />
+  } else if (boundaryType === 'error') {
+    segmentNode = <ErrorSegmentNode />
+  }
+  return segmentNode
+}
+
 export function SegmentViewNode({
   type,
   pagePath,
@@ -85,22 +98,9 @@ export function SegmentViewNode({
   pagePath: string
   children?: ReactNode
 }): React.ReactNode {
-  const { boundaryType } = useSegmentState()
-
-  const isChildBoundary = type !== 'layout' && type !== 'template'
-
-  let segmentNode = (
+  const segmentNode = (
     <SegmentTrieNode key={type} type={type} pagePath={pagePath} />
   )
-  if (boundaryType && boundaryType !== type && isChildBoundary) {
-    if (boundaryType === 'loading') {
-      segmentNode = <LoadingSegmentNode />
-    } else if (boundaryType === 'not-found') {
-      segmentNode = <NotFoundSegmentNode />
-    } else if (boundaryType === 'error') {
-      segmentNode = <ErrorSegmentNode />
-    }
-  }
 
   return (
     <>