fix(web): stop the bar under the composer popping in after threads load (#10727)
Co-authored-by: Claude Fable 5.1 <[email protected]>
This commit is contained in:
1 parent
3faeee49ac
commit
de545c4173
3 files changed
+6
-8
No files matched your search
@@ -12,7 +12,7 @@ import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useStat
|
||||
|
||||
import { useComposerDraftStore, type DraftId } from "../composerDraftStore";
|
||||
import { EnvironmentMachineIcon } from "./EnvironmentMachineIcon";
|
||||
import { useProject, useThread, useThreadShellsForProjectRefs } from "../state/entities";
|
||||
import { useProject, useThreadShell, useThreadShellsForProjectRefs } from "../state/entities";
|
||||
import {
|
||||
type EnvMode,
|
||||
type EnvironmentOption,
|
||||
@@ -465,7 +465,7 @@ export const BranchToolbar = memo(function BranchToolbar({
|
||||
const draftThread = useComposerDraftStore((store) =>
|
||||
draftId ? store.getDraftSession(draftId) : store.getDraftThreadByRef(threadRef),
|
||||
);
|
||||
const serverThread = useThread(threadRef, { waitForShell: draftThread !== null });
|
||||
const serverThread = useThreadShell(threadRef);
|
||||
const setDraftThreadContext = useComposerDraftStore((store) => store.setDraftThreadContext);
|
||||
const activeProjectRef = serverThread
|
||||
? scopeProjectRef(serverThread.environmentId, serverThread.projectId)
|
||||
|
||||
@@ -27,7 +27,7 @@ import { readLocalApi } from "../localApi";
|
||||
import { useOpenPrLink } from "../lib/openPullRequestLink";
|
||||
import { shouldLoadNextBranchPageAfterScroll } from "../state/paginatedBranches";
|
||||
import { usePaginatedBranches } from "../state/queries";
|
||||
import { useProject, useThread } from "../state/entities";
|
||||
import { useProject, useThreadShell } from "../state/entities";
|
||||
import { useEnvironmentQuery } from "../state/query";
|
||||
import { threadEnvironment } from "../state/threads";
|
||||
import { useAtomCommand } from "../state/use-atom-command";
|
||||
@@ -119,7 +119,7 @@ export function BranchToolbarBranchSelector({
|
||||
const draftThread = useComposerDraftStore((store) =>
|
||||
draftId ? store.getDraftSession(draftId) : store.getDraftThreadByRef(threadRef),
|
||||
);
|
||||
const serverThread = useThread(threadRef, { waitForShell: draftThread !== null });
|
||||
const serverThread = useThreadShell(threadRef);
|
||||
const serverSession = serverThread?.session ?? null;
|
||||
const setDraftThreadContext = useComposerDraftStore((store) => store.setDraftThreadContext);
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ import {
|
||||
useVcsInitAction,
|
||||
useVcsPullAction,
|
||||
} from "~/lib/sourceControlActions";
|
||||
import { useThread } from "~/state/entities";
|
||||
import { useThreadShell } from "~/state/entities";
|
||||
import { useEnvironmentQuery } from "~/state/query";
|
||||
import { serverEnvironment } from "~/state/server";
|
||||
import { sourceControlEnvironment } from "~/state/sourceControl";
|
||||
@@ -950,9 +950,7 @@ export default function GitActionsControl({
|
||||
? store.getDraftThreadByRef(activeThreadRef)
|
||||
: null,
|
||||
);
|
||||
const activeServerThread = useThread(activeThreadRef, {
|
||||
waitForShell: activeDraftThread !== null,
|
||||
});
|
||||
const activeServerThread = useThreadShell(activeThreadRef);
|
||||
const setDraftThreadContext = useComposerDraftStore((store) => store.setDraftThreadContext);
|
||||
const [isCommitDialogOpen, setIsCommitDialogOpen] = useState(false);
|
||||
const [dialogCommitMessage, setDialogCommitMessage] = useState("");
|
||||
|
||||
Reference in new issue
Block a user