fix(owned-browser): preserve eval title changes#3908
Merged
louis030195 merged 1 commit intoJun 8, 2026
Conversation
louis030195
approved these changes
Jun 8, 2026
louis030195
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed: focused fix for #3676. Correct — document.title is read into the marker payload after user code runs and before the marker overwrites it, so intentional title mutations survive the transport restore. Tolerant fallback preserves the old best-effort behavior; the title-clear happens before the strict payload parse so the marker is always cleared. Note: fork PR so CI did not auto-run; verified by inspection (pure helper + JS-string field).
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.
description
Preserve
document.titlechanges made through owned-browser/evalafter the internal title-marker transport is cleared.related issue: #3676
before
POST /connections/browsers/owned-default/evalwithdocument.title = "changed";returnedsuccess: true, but the next snapshot still showed the previous title because the eval transport restored the pre-eval title after reading its marker.after
The eval wrapper includes the post-eval page title in the marker payload, and Rust restores that title instead of the stale pre-eval title. This keeps the marker hidden while preserving intentional title mutations from user code.
how to test
owned-defaulttohttps://example.com./connections/browsers/owned-default/evalwith{ "code": "document.title = \"changed\";" }./connections/browsers/owned-default/snapshotand confirm the title ischanged.desktop app checklist (if applicable)
If this PR adds or changes
#[tauri::command]handlers or Rust types exported to the frontend, fromapps/screenpipe-app-tauri/:bun run bindings:generate(if bindings changed)bun run bindings:checkbun run typecheckNo Tauri commands or exported Rust types changed.
Validation run locally:
git diff --checkrustfmt +stable --edition 2021 --check apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rsAttempted but blocked before compilation by dependency fetch failure:
cargo +stable test --manifest-path apps/screenpipe-app-tauri/src-tauri/Cargo.toml normalize_url_tests --libaudiopipegit dependency submoduleantirez/qwen-asrwith an SSL handshake error before this crate compiled.