You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: preserve native chat context-menu targets on reopening - #33725
A delayed close callback from an earlier native-chat context menu could clear the target of a menu opened immediately afterward, leaving link and file actions missing. Preserve the captured target while the current menu is open; release it normally once closed.
Adds two deterministic regressions using the real Radix menu for web-to-file and file-to-web reopening. All eight existing target cases and assertions are preserved. This behavior fix is separate from the module-organization refactor in #33665.
Validation so far:
On unchanged main, all eight existing cases pass and both new cases reproduce the target-loss failure; with the fix, all ten pass.
Hidden Electron rendered checks pass real-pointer web/file/web copy flows and empty-area cleanup; external integrations are isolated in that fixture.
Precommit lint, AST, React Doctor and formatting pass.
Two independent reviews approve the exact committed source.
All 22 checks in the normal local changed-file gate pass, including related tests, typechecks and quality checks.
Full PR CI and its aggregate gate pass, including Linux and Windows packaging.
Current-main integration preserves every upstream entry outside the two changed files.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Walkthrough
The close handler now clears the captured image, target, and focus-return element only when the menu remains closed. Regression tests cover reopening the menu on a different web-link or file target after selecting a copy action, and verify the next menu row and copied destination.
Priority: Normal
Merge Risk: Minimal · up to 0c262
The reopened menu retains its target in the inspected event sequence. The change is mergeable after normal checks.
Pre-merge checks: 3 · 2
Failed checks: 2 warnings
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check
The description explains the bug, the fix, regression coverage, and validation results. However, it does not follow the required template. It omits the required ELI5, What Changed, Why, Linked Issue, …
Rewrite the description using all required template headings. Add an actual issue link after "Fixes #"; provide visual proof or write "N/A" with a reason; document testing platforms and mark the relevant testing checkboxes; complete the AI …
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: preserving native chat context-menu targets when reopening the menu.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description explains the bug, the fix, regression coverage, and validation results. However, it does not follow the required template. It omits the required ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections. It also does not provide an actual linked issue.
Resolution
Rewrite the description using all required template headings. Add an actual issue link after "Fixes #"; provide visual proof or write "N/A" with a reason; document testing platforms and mark the relevant testing checkboxes; complete the AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections. Preserve the existing technical summary and validation details in the appropriate sections.
Finishing Touches: 💡 1
📝 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.
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
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.
A delayed close callback from an earlier native-chat context menu could clear the target of a menu opened immediately afterward, leaving link and file actions missing. Preserve the captured target while the current menu is open; release it normally once closed.
Adds two deterministic regressions using the real Radix menu for web-to-file and file-to-web reopening. All eight existing target cases and assertions are preserved. This behavior fix is separate from the module-organization refactor in #33665.
Validation so far: