Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

ThreadQueueControl.tsx

637 lines25.3 KB

1import { type StaticScreenProps, useNavigation } from "@react-navigation/native";
2import { useAtomValue } from "@effect/atom-react";
3import type { ChatAttachment, EnvironmentId, RunId, ThreadId } from "@t3tools/contracts";
4import { Atom } from "effect/reactivity";
5import { Image } from "expo-image";
6import * as Haptics from "expo-haptics";
7import { useEffect, useEffectEvent, useRef, useState } from "react";
8import { Animated, Platform, Pressable, ScrollView, View } from "react-native";
9import { Gesture, GestureDetector, GestureHandlerRootView } from "react-native-gesture-handler";
10import ReanimatedSwipeable, {
11 type SwipeableMethods,
12} from "react-native-gesture-handler/ReanimatedSwipeable";
13import { Screen, ScreenStack, ScreenStackHeaderConfig } from "react-native-screens";
14import { useSafeAreaInsets } from "react-native-safe-area-context";
15import Reanimated, { ReduceMotion, useAnimatedStyle, withTiming } from "react-native-reanimated";
16​
17import { Button } from "../../components/ui/Button";
18import { AndroidSheetHeader } from "../../components/ui/AndroidScreenHeader";
19import { AppText as Text } from "../../components/ui/AppText";
20import { SymbolView } from "../../components/ui/AppSymbol";
21import { Menu } from "../../components/ui/Menu";
22import { ScreenContent } from "../../components/ui/ScreenContent";
23import { scopedThreadKey } from "../../lib/scopedEntities";
24import { useUniwindTheme } from "../../lib/useUniwindTheme";
25import { NativeStackScreenOptions, nativeHeaderScrollEdgeEffects } from "../../native/StackHeader";
26import { useAssetUrl } from "../../state/assets";
27import { assetImageSource } from "../../lib/assetImageSource";
28import { beginQueuedRunEdit, useQueuedRunEdit } from "../../state/queued-run-edit";
29import { environmentThreadDetails, threadEnvironment } from "../../state/threads";
30import { useAtomCommand } from "../../state/use-atom-command";
31import { useAdaptiveWorkspaceLayout } from "../layout/AdaptiveWorkspaceLayout";
32import {
33 REMOVE_QUEUED_MESSAGE_ACCESSIBILITY_LABEL,
34 buildCancelQueuedRunCommand,
35 resolveQueueDragBeforeRunId,
36 resolveQueueDropBeforeRunId,
37 resolveThreadQueueRowControls,
38} from "./threadQueueControlPresentation";
39import { threadDragGapOffset } from "./threadDragGap";
40​
41const HEADER_SCROLL_EDGE_EFFECTS = nativeHeaderScrollEdgeEffects(Platform.OS, Platform.Version);
42const REMOVE_ACTION_WIDTH = 76;
43const THUMBNAIL_LIMIT = 3;
44const EMPTY_QUEUED_COUNT_ATOM = Atom.make(0).pipe(
45 Atom.withLabel("mobile-thread-queue-count:empty"),
46);
47​
48type QueueTarget = { readonly environmentId: EnvironmentId; readonly threadId: ThreadId };
49type QueueAction = "steer" | "edit" | "up" | "down" | "remove";
50type QueueRowLayout = { readonly id: RunId; readonly y?: number; readonly height?: number };
51​
52export function useThreadQueueWorkflow(target: QueueTarget) {
53 return useAtomValue(environmentThreadDetails.queueWorkflowAtom(target));
55​
56export function useThreadQueuedCount(target: QueueTarget | null) {
57 return useAtomValue(
58 target === null ? EMPTY_QUEUED_COUNT_ATOM : environmentThreadDetails.queuedCountAtom(target),
59 );
61​
62export function ThreadQueueSheet({ route }: StaticScreenProps<QueueTarget>) {
63 const { layout } = useAdaptiveWorkspaceLayout();
64 const target = route.params;
65 const navigation = useNavigation();
66 const insets = useSafeAreaInsets();
67 const theme = useUniwindTheme();
68 const workflow = useThreadQueueWorkflow(target);
69 const threadKey = scopedThreadKey(target.environmentId, target.threadId);
70 const editing = useQueuedRunEdit(threadKey);
71 const reorder = useAtomCommand(threadEnvironment.reorderQueuedRun, "reorder queued message");
72 const promote = useAtomCommand(threadEnvironment.promoteQueuedRun, "promote queued message");
73 const cancel = useAtomCommand(threadEnvironment.cancelQueuedRun, "remove queued message");
74 const resume = useAtomCommand(threadEnvironment.resumeThreadQueue, "resume queue");
75 const [resuming, setResuming] = useState(false);
76 const [busyRunId, setBusyRunId] = useState<RunId | null>(null);
77 const busyRef = useRef(false);
78 const [draggedRunId, setDraggedRunId] = useState<RunId | null>(null);
79 const [previewBeforeRunId, setPreviewBeforeRunId] = useState<RunId | null | undefined>();
80 const [dragRows, setDragRows] = useState<ReadonlyArray<QueueRowLayout> | null>(null);
81 const rowLayouts = useRef(new Map<RunId, { y: number; height: number }>());
82 const drag = useRef<{
83 runId: RunId;
84 order: string;
85 beforeRunId: RunId | null | undefined;
86 rows: ReadonlyArray<QueueRowLayout>;
87 } | null>(null);
88 const [translation] = useState(() => new Animated.Value(0));
89 const queuedRuns = workflow?.queuedRuns ?? [];
90 const order = queuedRuns.map(({ run }) => run.id).join(",");
91​
92 useEffect(() => {
93 if (drag.current && drag.current.order !== order) {
94 drag.current = null;
95 setDraggedRunId(null);
96 setPreviewBeforeRunId(undefined);
97 setDragRows(null);
98 translation.setValue(0);
99 }
100 }, [order, translation]);
101​
102 const hadQueuedRuns = useRef(queuedRuns.length > 0);
103 useEffect(() => {
104 if (queuedRuns.length > 0) {
105 hadQueuedRuns.current = true;
106 return;
107 }
108 if (hadQueuedRuns.current) navigation.goBack();
109 }, [navigation, queuedRuns.length]);
110​
111 const move = async (runId: RunId, beforeRunId: RunId | null) => {
112 if (busyRef.current || !workflow?.canReorder) return;
113 busyRef.current = true;
114 setBusyRunId(runId);
115 void Haptics.selectionAsync();
116 await reorder({ ...target, input: { threadId: target.threadId, runId, beforeRunId } });
117 busyRef.current = false;
118 setBusyRunId(null);
119 };
120​
121 const act = async (runId: RunId, action: QueueAction) => {
122 if (busyRef.current) return;
123 const index = queuedRuns.findIndex(({ run }) => run.id === runId);
124 if (index < 0) return;
125 if (action === "up" && index > 0) {
126 await move(runId, queuedRuns[index - 1]!.run.id);
127 return;
128 }
129 if (action === "down" && index < queuedRuns.length - 1) {
130 await move(runId, queuedRuns[index + 2]?.run.id ?? null);
131 return;
132 }
133 if (action === "edit") {
134 const entry = queuedRuns[index]!;
135 void Haptics.selectionAsync();
136 beginQueuedRunEdit(threadKey, {
137 runId,
138 messageId: entry.messageId,
139 originalText: entry.text,
140 existingAttachments: entry.attachments,
141 ...(entry.context ? { context: entry.context } : {}),
142 });
143 navigation.goBack();
144 return;
145 }
146 if (action !== "steer" && action !== "remove") return;
147 busyRef.current = true;
148 setBusyRunId(runId);
149 void Haptics.selectionAsync();
150 if (action === "remove") {
151 await cancel(buildCancelQueuedRunCommand({ ...target, runId }));
152 } else if (workflow?.canSendNow) {
153 await resume({ ...target, input: { threadId: target.threadId, runId } });
154 } else if (workflow?.activeRun && workflow.canPromoteToSteer) {
155 await promote({
156 ...target,
157 input: {
158 threadId: target.threadId,
159 queuedRunId: runId,
160 targetRunId: workflow.activeRun.id,
161 },
162 });
163 }
164 busyRef.current = false;
165 setBusyRunId(null);
166 };
167​
168 const canReorder = workflow?.canReorder === true && queuedRuns.length > 1;
169 const sourceLayout = dragRows?.find((row) => row.id === draggedRunId);
170 const lastLayout = dragRows?.at(-1);
171 const insertionOffset =
172 previewBeforeRunId === undefined
173 ? undefined
174 : previewBeforeRunId === null
175 ? lastLayout?.y === undefined || lastLayout.height === undefined
176 ? undefined
177 : lastLayout.y + lastLayout.height
178 : dragRows?.find((row) => row.id === previewBeforeRunId)?.y;
179 const queueRows = () =>
180 queuedRuns.map(({ run }) => ({ id: run.id, ...rowLayouts.current.get(run.id) }));
181 const content = (
182 <ScrollView
183 nestedScrollEnabled
184 className="flex-1"
185 scrollEnabled={draggedRunId === null}
186 // The iOS header is translucent and floats over this view; UIKit has to
187 // inset the content or the first row sits underneath the title.
188 contentInsetAdjustmentBehavior={Platform.OS === "ios" ? "automatic" : "never"}
189 contentContainerClassName="px-5 pb-6"
190 contentContainerStyle={{ paddingBottom: Math.max(insets.bottom, 16) + 8 }}
191 >
192 {workflow?.isHeld && queuedRuns.length > 0 ? (
193 <View className="gap-2 py-3">
194 <Text className="text-sm text-foreground-muted">Queue paused</Text>
195 <Button
196 label="Resume queue"
197 disabled={resuming || busyRunId !== null}
198 onPress={async () => {
199 if (busyRef.current) return;
200 busyRef.current = true;
201 setResuming(true);
202 await resume({ ...target, input: { threadId: target.threadId } });
203 busyRef.current = false;
204 setResuming(false);
205 }}
206 />
207 </View>
208 ) : null}
209 {queuedRuns.length === 0 ? (
210 <Text className="pt-6 text-center text-sm text-foreground-muted">
211 No messages waiting in this queue.
212 </Text>
213 ) : null}
214 {queuedRuns.map(({ run, text, attachments }, index) => {
215 const layout = dragRows?.find((row) => row.id === run.id);
216 const offset =
217 sourceLayout?.y !== undefined &&
218 sourceLayout.height !== undefined &&
219 layout?.y !== undefined &&
220 insertionOffset !== undefined
221 ? threadDragGapOffset(layout.y, sourceLayout.y, sourceLayout.height, insertionOffset)
222 : 0;
223 const controls = resolveThreadQueueRowControls({
224 busy: busyRunId !== null || draggedRunId !== null,
225 canPromoteToSteer: workflow?.canPromoteToSteer ?? false,
226 canSendNow: workflow?.canSendNow ?? false,
227 canReorder: workflow?.canReorder ?? false,
228 index,
229 isEditing: editing?.runId === run.id,
230 queuedCount: queuedRuns.length,
231 text,
232 });
233 const title =
234 controls.displayText || (attachments.length > 0 ? "Attachments" : "Queued message");
235 return (
236 <QueueShiftedRow
237 key={run.id}
238 offset={offset}
239 dragging={draggedRunId !== null}
240 lifted={draggedRunId === run.id}
241 onLayout={({ nativeEvent }) => rowLayouts.current.set(run.id, nativeEvent.layout)}
242 >
243 <Animated.View
244 className="flex-row items-center border-b border-border bg-sheet"
245 style={
246 draggedRunId === run.id
247 ? { transform: [{ translateY: translation }], zIndex: 1, opacity: 0.85 }
248 : undefined
249 }
250 >
251 {canReorder ? (
252 // Outside the swipeable: two pans on one row would race, and
253 // the handle owns vertical movement while the row owns sideways.
254 <QueueDragHandle
255 disabled={busyRunId !== null}
256 title={title}
257 canMoveUp={controls.canMoveUp}
258 canMoveDown={controls.canMoveDown}
259 onStep={(action) => void act(run.id, action)}
260 onStart={() => {
261 const rows = queueRows();
262 const beforeRunId = resolveQueueDragBeforeRunId(rows, run.id, 0);
263 drag.current = { runId: run.id, order, beforeRunId, rows };
264 translation.setValue(0);
265 setDragRows(rows);
266 setPreviewBeforeRunId(beforeRunId);
267 setDraggedRunId(run.id);
268 void Haptics.selectionAsync();
269 }}
270 onMove={(y) => {
271 const current = drag.current;
272 if (current?.runId !== run.id || current.order !== order) return;
273 translation.setValue(y);
274 const before = resolveQueueDragBeforeRunId(current.rows, run.id, y);
275 if (current.beforeRunId !== before) {
276 current.beforeRunId = before;
277 setPreviewBeforeRunId(before);
278 }
279 }}
280 onEnd={(y, success) => {
281 const started = drag.current;
282 const stop = () => {
283 if (drag.current !== started) return;
284 drag.current = null;
285 setDraggedRunId(null);
286 setPreviewBeforeRunId(undefined);
287 setDragRows(null);
288 translation.setValue(0);
289 };
290 if (!success || started?.order !== order || started.runId !== run.id) {
291 stop();
292 return;
293 }
294 const before = resolveQueueDropBeforeRunId(started.rows, run.id, y);
295 if (before === undefined) {
296 stop();
297 return;
298 }
299 const source = started.rows.find((row) => row.id === run.id);
300 const tail = started.rows.at(-1);
301 const insertion =
302 before === null
303 ? tail?.y !== undefined && tail.height !== undefined
304 ? tail.y + tail.height
305 : undefined
306 : started.rows.find((row) => row.id === before)?.y;
307 if (
308 source?.y !== undefined &&
309 source.height !== undefined &&
310 insertion !== undefined
311 ) {
312 Animated.timing(translation, {
313 toValue: insertion - source.y - (insertion > source.y ? source.height : 0),
314 duration: 160,
315 useNativeDriver: true,
316 }).start();
317 }
318 setPreviewBeforeRunId(before);
319 void move(run.id, before).finally(stop);
320 }}
321 />
322 ) : null}
323 <QueueRowSwipeable
324 enabled={draggedRunId === null && busyRunId === null && controls.canDismiss}
325 background={theme["--color-sheet"]}
326 onRemove={() => void act(run.id, "remove")}
327 >
328 <Menu
329 accessibilityLabel={`Actions for queued message ${index + 1}`}
330 shouldOpenOnLongPress
331 actions={[
332 ...(workflow?.canPromoteToSteer || workflow?.canSendNow
333 ? [
334 {
335 id: "steer",
336 title: workflow?.canSendNow ? "Send now" : "Steer now",
337 attributes: { disabled: !controls.canSend },
338 image: Platform.OS === "ios" ? "arrow.turn.left.up" : "arrow_upward",
339 },
340 ]
341 : []),
342 {
343 id: "edit",
344 title: "Edit",
345 attributes: { disabled: !controls.canEdit },
346 image: Platform.OS === "ios" ? "pencil" : "edit",
347 },
348 { id: "up", title: "Move up", attributes: { disabled: !controls.canMoveUp } },
349 {
350 id: "down",
351 title: "Move down",
352 attributes: { disabled: !controls.canMoveDown },
353 },
354 {
355 id: "remove",
356 title: "Remove",
357 attributes: { disabled: !controls.canDismiss, destructive: true },
358 },
359 ]}
360 onPressAction={({ nativeEvent }) =>
361 void act(run.id, nativeEvent.event as QueueAction)
362 }
363 >
364 <Pressable
365 accessibilityRole="button"
366 accessibilityLabel={title}
367 accessibilityHint="Opens this message in the composer for editing"
368 disabled={!controls.canEdit}
369 onPress={() => void act(run.id, "edit")}
370 className="min-h-14 flex-row items-center gap-2.5 py-2.5 active:opacity-70"
371 >
372 <QueueAttachmentThumbnails
373 environmentId={target.environmentId}
374 attachments={attachments}
375 />
376 <Text
377 className={
378 controls.isEditing
379 ? "min-w-0 flex-1 text-sm text-foreground-muted"
380 : "min-w-0 flex-1 text-sm text-foreground"
381 }
382 numberOfLines={1}
383 >
384 {title}
385 </Text>
386 {controls.isEditing ? (
387 <Text className="shrink-0 text-2xs uppercase tracking-wide text-primary">
388 Editing
389 </Text>
390 ) : null}
391 {workflow?.canPromoteToSteer || workflow?.canSendNow ? (
392 <Pressable
393 accessibilityRole="button"
394 accessibilityLabel={
395 workflow?.canSendNow
396 ? `Send message ${index + 1} now`
397 : `Steer with message ${index + 1} now`
398 }
399 disabled={!controls.canSend}
400 onPress={() => void act(run.id, "steer")}
401 className="h-8 shrink-0 justify-center rounded-full bg-primary px-3 active:opacity-70 disabled:opacity-40"
402 >
403 <Text className="font-t3-medium text-xs text-primary-foreground">
404 {workflow?.canSendNow ? "Send now" : "Steer"}
405 </Text>
406 </Pressable>
407 ) : null}
408 </Pressable>
409 </Menu>
410 </QueueRowSwipeable>
411 </Animated.View>
412 </QueueShiftedRow>
413 );
414 })}
415 </ScrollView>
416 );
417​
418 if (Platform.OS === "ios") {
419 // A plain formSheet screen never renders a stack header, so it comes from
420 // a nested native stack inside the sheet (same shape as the git sheet).
421 return (
422 <GestureHandlerRootView style={{ flex: 1 }}>
423 <View collapsable={false} className="flex-1 bg-sheet">
424 <ScreenStack style={{ flex: 1 }}>
425 <Screen
426 activityState={2}
427 enabled
428 isNativeStack
429 screenId="thread-queue-sheet-native"
430 scrollEdgeEffects={HEADER_SCROLL_EDGE_EFFECTS}
431 style={{ backgroundColor: theme["--color-sheet"], flex: 1 }}
432 >
433 {content}
434 <ScreenStackHeaderConfig
435 backgroundColor="rgba(0,0,0,0)"
436 color={theme["--color-foreground"]}
437 hideBackButton
438 hideShadow={false}
439 title="Queued"
440 titleColor={theme["--color-foreground"]}
441 titleFontSize={18}
442 titleFontWeight="800"
443 translucent
444 />
445 </Screen>
446 </ScreenStack>
447 </View>
448 </GestureHandlerRootView>
449 );
450 }
451​
452 return (
453 <GestureHandlerRootView style={{ flex: 1 }}>
454 <View collapsable={false} className="flex-1 bg-sheet">
455 <NativeStackScreenOptions options={{ sheetCornerRadius: 28 }} />
456 <AndroidSheetHeader title="Queued" onBack={() => navigation.goBack()} />
457 <ScreenContent insetHorizontal={layout.usesSplitView}>{content}</ScreenContent>
458 </View>
459 </GestureHandlerRootView>
460 );
462​
463function QueueShiftedRow(props: {
464 readonly offset: number;
465 readonly dragging: boolean;
466 readonly lifted: boolean;
467 readonly onLayout: React.ComponentProps<typeof View>["onLayout"];
468 readonly children: React.ReactNode;
469}) {
470 const { dragging, offset } = props;
471 const style = useAnimatedStyle(() => ({
472 transform: [
473 {
474 translateY: dragging
475 ? withTiming(offset, { duration: 160, reduceMotion: ReduceMotion.System })
476 : offset,
477 },
478 ],
479 }));
480 return (
481 <Reanimated.View onLayout={props.onLayout} style={[style, { zIndex: props.lifted ? 1 : 0 }]}>
482 {props.children}
483 </Reanimated.View>
484 );
486​
487function QueueRowSwipeable(props: {
488 readonly enabled: boolean;
489 readonly background: string;
490 readonly onRemove: () => void;
491 readonly children: React.ReactNode;
492}) {
493 const swipeableRef = useRef<SwipeableMethods | null>(null);
494 return (
495 <ReanimatedSwipeable
496 ref={swipeableRef}
497 enabled={props.enabled}
498 friction={2}
499 rightThreshold={40}
500 overshootRight={false}
501 // The sheet's own vertical scroll and the drag handle both move up and
502 // down; a swipe has to be clearly sideways before it takes the gesture.
503 failOffsetY={[-12, 12]}
504 containerStyle={{ backgroundColor: props.background, flex: 1 }}
505 childrenContainerStyle={{ backgroundColor: props.background }}
506 onSwipeableOpen={(direction) => {
507 if (direction !== "right") return;
508 swipeableRef.current?.close();
509 props.onRemove();
510 }}
511 renderRightActions={() => (
512 <Pressable
513 accessibilityRole="button"
514 accessibilityLabel={REMOVE_QUEUED_MESSAGE_ACCESSIBILITY_LABEL}
515 disabled={!props.enabled}
516 onPress={() => {
517 swipeableRef.current?.close();
518 props.onRemove();
519 }}
520 className="items-center justify-center bg-danger active:opacity-70 disabled:opacity-40"
521 style={{ width: REMOVE_ACTION_WIDTH }}
522 >
523 <SymbolView name="trash" size={16} tintColorClassName="accent-danger-foreground" />
524 <Text className="pt-1 text-2xs font-t3-medium text-danger-foreground">Remove</Text>
525 </Pressable>
526 )}
527 >
528 {props.children}
529 </ReanimatedSwipeable>
530 );
532​
533function QueueAttachmentThumbnails(props: {
534 readonly environmentId: EnvironmentId;
535 readonly attachments: ReadonlyArray<ChatAttachment>;
536}) {
537 const images = props.attachments.filter((attachment) => attachment.mimeType.startsWith("image/"));
538 const shown = images.slice(0, THUMBNAIL_LIMIT);
539 const overflow = props.attachments.length - shown.length;
540 if (props.attachments.length === 0) return null;
541 return (
542 <View className="shrink-0 flex-row items-center gap-1">
543 {shown.map((attachment) => (
544 <QueueAttachmentThumbnail
545 key={attachment.id}
546 environmentId={props.environmentId}
547 attachment={attachment}
548 />
549 ))}
550 {overflow > 0 ? (
551 <View className="h-6 min-w-6 items-center justify-center rounded bg-subtle px-1">
552 <Text className="text-2xs tabular-nums text-foreground-muted">
553 {shown.length === 0 ? `${overflow}` : `+${overflow}`}
554 </Text>
555 </View>
556 ) : null}
557 </View>
558 );
560​
561function QueueAttachmentThumbnail(props: {
562 readonly environmentId: EnvironmentId;
563 readonly attachment: ChatAttachment;
564}) {
565 const resource = {
566 _tag: "attachment",
567 attachmentId: props.attachment.id,
568 fileName: props.attachment.name,
569 mimeType: props.attachment.mimeType,
570 disposition: "inline",
571 } as const;
572 const url = useAssetUrl(props.environmentId, resource);
573 if (url === null) {
574 return <View className="h-6 w-6 rounded bg-subtle" />;
575 }
576 return (
577 <Image
578 source={assetImageSource(props.environmentId, resource, url)}
579 cachePolicy="memory-disk"
580 contentFit="cover"
581 style={{ width: 24, height: 24, borderRadius: 4 }}
582 accessibilityIgnoresInvertColors
583 />
584 );
586​
587function QueueDragHandle(props: {
588 disabled: boolean;
589 title: string;
590 canMoveUp: boolean;
591 canMoveDown: boolean;
592 onStep: (action: "up" | "down") => void;
593 onStart: () => void;
594 onMove: (y: number) => void;
595 onEnd: (y: number, success: boolean) => void;
596}) {
597 // Gesture callbacks fire outside render, so effect events read the latest
598 // props without rebuilding the gesture.
599 const onStart = useEffectEvent(() => props.onStart());
600 const onMove = useEffectEvent((y: number) => props.onMove(y));
601 const onEnd = useEffectEvent((y: number, success: boolean) => props.onEnd(y, success));
602 const gesture = Gesture.Pan()
603 .enabled(!props.disabled)
604 .minDistance(0)
605 .shouldCancelWhenOutside(false)
606 .runOnJS(true)
607 .onStart(() => onStart())
608 .onUpdate((event) => onMove(event.translationY))
609 .onFinalize((event, success) => onEnd(event.translationY, success));
610 return (
611 <GestureDetector gesture={gesture}>
612 <View
613 collapsable={false}
614 accessible
615 accessibilityRole="adjustable"
616 accessibilityLabel={`Reorder ${props.title}`}
617 accessibilityState={{ disabled: props.disabled }}
618 accessibilityActions={[
619 ...(props.canMoveUp ? [{ name: "decrement", label: "Move up" }] : []),
620 ...(props.canMoveDown ? [{ name: "increment", label: "Move down" }] : []),
621 ]}
622 onAccessibilityAction={({ nativeEvent }) => {
623 if (props.disabled) return;
624 if (nativeEvent.actionName === "decrement" && props.canMoveUp) props.onStep("up");
625 if (nativeEvent.actionName === "increment" && props.canMoveDown) props.onStep("down");
626 }}
627 className="h-12 w-8 items-center justify-center"
628 >
629 <SymbolView
630 name="line.3.horizontal"
631 size={16}
632 tintColorClassName="accent-foreground-muted"
633 />
634 </View>
635 </GestureDetector>
636 );