feat(research): smart completion detection via stop button - #7
Merged
Conversation
…gnal Replace fixed dom_min_elapsed guards (240s/360s) with stop button cycle detection as primary signal for research/labs modes. Stop button appear→disappear with 3s debounce is the most reliable indicator. Multi-signal confirmation: MutationObserver stability (5s zero mutations) or text stability (8s unchanged) confirms after stop button disappears. Falls back to CSS/text-stability with reduced guards if stop button never appears. Error state detection after stop button disappearance. Vision path deprecated for research/labs completion detection. Expected ~65% reduction in query time (360s→~130s for 2-min queries). Co-Authored-By: Claude Opus 4.6 <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.
Summary
dom_min_elapsedguards with stop button cycle detection (appear→disappear + 3s debounce) as primary signal for research/labs modesExpected ~65% reduction in research query time (360s → ~130s for a 2-min query).
Test plan
research_queryand verify completion detected within ~15s of actual generation finishing🤖 Generated with Claude Code