Recover auth windows after web process crashes - #57
Conversation
hongnoul
left a comment
There was a problem hiding this comment.
Review verdict: changes requested (comment-only self-review).
P2 – intentional API termination is reported as a crash. The termination callback maps every reason other than crash/OOM to terminated unexpectedly. On normal close, connect_close_request calls terminate_web_process_unless_shared() while the view is still stored in self.webview, so TerminatedByApi can pass the ownership guard, emit a spurious web_process failure event, set crash diagnostics, and show the recovery overlay. Match TerminatedByApi explicitly and return without failure state; add a close regression.
P2 – focus promotion can disable discard indefinitely. present() cancels the discard timer before requesting compositor activation. If activation is denied and is-active-notify never transitions, no path re-arms discard. The later auto-demote path also does not schedule discard, so the promoted view can remain resident. Re-arm discard when focus is not obtained or when demoting.
The URL/title retention and IPC compatibility otherwise look sound.
Validation: CI is green. I independently ran the focused recovery helper and old-WindowInfo compatibility tests successfully.
hongnoul
left a comment
There was a problem hiding this comment.
Follow-up: PR #59 merged into main while this review was in progress and touched the same window lifecycle code. GitHub now reports this PR as CONFLICTING, so it must be rebased and the termination/discard interactions revalidated against the merged QoL handlers before merge.
58e8146 to
7ad115b
Compare
Summary
web_process_terminateddiagnostic throughWindowInfoand the event stream, including a stable reason and recoverable URLCloses #51
Validation
cargo fmt --all --checkcargo test -p hwatu-ipchwatudrecovery testscargo testcargo clippy --all-targets --all-features -- -D warningsbash -n scripts/test-crash-recovery.shscripts/test-crash-recovery.sh