Skip to content

fix(studio): let only user input hold back font list idle work, and retry after a failure - #4823

Draft
miguel-heygen wants to merge 7 commits into
mainfrom
perf/studio-font-idle-input-gate
Draft

miguel-heygen wants to merge 7 commits into
mainfrom
perf/studio-font-idle-input-gate

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Stacked on #4794. Retarget to main once that merges.

What

Three follow-ups to the idle font-list processing:

  1. Only the user's input holds the work back. The idle gate used the overlay loop's awake window, and that window is also extended by playback frames and by programmatic wakes. During a long playback the picker therefore stayed on the popular fonts. The gate now reads its own last-input time, which comes from pointer, key and wheel events only (INPUT_EVENTS; the loop's wake sources are those plus scroll, resize and visibility). The input listeners attach with the first overlay subscriber, so input that happens before the lists arrive still counts.
  2. A failure in the idle step no longer leaves "Loading" forever. The step catches the error, logs it, and clears the request, so the next mount or picker open retries.
  3. Input that lands after an idle slice was queued holds that slice back. A test now covers this; the behaviour was already there.

Tests

overlayFrameLoop.test.ts:

  • "holds an idle slice when input lands after it was queued";
  • "does not hold idle work for playback frames or programmatic wakes".

propertyPanelFont.test.tsx:

  • "retries on the next open when processing the lists throws".

All three fail with the two source files at #4794's head. With the re-check at the idle callback removed, the first one fails.

@miguel-heygen
miguel-heygen force-pushed the perf/studio-font-list-on-demand branch from 7ccf56d to c53de72 Compare October 1, 2026 15:06
Base automatically changed from perf/studio-font-list-on-demand to main October 1, 2026 15:35

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant