fix(mobile): combined test branch — scroll, back-swipe, thread lists, computer switching #3687
Mergedt3dotgg(GitHub profile, opens in a new tab)merged 18 commits into
main fromintegration/test-allmerged 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:L
- apps/mobile/src/features/threads/new-task-flow-provider.tsx line 505Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -384,7 +384,4 @@384384 setSelectedProjectKey(nextProjectKey);385385 }, []);386386387- const selectEnvironment = useCallback((environmentId: EnvironmentId) => {388- setSelectedEnvironmentId(environmentId);389- setSelectedProjectKey(null);390- }, []);387+ const selectEnvironment = useCallback(apps/mobile/src/app/index.tsx line 105OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -102,3 +102,4 @@102102 onAddConnection={() => router.push("/connections/new")}103103 onArchiveThread={archiveThread}104104 onDeleteThread={confirmDeleteThread}105+ onNewThreadInProject={(project) => {
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XL
t3dotgg(GitHub profile, opens in a new tab) changed the title
- apps/mobile/src/features/threads/new-task-flow-provider.tsx line 312Resolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -310,3 +276,21 @@310276 scopedProjectKey(editingPendingProject.environmentId, editingPendingProject.id)311277 ? editingPendingProject312278 : (projectsForEnvironment[0] ?? null));279+280+ // Only offer machines that actually host the currently selected repository, so281+ // switching computers moves the same repo across machines instead of jumping to282+ // whatever unrelated project happens to be first on the other machine.283+ const selectedRepositoryKey = selectedProject?.repositoryIdentity?.canonicalKey ?? null;284+ const environments = useMemo(() => {285+ const seen = new Set<EnvironmentId>();286+ const result: Array<{287+ readonly environmentId: EnvironmentId;288+ readonly environmentLabel: string;289+ }> = [];290+ for (const project of projects) {291+ if (292+ selectedRepositoryKey !== null &&293+ (project.repositoryIdentity?.canonicalKey ?? null) !== selectedRepositoryKey294+ ) {295+ continue;296+ }
- apps/mobile/src/features/threads/new-task-flow-provider.tsx line 290Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -310,3 +276,9 @@310276 scopedProjectKey(editingPendingProject.environmentId, editingPendingProject.id)311277 ? editingPendingProject312278 : (projectsForEnvironment[0] ?? null));279+280+ // Only offer machines that actually host the currently selected repository, so281+ // switching computers moves the same repo across machines instead of jumping to282+ // whatever unrelated project happens to be first on the other machine.283+ const selectedRepositoryKey = selectedProject?.repositoryIdentity?.canonicalKey ?? null;284+ const environments = useMemo(() => {apps/mobile/src/features/home/HomeScreen.tsx line 254OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -248,3 +249,6 @@248249 isFirst={item.isFirst}249250 groupKey={item.group.key}250251 onGroupAction={updateGroupDisplay}252+ // Aggregated groups (same repo across machines) have no single253+ // target project, so the quick new-thread button is single-project only.254+ onNewThread={apps/mobile/src/features/threads/thread-list-items.tsx line 72Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -49,14 +49,14 @@49+ const iconMutedColor = useThemeColor("--color-icon-muted");50+ const { groupKey, onGroupAction, onNewThread, project } = props;4951 const compact = props.variant === "compact";5052 const handleToggle = useCallback(5153 () => onGroupAction(groupKey, "toggle-collapsed"),5254 [groupKey, onGroupAction],5355 );56+ const handleNewThread = useCallback(() => onNewThread?.(project), [onNewThread, project]);545758+ // The new-thread button is a SIBLING of the collapse toggle, not a child:59+ // nested touchables are unreachable to VoiceOver/TalkBack (the parent60+ // swallows focus), so the row is a plain View with two adjacent pressables.5561 return (56- <Pressable57- accessibilityRole="button"58- accessibilityState={{ expanded: !props.collapsed }}59- accessibilityLabel={`${props.title}, ${props.threadCount} threads`}60- accessibilityHint={props.collapsed ? "Expands the project" : "Collapses the project"}61- className={compact ? "bg-screen" : undefined}62- onPress={handleToggle}62+ <View
- apps/mobile/src/features/threads/new-task-flow-provider.tsx lines 286 to 286OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -310,3 +276,11 @@310276 scopedProjectKey(editingPendingProject.environmentId, editingPendingProject.id)311277 ? editingPendingProject312278 : (projectsForEnvironment[0] ?? null));279+280+ // Only offer machines that actually host the currently selected repository, so281+ // switching computers moves the same repo across machines instead of jumping to282+ // whatever unrelated project happens to be first on the other machine. Repository283+ // identity is the primary signal; projects that haven't reported one yet (still284+ // indexing) fall back to workspace basename / title so a valid host isn't hidden.285+ const selectedRepositoryKey = selectedProject?.repositoryIdentity?.canonicalKey ?? null;286+ const selectedWorkspaceBasename = selectedProject?.workspaceRoot.split("/").at(-1) ?? null;
t3dotgg(GitHub profile, opens in a new tab) changed the title
- apps/mobile/src/features/threads/thread-list-items.tsx line 84OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -63,8 +69,16 @@69+ // Compact right padding centers the 20pt plus glyph on the thread70+ // rows' trailing chevron column (18 + 13/2 ≈ 24.5 from the edge).71+ paddingRight: compact ? 14 : 12,72+ paddingBottom: compact ? 12 : 8,73+ paddingTop: props.isFirst ? (compact ? 8 : 4) : compact ? 24 : 20,74+ }}6375 >64- <View76+ <Pressable77+ accessibilityRole="button"78+ accessibilityState={{ expanded: !props.collapsed }}79+ accessibilityLabel={`${props.title}, ${props.threadCount} threads`}80+ accessibilityHint={props.collapsed ? "Expands the project" : "Collapses the project"}6581 className={66- compact67- ? `flex-row items-center gap-2.5 px-5 pb-3 ${props.isFirst ? "pt-2" : "pt-6"}`68- : `flex-row items-center gap-2 px-3 pb-2 ${props.isFirst ? "pt-1" : "pt-5"}`82+ compact ? "flex-1 flex-row items-center gap-2.5" : "flex-1 flex-row items-center gap-2"6983 }70- style={{ minHeight: compact ? 44 : 36 }}84+ hitSlop={verticalHitSlop}
- @@ -168,7 +227,20 @@227+ Arr.findFirst(228+ group.projects,229+ (project) =>230+ project.environmentId === thread.environmentId && project.id === thread.projectId,231+ ),232+ ),233+ Option.getOrNull,234+ );235+168236 result.push({169237 key: group.key,170238 title,171239 representative,172240 projects: group.projects,173241 pendingTasks: matchingPendingTasks,174- threads: sortThreads(matchingThreads, input.threadSortOrder),242+ threads: sortedThreads,243+ recentThreads,244+ newThreadTarget: group.key.startsWith("pending-project:")245+ ? null246+ : (lastActiveProject ?? representative),
juliusmarminge merged thise26e55f
juliusmarminge closed this
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:
4d7e3027-8d6c-4aa4-855e-a0fcd0c748cbYou 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.