Skip to content

Commit 44bfbf4

Browse files
fix(web): drop the menu wait, which could open after close
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 579779a commit 44bfbf4

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎apps/web/src/hooks/useThreadActionMenu.ts‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import {
3232
readEnvironmentSupportsAutoSettleOptOut,
3333
readThreadShell,
3434
useProjects,
35-
waitForThreadShell,
3635
} from "../state/entities";
3736
import { usePrimaryEnvironmentId } from "../state/environments";
3837
import { readLocalApi } from "../localApi";
@@ -121,12 +120,9 @@ export function useThreadActionMenu(input: {
121120
void (async () => {
122121
const api = readLocalApi();
123122
if (!api) return;
124-
// An open thread the shell leaves out gets its row from a family read that may still be pending.
125-
const thread =
126-
readThreadShell(threadRef) ??
127-
((await waitForThreadShell(threadRef)) ? readThreadShell(threadRef) : null);
123+
const thread = readThreadShell(threadRef);
128124
if (!thread) {
129-
failureToast("Thread actions unavailable", new Error("This thread could not be loaded."));
125+
failureToast("Thread actions unavailable", new Error("This thread has not loaded yet."));
130126
return;
131127
}
132128
const now = new Date();

0 commit comments

Comments
 (0)