-
Notifications
You must be signed in to change notification settings - Fork 3.8k
fix(mobile): preserve grouped project workspaces #4642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
shivamhwp
merged 30 commits into
pingdotgg:main
from
shivamhwp:agent/fix-mobile-project-grouping
Aug 5, 2026
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
6d1ee77
fix(mobile): preserve grouped project workspaces
shivamhwp 5a38989
docs: add Android grouping verification screenshots
shivamhwp 5b89b51
refactor(mobile): simplify project grouping settings
shivamhwp 4f75888
refactor(mobile): use global project grouping only
shivamhwp 72bf9c6
Merge branch 'main' into agent/fix-mobile-project-grouping
shivamhwp 7cb3c13
fix mobile project grouping review issues
shivamhwp 89ee06f
fix stale mobile draft project selection
shivamhwp da8bccd
Merge remote-tracking branch 'upstream/main' into agent/fix-mobile-pr…
shivamhwp 69f4be5
Merge branch 'main' into agent/fix-mobile-project-grouping
shivamhwp e6a6e85
fix(mobile): gate grouping settings on hydration
shivamhwp a4b234f
Merge remote-tracking branch 'upstream/main' into agent/fix-mobile-pr…
shivamhwp b3810f5
chore(mobile): remove verification artifacts
shivamhwp b64c036
fix(mobile): preserve grouped project workspaces
shivamhwp 5d5b5a8
docs: add Android grouping verification screenshots
shivamhwp b8380d1
refactor(mobile): simplify project grouping settings
shivamhwp 2c2022d
refactor(mobile): use global project grouping only
shivamhwp 9ffd3c4
fix mobile project grouping review issues
shivamhwp 0ecedae
fix stale mobile draft project selection
shivamhwp 9c6fd58
fix(mobile): gate grouping settings on hydration
shivamhwp e39c2ee
chore(mobile): remove verification artifacts
shivamhwp 7e1cd27
docs(mobile): refresh grouping verification screenshots
20b7f06
chore(mobile): remove verification artifacts
fd21fbc
fix(mobile): polish project selection UI
4737831
docs(mobile): refresh grouping screenshots
166040d
chore(mobile): remove screenshot artifacts
6147257
Merge branch 'main' into agent/fix-mobile-project-grouping
shivamhwp 68550f9
Merge remote-tracking branch 'origin/agent/fix-mobile-project-groupin…
shivamhwp 9ebf027
Merge branch 'main' into agent/fix-mobile-project-grouping
shivamhwp 98d00c3
Merge branch 'main' into agent/fix-mobile-project-grouping
shivamhwp db0db83
Merge branch 'main' into agent/fix-mobile-project-grouping
shivamhwp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 11 additions & 1 deletion
12
apps/mobile/src/features/settings/SettingsAppearanceRouteScreen.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
apps/mobile/src/features/settings/SettingsProjectGroupingRouteScreen.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| import { useAtomSet, useAtomValue } from "@effect/atom-react"; | ||
| import { useNavigation } from "@react-navigation/native"; | ||
| import type { SidebarProjectGroupingMode } from "@t3tools/contracts"; | ||
| import { AsyncResult } from "effect/unstable/reactivity"; | ||
| import { Platform, Pressable, ScrollView, View } from "react-native"; | ||
| import { useSafeAreaInsets } from "react-native-safe-area-context"; | ||
|
|
||
| import { AndroidScreenHeader } from "../../components/AndroidScreenHeader"; | ||
| import { AppText as Text } from "../../components/AppText"; | ||
| import { SymbolView } from "../../components/AppSymbol"; | ||
| import { useThemeColor } from "../../lib/useThemeColor"; | ||
| import { NativeStackScreenOptions } from "../../native/StackHeader"; | ||
| import { | ||
| mobileProjectGroupingModePatch, | ||
| resolveMobileProjectGroupingSettings, | ||
| } from "../../state/project-grouping"; | ||
| import { mobilePreferencesAtom, updateMobilePreferencesAtom } from "../../state/preferences"; | ||
| import { SettingsSection } from "./components/SettingsSection"; | ||
|
|
||
| const GROUPING_OPTIONS: ReadonlyArray<{ | ||
| readonly mode: SidebarProjectGroupingMode; | ||
| readonly label: string; | ||
| readonly description: string; | ||
| }> = [ | ||
| { | ||
| mode: "repository", | ||
| label: "Group by repository", | ||
| description: "Matching repositories appear as one project.", | ||
| }, | ||
| { | ||
| mode: "repository_path", | ||
| label: "Group by repository path", | ||
| description: "Keep monorepo paths separate.", | ||
| }, | ||
| { | ||
| mode: "separate", | ||
| label: "Keep separate", | ||
| description: "Show every workspace as its own project.", | ||
| }, | ||
| ]; | ||
|
|
||
| export function SettingsProjectGroupingRouteScreen() { | ||
| const navigation = useNavigation(); | ||
| const insets = useSafeAreaInsets(); | ||
| const checkmarkColor = useThemeColor("--color-icon"); | ||
| const preferencesResult = useAtomValue(mobilePreferencesAtom); | ||
| const savePreferences = useAtomSet(updateMobilePreferencesAtom); | ||
| const preferencesReady = AsyncResult.isSuccess(preferencesResult) && !preferencesResult.waiting; | ||
| const selectedMode = AsyncResult.isSuccess(preferencesResult) | ||
| ? resolveMobileProjectGroupingSettings(preferencesResult.value).sidebarProjectGroupingMode | ||
| : null; | ||
|
|
||
| return ( | ||
| <View collapsable={false} className="flex-1 bg-sheet"> | ||
| {Platform.OS === "android" ? ( | ||
| <> | ||
| <NativeStackScreenOptions options={{ headerShown: false }} /> | ||
| <AndroidScreenHeader title="Project Grouping" onBack={() => navigation.goBack()} /> | ||
| </> | ||
| ) : null} | ||
| <ScrollView | ||
| contentInsetAdjustmentBehavior="automatic" | ||
| showsVerticalScrollIndicator={false} | ||
| className="flex-1" | ||
| contentContainerClassName="gap-3 px-5 pt-4" | ||
| contentContainerStyle={{ paddingBottom: Math.max(insets.bottom, 18) + 18 }} | ||
| > | ||
| <SettingsSection title="Default grouping"> | ||
| {GROUPING_OPTIONS.map((option, index) => ( | ||
| <Pressable | ||
| key={option.mode} | ||
| accessibilityRole="radio" | ||
| accessibilityState={{ | ||
| checked: selectedMode === option.mode, | ||
| disabled: !preferencesReady, | ||
| }} | ||
| disabled={!preferencesReady} | ||
| onPress={() => savePreferences(mobileProjectGroupingModePatch(option.mode))} | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| className={ | ||
| index === 0 | ||
| ? "flex-row items-center gap-4 p-4" | ||
| : "flex-row items-center gap-4 border-t border-border-subtle p-4" | ||
| } | ||
| > | ||
| <View className="min-w-0 flex-1 gap-1"> | ||
| <Text className="text-lg text-foreground">{option.label}</Text> | ||
| <Text className="text-sm leading-normal text-foreground-muted"> | ||
| {option.description} | ||
| </Text> | ||
| </View> | ||
| {selectedMode === option.mode ? ( | ||
| <SymbolView | ||
| name="checkmark" | ||
| size={18} | ||
| tintColor={checkmarkColor} | ||
| type="monochrome" | ||
| weight="semibold" | ||
| /> | ||
| ) : null} | ||
| </Pressable> | ||
| ))} | ||
| </SettingsSection> | ||
| </ScrollView> | ||
| </View> | ||
| ); | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.