Skip to content

Commit 33d52bb

Browse files
committed
Merge origin/main into fix-composer-scroll-position
2 parents 6391cf1 + 3409651 commit 33d52bb

44 files changed

Lines changed: 2343 additions & 634 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
-176 KB
Binary file not shown.

‎apps/mobile/package.json‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"@clerk/expo": "catalog:",
5050
"@effect/atom-react": "catalog:",
5151
"@expo-google-fonts/dm-sans": "^0.4.2",
52-
"@expo/metro-runtime": "~57.0.14",
5352
"@expo/ui": "~57.0.14",
5453
"@legendapp/list": "catalog:",
5554
"@material/material-color-utilities": "0.3.0",
@@ -137,9 +136,6 @@
137136
"tailwindcss": "^4.0.0",
138137
"typescript": "catalog:"
139138
},
140-
"overrides": {
141-
"react-native-nitro-markdown": "file:deps/react-native-nitro-markdown-0.5.0.tgz"
142-
},
143139
"expo": {
144140
"install": {
145141
"exclude": [

‎apps/mobile/src/components/ProjectFavicon.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
hasLoadedProjectFavicon,
1919
markProjectFaviconFailed,
2020
markProjectFaviconLoaded,
21-
} from "./projectFaviconCache";
21+
} from "../lib/projectFaviconRequests";
2222

2323
const EMPTY_FAVICON_URL = Atom.make<string | null>(null);
2424

‎apps/mobile/src/connection/environment-cache-store.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ import * as Option from "effect/Option";
1515
import * as Schema from "effect/Schema";
1616

1717
import * as MobileDatabase from "../persistence/mobile-database";
18-
import { attachProjectFaviconDatabase, projectFaviconCache } from "../lib/projectFaviconCache";
18+
import {
19+
attachProjectFaviconDatabase,
20+
projectFaviconDatabaseCache,
21+
} from "../lib/projectFaviconDatabaseCache";
1922

2023
const SHELL_SNAPSHOT_CACHE_SCHEMA_VERSION = 1;
2124
// v3 adds windowed (paginated) snapshots carrying `page` metadata; the bump
@@ -130,7 +133,7 @@ export const make = Effect.fn("MobileEnvironmentCacheStore.make")(function* () {
130133
decode: decodeStoredShellSnapshot,
131134
select: (stored) =>
132135
stored.environmentId === environmentId ? Option.some(stored.snapshot) : Option.none(),
133-
}).pipe(Effect.tap(() => Effect.promise(() => projectFaviconCache.hydrate()))),
136+
}).pipe(Effect.tap(() => Effect.promise(() => projectFaviconDatabaseCache.hydrate()))),
134137
),
135138
saveShell: Effect.fn("MobileEnvironmentCache.saveShell")(function* (environmentId, snapshot) {
136139
const payload = yield* encodeStoredShellSnapshot({
@@ -241,7 +244,7 @@ export const make = Effect.fn("MobileEnvironmentCacheStore.make")(function* () {
241244
.pipe(Effect.mapError(mapDatabaseError("clear-vcs-refs"))),
242245
),
243246
clear: Effect.fn("MobileEnvironmentCache.clear")((environmentId) =>
244-
Effect.promise(() => projectFaviconCache.clearEnvironment(environmentId)).pipe(
247+
Effect.promise(() => projectFaviconDatabaseCache.clearEnvironment(environmentId)).pipe(
245248
Effect.andThen(database.clearEnvironmentCache(environmentId)),
246249
Effect.mapError(mapDatabaseError("clear-environment")),
247250
),

‎apps/mobile/src/features/threads/git/GitBranchesSheet.tsx‎

Lines changed: 18 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function GitBranchesSheet(_props: GitBranchesSheetProps) {
6363
return (
6464
<View
6565
collapsable={false}
66-
className={Platform.OS === "android" ? "bg-sheet" : "flex-1 bg-sheet"}
66+
className="bg-sheet ios:flex-1"
6767
style={Platform.OS === "android" ? { maxHeight: windowHeight * 0.92 } : undefined}
6868
>
6969
{Platform.OS === "android" ? (
@@ -83,39 +83,27 @@ export function GitBranchesSheet(_props: GitBranchesSheetProps) {
8383
) : null}
8484
<MaterialScreenContent fitToContents>
8585
<ScrollView
86-
className={Platform.OS === "android" ? "shrink grow-0" : "flex-1"}
86+
className="android:shrink android:grow-0 ios:flex-1"
8787
keyboardShouldPersistTaps="handled"
8888
showsVerticalScrollIndicator={false}
8989
contentInset={{ bottom: Math.max(insets.bottom, 18) + 18 }}
90-
contentContainerClassName={Platform.OS === "android" ? "gap-2 p-2" : "gap-4 px-5 pt-2"}
90+
contentContainerClassName="android:gap-2 android:p-2 ios:gap-4 ios:px-5 ios:pt-2"
9191
contentContainerStyle={
9292
Platform.OS === "android"
9393
? { paddingBottom: Math.max(insets.bottom, 18) + 18 }
9494
: undefined
9595
}
9696
>
97-
<View
98-
className={
99-
Platform.OS === "android"
100-
? "gap-3 rounded-[20px] bg-card p-4"
101-
: "gap-2 rounded-[18px] border border-border bg-card px-4 py-4"
102-
}
103-
>
104-
<Text
105-
className={
106-
Platform.OS === "android"
107-
? "text-foreground text-base font-t3-medium"
108-
: "text-foreground-secondary text-2xs font-t3-bold tracking-[1px] uppercase"
109-
}
110-
>
97+
<View className="bg-card android:gap-3 android:rounded-[20px] android:p-4 ios:gap-2 ios:rounded-[18px] ios:border ios:border-border ios:px-4 ios:py-4">
98+
<Text className="android:text-foreground android:text-base android:font-t3-medium ios:text-foreground-secondary ios:text-2xs ios:font-t3-bold ios:tracking-[1px] ios:uppercase">
11199
New branch
112100
</Text>
113101
<TextInput
114102
value={newBranchName}
115103
onChangeText={setNewBranchName}
116104
placeholder="feature/mobile-polish"
117105
accessibilityLabel="New branch name"
118-
className={Platform.OS === "android" ? "rounded-xl bg-sheet-solid" : "rounded-[18px]"}
106+
className="android:rounded-xl android:bg-sheet-solid ios:rounded-[18px]"
119107
/>
120108
<SheetActionButton
121109
icon="plus"
@@ -133,20 +121,8 @@ export function GitBranchesSheet(_props: GitBranchesSheetProps) {
133121
/>
134122
</View>
135123

136-
<View
137-
className={
138-
Platform.OS === "android"
139-
? "gap-3 rounded-[20px] bg-card p-4"
140-
: "gap-2 rounded-[18px] border border-border bg-card px-4 py-4"
141-
}
142-
>
143-
<Text
144-
className={
145-
Platform.OS === "android"
146-
? "text-foreground text-base font-t3-medium"
147-
: "text-foreground-secondary text-2xs font-t3-bold tracking-[1px] uppercase"
148-
}
149-
>
124+
<View className="bg-card android:gap-3 android:rounded-[20px] android:p-4 ios:gap-2 ios:rounded-[18px] ios:border ios:border-border ios:px-4 ios:py-4">
125+
<Text className="android:text-foreground android:text-base android:font-t3-medium ios:text-foreground-secondary ios:text-2xs ios:font-t3-bold ios:tracking-[1px] ios:uppercase">
150126
New worktree
151127
</Text>
152128
{Platform.OS === "android" ? (
@@ -157,7 +133,7 @@ export function GitBranchesSheet(_props: GitBranchesSheetProps) {
157133
onChangeText={setWorktreeBaseBranch}
158134
placeholder="main"
159135
accessibilityLabel="Worktree base branch"
160-
className={Platform.OS === "android" ? "rounded-xl bg-sheet-solid" : "rounded-[18px]"}
136+
className="android:rounded-xl android:bg-sheet-solid ios:rounded-[18px]"
161137
/>
162138
{Platform.OS === "android" ? (
163139
<Text className="text-foreground-secondary text-sm">New branch</Text>
@@ -167,7 +143,7 @@ export function GitBranchesSheet(_props: GitBranchesSheetProps) {
167143
onChangeText={setWorktreeBranchName}
168144
placeholder="feature/mobile-thread"
169145
accessibilityLabel="Worktree branch name"
170-
className={Platform.OS === "android" ? "rounded-xl bg-sheet-solid" : "rounded-[18px]"}
146+
className="android:rounded-xl android:bg-sheet-solid ios:rounded-[18px]"
171147
/>
172148
<SheetActionButton
173149
icon="square.split.2x1"
@@ -193,32 +169,16 @@ export function GitBranchesSheet(_props: GitBranchesSheetProps) {
193169
</View>
194170

195171
<View className="gap-2">
196-
<Text
197-
className={
198-
Platform.OS === "android"
199-
? "px-4 pb-1 pt-3 text-foreground-secondary text-sm font-t3-medium"
200-
: "text-foreground-secondary text-2xs font-t3-bold tracking-[1px] uppercase"
201-
}
202-
>
172+
<Text className="text-foreground-secondary android:px-4 android:pb-1 android:pt-3 android:text-sm android:font-t3-medium ios:text-2xs ios:font-t3-bold ios:tracking-[1px] ios:uppercase">
203173
Existing branches
204174
</Text>
205175
{branchesLoading ? (
206-
<Text
207-
className={cn(
208-
"text-foreground-secondary text-sm font-medium",
209-
Platform.OS === "android" && "px-4",
210-
)}
211-
>
176+
<Text className="text-foreground-secondary text-sm font-medium android:px-4">
212177
Loading branches...
213178
</Text>
214179
) : null}
215180
{!branchesLoading && availableBranches.length === 0 ? (
216-
<Text
217-
className={cn(
218-
"text-foreground-secondary text-sm font-medium",
219-
Platform.OS === "android" && "px-4",
220-
)}
221-
>
181+
<Text className="text-foreground-secondary text-sm font-medium android:px-4">
222182
No local branches found.
223183
</Text>
224184
) : null}
@@ -236,16 +196,10 @@ export function GitBranchesSheet(_props: GitBranchesSheetProps) {
236196
<Pressable
237197
key={branch.name}
238198
className={cn(
239-
"gap-1 px-4 py-3 disabled:opacity-[0.45]",
240-
Platform.OS === "android"
241-
? cn(
242-
"rounded-[20px] active:bg-subtle",
243-
branch.current ? "bg-secondary" : "bg-card",
244-
)
245-
: cn(
246-
"rounded-[18px] border",
247-
branch.current ? "border-subtle-strong" : "border-border",
248-
),
199+
"gap-1 px-4 py-3 disabled:opacity-[0.45] android:rounded-[20px] android:active:bg-subtle ios:rounded-[18px] ios:border",
200+
branch.current
201+
? "android:bg-secondary ios:border-subtle-strong"
202+
: "android:bg-card ios:border-border",
249203
)}
250204
accessibilityRole="button"
251205
accessibilityState={{ selected: branch.current, disabled: busy || disabled }}
@@ -259,12 +213,7 @@ export function GitBranchesSheet(_props: GitBranchesSheetProps) {
259213
{Platform.OS !== "android" ? (
260214
<View className="absolute inset-0 rounded-[18px] bg-card" />
261215
) : null}
262-
<Text
263-
className={cn(
264-
"text-foreground text-base",
265-
Platform.OS === "android" ? "font-t3-medium" : "font-t3-bold",
266-
)}
267-
>
216+
<Text className="text-foreground text-base android:font-t3-medium ios:font-t3-bold">
268217
{branch.name}
269218
</Text>
270219
<Text className="text-foreground-secondary text-xs font-medium">{subtitle}</Text>

0 commit comments

Comments
 (0)