Repository navigation
test(search): reproduce the cancelled click behind the CI timeout - #71
Merged
Merged
Conversation
Issue #62: spec/system/catalog_search_spec.rb:4 timed out opening a card page on GitHub CI (runs 36793202581 and 36882235200). Both runs predate 09aa85a, when the search form was still a frame-advance filter. Turbo swapped the results in, then waited two repaints before starting a page visit. On a slow runner the spec's click on a result landed in that gap, and the late visit's navigator.stop() cancelled the card page's visit, so the search page stayed. The CI screenshots show the cancelled visit's leaked progress bar, full width and never fading. The new example slows repaints and the card page's fetch so the click always lands in the gap. It fails at 09aa85a^ (and at fc8cff1, the commit of the second CI failure) and passes from 09aa85a on, which removed the results frame. No application change is needed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The flake was the frame-advance late page visit cancelling a click, fixed by 09aa85a. The Turbo quirks memory now covers it, what a stuck full-width progress bar means, and how to slow repaints without breaking cancelAnimationFrame. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CI-only timeout in
spec/system/catalog_search_spec.rb:4is traced to its cause, which PR #9 (09aa85a, 2026-10-02) already removed. This PR adds a regression example that reproduces the failure on the old code, and records the cause. No application code changes.Closes #62
Cause
Both failing runs (36793202581 at
948c17b, 36882235200 atfc8cff1) predate09aa85a. At those commits the search form was a Turbo frame-advance filter (data-turbo-frame="results",data-turbo-action="advance"):navigator.stop(), which cancels the click's visit. The search page stays andhave_css("h1", text: "Lightning Bolt")times out.This is the click variant of the "late page visit" race that broke Back. The earlier reading of the CI screenshot (a slow visit still in flight) was wrong: the bar in both screenshots is full width and opaque, which is a leaked timer from a cancelled visit, not a visit in progress.
Evidence
09aa85a^and atfc8cff109aa85aand on currentmainmainwith the frame filter put back (reviewer)mainAn independent read-only review (Opus) confirmed the cause from Turbo's source and a live trace, found no other path on current
mainthat could cancel the click's visit, and agrees the issue can close as already fixed.What changed
spec/system/catalog_search_spec.rb: a second example, "opens a printing even when repaints and the card page's fetch are slow". It usesusing_wait_time(5)only because it injects a 1.5 s fetch delay and 300 ms repaints itself; the original example keeps the default wait..claude/memory/: the flake's memory file is deleted, andturbo-back-navigation-quirks.mdrecords the click variant and what a stuck full-width progress bar means.Verification
bin/ci: passed. RSpec 1220 examples, 0 failures, 1 pending (the art agreement spec, unrelated).Notes and follow-ups
b4f9bbcoverstates it. On current code that is not a flake risk.search_for_boltand the slow-repaint helper near-duplicate ones inspec/system/back_navigation_spec.rb; one shared helper inspec/support/would be tidier.back_navigation_spec.rb:45also fails if the frame filter comes back, so the new example is a second guard that documents this symptom.log/test.logas a CI artifact on failure wasn't added; it would still help the next unrelated flake.docs/roadmap.mdstill lists Catalog search system spec times out on GitHub CI #62.🤖 Generated with Claude Code