| author | |
| committer | |
| log | de545c41737aca08359244b7778ab52e55934f17 |
| tree | 269217a8e2263eee6c0b0a5d4a5306c246d956db |
| parent | 3faeee49ac67dfd9534369f1e1c627c0356b75ac |
| signature | Signed by PGP key B5690EEEBB952194 |
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>3 files changed, 6 insertions(+), 8 deletions(-)
apps/web/src/components/BranchToolbar.tsx+2-2| ... | @@ -12,7 +12,7 @@ import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useStat | ... | @@ -12,7 +12,7 @@ import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useStat |
| 12 | 12 | ||
| 13 | import { useComposerDraftStore, type DraftId } from "../composerDraftStore"; | 13 | import { useComposerDraftStore, type DraftId } from "../composerDraftStore"; |
| 14 | import { EnvironmentMachineIcon } from "./EnvironmentMachineIcon"; | 14 | import { EnvironmentMachineIcon } from "./EnvironmentMachineIcon"; |
| 15 | import { useProject, useThread, useThreadShellsForProjectRefs } from "../state/entities"; | 15 | import { useProject, useThreadShell, useThreadShellsForProjectRefs } from "../state/entities"; |
| 16 | import { | 16 | import { |
| 17 | type EnvMode, | 17 | type EnvMode, |
| 18 | type EnvironmentOption, | 18 | type EnvironmentOption, |
| ... | @@ -465,7 +465,7 @@ export const BranchToolbar = memo(function BranchToolbar({ | ... | @@ -465,7 +465,7 @@ export const BranchToolbar = memo(function BranchToolbar({ |
| 465 | const draftThread = useComposerDraftStore((store) => | 465 | const draftThread = useComposerDraftStore((store) => |
| 466 | draftId ? store.getDraftSession(draftId) : store.getDraftThreadByRef(threadRef), | 466 | draftId ? store.getDraftSession(draftId) : store.getDraftThreadByRef(threadRef), |
| 467 | ); | 467 | ); |
| 468 | const serverThread = useThread(threadRef, { waitForShell: draftThread !== null }); | 468 | const serverThread = useThreadShell(threadRef); |
| 469 | const setDraftThreadContext = useComposerDraftStore((store) => store.setDraftThreadContext); | 469 | const setDraftThreadContext = useComposerDraftStore((store) => store.setDraftThreadContext); |
| 470 | const activeProjectRef = serverThread | 470 | const activeProjectRef = serverThread |
| 471 | ? scopeProjectRef(serverThread.environmentId, serverThread.projectId) | 471 | ? scopeProjectRef(serverThread.environmentId, serverThread.projectId) |
apps/web/src/components/BranchToolbarBranchSelector.tsx+2-2| ... | @@ -27,7 +27,7 @@ import { readLocalApi } from "../localApi"; | ... | @@ -27,7 +27,7 @@ import { readLocalApi } from "../localApi"; |
| 27 | import { useOpenPrLink } from "../lib/openPullRequestLink"; | 27 | import { useOpenPrLink } from "../lib/openPullRequestLink"; |
| 28 | import { shouldLoadNextBranchPageAfterScroll } from "../state/paginatedBranches"; | 28 | import { shouldLoadNextBranchPageAfterScroll } from "../state/paginatedBranches"; |
| 29 | import { usePaginatedBranches } from "../state/queries"; | 29 | import { usePaginatedBranches } from "../state/queries"; |
| 30 | import { useProject, useThread } from "../state/entities"; | 30 | import { useProject, useThreadShell } from "../state/entities"; |
| 31 | import { useEnvironmentQuery } from "../state/query"; | 31 | import { useEnvironmentQuery } from "../state/query"; |
| 32 | import { threadEnvironment } from "../state/threads"; | 32 | import { threadEnvironment } from "../state/threads"; |
| 33 | import { useAtomCommand } from "../state/use-atom-command"; | 33 | import { useAtomCommand } from "../state/use-atom-command"; |
| ... | @@ -119,7 +119,7 @@ export function BranchToolbarBranchSelector({ | ... | @@ -119,7 +119,7 @@ export function BranchToolbarBranchSelector({ |
| 119 | const draftThread = useComposerDraftStore((store) => | 119 | const draftThread = useComposerDraftStore((store) => |
| 120 | draftId ? store.getDraftSession(draftId) : store.getDraftThreadByRef(threadRef), | 120 | draftId ? store.getDraftSession(draftId) : store.getDraftThreadByRef(threadRef), |
| 121 | ); | 121 | ); |
| 122 | const serverThread = useThread(threadRef, { waitForShell: draftThread !== null }); | 122 | const serverThread = useThreadShell(threadRef); |
| 123 | const serverSession = serverThread?.session ?? null; | 123 | const serverSession = serverThread?.session ?? null; |
| 124 | const setDraftThreadContext = useComposerDraftStore((store) => store.setDraftThreadContext); | 124 | const setDraftThreadContext = useComposerDraftStore((store) => store.setDraftThreadContext); |
| 125 | 125 |
apps/web/src/components/GitActionsControl.tsx+2-4| ... | @@ -87,7 +87,7 @@ import { | ... | @@ -87,7 +87,7 @@ import { |
| 87 | useVcsInitAction, | 87 | useVcsInitAction, |
| 88 | useVcsPullAction, | 88 | useVcsPullAction, |
| 89 | } from "~/lib/sourceControlActions"; | 89 | } from "~/lib/sourceControlActions"; |
| 90 | import { useThread } from "~/state/entities"; | 90 | import { useThreadShell } from "~/state/entities"; |
| 91 | import { useEnvironmentQuery } from "~/state/query"; | 91 | import { useEnvironmentQuery } from "~/state/query"; |
| 92 | import { serverEnvironment } from "~/state/server"; | 92 | import { serverEnvironment } from "~/state/server"; |
| 93 | import { sourceControlEnvironment } from "~/state/sourceControl"; | 93 | import { sourceControlEnvironment } from "~/state/sourceControl"; |
| ... | @@ -950,9 +950,7 @@ export default function GitActionsControl({ | ... | @@ -950,9 +950,7 @@ export default function GitActionsControl({ |
| 950 | ? store.getDraftThreadByRef(activeThreadRef) | 950 | ? store.getDraftThreadByRef(activeThreadRef) |
| 951 | : null, | 951 | : null, |
| 952 | ); | 952 | ); |
| 953 | const activeServerThread = useThread(activeThreadRef, { | 953 | const activeServerThread = useThreadShell(activeThreadRef); |
| 954 | waitForShell: activeDraftThread !== null, | ||
| 955 | }); | ||
| 956 | const setDraftThreadContext = useComposerDraftStore((store) => store.setDraftThreadContext); | 954 | const setDraftThreadContext = useComposerDraftStore((store) => store.setDraftThreadContext); |
| 957 | const [isCommitDialogOpen, setIsCommitDialogOpen] = useState(false); | 955 | const [isCommitDialogOpen, setIsCommitDialogOpen] = useState(false); |
| 958 | const [dialogCommitMessage, setDialogCommitMessage] = useState(""); | 956 | const [dialogCommitMessage, setDialogCommitMessage] = useState(""); |