[bug][page-templates] lookup context can strand an id in-flight on a partial server response #35
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From review of #17 (merged to develop).
apps/client/src/features/editor/components/page-embed/page-embed-lookup-context.tsxflush()clearsinFlightRef/ resolvespendingRefonly for ids present in the responseitems. If the server ever returns fewer items than requested, the missing id stays ininFlightRefforever (never re-fetched because of theelse if (!inFlightRef...has)guard; itsrefresh()promise never resolves).The current server contract (
lookupTemplatemaps exactly oversourcePageIds) guarantees one item per requested id, so it cannot trigger today — but harden by iterating the originalidsin the success branch and clearing/resolving any still-in-flight id (as thecatchbranch already does).Severity: low.