@devries-cameron20 / t3code Mirror · read-only / commits / 44df336016
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 17:00 UTC

fix(mobile): upgrade react-native-keyboard-controller to 1.22.8 for the Duo fold composer (#25141)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Oct 25, 2026 at 17:04 UTC 44df3360165ba96a6902496812feca2b60c7fcc9
4 files changed +58 -52
apps/mobile/package.json
+1 -1
@@ -129,7 +129,7 @@
129 "react-native-enriched-markdown": "file:deps/react-native-enriched-markdown-1.2.0-t3.16-558767d9.tgz",
130 "react-native-gesture-handler": "~3.3.0",
131 "react-native-image-viewing": "^0.2.2",
132 - "react-native-keyboard-controller": "1.22.7",
132 + "react-native-keyboard-controller": "1.22.8",
133 "react-native-nitro-modules": "0.37.1",
134 "react-native-pdf-jsi": "5.0.0",
135 "react-native-reanimated": "4.7.1",
patches/react-native-keyboard-controller@1.22.8.patch renamed
+47 -41
@@ -187,10 +187,10 @@ index 6481228..0dc5dd1 100644
187 padding,
188 currentHeight,
189 diff --git a/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js b/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js
190 -index 827436c..fe9f371 100644
190 +index 11e81a9..de39eac 100644
191 --- a/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js
192 +++ b/lib/commonjs/components/KeyboardChatScrollView/useExtraContentPadding/index.js
193 -@@ -32,6 +32,8 @@ function useExtraContentPadding(options) {
193 +@@ -33,6 +33,8 @@ function useExtraContentPadding(options) {
194 extraContentPadding,
195 keyboardPadding,
196 blankSpace,
@@ -199,7 +199,7 @@ index 827436c..fe9f371 100644
199 scroll,
200 layout,
201 size,
202 -@@ -66,8 +68,8 @@ function useExtraContentPadding(options) {
202 +@@ -74,8 +76,8 @@ function useExtraContentPadding(options) {
203 }
204
205 // Compute effective delta considering blankSpace floor
@@ -210,20 +210,24 @@ index 827436c..fe9f371 100644
210 const effectiveDelta = currentTotal - previousTotal;
211 if (effectiveDelta === 0) {
212 // blankSpace absorbed the change
213 -@@ -86,13 +88,11 @@ function useExtraContentPadding(options) {
214 - const target = Math.max(scroll.value - effectiveDelta, -currentTotal);
215 - scrollToTarget(target);
213 +@@ -116,14 +118,15 @@ function useExtraContentPadding(options) {
214 + if (inverted) {
215 + target = Math.max(base - effectiveDelta, -currentTotal);
216 } else {
217 - const maxScroll = Math.max(size.value.height - layout.value.height + currentTotal, 0);
218 -- // Clamp at 0 as well: when the content is shorter than the viewport a
219 -- // shrinking padding makes `effectiveDelta` negative while `scroll.value`
220 -- // is already 0, so the target would go below the top of the content.
221 -- const target = Math.max(Math.min(scroll.value + effectiveDelta, maxScroll), 0);
218 + const minScroll = -adjustedStartInsetCompensation;
219 + const maxScroll = Math.max(size.value.height - layout.value.height + currentTotal, minScroll);
224 -+ const target = Math.max(minScroll, Math.min(scroll.value + effectiveDelta, maxScroll));
225 - scrollToTarget(target);
220 +
221 +- // Clamp at 0 as well: when the content is shorter than the viewport a
222 +- // shrinking padding makes `effectiveDelta` negative while `base` is
223 +- // already 0, so the target would go below the top of the content.
224 +- target = Math.max(Math.min(base + effectiveDelta, maxScroll), 0);
225 ++ // Clamp at the top as well: when the content is shorter than the
226 ++ // viewport a shrinking padding makes `effectiveDelta` negative while
227 ++ // `base` is already at the top.
228 ++ target = Math.max(minScroll, Math.min(base + effectiveDelta, maxScroll));
229 }
230 + scrollToTarget(target);
231 - }, [inverted, keyboardLiftBehavior]);
232 + }, [inverted, keyboardLiftBehavior, adjustedInsetCompensation, adjustedStartInsetCompensation]);
233 }
@@ -430,10 +434,10 @@ index 043b973..df5a408 100644
434 padding,
435 currentHeight,
436 diff --git a/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js b/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js
433 -index 3c90439..9e7ebb6 100644
437 +index cdca47b..3ea3a7f 100644
438 --- a/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js
439 +++ b/lib/module/components/KeyboardChatScrollView/useExtraContentPadding/index.js
436 -@@ -26,6 +26,8 @@ function useExtraContentPadding(options) {
440 +@@ -27,6 +27,8 @@ function useExtraContentPadding(options) {
441 extraContentPadding,
442 keyboardPadding,
443 blankSpace,
@@ -442,7 +446,7 @@ index 3c90439..9e7ebb6 100644
446 scroll,
447 layout,
448 size,
445 -@@ -60,8 +62,8 @@ function useExtraContentPadding(options) {
449 +@@ -68,8 +70,8 @@ function useExtraContentPadding(options) {
450 }
451
452 // Compute effective delta considering blankSpace floor
@@ -453,20 +457,24 @@ index 3c90439..9e7ebb6 100644
457 const effectiveDelta = currentTotal - previousTotal;
458 if (effectiveDelta === 0) {
459 // blankSpace absorbed the change
456 -@@ -80,14 +82,12 @@ function useExtraContentPadding(options) {
457 - const target = Math.max(scroll.value - effectiveDelta, -currentTotal);
458 - scrollToTarget(target);
460 +@@ -110,15 +112,16 @@ function useExtraContentPadding(options) {
461 + if (inverted) {
462 + target = Math.max(base - effectiveDelta, -currentTotal);
463 } else {
464 - const maxScroll = Math.max(size.value.height - layout.value.height + currentTotal, 0);
461 -- // Clamp at 0 as well: when the content is shorter than the viewport a
462 -- // shrinking padding makes `effectiveDelta` negative while `scroll.value`
463 -- // is already 0, so the target would go below the top of the content.
464 -- const target = Math.max(Math.min(scroll.value + effectiveDelta, maxScroll), 0);
465 + const minScroll = -adjustedStartInsetCompensation;
466 + const maxScroll = Math.max(size.value.height - layout.value.height + currentTotal, minScroll);
467 -+ const target = Math.max(minScroll, Math.min(scroll.value + effectiveDelta, maxScroll));
468 - scrollToTarget(target);
467 +
468 +- // Clamp at 0 as well: when the content is shorter than the viewport a
469 +- // shrinking padding makes `effectiveDelta` negative while `base` is
470 +- // already 0, so the target would go below the top of the content.
471 +- target = Math.max(Math.min(base + effectiveDelta, maxScroll), 0);
472 ++ // Clamp at the top as well: when the content is shorter than the
473 ++ // viewport a shrinking padding makes `effectiveDelta` negative while
474 ++ // `base` is already at the top.
475 ++ target = Math.max(minScroll, Math.min(base + effectiveDelta, maxScroll));
476 }
477 + scrollToTarget(target);
478 - }, [inverted, keyboardLiftBehavior]);
479 + }, [inverted, keyboardLiftBehavior, adjustedInsetCompensation, adjustedStartInsetCompensation]);
480 }
@@ -823,10 +831,10 @@ index f89b7c8..02e0e19 100644
831
832 type UseChatKeyboardReturn = {
833 diff --git a/src/components/KeyboardChatScrollView/useExtraContentPadding/index.ts b/src/components/KeyboardChatScrollView/useExtraContentPadding/index.ts
826 -index e7584ed..dc653b0 100644
834 +index 99cc6c6..d883e76 100644
835 --- a/src/components/KeyboardChatScrollView/useExtraContentPadding/index.ts
836 +++ b/src/components/KeyboardChatScrollView/useExtraContentPadding/index.ts
829 -@@ -17,6 +17,10 @@ type UseExtraContentPaddingOptions = {
837 +@@ -18,6 +18,10 @@ type UseExtraContentPaddingOptions = {
838 keyboardPadding: SharedValue<number>;
839 /** Minimum inset floor — used to absorb keyboard and extraContentPadding changes. */
840 blankSpace: SharedValue<number>;
@@ -837,7 +845,7 @@ index e7584ed..dc653b0 100644
845 /** Current vertical scroll offset. */
846 scroll: SharedValue<number>;
847 /** Visible viewport dimensions. */
840 -@@ -52,6 +56,8 @@ function useExtraContentPadding(options: UseExtraContentPaddingOptions): void {
848 +@@ -53,6 +57,8 @@ function useExtraContentPadding(options: UseExtraContentPaddingOptions): void {
849 extraContentPadding,
850 keyboardPadding,
851 blankSpace,
@@ -846,7 +854,7 @@ index e7584ed..dc653b0 100644
854 scroll,
855 layout,
856 size,
849 -@@ -95,14 +101,12 @@ function useExtraContentPadding(options: UseExtraContentPaddingOptions): void {
857 +@@ -104,14 +110,12 @@ function useExtraContentPadding(options: UseExtraContentPaddingOptions): void {
858 }
859
860 // Compute effective delta considering blankSpace floor
@@ -867,9 +875,9 @@ index e7584ed..dc653b0 100644
875 const effectiveDelta = currentTotal - previousTotal;
876
877 if (effectiveDelta === 0) {
870 -@@ -135,22 +139,28 @@ function useExtraContentPadding(options: UseExtraContentPaddingOptions): void {
871 -
872 - scrollToTarget(target);
878 +@@ -170,20 +174,26 @@ function useExtraContentPadding(options: UseExtraContentPaddingOptions): void {
879 + if (inverted) {
880 + target = Math.max(base - effectiveDelta, -currentTotal);
881 } else {
882 + const minScroll = -adjustedStartInsetCompensation;
883 const maxScroll = Math.max(
@@ -877,20 +885,18 @@ index e7584ed..dc653b0 100644
885 - 0,
886 + minScroll,
887 );
888 +
889 - // Clamp at 0 as well: when the content is shorter than the viewport a
881 -- // shrinking padding makes `effectiveDelta` negative while `scroll.value`
882 -- // is already 0, so the target would go below the top of the content.
890 +- // shrinking padding makes `effectiveDelta` negative while `base` is
891 +- // already 0, so the target would go below the top of the content.
892 +- target = Math.max(Math.min(base + effectiveDelta, maxScroll), 0);
893 + // Clamp at the top as well: when the content is shorter than the
894 + // viewport a shrinking padding makes `effectiveDelta` negative while
885 -+ // `scroll.value` is already at the top.
886 - const target = Math.max(
887 -+ minScroll,
888 - Math.min(scroll.value + effectiveDelta, maxScroll),
889 -- 0,
890 - );
891 -
892 - scrollToTarget(target);
895 ++ // `base` is already at the top.
896 ++ target = Math.max(minScroll, Math.min(base + effectiveDelta, maxScroll));
897 }
898 +
899 + scrollToTarget(target);
900 },
901 - [inverted, keyboardLiftBehavior],
902 + [
pnpm-lock.yaml
+7 -7
@@ -272,7 +272,7 @@ overrides:
272 node-pty: 1.2.0-beta.15
273 react-native-gesture-handler: 3.3.0
274 react-native-reanimated: 4.7.1
275 - react-native-keyboard-controller: 1.22.7
275 + react-native-keyboard-controller: 1.22.8
276 react-native-pdf-jsi: 5.0.0
277 react-native-webview: 14.0.1
278 '@expo/ui': 58.0.20
@@ -373,7 +373,7 @@ patchedDependencies:
373 node-pty@1.2.0-beta.15: f1e680afec85f650699ea756f91f469844ec4c976f4f168492a45c6b3f67d651
374 react-native-gesture-handler@3.3.0: abe20e1d1c23549297cbbc818e14fe479b41455930d9663135d6b40fe359b626
375 react-native-image-viewing@0.2.2: 419f35ee91eac88ced9438058281db5eb09d9c799d8974c1172926068c9448cf
376 - react-native-keyboard-controller@1.22.7: f28d08f1233e3cce8b9324b4357d2b10f1ee040b8051bc87235b0fb95069b9bb
376 + react-native-keyboard-controller@1.22.8: 6eb6c847ac693b636ec97c83575acd44b77e92ad0d2c776de0cb4e78e8fb9d4f
377 react-native-pdf-jsi@5.0.0: 6f52854210f61bef499850ebd498229a111bc34ec5b2a4925e644f2f48f42760
378 react-native-reanimated@4.7.1: 95ee26e5fcab5f50bc4b4c47b3f7e6278a0b20850205efb9f6ee7e70a22d2b59
379 react-native-webview@14.0.1: 81caa279ec3dc1f81209062133b66e8f824e13f106cca57f1fa732a72c2ab378
@@ -748,8 +748,8 @@ importers:
748 specifier: 0.2.2
749 version: 0.2.2(patch_hash=419f35ee91eac88ced9438058281db5eb09d9c799d8974c1172926068c9448cf)(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
750 react-native-keyboard-controller:
751 - specifier: 1.22.7
752 - version: 1.22.7(patch_hash=f28d08f1233e3cce8b9324b4357d2b10f1ee040b8051bc87235b0fb95069b9bb)(e2a826d844fe10cdcbda558127861778)
751 + specifier: 1.22.8
752 + version: 1.22.8(patch_hash=6eb6c847ac693b636ec97c83575acd44b77e92ad0d2c776de0cb4e78e8fb9d4f)(e2a826d844fe10cdcbda558127861778)
753 react-native-nitro-modules:
754 specifier: 0.37.1
755 version: 0.37.1(react-native@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(react@19.3.0)
@@ -10704,8 +10704,8 @@ packages:
10704 react: '*'
10705 react-native: '*'
10706
10707 - react-native-keyboard-controller@1.22.7:
10708 - resolution: {integrity: sha512-IBR9z6Nl/iDLRfiv1zN9QQroOXAwYMugeAjVDb+CFbRBNC8fayXlHTBbshVcWc4j95Itsv+1/FgwfxKnIn1Vmg==}
10707 + react-native-keyboard-controller@1.22.8:
10708 + resolution: {integrity: sha512-1eJk1bPMyRq+MlKxak1p0tyZ3sOF3KWi4ilVCYm1u7RSGJ4bVXu0Kn6lKzByrc/vH+m0LqWNhGNuUDyOJ/Lwhw==}
10709 peerDependencies:
10710 react: '*'
10711 react-native: '*'
@@ -21307,7 +21307,7 @@ snapshots:
21307 react: 19.3.0
21308 react-native: 0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6)
21309
21310 - react-native-keyboard-controller@1.22.7(patch_hash=f28d08f1233e3cce8b9324b4357d2b10f1ee040b8051bc87235b0fb95069b9bb)(e2a826d844fe10cdcbda558127861778):
21310 + react-native-keyboard-controller@1.22.8(patch_hash=6eb6c847ac693b636ec97c83575acd44b77e92ad0d2c776de0cb4e78e8fb9d4f)(e2a826d844fe10cdcbda558127861778):
21311 dependencies:
21312 react: 19.3.0
21313 react-native: 0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(@react-native/metro-config@0.88.0(@babel/core@7.29.7(supports-color@8.1.1))(bufferutil@4.1.0)(supports-color@8.1.1)(utf-8-validate@6.0.6))(@types/react@19.3.0)(bufferutil@4.1.0)(react@19.3.0)(supports-color@8.1.1)(utf-8-validate@6.0.6)
pnpm-workspace.yaml
+3 -3
@@ -185,7 +185,7 @@ minimumReleaseAgeExclude:
185 - "react@19.3.0"
186 - "react-dom@19.3.0"
187 - "react-native@0.88.0"
188 - - "react-native-keyboard-controller@1.22.7"
188 + - "react-native-keyboard-controller@1.22.8"
189 - "react-native-worklets@0.13.0"
190 - "react-native-reanimated@4.7.1"
191 - "react-native-screens@4.28.0"
@@ -246,7 +246,7 @@ overrides:
246 node-pty: 1.2.0-beta.15
247 react-native-gesture-handler: 3.3.0
248 react-native-reanimated: 4.7.1
249 - react-native-keyboard-controller: 1.22.7
249 + react-native-keyboard-controller: 1.22.8
250 react-native-pdf-jsi: 5.0.0
251 react-native-webview: 14.0.1
252 "@expo/ui": 58.0.20
@@ -380,7 +380,7 @@ patchedDependencies:
380 # Screens v5 stack, split and tab screens leave at once, like legacy screens. Exiting animations
381 # inside one otherwise hold its removal for a later mount, after its stack has moved on.
382 react-native-reanimated@4.7.1: patches/react-native-reanimated@4.7.1.patch
383 - react-native-keyboard-controller@1.22.7: patches/react-native-keyboard-controller@1.22.7.patch
383 + react-native-keyboard-controller@1.22.8: patches/react-native-keyboard-controller@1.22.8.patch
384 react-native-pdf-jsi@5.0.0: patches/react-native-pdf-jsi@5.0.0.patch
385 # Android: a nested WebView hands a vertical drag to its scrolling parent at the page's edge.
386 react-native-webview@14.0.1: patches/react-native-webview@14.0.1.patch