Skip to content

refactor: preserve independent window layout and native geometry (7/10) - #5919

Closed
Jocs wants to merge 3 commits into
developfrom
feat/startup-07-layout
Closed

Jocs wants to merge 3 commits into
developfrom
feat/startup-07-layout

Conversation

@Jocs

@Jocs Jocs commented Oct 27, 2026

Copy link
Copy Markdown
Member

Refs #519, #2345, #3717, #2134, #1920, #1192, #2467, #2268, #3049, #2421, #3818, #143. Part 7 of the startup recovery series.

Summary

Add window-owned layout capture/restoration to the actual Pinia store and sidebar/outline components. Outline placement/visibility/width, sidebar view/visibility/width, opened-files expansion/height, tab visibility and source/focus/typewriter modes stay independent of global defaults and other windows. Managed layouts avoid legacy localStorage/preferences writes; folder loading preserves sidebar visibility. Reading mode and temporary width clipping preserve the preferred layout.

Add native geometry adapters for outer device-independent bounds, normal bounds during maximization and visible placement after display removal. Existing production windows retain their legacy adapters until the later session-host integration enables the managed path.

Type of change

  • Internal refactor

Test plan

  • 8 focused tests with actual Pinia stores and mounted outline interaction, including independent instances, all layout fields, default changes, reading mode, folder loading and temporary size clipping.
  • All 1466 desktop unit tests.
  • 7 real Electron checks: existing layout interactions and geometry adapters operating on two native windows.
  • pnpm run build:unpack, pnpm run typecheck and pnpm run lint.

Notes for reviewers

Depends only on #5913. This branch targets develop and includes its prerequisite commits. Review this part at feat/startup-01-contracts...feat/startup-07-layout .

The native-window test compiles and executes the actual geometry adapter in Electron, rather than reimplementing its calculations. Application restart persistence and default activation are verified in the integration PRs; these issue references do not close requests ahead of that evidence. No migration or reset-layout action. Design/progress documents remain in the agreed desktop folder.


By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@github-actions

Copy link
Copy Markdown
Contributor

Build artifacts for PR #5919:

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

Artifact Size Link
marktext-macos-x64 332.5 MB Download
marktext-windows-arm64 327.3 MB Download
marktext-linux-x64 729.5 MB Download
marktext-linux-arm64 571.8 MB Download
marktext-macos-arm64 320.8 MB Download
marktext-windows-x64 335.4 MB Download

@Jocs

Jocs commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Consolidated into #5920. All commits and tests are retained there; this duplicate review thread is closed without merging into develop.

@Jocs Jocs closed this Oct 28, 2026
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