Awesome Reviewers

In React, any effect that listens to global/input events or performs one-time navigation/initialization must be explicitly coordinated with UI lifecycle and state ownership.

Apply this standard:

Example pattern (one-time bootstrap + event gating):

function useOneTimeBootstrap({ isReady }: { isReady: boolean }) {
  const didBootstrapRef = useRef(false);

  useEffect(() => {
    if (!isReady || didBootstrapRef.current) return;
    didBootstrapRef.current = true;

    // initial, selection-preserving navigation
    dispatch(selectEnvironmentDraft());
  }, [isReady]);
}

function onKeyDownOwned(event: KeyboardEvent, { isSuspended }: { isSuspended: boolean }) {
  if (isSuspended) return;
  if (!matchesOwnedAccelerator(event)) return;

  event.preventDefault();
  event.stopImmediatePropagation();
  performOwnedAction();
}