Skip to content

Plugins: run the binary custom-editor e2e on Linux again - #35638

Merged
nwparker merged 1 commit into
mainfrom
nwparker/plugin-linux-binary-editor
Oct 29, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/plugin-linux-binary-editor

Conversation

@nwparker

@nwparker nwparker commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1
Prod 0 0 0 0

ELI5

The end-to-end test for binary-file plugin editors was switched off on Linux because the edit never seemed to land. The product was fine: the test's simulated mouse click never reached the plugin's button on Linux CI. The test now presses the button with the keyboard, and runs on Linux again.

What Changed

  • Before: the bytes custom-editor e2e was fixme on Linux. It clicked an "Append" button inside the plugin's sandboxed frame and waited for the tab to go dirty, which never happened on Linux CI.
  • After: the test activates the button with Enter instead of a mouse click, and the Linux skip is removed.

Why

Root cause, from instrumenting the frame on Linux CI: Playwright's click on the button inside the sandboxed srcdoc iframe gives the frame focus, but no pointerdown or click event fires in a hidden (never shown) Linux test window, so the plugin never sent its edit. With Enter on the focused button the frame logs click, the edit is applied at version 1, the tab goes dirty, and the rest of the test (save, Source view, remount) passes. The text editor test only looked fine because pressSequentially focuses and types without needing a mouse hit. Keyboard activation still counts as a real user gesture, so the test keeps covering the user-activation rules. Showing the window to make mouse input work is ruled out by the background-launch policy.

Linked Issue

Follow-up from #35470.

Visual Proof

N/A — test-only change.

Testing

  • tests/e2e/plugin-custom-editor.spec.ts passes on Linux CI in this PR (both tests).

Notes

No product code changes.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the double activation is fixed and no new actionable issues were found.

Summary

The current PR changes only the binary custom-editor end-to-end test.

  • The binary custom-editor test now runs on Linux.

No new actionable issues were found. Tests were not run.

Reviews (6) · Last reviewed commit: "test(plugins): run the binary custom-edi..." · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e4e038a2-e20a-44a6-b42b-2cca48ebae41
Commits

Reviewing files that changed from the base of the PR and between 4da1071 and 05358fc.

Files selected for processing: 1
  • tests/e2e/plugin-custom-editor.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Walkthrough

The bytes custom-editor end-to-end test no longer skips on Linux. It activates the Append button with Enter instead of a mouse click. The test retains its dirty-state and save checks.

Priority: Normal

Merge Risk: Minimal · up to 05358

No actionable merge risk remains in this test change.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: re-enabling the binary custom-editor end-to-end test on Linux.
Description check Passed The description provides the required high-level explanation, change details, rationale, linked issue, visual-proof rationale, and testing information. It is sufficiently complete for this test-only c…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description provides the required high-level explanation, change details, rationale, linked issue, visual-proof rationale, and testing information. It is sufficiently complete for this test-only change, although the repository checklist and review sections are not included.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ea763144-3a29-4510-bf6c-c90c9a8f1f54
Commits

Reviewing files that changed from the base of the PR and between 31be502 and b442adf.

Files selected for processing: 1
  • tests/e2e/plugin-custom-editor.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

Comment thread tests/e2e/plugin-custom-editor.spec.ts Resolved
Comment thread tests/e2e/plugin-custom-editor.spec.ts Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0b6abc61-ee28-4c14-97df-a087f2526971
Commits

Reviewing files that changed from the base of the PR and between b442adf and 4da1071.

Files selected for processing: 1
  • tests/e2e/plugin-custom-editor.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

)
)
console.log('[diag] iframes', await orcaPage.locator('iframe').count())
await append.press('Enter')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Major · Functional Correctness · Quick win

Supported by static analysis

Script executed:

sed -n '120,160p' tests/e2e/plugin-custom-editor.spec.ts
sed -n '195,290p' tests/e2e/plugin-custom-editor.spec.ts

Repository: stablyai/orca

Length of output: 5013


Script executed:

rg -n -F -e 'applyEdit' -e 'baseVersion' -e 'onDidChange' -- src/ || test "$?" -eq 1

Repository: stablyai/orca

Length of output: 18723


Script executed:

sed -n '120,200p' src/renderer/src/components/editor/plugin-custom-editor-host.ts && rg -n -F -e 'version' -- src/renderer/src/components/editor/plugin-custom-editor-host.ts

Repository: stablyai/orca

Length of output: 3083


Remove the Enter press that re-activates Append.

After append.click() succeeds, the button keeps focus. append.press('Enter') then activates it again, so the click handler runs a second time. The second run appends another byte and sends another editor.applyEdit with the same baseVersion. The host accepts that second edit, so the saved file can receive two appended bytes instead of one. The test expects exactly one byte, so it can fail on a working editor. If the first click never reaches the handler, the Enter activation runs the same handler and can hide that failure. Remove the Enter press and assert the outcome of the original click instead.

🐛 Suggested fix
     await append.click()
     ...
-    await append.press('Enter')
     await expect
       .poll(async () => (await diagFrame?.title()) ?? '', { timeout: 3000 })
       .toContain('applied')
Committable suggestion

IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
await append.press('Enter')

In a hidden Linux test window Playwright's mouse click on a button inside the
sandboxed editor frame never reaches it: the frame takes focus, but no
pointerdown or click fires, so the edit was never sent and the tab never went
dirty. Activate the button from the keyboard instead, which still counts as a
real user gesture.
@nwparker
nwparker force-pushed the nwparker/plugin-linux-binary-editor branch from 4da1071 to 05358fc Compare October 29, 2026 05:04
@nwparker nwparker changed the title Plugins: binary custom editor keeps its first edit after a same-bytes reload Plugins: run the binary custom-editor e2e on Linux again Oct 29, 2026
@nwparker
nwparker merged commit 2f3d96f into main Oct 29, 2026
47 checks passed
@nwparker
nwparker deleted the nwparker/plugin-linux-binary-editor branch October 29, 2026 05:15
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.

1 participant