Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix: tanstack query initial value undefined despite cached data (#2380)

dev-rbedd594b4e670
diff --git a/js/app/bun.lock b/js/app/bun.lock
index c5fdbf9391..6c2ae77439 100644
--- a/js/app/bun.lock
+++ b/js/app/bun.lock
@@ -54,7 +54,7 @@
"@solidjs/router": "^0.15.3",
"@tailwindcss/vite": "^4.1.14",
"@tanstack/pacer": "^0.17.3",
- "@tanstack/solid-query": "^5.90.3",
+ "@tanstack/solid-query": "5.90.3",
"@tanstack/solid-virtual": "^3.13.13",
"@tauri-apps/plugin-haptics": "~2",
"@tauri-apps/plugin-http": "~2",
@@ -302,11 +302,12 @@
"esbuild",
],
"patchedDependencies": {
+ "@tanstack/[email protected]": "patches/@tanstack%[email protected]",
"@kobalte/[email protected]": "patches/@kobalte%[email protected]",
"@thisbeyond/[email protected]": "patches/@thisbeyond%[email protected]",
"@lexical/[email protected]": "patches/@lexical%[email protected]",
},
"overrides": {
"ajv": ">=6.14.0",
diff --git a/js/app/package.json b/js/app/package.json
index eac02493a9..308bcc42ec 100644
--- a/js/app/package.json
+++ b/js/app/package.json
@@ -71,7 +71,7 @@
"@solidjs/router": "^0.15.3",
"@tailwindcss/vite": "^4.1.14",
"@tanstack/pacer": "^0.17.3",
- "@tanstack/solid-query": "^5.90.3",
+ "@tanstack/solid-query": "5.90.3",
"@tanstack/solid-virtual": "^3.13.13",
"@tauri-apps/plugin-haptics": "~2",
"@tauri-apps/plugin-http": "~2",
@@ -165,7 +165,8 @@
"@thisbeyond/[email protected]": "patches/@thisbeyond%[email protected]",
"@lexical/[email protected]": "patches/@lexical%[email protected]",
"@kobalte/[email protected]": "patches/@kobalte%[email protected]",
+ "@tanstack/[email protected]": "patches/@tanstack%[email protected]"
},
"overrides": {
"cross-spawn": "7.0.6",
diff --git a/js/app/patches/@tanstack%[email protected] b/js/app/patches/@tanstack%[email protected]
new file mode 100644
index 0000000000..ad93ffc9f3
--- /dev/null
+++ b/js/app/patches/@tanstack%[email protected]
@@ -0,0 +1,30 @@
+diff --git a/node_modules/@tanstack/solid-query/.bun-tag-45b322634d70fffb b/.bun-tag-45b322634d70fffb
+new file mode 100644
+index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
+diff --git a/node_modules/@tanstack/solid-query/.bun-tag-4e44056cd98d1d17 b/.bun-tag-4e44056cd98d1d17
+new file mode 100644
+index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
+diff --git a/build/dev.js b/build/dev.js
+index d1b3addc6fc214c5508f903fda375f38e14acfd7..cc27b37db9ab24a07ed6ec0bfd31da3fd1a6bd8b 100644
+--- a/build/dev.js
++++ b/build/dev.js
+@@ -191,6 +191,7 @@ function useBaseQuery(options, Observer, queryClient) {
+ },
+ {
+ storage: createDeepSignal,
++ initialValue: !observerResult.isLoading ? observerResult : undefined,
+ get deferStream() {
+ return options().deferStream;
+ },
+diff --git a/build/index.js b/build/index.js
+index afe1550d6dd52e4dd7cacf1dc8850463f0a55986..3079aee613917690286dc2aed99572d15555d1d7 100644
+--- a/build/index.js
++++ b/build/index.js
+@@ -182,6 +182,7 @@ function useBaseQuery(options, Observer, queryClient) {
+ },
+ {
+ storage: createDeepSignal,
++ initialValue: !observerResult.isLoading ? observerResult : undefined,
+ get deferStream() {
+ return options().deferStream;
+ },