[codex] Add Android mobile support #3579
Mergedjuliusmarmingemerged 48 commits into
main fromrefs/pull/3579/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
- apps/mobile/src/app/new/index.tsx lines 118 to 118OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -108,9 +111,8 @@108111109112 return (110113 <View collapsable={false} className="flex-1 bg-sheet">111- <Stack.Screen options={{ title: "Choose project" }} />112- <Stack.Toolbar placement="right">113- <Stack.Toolbar.Button114- icon="plus"115- onPress={() => router.push("/new/add-project")}116- separateBackground114+ <Stack.Screen options={{ headerShown: Platform.OS !== "android", title: "Choose project" }} />115+ {Platform.OS === "android" ? (116+ <AndroidScreenHeader117+ title="Choose project"118+ onBack={layout.usesSplitView ? () => router.back() : undefined}apps/mobile/src/features/diffs/nativeReviewDiffSurface.ts line 190OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -134,0 +167,21 @@167+type NativeReviewDiffPayloadMethod = "setRowsJson" | "setTokensJson" | "setTokensPatchJson";168+169+export function isPendingNativeViewRegistration(error: unknown): boolean {170+ return (171+ error instanceof Error &&172+ error.message.includes(`Unable to find the '${NATIVE_REVIEW_DIFF_MODULE_NAME}' view`)173+ );174+}175+176+function useNativeReviewDiffPayload(177+ nativeRef: React.RefObject<NativeReviewDiffViewRef | null>,178+ method: NativeReviewDiffPayloadMethod,179+ payload: string | undefined,180+) {181+ useEffect(() => {182+ if (payload === undefined) {183+ return;184+ }185+186+ let cancelled = false;187+ let frame: number | null = null;apps/mobile/src/components/AppSymbol.tsx line 188Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +108,21 @@108+ terminal: IconTerminal2,109+ "text.bubble": IconMessage,110+ "textformat.size": IconTypography,111+ trash: IconTrash,112+ "wifi.slash": IconWifiOff,113+ xmark: IconX,114+ "xmark.circle.fill": IconCircleXFilled,115+};116+117+export type { SFSymbol } from "expo-symbols";118+export type AppSymbolName = SymbolViewProps["name"];119+120+export function SymbolView(props: SymbolViewProps) {121+ if (Platform.OS !== "android") {122+ return <ExpoSymbolView {...props} />;123+ }124+125+ const sfSymbol = typeof props.name === "string" ? props.name : props.name.ios;126+ const AndroidIcon = sfSymbol ? ANDROID_ICON_BY_SF_SYMBOL[sfSymbol] : undefined;127+128+ if (!AndroidIcon) {apps/mobile/src/features/threads/ThreadComposer.tsx lines 221 to 223OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -212,6 +214,10 @@212214213215 const [previewImageUri, setPreviewImageUri] = useState<string | null>(null);214216 const hasContent = props.draftMessage.trim().length > 0 || props.draftAttachments.length > 0;215- const isExpanded = isFocused;217+ const isExpanded = isFocused || (Platform.OS === "android" && hasContent);216218 const canSend = hasContent;217219220+ useEffect(() => {221+ if (Platform.OS !== "android") return;222+ onExpandedChange?.(isExpanded);223+ }, [isExpanded, onExpandedChange]);apps/mobile/src/state/use-thread-selection.ts line 25OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -16,5 +21,5 @@1621 return value ?? null;1722 }182319-export function useThreadSelection() {20- const params = useLocalSearchParams<{24+function useResolvedThreadSelection() {25+ const params = useGlobalSearchParams<{apps/mobile/src/features/files/ThreadFilesRouteScreen.tsx line 330OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -465,5 +526,20 @@526+ const handlePreviewFile = useCallback(527+ (relativePath: string) => {528+ if (environmentId === null || cwd === null) {529+ return;530+ }531+ preloadWorkspaceFileContents({532+ cwd,533+ environmentId,534+ relativePath,535+ theme: highlightTheme,536+ });465537 },466- [environmentId, router, threadId],538+ [cwd, environmentId, highlightTheme],539+ );540+ const renderHeaderTitle = useCallback(541+ () => <FilesHeaderTitle projectName={projectName} />,542+ [projectName],467543 );468544469545 if (selectedThread === null || environmentId === null || threadId === null) {@@ -338,3 +645,20 @@645+ isAndroid646+ ? { headerShown: false }647+ : {648+ headerTransparent: true,649+ headerShadowVisible: false,650+ headerTintColor: headerIcon,651+ headerStyle: {652+ backgroundColor: "transparent",653+ },654+ headerTitle: renderHeaderTitle,655+ }656+ }338657 />339658340- {showSectionToolbar ? (659+ {isAndroid ? (660+ <AndroidScreenHeader661+ title="Review changes"662+ subtitle={androidHeaderSubtitle || "Select a diff"}663+ onBack={() => router.back()}664+ trailing={@@ -379,3 +391,9 @@379391 updateViewportFrame()380392 }381393394+ public func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {395+ // A direct gesture takes ownership from any interrupted programmatic jump.396+ // Resume visible-file events immediately so the inspector follows the finger.397+ isProgrammaticScrollActive = false398+ contentView.isVerticalScrollActive = true399+ }apps/mobile/plugins/withIosSceneLifecycle.cjs lines 38 to 46OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +8,21 @@8+ func scene(9+ _ scene: UIScene,10+ willConnectTo session: UISceneSession,11+ options connectionOptions: UIScene.ConnectionOptions12+ ) {13+ guard14+ let windowScene = scene as? UIWindowScene,15+ let appDelegate = UIApplication.shared.delegate as? AppDelegate,16+ let appWindow = appDelegate.window17+ else {18+ return19+ }20+21+ window = appWindow22+ appWindow.windowScene = windowScene23+ appWindow.makeKeyAndVisible()24+25+ if let url = connectionOptions.urlContexts.first?.url {26+ _ = appDelegate.application(UIApplication.shared, open: url, options: [:])27+ }28+ }apps/mobile/src/features/threads/ThreadFeed.tsx line 528OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -490,20 +527,2 @@490527 : {}),491- code_block: ({ content, language }) => (492- <View493- style={{494- backgroundColor: blockBackgroundColor,495- borderRadius: 10,496- borderWidth: 1,497- borderColor: markdownHrColor,498- marginVertical: 12,499- overflow: "hidden",500- }}501- >502- {language ? (503- <View504- style={{505- borderBottomWidth: 1,506- borderBottomColor: markdownHrColor,507- paddingHorizontal: 14,508- paddingVertical: 8,509- }}528+ code_block: ({ content = "", language }) => {@@ -143,6 +151,21 @@151+ const handleSubmit = useCallback(() => {152+ if (!target || !environmentId || !threadId || commentText.trim().length === 0) {153+ return;154+ }155+156+ appendReviewCommentToDraft({157+ environmentId,158+ threadId,159+ text: formatReviewCommentContext(target, commentText),160+ attachments,161+ });162+ setAttachments([]);163+ dismissComposer();164+ }, [attachments, commentText, dismissComposer, environmentId, target, threadId]);165+143166 return (144167 <View style={{ flex: 1 }}>145168 <KeyboardAvoidingView automaticOffset behavior="padding" style={{ flex: 1 }}>146169 <View147170 style={{148171 flex: 1,
- apps/mobile/src/features/threads/ThreadDetailScreen.tsx line 404OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -418,20 +404 @@418- <PendingApprovalCard419- approval={props.activePendingApproval}420- respondingApprovalId={props.respondingApprovalId}421- onRespond={props.onRespondToApproval}422- />423- ) : null}424- {props.activePendingUserInput ? (425- <PendingUserInputCard426- pendingUserInput={props.activePendingUserInput}427- drafts={props.activePendingUserInputDrafts}428- answers={props.activePendingUserInputAnswers}429- respondingUserInputId={props.respondingUserInputId}430- onSelectOption={props.onSelectUserInputOption}431- onChangeCustomAnswer={props.onChangeUserInputCustomAnswer}432- onSubmit={props.onSubmitUserInput}433- />434- ) : null}435- </View>436- ) : null}437- </View>404+ <View ref={composerOverlayRef} onLayout={onComposerLayout} style={{ paddingTop: 8 }}>apps/mobile/src/features/threads/ThreadNavigationDrawer.tsx lines 134 to 134OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -131,5 +131,4 @@131131 bottom: 0,132132 width: drawerWidth,133133 backgroundColor: drawerBg,134- paddingTop: insets.top + 10,135- paddingBottom: Math.max(insets.bottom, 18),134+ paddingTop: insets.top,apps/mobile/modules/t3-review-diff/android/src/main/java/expo/modules/t3reviewdiff/T3ReviewDiffView.kt line 1055Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +1002,21 @@1002+ }1003+} catch (_: Exception) {1004+ emptySet()1005+}1006+1007+private fun parseColor(value: String, fallback: Int): Int = try {1008+ Color.parseColor(value)1009+} catch (_: Exception) {1010+ fallback1011+}1012+1013+private fun JSONObject.optNullableString(key: String): String? =1014+ if (isNull(key)) null else optString(key).takeIf { it.isNotEmpty() }1015+1016+private fun JSONObject.optNullableInt(key: String): Int? =1017+ if (isNull(key) || !has(key)) null else optInt(key)1018+1019+private fun JSONObject.floatDp(key: String, fallbackPx: Float, density: Float): Float =1020+ if (has(key)) optDouble(key).toFloat() * density else fallbackPx1021+1022+private fun JSONObject.floatSp(key: String, fallbackPx: Float, density: Float): Float =apps/mobile/modules/t3-terminal/android/src/main/java/expo/modules/t3terminal/TerminalCanvasView.kt line 607Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +217,21 @@217+ )218+ }219+220+ private inner class TerminalGestureListener : GestureDetector.SimpleOnGestureListener() {221+ override fun onDown(event: MotionEvent): Boolean {222+ onRequestKeyboard?.invoke()223+ return true224+ }225+226+ override fun onSingleTapUp(event: MotionEvent): Boolean {227+ performClick()228+ return true229+ }230+231+ override fun onScroll(232+ first: MotionEvent?,233+ current: MotionEvent,234+ distanceX: Float,235+ distanceY: Float,236+ ): Boolean {237+ scrollRemainder += distanceY / cellHeightPxapps/mobile/src/features/home/HomeScreen.tsx lines 299 to 299OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -244,0 +279,21 @@279+280+ props.onSwipeableWillOpen(methods);281+ if (fullSwipeArmedRef.current) {282+ fullSwipeArmedRef.current = false;283+ methods.close();284+ props.onDelete();285+ }286+ }}287+ overshootFriction={1}288+ overshootRight289+ renderRightActions={(_progress, translation, methods) => (290+ <ThreadSwipeActions291+ backgroundColor={cardColor}292+ fullSwipeThreshold={fullSwipeThreshold}293+ onDelete={props.onDelete}294+ onFullSwipeArmedChange={handleFullSwipeArmedChange}295+ primaryAction={{296+ accessibilityLabel: `Archive ${props.thread.title}`,297+ icon: "archivebox",298+ label: "Archive",299+ onPress: props.onArchive,apps/mobile/modules/t3-review-diff/android/src/main/java/expo/modules/t3reviewdiff/T3ReviewDiffView.kt line 792Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +761,21 @@761+ textPaint.color = theme.hunkText762+ textPaint.textSize = style.codeFontSizePx763+ drawScrollableCode(canvas, top, bottom) { codeX ->764+ canvas.drawText(765+ row.text.ifEmpty { row.content },766+ codeX,767+ centeredBaseline(top, bottom, textPaint),768+ textPaint,769+ )770+ }771+ }772+773+ private fun drawNoticeRow(canvas: Canvas, row: DiffRow, top: Int, bottom: Int) {774+ textPaint.color = theme.mutedText775+ textPaint.textSize = style.codeFontSizePx776+ drawScrollableCode(canvas, top, bottom) { codeX ->777+ canvas.drawText(row.text, codeX, centeredBaseline(top, bottom, textPaint), textPaint)778+ }779+ }780+781+ private fun drawCommentRow(canvas: Canvas, row: DiffRow, top: Int, bottom: Int) {apps/mobile/modules/t3-terminal/android/src/main/java/expo/modules/t3terminal/TerminalCanvasView.kt line 338Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +183,21 @@183+ val left = contentPadding + currentFrame.cursorX * cellWidthPx184+ val top = contentPadding + currentFrame.cursorY * cellHeightPx185+ val right = left + cellWidthPx186+ val bottom = top + cellHeightPx187+ paint.color = currentFrame.cursorColor188+ paint.isUnderlineText = false189+ paint.isStrikeThruText = false190+ when (currentFrame.cursorStyle) {191+ 0 -> canvas.drawRect(left, top, left + max(2f * density, 2f), bottom, paint)192+ 2 -> canvas.drawRect(left, bottom - max(2f * density, 2f), right, bottom, paint)193+ 3 -> {194+ paint.style = Paint.Style.STROKE195+ paint.strokeWidth = max(density, 1f)196+ canvas.drawRect(left, top, right, bottom, paint)197+ }198+ else -> {199+ paint.style = Paint.Style.FILL200+ canvas.drawRect(left, top, right, bottom, paint)201+ val index = currentFrame.cursorY * currentFrame.cols + currentFrame.cursorX202+ val text = currentFrame.cellText[index]203+ if (text.isNotEmpty()) {apps/mobile/modules/t3-review-diff/android/src/main/java/expo/modules/t3reviewdiff/T3ReviewDiffView.kt lines 84 to 84Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +64,21 @@64+ ),65+ )66+ emitVisibleFile(first)67+ }68+69+ addView(70+ canvasView,71+ LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT),72+ )73+ }74+75+ fun setTokensResetKey(value: String) {76+ if (tokensResetKey == value) return77+ tokensResetKey = value78+ canvasView.tokensByRowId = emptyMap()79+ }80+81+ fun setContentResetKey(value: String) {82+ if (contentResetKey == value) return83+ contentResetKey = value84+ tokensDecodeGeneration += 1apps/mobile/modules/t3-terminal/android/src/main/java/expo/modules/t3terminal/T3TerminalView.kt line 405Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -197,0 +315,21 @@315+ }316+ }317+318+ private fun parseThemeConfig(config: String) {319+ val palette = sortedMapOf<Int, Int>()320+ for (line in config.lineSequence()) {321+ val parts = line.split('=', limit = 2)322+ if (parts.size != 2) continue323+ val key = parts[0].trim()324+ val value = parts[1].trim()325+ when (key) {326+ "cursor-color" -> cursorColorValue = parseColor(value, cursorColorValue)327+ "palette" -> {328+ val paletteParts = value.split('=', limit = 2)329+ val index = paletteParts.firstOrNull()?.trim()?.toIntOrNull() ?: continue330+ val color = paletteParts.getOrNull(1)?.trim() ?: continue331+ if (index in 0..255) palette[index] = parseColor(color, foregroundColorValue)332+ }333+ }334+ }335+ if (palette.isNotEmpty()) {@@ -0,0 +28,21 @@28+ }29+ Prop("contentInsetVertical") { view: T3ComposerEditorView, contentInsetVertical: Double ->30+ view.setContentInsetVertical(contentInsetVertical.toInt())31+ }32+ Prop("editable") { view: T3ComposerEditorView, editable: Boolean ->33+ view.setEditable(editable)34+ }35+ Prop("scrollEnabled") { view: T3ComposerEditorView, scrollEnabled: Boolean ->36+ view.setScrollEnabled(scrollEnabled)37+ }38+ Prop("autoFocus") { view: T3ComposerEditorView, autoFocus: Boolean ->39+ view.setAutoFocus(autoFocus)40+ }41+ Prop("autoCorrect") { view: T3ComposerEditorView, autoCorrect: Boolean ->42+ view.setAutoCorrect(autoCorrect)43+ }44+ Prop("spellCheck") { view: T3ComposerEditorView, spellCheck: Boolean ->45+ view.setSpellCheck(spellCheck)46+ }47+48+ Events(@@ -159 +232,21 @@232+ terminalCanvas.cellHeightPx.toInt(),233+ )234+ }235+ emitResponse(response)236+ onResize(mapOf("cols" to cols, "rows" to rows))237+ feedPendingBuffer()238+ renderSnapshot()239+ }240+241+ private fun createTerminal() {242+ if (terminalHandle != 0L || cols <= 0 || rows <= 0 || isCleanedUp) return243+ terminalHandle = GhosttyBridge.nativeCreate(244+ cols,245+ rows,246+ terminalCanvas.cellWidthPx.toInt(),247+ terminalCanvas.cellHeightPx.toInt(),248+ foregroundColorValue,249+ backgroundColorValue,250+ cursorColorValue,251+ paletteColors,159252 )
- @@ -36,3 +36,15 @@3636 The script builds Ghostty with Zig 0.15.2, strips the iOS archives, and replaces only the3737 `ios-arm64` and `ios-arm64-simulator` slices. Xcode's Metal toolchain must be installed; if `metal`3838 fails, run `xcodebuild -downloadComponent MetalToolchain`.39+40+## Rebuilding libghostty-vt for Android41+42+The checked-in Android shared libraries and headers are pinned to the revision recorded in43+`Vendor/libghostty-vt/VERSION`. Set `ANDROID_NDK_HOME` and run:44+45+```bash46+apps/mobile/modules/t3-terminal/scripts/build-libghostty-android.sh47+```48+49+The script downloads Zig 0.15.2 when needed, checks out the pinned upstream Ghostty revision, and50+rebuilds all four Android ABIs with 16 KB page-size support.apps/mobile/modules/t3-review-diff/android/src/main/java/expo/modules/t3reviewdiff/T3ReviewDiffView.kt lines 856 to 859Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +820,21 @@820+ else -> Color.TRANSPARENT821+ }822+ if (barColor != Color.TRANSPARENT && style.changeBarWidthPx > 0) {823+ fill(canvas, barColor, 0f, top.toFloat(), style.changeBarWidthPx, bottom.toFloat())824+ }825+826+ val tokens = tokensByRowId[row.id]827+ drawScrollableCode(canvas, top, bottom) { codeX ->828+ if (tokens.isNullOrEmpty()) {829+ textPaint.textSize = style.codeFontSizePx830+ textPaint.color = when (row.change) {831+ "add" -> theme.addText832+ "delete" -> theme.deleteText833+ else -> theme.text834+ }835+ canvas.drawText(row.content, codeX, centeredBaseline(top, bottom, textPaint), textPaint)836+ } else {837+ var x = codeX838+ tokens.forEach { token ->839+ textPaint.textSize = style.codeFontSizePx840+ textPaint.color = token.color ?: theme.textapps/mobile/modules/t3-review-diff/android/src/main/java/expo/modules/t3reviewdiff/T3ReviewDiffView.kt lines 89 to 91Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +71,21 @@71+ LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT),72+ )73+ }74+75+ fun setTokensResetKey(value: String) {76+ if (tokensResetKey == value) return77+ tokensResetKey = value78+ canvasView.tokensByRowId = emptyMap()79+ }80+81+ fun setContentResetKey(value: String) {82+ if (contentResetKey == value) return83+ contentResetKey = value84+ tokensDecodeGeneration += 185+ canvasView.tokensByRowId = emptyMap()86+ lastVisibleFileId = null87+ pendingInitialScroll = true88+ canvasView.setVerticalOffset(0)89+ canvasView.setHorizontalOffset(0)90+ applyPendingInitialScroll()91+ }apps/mobile/modules/t3-review-diff/android/src/main/java/expo/modules/t3reviewdiff/T3ReviewDiffView.kt lines 860 to 862Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +823,21 @@823+ fill(canvas, barColor, 0f, top.toFloat(), style.changeBarWidthPx, bottom.toFloat())824+ }825+826+ val tokens = tokensByRowId[row.id]827+ drawScrollableCode(canvas, top, bottom) { codeX ->828+ if (tokens.isNullOrEmpty()) {829+ textPaint.textSize = style.codeFontSizePx830+ textPaint.color = when (row.change) {831+ "add" -> theme.addText832+ "delete" -> theme.deleteText833+ else -> theme.text834+ }835+ canvas.drawText(row.content, codeX, centeredBaseline(top, bottom, textPaint), textPaint)836+ } else {837+ var x = codeX838+ tokens.forEach { token ->839+ textPaint.textSize = style.codeFontSizePx840+ textPaint.color = token.color ?: theme.text841+ textPaint.typeface = when {842+ token.fontStyle and 1 != 0 -> Typeface.create(Typeface.MONOSPACE, Typeface.ITALIC)843+ token.fontStyle and 2 != 0 -> Typeface.create(Typeface.MONOSPACE, Typeface.BOLD)@@ -0,0 +15,21 @@15+ view.setThemeJson(themeJson)16+ }17+ Prop("placeholder") { view: T3ComposerEditorView, placeholder: String ->18+ view.setPlaceholder(placeholder)19+ }20+ Prop("fontFamily") { view: T3ComposerEditorView, fontFamily: String ->21+ view.setFontFamily(fontFamily)22+ }23+ Prop("fontSize") { view: T3ComposerEditorView, fontSize: Double ->24+ view.setFontSize(fontSize.toFloat())25+ }26+ Prop("lineHeight") { view: T3ComposerEditorView, lineHeight: Double ->27+ view.setLineHeight(lineHeight.toFloat())28+ }29+ Prop("contentInsetVertical") { view: T3ComposerEditorView, contentInsetVertical: Double ->30+ view.setContentInsetVertical(contentInsetVertical.toInt())31+ }32+ Prop("editable") { view: T3ComposerEditorView, editable: Boolean ->33+ view.setEditable(editable)34+ }35+ Prop("scrollEnabled") { view: T3ComposerEditorView, scrollEnabled: Boolean ->apps/mobile/modules/t3-terminal/android/src/main/cpp/t3_terminal_jni.cpp line 218Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +188,21 @@188+} // namespace189+190+extern "C" JNIEXPORT jlong JNICALL191+Java_expo_modules_t3terminal_GhosttyBridge_nativeCreate(192+ JNIEnv* env, jclass, jint cols, jint rows, jint cell_width, jint cell_height,193+ jint foreground, jint background, jint cursor, jintArray palette) {194+ auto* session = new Session();195+ GhosttyTerminalOptions options = {196+ .cols = static_cast<uint16_t>(std::clamp(cols, 1, 65535)),197+ .rows = static_cast<uint16_t>(std::clamp(rows, 1, 65535)),198+ .max_scrollback = kMaxScrollbackRows,199+ };200+ if (ghostty_terminal_new(nullptr, &session->terminal, options) != GHOSTTY_SUCCESS ||201+ ghostty_render_state_new(nullptr, &session->render_state) != GHOSTTY_SUCCESS ||202+ ghostty_render_state_row_iterator_new(nullptr, &session->row_iterator) != GHOSTTY_SUCCESS ||203+ ghostty_render_state_row_cells_new(nullptr, &session->row_cells) != GHOSTTY_SUCCESS) {204+ FreeSession(session);205+ return 0;206+ }207+208+ ghostty_terminal_set(session->terminal, GHOSTTY_TERMINAL_OPT_USERDATA, session);@@ -626,19 +722,4 @@626- ? handleOpenFilesInspector627- : undefined628- }629- onOpenGitInspector={fileInspector.supported ? handleOpenGitInspector : undefined}630- currentBranch={selectedThread.branch}631- gitStatus={gitStatus.data}632- gitOperationLabel={gitState.gitOperationLabel}633- canOpenTerminal={Boolean(selectedThreadProject?.workspaceRoot)}634- canOpenFiles={Boolean(selectedThreadProject?.workspaceRoot)}635- projectScripts={selectedThreadProject?.scripts ?? []}636- terminalSessions={terminalMenuSessions}637- onOpenTerminal={handleOpenTerminal}638- onOpenNewTerminal={handleOpenNewTerminal}639- onRunProjectScript={handleRunProjectScript}640- onPull={gitActions.onPullSelectedThreadBranch}641- onRunAction={gitActions.onRunSelectedThreadGitAction}642- />722+ </>723+ )}643724644725 <GitActionProgressOverlay progress={gitActionProgress} onDismiss={dismissGitActionResult} />apps/mobile/modules/t3-composer-editor/android/src/main/java/expo/modules/t3composereditor/T3ComposerEditorView.kt line 175Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +146,21 @@146+ chipTheme = ComposerChipTheme(147+ chipBackground = parseColor(theme.optString("chipBackground"), chipTheme.chipBackground),148+ chipBorder = parseColor(theme.optString("chipBorder"), chipTheme.chipBorder),149+ chipText = parseColor(theme.optString("chipText"), chipTheme.chipText),150+ skillBackground = parseColor(151+ theme.optString("skillBackground"),152+ chipTheme.skillBackground,153+ ),154+ skillBorder = parseColor(theme.optString("skillBorder"), chipTheme.skillBorder),155+ skillText = parseColor(theme.optString("skillText"), chipTheme.skillText),156+ )157+ applyTokenSpans()158+ } catch (_: Exception) {159+ }160+ }161+162+ fun setPlaceholder(placeholder: String) {163+ editor.hint = placeholder164+ }165+166+ fun setFontFamily(fontFamily: String) {apps/mobile/src/app/connections/new.tsx lines 137 to 137OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -127,16 +128,10 @@127128 <Stack.Screen128129 options={{130+ headerShown: Platform.OS !== "android",129131 title: showScanner ? "Scan QR Code" : "Add Environment",130132 }}131133 />132- <Stack.Toolbar placement="right">133- <Stack.Toolbar.Button134- icon={showScanner ? "xmark" : "qrcode.viewfinder"}135- onPress={() => {136- if (showScanner) {137- closeScanner();138- } else {139- void openScanner();140- }141- }}142- separateBackground134+ {Platform.OS === "android" ? (135+ <AndroidScreenHeader136+ title={showScanner ? "Scan QR Code" : "Add Environment"}137+ onBack={() => router.back()}
- @@ -110,6 +132,6 @@110132 },111133 plugins: [112134 "expo-router",135+ "expo-asset",113136 "expo-font",114137 "expo-secure-store",115- ["@clerk/expo", { theme: "./clerk-theme.json" }],apps/mobile/modules/t3-composer-editor/android/src/main/java/expo/modules/t3composereditor/T3ComposerEditorView.kt line 217Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -0,0 +180,21 @@180+ desiredLineHeightPx = (lineHeight * resources.displayMetrics.density).toInt()181+ applyLineHeight()182+ }183+184+ fun setContentInsetVertical(contentInsetVertical: Int) {185+ this.contentInsetVertical =186+ max(0, (contentInsetVertical * resources.displayMetrics.density).toInt())187+ editor.setPadding(0, this.contentInsetVertical, 0, this.contentInsetVertical)188+ emitContentSizeIfNeeded()189+ }190+191+ fun setEditable(editable: Boolean) {192+ editor.isEnabled = editable193+ editor.isFocusable = editable194+ editor.isFocusableInTouchMode = editable195+ editor.isCursorVisible = editable196+ }197+198+ fun setScrollEnabled(scrollEnabled: Boolean) {199+ editor.isVerticalScrollBarEnabled = scrollEnabled200+ }apps/mobile/modules/t3-review-diff/android/src/main/java/expo/modules/t3reviewdiff/T3ReviewDiffView.kt line 336Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -0,0 +311,21 @@311+ postInvalidateOnAnimation()312+ }313+ }314+315+ private fun rebuildVisibleRows() {316+ val filtered = ArrayList<DiffRow>(rows.size)317+ var currentFileCollapsed = false318+ rows.forEach { row ->319+ if (row.kind == "file") {320+ currentFileCollapsed = collapsedFileIds.contains(row.resolvedFileId)321+ filtered.add(row)322+ } else if (!currentFileCollapsed) {323+ if (row.kind != "comment" || !collapsedCommentIds.contains(row.id)) {324+ filtered.add(row)325+ } else {326+ filtered.add(row.copy(commentText = "Comment collapsed"))327+ }328+ }329+ }330+ visibleRows = filtered331+ canvasView.rows = filtered@@ -0,0 +71,21 @@71+ LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT),72+ )73+ }74+75+ fun setTokensResetKey(value: String) {76+ if (tokensResetKey == value) return77+ tokensResetKey = value78+ canvasView.tokensByRowId = emptyMap()79+ }80+81+ fun setContentResetKey(value: String) {82+ if (contentResetKey == value) return83+ contentResetKey = value84+ tokensDecodeGeneration += 185+ canvasView.tokensByRowId = emptyMap()86+ lastVisibleFileId = null87+ pendingInitialScroll = true88+ canvasView.setVerticalOffset(0)89+ canvasView.setHorizontalOffset(0)90+ applyPendingInitialScroll()91+ }@@ -0,0 +352,21 @@352+ "change" to row.change,353+ )354+ row.oldLineNumber?.let { payload["oldLineNumber"] = it }355+ row.newLineNumber?.let { payload["newLineNumber"] = it }356+ onPressLine(payload)357+ }358+ }359+ }360+361+ private fun emitVisibleFile(firstVisibleIndex: Int) {362+ if (visibleRows.isEmpty()) return363+ val start = firstVisibleIndex.coerceIn(0, visibleRows.lastIndex)364+ val fileId = (start downTo 0)365+ .asSequence()366+ .map { visibleRows[it].resolvedFileId }367+ .firstOrNull { it.isNotEmpty() }368+ ?: return369+ if (fileId == lastVisibleFileId) return370+ lastVisibleFileId = fileId371+ onVisibleFileChange(mapOf("fileId" to fileId))372+ }apps/mobile/modules/t3-review-diff/android/src/main/java/expo/modules/t3reviewdiff/T3ReviewDiffView.kt line 706Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -0,0 +676,21 @@676+ }677+678+ fun horizontalOffset(): Int = horizontalOffset679+680+ fun maxHorizontalOffset(): Int = max(0, contentWidthPx - width)681+682+ private fun rebuildOffsets() {683+ rowOffsets = IntArray(rows.size + 1)684+ rows.forEachIndexed { index, row ->685+ rowOffsets[index + 1] = rowOffsets[index] + rowHeight(row)686+ }687+ setVerticalOffset(verticalOffset)688+ requestLayout()689+ invalidate()690+ }691+692+ private fun rowHeight(row: DiffRow): Int = when (row.kind) {693+ "file" -> style.fileHeaderHeightPx.toInt()694+ "comment" -> max((style.rowHeightPx * 3.2f).toInt(), (56 * density).toInt())695+ else -> style.rowHeightPx.toInt()696+ }.coerceAtLeast(1)
- @@ -0,0 +161,21 @@161+ }162+ }163+ }164+165+ fun setTokensPatchJson(value: String) {166+ payloadDecodeExecutor.execute {167+ try {168+ val payload = JSONObject(value)169+ val resetKey = payload.optString("resetKey")170+ val decodedTokens = parseTokensObject(171+ payload.optJSONObject("tokensByRowId") ?: JSONObject(),172+ )173+ post {174+ if (resetKey.isNotEmpty() && resetKey != tokensResetKey) return@post175+ if (decodedTokens.isNotEmpty()) {176+ canvasView.tokensByRowId = canvasView.tokensByRowId + decodedTokens177+ }178+ }179+ } catch (_: Exception) {180+ }181+ }@@ -0,0 +825,21 @@825+826+ val tokens = tokensByRowId[row.id]827+ drawScrollableCode(canvas, top, bottom) { codeX ->828+ if (tokens.isNullOrEmpty()) {829+ textPaint.textSize = style.codeFontSizePx830+ textPaint.color = when (row.change) {831+ "add" -> theme.addText832+ "delete" -> theme.deleteText833+ else -> theme.text834+ }835+ canvas.drawText(row.content, codeX, centeredBaseline(top, bottom, textPaint), textPaint)836+ } else {837+ var x = codeX838+ tokens.forEach { token ->839+ textPaint.textSize = style.codeFontSizePx840+ textPaint.color = token.color ?: theme.text841+ textPaint.typeface = when {842+ token.fontStyle and 1 != 0 -> Typeface.create(Typeface.MONOSPACE, Typeface.ITALIC)843+ token.fontStyle and 2 != 0 -> Typeface.create(Typeface.MONOSPACE, Typeface.BOLD)844+ else -> Typeface.MONOSPACE845+ }@@ -0,0 +430,21 @@430+ selectionListener?.invoke(selStart, selEnd)431+ }432+433+ override fun onTextContextMenuItem(id: Int): Boolean {434+ if (id == android.R.id.paste || id == android.R.id.pasteAsPlainText) {435+ val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as? ClipboardManager436+ val clip = clipboard?.primaryClip437+ val imageUris = buildList {438+ if (clip != null) {439+ for (index in 0 until clip.itemCount) {440+ clip.getItemAt(index).uri?.let { uri ->441+ val mimeType = context.contentResolver.getType(uri)442+ if (mimeType?.startsWith("image/") == true) add(uri.toString())443+ }444+ }445+ }446+ }447+ if (imageUris.isNotEmpty()) {448+ pasteImagesListener?.invoke(imageUris)449+ return true450+ }@@ -0,0 +35,21 @@35+ Prop("styleJson") { view: T3ReviewDiffView, styleJson: String ->36+ view.setStyleJson(styleJson)37+ }38+ Prop("rowHeight") { view: T3ReviewDiffView, rowHeight: Double ->39+ view.setRowHeight(rowHeight.toFloat())40+ }41+ Prop("contentWidth") { view: T3ReviewDiffView, contentWidth: Double ->42+ view.setContentWidth(contentWidth.toFloat())43+ }44+ Prop("initialRowIndex") { view: T3ReviewDiffView, initialRowIndex: Double ->45+ view.setInitialRowIndex(initialRowIndex)46+ }47+48+ Events(49+ "onDebug",50+ "onVisibleFileChange",51+ "onToggleFile",52+ "onToggleViewedFile",53+ "onPressLine",54+ "onToggleComment",55+ )
- apps/mobile/modules/t3-terminal/android/src/main/java/expo/modules/t3terminal/T3TerminalView.kt lines 314 to 320Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -176,4 +262,19 @@262+ cols,263+ rows,264+ terminalCanvas.cellWidthPx.toInt(),265+ terminalCanvas.cellHeightPx.toInt(),266+ foregroundColorValue,267+ backgroundColorValue,268+ cursorColorValue,269+ paletteColors,176270 )271+ fedBuffer = ""272+ }177273178- post {179- requestKeyboardFocus()274+ private fun recreateTerminal() {275+ if (terminalHandle == 0L) return276+ destroyTerminal()277+ createTerminal()278+ feedPendingBuffer()279+ renderSnapshot()280+ }apps/mobile/modules/t3-composer-editor/android/src/main/java/expo/modules/t3composereditor/T3ComposerEditorView.kt line 473Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +427,21 @@427+428+ override fun onSelectionChanged(selStart: Int, selEnd: Int) {429+ super.onSelectionChanged(selStart, selEnd)430+ selectionListener?.invoke(selStart, selEnd)431+ }432+433+ override fun onTextContextMenuItem(id: Int): Boolean {434+ if (id == android.R.id.paste || id == android.R.id.pasteAsPlainText) {435+ val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as? ClipboardManager436+ val clip = clipboard?.primaryClip437+ val imageUris = buildList {438+ if (clip != null) {439+ for (index in 0 until clip.itemCount) {440+ clip.getItemAt(index).uri?.let { uri ->441+ val mimeType = context.contentResolver.getType(uri)442+ if (mimeType?.startsWith("image/") == true) add(uri.toString())443+ }444+ }445+ }446+ }447+ if (imageUris.isNotEmpty()) {@@ -11,4 +12,4 @@1112 ) {1213 const { layout, panes, togglePrimarySidebar } = useAdaptiveWorkspaceLayout();131414- if (!layout.usesSplitView) {15+ if (Platform.OS === "android" || !layout.usesSplitView) {apps/mobile/modules/t3-terminal/android/src/main/cpp/t3_terminal_jni.cpp line 469Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +349,21 @@349+350+ uint16_t written_cols = 0;351+ while (written_cols < cols && ghostty_render_state_row_cells_next(session->row_cells)) {352+ GhosttyStyle style{};353+ style.size = sizeof(style);354+ bool selected = false;355+ GhosttyColorRgb foreground = colors.foreground;356+ GhosttyColorRgb background = colors.background;357+ ghostty_render_state_row_cells_get(session->row_cells,358+ GHOSTTY_RENDER_STATE_ROW_CELLS_DATA_STYLE,359+ &style);360+ ghostty_render_state_row_cells_get(session->row_cells,361+ GHOSTTY_RENDER_STATE_ROW_CELLS_DATA_SELECTED,362+ &selected);363+ ghostty_render_state_row_cells_get(session->row_cells,364+ GHOSTTY_RENDER_STATE_ROW_CELLS_DATA_FG_COLOR,365+ &foreground);366+ ghostty_render_state_row_cells_get(session->row_cells,367+ GHOSTTY_RENDER_STATE_ROW_CELLS_DATA_BG_COLOR,368+ &background);369+ if (style.inverse) std::swap(foreground, background);apps/mobile/modules/t3-terminal/android/src/main/java/expo/modules/t3terminal/TerminalCanvasView.kt lines 581 to 586Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +204,21 @@204+ configureTextPaint(currentFrame.cellFlags[index], currentFrame.background)205+ canvas.drawText(text, left, top + baselineOffsetPx, paint)206+ }207+ }208+ }209+ }210+211+ private fun blend(foreground: Int, background: Int, amount: Float): Int {212+ val inverseAmount = 1f - amount213+ return Color.rgb(214+ (Color.red(foreground) * amount + Color.red(background) * inverseAmount).toInt(),215+ (Color.green(foreground) * amount + Color.green(background) * inverseAmount).toInt(),216+ (Color.blue(foreground) * amount + Color.blue(background) * inverseAmount).toInt(),217+ )218+ }219+220+ private inner class TerminalGestureListener : GestureDetector.SimpleOnGestureListener() {221+ override fun onDown(event: MotionEvent): Boolean {222+ onRequestKeyboard?.invoke()223+ return true224+ }
- @@ -0,0 +660,21 @@660+ setVerticalOffset(verticalOffset + delta)661+ }662+663+ fun verticalOffset(): Int = verticalOffset664+665+ fun maxVerticalOffset(): Int = max(0, (rowOffsets.lastOrNull() ?: 0) - height)666+667+ fun setHorizontalOffset(value: Int) {668+ val nextOffset = value.coerceIn(0, maxHorizontalOffset())669+ if (horizontalOffset == nextOffset) return670+ horizontalOffset = nextOffset671+ invalidate()672+ }673+674+ fun scrollByHorizontal(delta: Int) {675+ setHorizontalOffset(horizontalOffset + delta)676+ }677+678+ fun horizontalOffset(): Int = horizontalOffset679+680+ fun maxHorizontalOffset(): Int = max(0, contentWidthPx - width)apps/mobile/modules/t3-review-diff/android/src/main/java/expo/modules/t3reviewdiff/T3ReviewDiffView.kt line 1005Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -0,0 +952,21 @@952+ kind = row.optString("kind"),953+ id = row.optString("id"),954+ fileId = row.optString("fileId"),955+ filePath = row.optString("filePath"),956+ previousPath = row.optNullableString("previousPath"),957+ changeType = row.optString("changeType"),958+ additions = row.optInt("additions"),959+ deletions = row.optInt("deletions"),960+ text = row.optString("text"),961+ content = row.optString("content"),962+ change = row.optString("change", "context"),963+ oldLineNumber = row.optNullableInt("oldLineNumber"),964+ newLineNumber = row.optNullableInt("newLineNumber"),965+ commentText = row.optString("commentText"),966+ commentRangeLabel = row.optString("commentRangeLabel"),967+ commentSectionTitle = row.optString("commentSectionTitle"),968+ )969+ }970+} catch (_: Exception) {971+ emptyList()972+}apps/mobile/modules/t3-composer-editor/android/src/main/java/expo/modules/t3composereditor/T3ComposerEditorView.kt line 475Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -0,0 +429,21 @@429+ super.onSelectionChanged(selStart, selEnd)430+ selectionListener?.invoke(selStart, selEnd)431+ }432+433+ override fun onTextContextMenuItem(id: Int): Boolean {434+ if (id == android.R.id.paste || id == android.R.id.pasteAsPlainText) {435+ val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as? ClipboardManager436+ val clip = clipboard?.primaryClip437+ val imageUris = buildList {438+ if (clip != null) {439+ for (index in 0 until clip.itemCount) {440+ clip.getItemAt(index).uri?.let { uri ->441+ val mimeType = context.contentResolver.getType(uri)442+ if (mimeType?.startsWith("image/") == true) add(uri.toString())443+ }444+ }445+ }446+ }447+ if (imageUris.isNotEmpty()) {448+ pasteImagesListener?.invoke(imageUris)449+ return true
- apps/mobile/modules/t3-review-diff/android/src/main/java/expo/modules/t3reviewdiff/T3ReviewDiffView.kt line 411Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +385,21 @@385+ 0,386+ canvasView.verticalOffset(),387+ 0,388+ target - canvasView.verticalOffset(),389+ 250,390+ )391+ postInvalidateOnAnimation()392+ } else {393+ canvasView.setVerticalOffset(target)394+ }395+ }396+397+ private fun dp(value: Float): Float = value * resources.displayMetrics.density398+399+ private enum class DragAxis {400+ VERTICAL,401+ HORIZONTAL,402+ }403+}404+405+private data class DiffRow(apps/mobile/modules/t3-review-diff/android/src/main/java/expo/modules/t3reviewdiff/T3ReviewDiffView.kt lines 692 to 694Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +664,21 @@664+665+ fun maxVerticalOffset(): Int = max(0, (rowOffsets.lastOrNull() ?: 0) - height)666+667+ fun setHorizontalOffset(value: Int) {668+ val nextOffset = value.coerceIn(0, maxHorizontalOffset())669+ if (horizontalOffset == nextOffset) return670+ horizontalOffset = nextOffset671+ invalidate()672+ }673+674+ fun scrollByHorizontal(delta: Int) {675+ setHorizontalOffset(horizontalOffset + delta)676+ }677+678+ fun horizontalOffset(): Int = horizontalOffset679+680+ fun maxHorizontalOffset(): Int = max(0, contentWidthPx - width)681+682+ private fun rebuildOffsets() {683+ rowOffsets = IntArray(rows.size + 1)684+ rows.forEachIndexed { index, row ->apps/mobile/modules/t3-composer-editor/android/src/main/java/expo/modules/t3composereditor/T3ComposerEditorView.kt lines 208 to 213Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +176,21 @@176+ applyLineHeight()177+ }178+179+ fun setLineHeight(lineHeight: Float) {180+ desiredLineHeightPx = (lineHeight * resources.displayMetrics.density).toInt()181+ applyLineHeight()182+ }183+184+ fun setContentInsetVertical(contentInsetVertical: Int) {185+ this.contentInsetVertical =186+ max(0, (contentInsetVertical * resources.displayMetrics.density).toInt())187+ editor.setPadding(0, this.contentInsetVertical, 0, this.contentInsetVertical)188+ emitContentSizeIfNeeded()189+ }190+191+ fun setEditable(editable: Boolean) {192+ editor.isEnabled = editable193+ editor.isFocusable = editable194+ editor.isFocusableInTouchMode = editable195+ editor.isCursorVisible = editable196+ }apps/mobile/modules/t3-review-diff/android/src/main/java/expo/modules/t3reviewdiff/T3ReviewDiffView.kt line 690Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +660,21 @@660+ setVerticalOffset(verticalOffset + delta)661+ }662+663+ fun verticalOffset(): Int = verticalOffset664+665+ fun maxVerticalOffset(): Int = max(0, (rowOffsets.lastOrNull() ?: 0) - height)666+667+ fun setHorizontalOffset(value: Int) {668+ val nextOffset = value.coerceIn(0, maxHorizontalOffset())669+ if (horizontalOffset == nextOffset) return670+ horizontalOffset = nextOffset671+ invalidate()672+ }673+674+ fun scrollByHorizontal(delta: Int) {675+ setHorizontalOffset(horizontalOffset + delta)676+ }677+678+ fun horizontalOffset(): Int = horizontalOffset679+680+ fun maxHorizontalOffset(): Int = max(0, contentWidthPx - width)apps/mobile/modules/t3-review-diff/android/src/main/java/expo/modules/t3reviewdiff/T3ReviewDiffView.kt line 1052Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +999,21 @@999+ val array = JSONArray(value)1000+ buildSet {1001+ for (index in 0 until array.length()) add(array.getString(index))1002+ }1003+} catch (_: Exception) {1004+ emptySet()1005+}1006+1007+private fun parseColor(value: String, fallback: Int): Int = try {1008+ Color.parseColor(value)1009+} catch (_: Exception) {1010+ fallback1011+}1012+1013+private fun JSONObject.optNullableString(key: String): String? =1014+ if (isNull(key)) null else optString(key).takeIf { it.isNotEmpty() }1015+1016+private fun JSONObject.optNullableInt(key: String): Int? =1017+ if (isNull(key) || !has(key)) null else optInt(key)1018+1019+private fun JSONObject.floatDp(key: String, fallbackPx: Float, density: Float): Float =
- @@ -0,0 +65,21 @@65+ )66+ emitVisibleFile(first)67+ }68+69+ addView(70+ canvasView,71+ LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT),72+ )73+ }74+75+ fun setTokensResetKey(value: String) {76+ if (tokensResetKey == value) return77+ tokensResetKey = value78+ canvasView.tokensByRowId = emptyMap()79+ }80+81+ fun setContentResetKey(value: String) {82+ if (contentResetKey == value) return83+ contentResetKey = value84+ tokensDecodeGeneration += 185+ canvasView.tokensByRowId = emptyMap()apps/mobile/modules/t3-review-diff/android/src/main/java/expo/modules/t3reviewdiff/T3ReviewDiffView.kt lines 165 to 181Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +161,21 @@161+ }162+ }163+ }164+165+ fun setTokensPatchJson(value: String) {166+ payloadDecodeExecutor.execute {167+ try {168+ val payload = JSONObject(value)169+ val resetKey = payload.optString("resetKey")170+ val decodedTokens = parseTokensObject(171+ payload.optJSONObject("tokensByRowId") ?: JSONObject(),172+ )173+ post {174+ if (resetKey.isNotEmpty() && resetKey != tokensResetKey) return@post175+ if (decodedTokens.isNotEmpty()) {176+ canvasView.tokensByRowId = canvasView.tokensByRowId + decodedTokens177+ }178+ }179+ } catch (_: Exception) {180+ }181+ }@@ -152,20 +200 @@152- scrollView.setOnClickListener { requestKeyboardFocus() }153- container.setOnClickListener { requestKeyboardFocus() }154- isClickable = true155- setOnClickListener { requestKeyboardFocus() }156-157- scrollView.addView(158- textView,159- LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT),160- )161- container.addView(162- scrollView,163- LinearLayout.LayoutParams(164- ViewGroup.LayoutParams.MATCH_PARENT,165- 0,166- 1f,167- ),168- )169- container.addView(170- inputView,171- LinearLayout.LayoutParams(1, 1),200+ inputView.addTextChangedListener(
- @@ -139,16 +140,9 @@139140 options={{141+ // Android renders its own in-screen header below instead of the native bar.142+ ...(Platform.OS === "android" ? { headerShown: false } : null),140143 title: showScanner ? "Scan QR Code" : "Add Environment",141144 }}142145 />143- <NativeHeaderToolbar placement="right">144- <NativeHeaderToolbar.Button145- icon={showScanner ? "xmark" : "qrcode.viewfinder"}146- onPress={() => {147- if (showScanner) {148- closeScanner();149- } else {150- void openScanner();151- }152- }}153- separateBackground154- tintColor={headerIconColor}146+ {Platform.OS === "android" ? (147+ <AndroidScreenHeader148+ title={showScanner ? "Scan QR Code" : "Add Environment"}
- apps/mobile/modules/t3-terminal/android/src/main/java/expo/modules/t3terminal/T3TerminalView.kt lines 388 to 390Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -210,5 +323,16 @@210- textView.setTextColor(foregroundColorValue)211- textView.setBackgroundColor(backgroundColorValue)212- inputView.setTextColor(Color.TRANSPARENT)213- inputView.setHintTextColor(mutedForegroundColorValue)214- inputView.setBackgroundColor(Color.TRANSPARENT)323+ terminalCanvas.setBackgroundColor(backgroundColorValue)324+ if (terminalHandle != 0L) {325+ GhosttyBridge.nativeSetTheme(326+ terminalHandle,327+ foregroundColorValue,328+ backgroundColorValue,329+ cursorColorValue,330+ paletteColors,331+ )332+ renderSnapshot()333+ }334+ }335+336+ private fun parseThemeConfig(config: String) {337+ val palette = sortedMapOf<Int, Int>()338+ for (line in config.lineSequence()) {
- apps/mobile/src/features/threads/ThreadFeed.tsx line 651Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -541,20 +662 @@541- ) : null}542- <ScrollView543- horizontal544- showsHorizontalScrollIndicator={false}545- bounces={false}546- contentContainerStyle={{ paddingHorizontal: 14, paddingVertical: 12 }}547- >548- <NativeText549- selectable550- style={{551- color: blockTextColor,552- fontFamily: "ui-monospace",553- fontSize: markdownFontSizes.codeBlockFontSize,554- lineHeight: markdownFontSizes.codeBlockLineHeight,555- }}556- >557- {content}558- </NativeText>559- </ScrollView>560- </View>662+ code_block: ({ content = "", language }) => (
- apps/mobile/src/features/threads/ThreadFeed.tsx line 298Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -256,3 +264,17 @@256264 );257265 });258266267+function MarkdownCodeBlock(props: {268+ readonly backgroundColor: string;269+ readonly borderColor: string;270+ readonly content: string;271+ readonly copyTintColor: ColorValue;272+ readonly headerTextColor: string;273+ readonly fontSize: number;274+ readonly highlightCode: boolean;275+ readonly language?: string | null;276+ readonly lineHeight: number;277+ readonly textColor: string;278+ readonly theme: ReviewDiffTheme;279+}) {280+ const content = props.content.replace(/\n$/, "");
- apps/mobile/src/features/threads/NewTaskDraftScreen.tsx line 637OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -444,0 +617,21 @@617+ ) : null}618+ <View style={isExpanded ? undefined : { flex: 1, minWidth: 0 }}>{promptEditor}</View>619+ {!isExpanded ? (620+ <ControlPill621+ icon="arrow.up"622+ variant="primary"623+ disabled={!canStart}624+ onPress={() => void handleStart()}625+ />626+ ) : null}627+ </ComposerSurface>628+629+ <ComposerToolbarRow paddingBottom={8} paddingHorizontal={0} paddingTop={8}>630+ <ComposerToolbarScroller631+ fadeOpaque={isDarkMode ? "rgba(0,0,0,0.95)" : "rgba(255,255,255,0.95)"}632+ fadeTransparent={isDarkMode ? "rgba(0,0,0,0)" : "rgba(255,255,255,0)"}633+ >634+ {toolbarPills}635+ </ComposerToolbarScroller>636+ {isExpanded ? startButton : null}637+ </ComposerToolbarRow>
Sign in to join this conversation.











Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
5bdae982-b2e5-48c1-b3e9-a997ea8c830aYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment `@coderabbitai help` to get the list of available commands.