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
Docking: reject raw panel opens through command aliases - #2527
Raw Open/OpenAt actions through ui.dock and window.panel.layout bypassed the guard already applied by window.dockAction. Share that check across all three routes, preserving normal open/activate operations and documenting the restriction.
Regression covers both actions, viewer/ScriptUI identities, all three routes, unchanged layouts on rejection, and supported open/activate commands.
The regression failed against the original guard and passed with the fix restored.
Strict UI-crate Clippy with all targets, formatting, dependency layers, and asset attribution passed.
Local verification: fetched and verified the expected branch head; reviewed the diff against upstream main and passed git diff --check. No code changes or test reruns. The macOS native menu backend and full local CI were not run.
Summary by CodeRabbit
Behavior Changes
Raw Open and OpenAt docking actions are now rejected through ui.dock, window.panel.layout, and window.dockAction. Use panel open commands to open panels. Other supported docking actions, including Activate, remain available.
Documentation
Updated the control protocol guide to clarify where raw open actions are rejected and which commands to use instead.
Reviewing files that changed from the base of the PR and between dd12ed8 and 335d1f5.
Files selected for processing: 3
crates/ui-egui/src/dock_ui.rs
crates/ui-egui/tests/it/shared_docking_ui.rs
docs/control-protocol.md
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
Raw Open and OpenAt docking actions now return an error across the supported docking routes. Integration tests cover rejection, unchanged panel state, and continued support for normal open commands and Activate actions. The control protocol documents the restriction.
Changes: Docking action validation
Layer / File(s)
Summary
Validate raw panel-open actions crates/ui-egui/src/dock_ui.rs, crates/ui-egui/tests/it/shared_docking_ui.rs, docs/control-protocol.md
A shared check rejects raw Open and OpenAt actions through the docking command paths. Tests verify errors and unchanged state, and confirm normal open commands and Activate actions remain usable. The control protocol documents the restriction.
The change consistently rejects raw opens while preserving supported panel-opening behavior; no concrete merge-blocking risk is established.
Security architecture risk: Low · up to 335d1
The change restricts raw panel-opening commands rather than expanding access. Remaining uncertainty concerns externally supplied command handling and recovery after failures in the existing panel-opening behavior.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — The inspected control change affects command access to the current application's docking workspace and panel identities, including Viewer and ScriptPanel identifiers. It reduces raw-action reachability; the reviewed change does not establish a new credential, cross-service, or deployment authority path. Broader control-channel exposure was not assessed.
Trust Boundaries and Controls
inferred — The shared check closes the inspected alias paths from caller-supplied raw opening actions to workspace mutation. Rejection happens before downstream execution rather than attempting to repair lifecycle state afterward. This supports stronger lifecycle enforcement, but does not independently verify the downstream viewer or ScriptUI callback guarantees described by the error message.
Resilience and Maintainability Implications
observed — The existing opener stages layout changes on a clone and records an opening error before returning; show_panel still updates focus after raise_panel returns, and activation errors remain ignored. These behaviors predate the PR and gain no new execution branch here. Repeated supported dynamic-panel operations, callback failures, and recovery were not established by the new rejection-focused regression, so they are not treated as verified guarantees or introduced concerns.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surv…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the main change: rejecting raw panel-open actions through docking command aliases.
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: Docstring Coverage
Explanation
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 2 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
Clippy (1.99.0)
Clippy execution timed out
Comment @coderabbitai help to get the list of available commands.
Merged, thank you @nanox333! It landed on main with a batch of community PRs, after a full workspace build and test run on Windows against the refactored main (fmt, strict clippy, about 4,100 tests, layers, assets and wasm).
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.
Raw Open/OpenAt actions through
ui.dockandwindow.panel.layoutbypassed the guard already applied bywindow.dockAction. Share that check across all three routes, preserving normal open/activate operations and documenting the restriction.Follow-up to #2459.
Validation (prior Linux results):
Local verification: fetched and verified the expected branch head; reviewed the diff against upstream main and passed
git diff --check. No code changes or test reruns. The macOS native menu backend and full local CI were not run.Summary by CodeRabbit
OpenandOpenAtdocking actions are now rejected throughui.dock,window.panel.layout, andwindow.dockAction. Use panel open commands to open panels. Other supported docking actions, includingActivate, remain available.