From 060d21bf6a7652e6ac4e3db4d153e0eb2cae7ca4 Mon Sep 17 00:00:00 2001 From: Jackson Miller Date: Sun, 1 Nov 2026 14:28:39 -0500 Subject: [PATCH] fix(mobile): J5 screens sit below the header and status bar on iOS The artifact viewer drew its path line under the status bar and scrolled the document under the header, and Settings > Personas put its first card under the header. Their plain scroll views weren't registered with the native header, so iOS's transparent header didn't inset them. Like upstream's screens, they now scroll in ScreenScrollView with automatic insets, and the viewer's path line scrolls with the document instead of sitting above it. Closes #865 Co-Authored-By: Claude Opus 5.5 --- .../j5/agents/AgentLibrarySettingsScreen.tsx | 15 ++- .../j5/artifacts/ThreadArtifactsScreen.tsx | 108 +++++++----------- 2 files changed, 53 insertions(+), 70 deletions(-) diff --git a/apps/mobile/src/j5/agents/AgentLibrarySettingsScreen.tsx b/apps/mobile/src/j5/agents/AgentLibrarySettingsScreen.tsx index 6b91c965af9ef..5d22ed78ebdbe 100644 --- a/apps/mobile/src/j5/agents/AgentLibrarySettingsScreen.tsx +++ b/apps/mobile/src/j5/agents/AgentLibrarySettingsScreen.tsx @@ -38,6 +38,7 @@ import { pickAgentDefinitions } from "./pickAgentDefinitions"; import { useAtomCommand } from "../../state/use-atom-command"; import { AndroidScreenHeader } from "../../components/ui/AndroidScreenHeader"; import { AppText as Text } from "../../components/ui/AppText"; +import { ScreenScrollView } from "../../components/ui/ScreenScrollView"; import { cn } from "../../lib/cn"; import { NativeStackScreenOptions } from "../../native/StackHeader"; import { agentPersonaEnvironment } from "./agentPersonaAtoms"; @@ -49,9 +50,13 @@ import { PlaybookLibrarySettingsSection } from "../playbooks/PlaybookLibrarySett export function AgentLibrarySettingsScreen() { // Personas and Playbooks are managed by a server's Owners (People and access AC27). return useOwnerSomewhere() === false ? ( - + - + ) : ( ); @@ -325,10 +330,10 @@ function OwnerAgentLibrarySettingsScreen() { navigation.goBack()} /> ) : null} - @@ -771,7 +776,7 @@ function OwnerAgentLibrarySettingsScreen() { - + {notification ? ( ) : null} diff --git a/apps/mobile/src/j5/artifacts/ThreadArtifactsScreen.tsx b/apps/mobile/src/j5/artifacts/ThreadArtifactsScreen.tsx index 9b2897cb5b3a8..011fc16d0b8b6 100644 --- a/apps/mobile/src/j5/artifacts/ThreadArtifactsScreen.tsx +++ b/apps/mobile/src/j5/artifacts/ThreadArtifactsScreen.tsx @@ -6,13 +6,14 @@ import { import type { ArtifactContent, ArtifactEntry, EnvironmentId, ProjectId } from "@t3tools/contracts"; import { StackActions, useNavigation, type StaticScreenProps } from "@react-navigation/native"; import { ThreadId } from "@t3tools/contracts"; -import { RefreshControl, ScrollView, View } from "react-native"; +import { RefreshControl, View } from "react-native"; import { AppText } from "../../components/ui/AppText"; import { Button } from "../../components/ui/Button"; import { EmptyState } from "../../components/ui/EmptyState"; import { ListRow } from "../../components/ui/ListRow"; import { ListSection } from "../../components/ui/ListSection"; +import { ScreenScrollView } from "../../components/ui/ScreenScrollView"; import { useMarkdownPreviewStyles } from "../../features/files/FileMarkdownPreview"; import { fileRoutePathSegments, @@ -72,7 +73,8 @@ export function ThreadArtifactsScreen(props: ThreadArtifactsParams) { () => listArtifacts({ environmentId: project.environmentId, projectId: project.projectId! }), ); return ( - } @@ -115,7 +117,7 @@ export function ThreadArtifactsScreen(props: ThreadArtifactsParams) { ))} )} - + ); } @@ -126,8 +128,6 @@ export function ThreadArtifactsScreen(props: ThreadArtifactsParams) { function ArtifactMarkdown(props: { readonly markdown: string; readonly links: ArtifactLinkContext & { readonly workspaceRoot: string }; - readonly refreshing: boolean; - readonly onRefresh: () => void; }) { const navigation = useNavigation(); const styles = useMarkdownPreviewStyles(); @@ -155,22 +155,14 @@ function ArtifactMarkdown(props: { if (presentation.href) void tryOpenExternalUrl(presentation.href, "markdown-link"); }; return ( - } - > - artifactLinkContextMenu(href, links.workspaceRoot)} - onFileContextMenuAction={(href, actionId) => - onArtifactLinkMenuAction(href, actionId, links) - } - /> - + artifactLinkContextMenu(href, links.workspaceRoot)} + onFileContextMenuAction={(href, actionId) => onArtifactLinkMenuAction(href, actionId, links)} + /> ); } @@ -224,54 +216,40 @@ export function ThreadArtifactScreen(props: ThreadArtifactParams) { path, }), ); - const header = ( - + // One scroll view registered with the header, so iOS insets it under the transparent header + // and the status bar like upstream's screens; the path row scrolls with the document. + return ( + } + > - - artifacts/{path} - -