Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address local review: correct three comments that misdescribed the new caching/gating behavior

[._.]/ Adam Eivy8f23cfc8d121
diff --git a/client/src/components/settings/LocalLlmTab.jsx b/client/src/components/settings/LocalLlmTab.jsx
index f0c45e0011..8985c5d75e 100644
--- a/client/src/components/settings/LocalLlmTab.jsx
+++ b/client/src/components/settings/LocalLlmTab.jsx
@@ -389,8 +389,11 @@ export function LocalLlmTab() {
useEffect(() => {
const t = setTimeout(() => loadCatalog(selected, query, catalogSource, activeCategory), catalogSource === 'huggingface' ? 450 : 250);
return () => clearTimeout(t);
- // activeCategory is intentionally absent — catalogCategoryKey carries it for
- // the one source that needs it. loadCatalog reads the freshest value anyway.
+ // `activeCategory` is intentionally absent: `catalogCategoryKey` IS it
+ // whenever the source consumes it, so the effect re-runs (with a fresh
+ // closure) exactly when the category matters. On the curated source the
+ // closure can hold a stale category, which is harmless because that branch
+ // of loadCatalog never reads the argument.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selected, query, catalogSource, catalogCategoryKey, loadCatalog]);
diff --git a/server/services/huggingFaceCatalog.js b/server/services/huggingFaceCatalog.js
index 75d7594560..c138a220e1 100644
--- a/server/services/huggingFaceCatalog.js
+++ b/server/services/huggingFaceCatalog.js
@@ -694,9 +694,9 @@ function hfFetch(url) {
{ headers: hfHeaders() },
HF_TIMEOUT_MS,
{ retries: 1, retryDelayMs: HF_RETRY_DELAY_MS, shouldRetry: isReplayableConnectionError }
- // undici reports a connection-level failure as a bare `fetch failed`, which
- // reaches the search box verbatim and reads like a bug in PortOS. Name the
- // actual condition so the user knows to just try again.
+ // Both attempts lost the connection. undici's own message is a bare `fetch
+ // failed`, which reaches the search box verbatim and reads like a bug in
+ // PortOS — name the actual condition so the user knows to just try again.
).catch((err) => {
if (!isReplayableConnectionError(err)) throw err
throw new Error(`Hugging Face is not responding (connection dropped twice) — try again in a moment. [${describeFetchError(err)}]`)
diff --git a/server/services/ollamaRegistryCatalog.js b/server/services/ollamaRegistryCatalog.js
index e692af294a..22408166c5 100644
--- a/server/services/ollamaRegistryCatalog.js
+++ b/server/services/ollamaRegistryCatalog.js
@@ -18,7 +18,9 @@
// Network is bounded by the same discipline as fetchRepoModel: per-process
// caches with a `null` sentinel (fetched-but-unavailable, cached) distinct from
// a transient failure (returns null, NOT cached, so a recovered registry
-// re-enriches on the next request).
+// re-enriches on the next request), plus a shared concurrency gate and a
+// single-flight coalescer so a COLD load — where the caches are empty and every
+// entry probes at once — reaches the registry as a trickle rather than a herd.
import { fetchWithTimeout } from '../lib/fetchWithTimeout.js'
import { readResponseJson } from '../lib/readResponseJson.js'