Repository navigation
refactor: restore window layouts and document views (4/5) - #5920
Merged
Merged
Conversation
This was referenced Oct 27, 2026
# Conflicts: # packages/desktop/src/renderer/src/components/editorWithTabs/sourceCode.vue
This was referenced Oct 28, 2026
…ew-state # Conflicts: # packages/desktop/src/main/preferences/index.ts # packages/desktop/src/shared/types/preferences.ts
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Refs #519, #2345, #2672, #2421, #3818, #3717, #2268, #3049, #143.
Capture independent window layouts, panel sizes, opened-files folding, editing modes and native geometry. Preserve preferred layout while reading/focus modes temporarily suppress UI, and fit native bounds to available displays.
Persist CodeMirror/Muya selections, separate scroll positions, outline folds and root-relative tree folds. Compare editor and tab text through the same per-document trailing-newline policy. Reuse the existing normalization and browser hashing utilities; no store dependency is introduced into view adapters. Source positions use the actual outer source pane and its scroll events. Explicit TOC-position preference changes update the live window layout, while initialization retains its restored position. Ignore obsolete selection paths and respect newer interactions.
Private members use
_; imports reference definition modules directly. Interfaces explain identity, hash scope, ownership and CSS-pixel units. No new persistent fields are required by these fixes.Validation on 6820f45: all 1516 unit tests across 142 files, lint and typecheck pass locally. Includes newline-only readiness, punctuation preservation, source selection/scroller reconstruction and live preference changes. Real application reproduction/restart cases run in #5922, whose complete Electron suite passes 570 tests with 7 existing skips. Current-head CI is running.
#5918 is merged into develop and included in this branch. This 21-file review diff remains independently testable without #5917 or #5916. Review #5922 last for native integration and removal of the legacy adapters still needed by this standalone stage.
Design and acceptance documents remain in the agreed Desktop folder; no design documents, screenshots or recordings are committed.
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.