Automattic / Automattic/jetpack

GIF block: May load incorrect image on search

Open
#11,851 1 comment 0 reactions 0 assignees View on GitHub
[Block] GIF [Focus] Blocks [Pri] Low [Status] Stale
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

Multiple in-flight requests on the debounced Giphy search do not have any guarantees on the order in which they may be resolved. Typing slowly to trigger debounced search on a poor connection may mean that any previously searched image may be the last one to resolve, triggering an update of the component with whatever that response is. It may not necessarily be related to the most recent search.

cc: @jeffersonrabb @scruffian @simison

Contributor guide

Open the contributing guide

Research direction

Start by tracing the GIF block's debounced Giphy search and the component update triggered when a response resolves. Reproduce the slow-connection case with multiple searches, then verify that an older response can no longer replace results from the most recent search.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.