Repository navigation
Conversation
|
Windows build verification update:
One manual interaction remains: click Copy inside the PR build and inspect Win+V. This cannot be reliably asserted through the current headless/SSH automation because Clipboard History is an OS-managed interactive surface. |
Confirmed Windows validationThe author manually tested the PR build on Windows and confirmed that all clipboard scenarios worked:
This completes the previously outstanding Windows/WebView2 manual validation. |
Review at
|
…nterception model Addresses all 6 review issues from the PR review: 1. Copy-event bridge now reads post-handler clipboardData instead of raw getSelection(), preserving WebUI's sanitized text/html + text/plain payloads from _handleMarkdownTableCopy 2. Removed incidental window._copyText wrapper (not an explicit contract); now intercepts navigator.clipboard.writeText as the single choke point covering _copyText, _copyTextWithFallback, and all direct callers 3. Async clipboard writes that don't dispatch copy events now covered by the writeText interception 4. Fixed race: native republish deferred via setTimeout(0) and guarded with lastText dedup; promise errors propagate instead of unconditional resolve 5. clipboard-write Rust handler arm gated with #[cfg(target_os = "windows")] 6. init_script parameterized with explicit target_os so tests verify both Windows and non-Windows branches on any CI host Tests: cargo test --bin hermes-webui-desktop bridge::tests (3/3 pass)
Re-gate at
|
Codex leg at
|
…-history # Conflicts: # CHANGELOG.md
…bui#91 review Replace the payload-carrying clipboard-write bridge with a content-free clipboard-republish signal. The page no longer ships clipboard bytes across the page->native boundary; it only signals that a copy occurred, and the native side reads WebView2's own clipboard write back and re-publishes it so the desktop process owns the entry (Win+V records it). - Rejected navigator.clipboard.writeText no longer reaches the OS clipboard (republish attached to the fulfillment branch only; rejection propagates). - copy listener bound once (idempotence guard) so the 1s install re-arm can't leak a fresh listener every second. - Native read-back preserves both text/plain and text/html, so sanitized Markdown-table HTML survives instead of being flattened to plain text. - Label validation (tab-*/main-* only) + 4MB size cap + 150ms rate limit + self-echo guard on the native sink. - Regression test parameterized per target_os to assert the new signal shape. Closes the review blockers on the injection surface, flavor loss, rejected-write leak, listener leak, and missed form-control copies.
|
@nesquena-hermes ready for re-review — all review points addressed and verified. Redesigned to be content-free (your unified-model suggestion): the page no longer ships clipboard bytes across the boundary. It emits a payloadless Point-by-point:
Verification:
Also merged |
Re-gate at
|
Summary
Closes #90
Validation
cargo test native_clipboard_bridge_is_scoped_to_windows --manifest-path src-tauri/Cargo.tomlcargo fmt --manifest-path src-tauri/Cargo.toml -- --checkcargo check --manifest-path src-tauri/Cargo.tomlgit diff --checkRisk and scope
The injected bridge is compiled into initialization scripts only on Windows. Existing WebUI clipboard behavior remains responsible for the browser copy, while the desktop process performs the final native plain-text write.
Not verified
A real Windows/WebView2 build is still required to verify that Win+V records:
The native behavior was previously exercised manually, but this PR does not include an automated Windows Clipboard History assertion because Win+V behavior is OS-managed.