getRequestUid = (pathname) => {
  let uid = requestUids.get(pathname);

  if (!uid) {
    uid = uuid();
    requestUids.set(pathname, uid);
  }

  return uid;
}
we maintain a cache of request uids to ensure that we
preserve the same uid for a request even when the request
moves to a different location

In the past, we used to generate unique ids based on the
pathname of the request, but we faced problems when implementing
functionality where the user can move the request to a different
location. In that case, the uid would change, and we would
lose the request's draft state if the user has made some changes