Skip to content

Detect silent DataTransfer write failures - #1340

Open
OskarEichler wants to merge 1 commit into
basecamp:mainfrom
OskarEichler:codex/detect-unwritable-data-transfer
Open

Detect silent DataTransfer write failures#1340
OskarEichler wants to merge 1 commit into
basecamp:mainfrom
OskarEichler:codex/detect-unwritable-data-transfer

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

Correct the write verification in dataTransferIsWritable.

The current !getData(...) === value expression applies boolean negation before strict equality, so it never detects a setter that silently refuses to persist the probe value. Comparing the retrieved value directly makes the helper return false for both throwing and non-persisting implementations.

The generated Action Text asset is rebuilt with the same one-line change.

Verification

  • focused model: silent write rejection changes from writable=true to writable=false; normal and missing-setter cases remain unchanged
  • complete Chromium suite: 501 total, 472 pass, 0 fail, 29 conditional skips
  • frozen Yarn install, ESLint, Rollup/Sass/assets and gem build pass
  • Action Text wrapper test and Rails loading pass on Ruby 4.0.6 and Ruby 3.2.11

No public API or dependency change.

Copilot AI balanced review requested due to automatic review settings August 30, 2026 02:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes writable DataTransfer detection by verifying that probe data persists after writing.

Changes:

  • Corrects the source helper’s comparison.
  • Rebuilds the Action Text asset with the same fix.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/trix/core/helpers/events.js Correctly detects silently rejected writes.
action_text-trix/app/assets/javascripts/trix.js Updates the generated asset.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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