Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(settings): scheduled tasks use the project default branch #36924

ClosedStiensWout(GitHub profile, opens in a new tab)wants to merge 9 commits intomain fromrefs/pull/36924/headopened View on GitHub

Showing 21 changed files with 65 additions and 17 deletions (loading 18).

x
0 of 21 viewed, 21 left
46 additions and 0 deletionsapps/mobile/src/features/settings/ScheduledTaskPickerScreens.tsxModified
View file
@@ -18,6 +18,8 @@
useVisibleThreadShells,
} from "../../state/entities";
import { useDebouncedValue, usePaginatedBranches, useThreadSearch } from "../../state/queries";
+import { useEnvironmentQuery } from "../../state/query";
+import { vcsEnvironment } from "../../state/vcs";
import { BranchPickerScreen } from "../threads/NewTaskContextPickerScreens";
import { ThreadSettingsPickerScreen } from "../threads/ThreadSettingsSheet";
import { SettingsScreen } from "./components/SettingsScreen";
@@ -137,15 +139,59 @@
cwd: project?.workspaceRoot ?? null,
query: debouncedQuery,
});
+ const selectedRefQuery = useEnvironmentQuery(
+ editor && project && editor.draft.baseRef
+ ? vcsEnvironment.listRefs({
+ environmentId: editor.environmentId,
+ input: {
+ cwd: project.workspaceRoot,
+ query: editor.draft.baseRef,
+ limit: 10,
+ includeMatchingRemoteRefs: true,
+ },
+ })
+ : null,
+ );
+ const selectedRef = selectedRefQuery.data?.refs.find((ref) => ref.name === editor?.draft.baseRef);
const visibleBranches = branches.refs.filter(
(branch) => !branch.isRemote && branch.name.toLowerCase().includes(query.trim().toLowerCase()),