You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(platform): Website content search can replace newer results with an older response #3833
Evidence:products-websites-next-search-race-evidence.md; an isolated Vitest/jsdom harness passed an out-of-order completion test against the current WebsiteViewDialog.
Reproduction
Open WebsiteViewDialog for a crawled site and submit a content search for first.
Immediately replace the field with second and press Enter again.
Resolve the second action first with a “Second result”, then resolve the earlier first action with a “First result”.
The input still displays second, but the dialog displays “First result” and the newer result is gone. The harness controlled only the backend action boundary and passed the stale-state assertion; no production request was made.
Root cause
services/platform/app/features/websites/components/website-view-dialog.tsx:337-345 installs one onSuccess callback that unconditionally calls setSearchResults(data.results) and clears isSearching. triggerSearch at :354-362 allows another Enter while the first action is pending, and the SearchInput stays enabled. There is no request token or query identity check, so late responses can overwrite the latest query.
Expected / actual
Expected: only the latest submitted query may update the result list, or the input should prevent overlapping searches while still guarding late responses. Actual: network timing can show content for an older query under the newer visible input, undermining inspection accuracy.
Deduplication
No matching current ledger or issue title covers Website content-search races; existing website findings concern scan/status/page-data paths.
Suggested repair
Track a monotonically increasing request token or compare the returned query with the active query before applying results, and add a regression that resolves two searches out of order.
Activity