Skip to content

fix(owned-browser): preserve eval title changes#3908

Merged
louis030195 merged 1 commit into
screenpipe:mainfrom
qybaihe:fix-3676-owned-browser-eval-title
Jun 8, 2026
Merged

fix(owned-browser): preserve eval title changes#3908
louis030195 merged 1 commit into
screenpipe:mainfrom
qybaihe:fix-3676-owned-browser-eval-title

Conversation

@qybaihe

@qybaihe qybaihe commented Jun 8, 2026

Copy link
Copy Markdown

description

Preserve document.title changes made through owned-browser /eval after the internal title-marker transport is cleared.

related issue: #3676

before

POST /connections/browsers/owned-default/eval with document.title = "changed"; returned success: 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

  1. Navigate owned-default to https://example.com.
  2. POST /connections/browsers/owned-default/eval with { "code": "document.title = \"changed\";" }.
  3. GET /connections/browsers/owned-default/snapshot and confirm the title is changed.

desktop app checklist (if applicable)

If this PR adds or changes #[tauri::command] handlers or Rust types exported to the frontend, from apps/screenpipe-app-tauri/:

  • bun run bindings:generate (if bindings changed)
  • bun run bindings:check
  • bun run typecheck

No Tauri commands or exported Rust types changed.

Validation run locally:

  • git diff --check
  • rustfmt +stable --edition 2021 --check apps/screenpipe-app-tauri/src-tauri/src/owned_browser.rs

Attempted but blocked before compilation by dependency fetch failure:

  • cargo +stable test --manifest-path apps/screenpipe-app-tauri/src-tauri/Cargo.toml normalize_url_tests --lib
  • Cargo failed while fetching the audiopipe git dependency submodule antirez/qwen-asr with an SSL handshake error before this crate compiled.

@louis030195 louis030195 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@louis030195 louis030195 merged commit ef749ba into screenpipe:main Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants