Skip to content

refactor: restore window layouts and document views (4/5) - #5920

Merged
Jocs merged 16 commits into
developfrom
feat/startup-08-view-state
Oct 28, 2026
Merged

Jocs merged 16 commits into
developfrom
feat/startup-08-view-state

Conversation

@Jocs

@Jocs Jocs commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

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.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Build artifacts for PR #5920:

Run: https://github.com/marktext/marktext/actions/runs/40645363970

Artifact Size Link
marktext-macos-x64 332.4 MB Download
marktext-windows-arm64 327.3 MB Download
marktext-linux-arm64 571.7 MB Download
marktext-linux-x64 730.8 MB Download
marktext-macos-arm64 320.8 MB Download
marktext-windows-x64 335.5 MB Download

@Jocs Jocs changed the title refactor: capture document selections and workspace tree views (8/10) refactor: restore window layouts and document views (4/5) Oct 28, 2026
@Jocs
Jocs merged commit f994f6b into develop Oct 28, 2026
13 checks passed
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