Deactivate streaming copyright pass + smooth reference reveal#27
Merged
Conversation
The GUI streamed answer froze for ~0.6s at the body→references boundary, then dumped the references all at once. - basic.py execute_stream: skip the synchronous copyright-detection pass on the streaming (GUI) path. The body has already streamed and the client ignores the "revision" event, so the pass only added a visible mid-stream stall before the references with no user-facing effect. The non-streaming execute() path still runs it for compliance. Also drops the now-unused full_response accumulation. - ChatPanel: finish the post-stream buffered tail (the one-chunk references block) at a finite 48 chars/frame instead of snapping to instant on `done`, so it eases in smoothly. Historical loads stay instant (the typewriter starts caught up, so no animation runs). Verified: max inter-token gap 131ms (was ~605-668ms); no copyright pass on the stream; 91 targeted unit tests pass. Co-Authored-By: Claude Opus 4.8 <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
Fixes the streaming glitch where the GUI answer froze for ~0.6 s at the body→references boundary (right after the FBMN section) and then dumped the references all at once.
Freeze — deactivate the streaming copyright pass (
basic.py)After the body finished streaming,
_apply_copyright_filterran a synchronous verbatim-detection pass before references were appended — a ~605–668 ms stall. On the streaming (GUI) path this had no user-facing effect: the body had already streamed, and the client ignores therevisionevent. So the pass is skipped onexecute_stream(the non-streamingexecute()still runs it for compliance). Also drops the now-unusedfull_responseaccumulation.Dump — smooth the reference reveal (
ChatPanel.tsx)useTypewriterflipped from12 chars/frameto instant (99999) the momentdonearrived, so the one-chunk references block snapped in. It now finishes the buffered tail at a finite 48 chars/frame, easing the references in (~100 ms). Historical loads stay instant — the typewriter starts already caught-up, so no animation runs.Verification
91targeted unit tests pass (copyright / basic / stream / reference); frontend compiles clean.Note: the
testCI job fails on the pre-existingtest_web_app_routes.pysandbox issue already present onmain(passes locally 30/30); unrelated to this change.🤖 Generated with Claude Code