Repository navigation
fix(webview): detect dead webview renderer via heartbeat and auto-reload #1715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
myk1yt
wants to merge
24
commits into
Zoo-Code-Org:main
Choose a base branch
from
myk1yt:fix/1675-webview-heartbeat-recovery
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
19ebb09
fix(webview): detect dead webview renderer via heartbeat and auto-reload
77d02f3
fix(webview): scope recovery reload to the provider's own webview
dfbcc6e
fix(webview): stop recovery watchdog when sidebar webview is disposed
36e6bcb
test(webview): capture sidebar dispose callback in task history spec
ec7d375
fix(webview): invalidate in-flight recovery reload on dispose or replace
ba72a4e
test(webview): cover recovery rejection and watchdog precondition
1e6fd39
test(webview): assert global webview reload command is not used in pr…
myk1yt da8d752
fix(webview): harden recovery reload and scope sidebar disposal cleanup
myk1yt 148b641
test(e2e): poll restart task-history presence before asserting
myk1yt 54f6a93
fix(webview): guard recovery with heartbeat revision and in-flight flag
myk1yt fad059e
fix(webview): scope recovery in-flight guard to epoch
myk1yt 939e85f
fix(webview): bump recovery epoch when resolveWebviewView replaces th…
myk1yt 1c9ac52
chore(e2e): restore restart-persistence test to merge-base state
myk1yt aa666fc
fix(webview): gate obsolete-view messages and dispose replaced-view s…
myk1yt 9f05e75
fix(webview): bail out of a resolve that went stale during its awaits
myk1yt 325436d
fix(webview): skip the initial html assignment for a stale resolve
myk1yt e575537
Merge origin/main into fix/1675-webview-heartbeat-recovery
myk1yt 63c82c3
chore: retrigger review-state reconciliation
myk1yt 0985510
chore: retrigger review-state reconciliation
myk1yt 2dfc91a
Merge remote-tracking branch 'upstream/main' into fix/1675-webview-he…
myk1yt ff9aa8a
fix(webview): ignore suspend gap in webview heartbeat watchdog
myk1yt ee7109b
Merge main and bound webview heartbeat recovery retries
edelauna ce63424
fix(webview): stop stale-heartbeat logging after retry limit
edelauna f98b941
test(webview): verify sidebar disposal cleanup and recovery invalidation
edelauna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a test for sidebar-disposal cleanup of resolved-view subscriptions.
Mutation testing reports that two mutants at Line 863 and Line 864 survive. One removes the
disposeResolvedViewResources()call. The other changes the epoch update towebviewRecoveryEpoch--. The current sidebar-disposal tests check only that the watchdog interval is null and thatviewisundefined.If the call at Line 864 is removed, the disposed sidebar keeps its listeners. The message, visibility, and configuration listeners stay registered until the provider is disposed. No test fails in that case. The mid-recovery disposal test still passes without the epoch increment, because the
this.view !== viewguard also blocks the stale assignment.Add these assertions to "stops watching and clears the view when the sidebar webview is disposed":
disposecalled once.provider["resolvedViewDisposables"]is empty.webviewRecoveryEpochincreased by exactly 1.Test sketch
As per path instructions: "Require regression coverage at the lowest valid harness with behavior-focused assertions, including relevant negative, error, false/unset, and boundary cases."
🧰 Tools
🪛 GitHub Check: mutation-diff
[warning] 864-864: Mutation test advisory
src/core/webview/ClineProvider.ts:864: Survived CallExpression mutant (replacement: ;). See the job summary for the complete list and resolution guidance.
[warning] 863-863: Mutation test advisory
src/core/webview/ClineProvider.ts:863: Survived UpdateOperator mutant (replacement: this.webviewRecoveryEpoch--). See the job summary for the complete list and resolution guidance.
Sources: Path instructions, Linters/SAST tools