Fix/post v0.7 review#22
Open
synacktraa wants to merge 4 commits into
Open
Conversation
Detection listeners (framenavigated, DOM mutations) only fire on new events, so any transition into the completion state between session registration and first-connect was lost — the handoff would then wait for a future event that never came and time out on completion_timeout. Re-check on connect (LLM included now that the wrapper is loaded) and short-circuit if the state is already reached. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Previously the substrate iframe (passthrough) kept live focus and accepted keystrokes after completion, and the last stream frame lingered in memory (streaming). Now: defocus the iframe immediately so pending keystrokes stop hitting the substrate, keep the underlying frame visible for the ~300ms fade-in so the page fades under the card instead of snapping to black, then blank the iframe / drop the last frame. Applied symmetrically to both templates. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- proxy_intervention.html -> server/templates/passthrough-mode.html
- intervention.html -> server/templates/screencast-mode.html
The old names ("intervention" as a generic verb; "proxy" f
actually an iframe of a substrate viewer) obscured what each template
is for. Naming them by mode makes the two-mode design visi
tree. Living under server/ also disambiguates them from the top-level
package — they're a server-owned rendering detail.
Terminology harmonized across handoff.py, session.py, stre
the templates' internal cross-references, tests, README, and example
smoke tests. StreamingServer keeps its name — it hosts bot
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Its docstring said "Removed in v0.7" while the warning said "Will be removed in v0.7" — self-contradictory in v0.7.x. Resolving toward the docstring: it's gone. Callers were migrated to get_operator_url before v0.7, so no live consumers remain. Co-Authored-By: Claude Opus 4.7 <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.
Post-v0.7 review pass. Three Codex findings + a template rename that became too coupled to split cleanly.
Summary
P1 — completion race on operator arrival. Detection listeners (
framenavigated, DOM mutations) only fire on new events. Any transition into the completion state between session registration and first-connect was lost — the handoff would sit waiting for a future event that never came and time out oncompletion_timeout. Fires in practice on redirect chains (OAuth/callback, meta-refresh) or any autonomous navigation during the operator-arrival window. Re-probe on connect (LLM included now that the wrapper is loaded) and short-circuit if the state is already reached.P2 — viewer keeps live focus after completion. In passthrough, the substrate iframe kept accepting keystrokes for as long as focus stayed there, even after the completion card appeared. In screencast mode the last frame lingered as a stale reference. Fix: defocus the iframe immediately so pending keystrokes stop hitting the substrate, hold the underlying frame for the ~300ms overlay fade-in so the page fades under the card instead of snapping to black, then blank the iframe (
about:blank) or drop the last frame (revoke object URL, clearhas-frame). Applied symmetrically to both templates.Template rename by mode + move under
server/.intervention.htmlandproxy_intervention.htmlare nowscreencast-mode.htmlandpassthrough-mode.htmlunderbrowser_handoff/server/templates/. "Intervention" was a generic verb; "proxy" was misleading (passthrough iframes a substrate viewer, it doesn't proxy). Naming by mode makes the two-mode design visible in the tree. Terminology swept acrosshandoff.py,session.py,streaming.py, the templates' internal cross-references, tests, README, and example smoke tests.StreamingServerandserver/streaming.pykeep their names — the server hosts both modes.P3 — remove the
get_stream_urldeprecated shim. Its docstring said "Removed in v0.7" while its warning said "Will be removed in v0.7" — self-contradictory in v0.7.x. Resolving toward the docstring. Callers were migrated toget_operator_urlbefore v0.7.Test plan
pytest— all suites green./callback-URL completion condition, delay opening the operator link until after the redirect chain settles, confirm the handoff closes on connect instead of timing out.🤖 Generated with Claude Code