Skip to content

Commit 996ae04

Browse files
PR Batch Testerclaude
andcommitted
fix(web): keep the clone lookup cancel out of render
react(refs) failed lint because cancelCloneLookup, which bumps a ref, was a plain closure reachable from render-time groups. It is now a stable callback, like pushPaletteView. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent ab2326b commit 996ae04

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/web/src/components/CommandPalette.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -925,10 +925,10 @@ function OpenCommandPaletteDialog(props: {
925925
.slice(0, RECENT_THREAD_LIMIT);
926926

927927
// A lookup that resolves after the user edits or leaves its step must not restore that step.
928-
const cancelCloneLookup = (): void => {
928+
const cancelCloneLookup = useStableCallback((): void => {
929929
cloneLookupGeneration.current += 1;
930930
setIsRemoteProjectLookingUp(false);
931-
};
931+
});
932932

933933
const pushPaletteView = useStableCallback((view: CommandPaletteView): void => {
934934
browseNavigation.invalidate();

0 commit comments

Comments
 (0)