Skip to content

Fix additional panel docking and restoration bugs#4089

Merged
Keavon merged 3 commits intomasterfrom
fix-docking-further
May 2, 2026
Merged

Fix additional panel docking and restoration bugs#4089
Keavon merged 3 commits intomasterfrom
fix-docking-further

Conversation

@Keavon
Copy link
Copy Markdown
Member

@Keavon Keavon commented May 1, 2026

Fixes more bugs from #4015. Partly closes #195.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the workspace panel layout system by improving how panels are restored to their previous positions. It introduces a SavedPanelPosition struct to capture more context, such as sibling groups and slot sizes, which allows for more accurate restoration even when the original panel group has been pruned. Key additions include logic for finding sibling groups and inserting panels adjacent to them. Feedback suggests refining the document panel detection logic to be more robust across subdivisions and optimizing tree traversals in the insertion logic.

Comment thread editor/src/messages/portfolio/utility_types.rs Outdated
Comment thread editor/src/messages/portfolio/utility_types.rs Outdated
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files

Confidence score: 3/5

  • There is a concrete regression risk in editor/src/messages/portfolio/utility_types.rs: switching saved_positions from tuple entries to SavedPanelPosition entries can break deserialization of previously persisted workspace layouts.
  • Because this is a user-facing compatibility path (loading existing saved layouts) and the issue is high severity/high confidence (7/10, 9/10), the merge risk is moderate rather than low.
  • Pay close attention to editor/src/messages/portfolio/utility_types.rs - ensure backward-compatible deserialization for older persisted layout formats.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="editor/src/messages/portfolio/utility_types.rs">

<violation number="1" location="editor/src/messages/portfolio/utility_types.rs:211">
P1: Changing `saved_positions` from tuple entries to `SavedPanelPosition` entries breaks backward deserialization of previously persisted workspace layouts.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread editor/src/messages/portfolio/utility_types.rs
@Keavon Keavon merged commit eddd742 into master May 2, 2026
10 checks passed
@Keavon Keavon deleted the fix-docking-further branch May 2, 2026 00:14
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.

Rearrange and dock tabs and panel groups in the editor workspace

1 participant