- Deduplicate terminal IDs and favorite model slugs with trim-aware iteration - Use effect-based filtering for local branch and built-in model lists - Switch stable array handling to non-mutating `toSorted`
Showing the changes to apps/mobile (1 of 8 files). Show all
Unified · Split
| @@ -1,5 +1,7 @@ | |||
| 1 | import { resolveDefaultBranchActionDialogCopy } from "@t3tools/client-runtime"; | 1 | import { resolveDefaultBranchActionDialogCopy } from "@t3tools/client-runtime"; |
| 2 | import { resolveAutoFeatureBranchName } from "@t3tools/shared/git"; | 2 | import { resolveAutoFeatureBranchName } from "@t3tools/shared/git"; |
| 3 | import * as Arr from "effect/Array"; | ||
| 4 | import * as Result from "effect/Result"; | ||
| 3 | import { useLocalSearchParams, useRouter } from "expo-router"; | 5 | import { useLocalSearchParams, useRouter } from "expo-router"; |
| 4 | import { useCallback, useMemo } from "react"; | 6 | import { useCallback, useMemo } from "react"; |
| 5 | import { View } from "react-native"; | 7 | import { View } from "react-native"; |
| @@ -74,7 +76,9 @@ export function GitConfirmSheet() { · 68 unmodified lines | |||
| 74 | ? gitState.selectedThreadBranches | 76 | ? gitState.selectedThreadBranches |
| 75 | : await gitActions.refreshSelectedThreadBranches(); | 77 | : await gitActions.refreshSelectedThreadBranches(); |
| 76 | const newBranchName = resolveAutoFeatureBranchName( | 78 | const newBranchName = resolveAutoFeatureBranchName( |
| 77 | branches.filter((branch) => !branch.isRemote).map((branch) => branch.name), | 79 | Arr.filterMap(branches, (branch) => |
| 80 | branch.isRemote ? Result.failVoid : Result.succeed(branch.name), | ||
| 81 | ), | ||
| 78 | ); | 82 | ); |
| 79 | await gitActions.onCreateSelectedThreadBranch(newBranchName); | 83 | await gitActions.onCreateSelectedThreadBranch(newBranchName); |
| 80 | await gitActions.onRunSelectedThreadGitAction({ action: confirmAction }); | 84 | await gitActions.onRunSelectedThreadGitAction({ action: confirmAction }); |