Skip to content

fix(cli): exclude the Electron application entry from file arguments - #5834

Merged
Jocs merged 2 commits into
developfrom
fix/2222-electron-entry-args
Oct 21, 2026
Merged

Jocs merged 2 commits into
developfrom
fix/2222-electron-entry-args

Conversation

@Jocs

@Jocs Jocs commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Refs #2222

Summary

An unbundled Electron launch can place runtime switches before the application entry. Treating that entry as a document directory opens an extra window and prevents session restoration. Remove the entry from initial and second-instance user arguments, and explicitly configure sidebar visibility in affected E2E fixtures. The collapsed-folder regression test now opens its own temporary project instead of depending on the application directory being treated as a user folder.

Type of change

  • Bug fix (non-breaking)
  • New feature (non-breaking)

Test plan

  • CLI parser: 2 tests passed.
  • Collapsed-folder New File E2E passed with an explicit temporary project.
  • pnpm run lint and pnpm run typecheck passed.

Evidence

Startup argument parsing is covered by CLI unit tests and the sidebar/session E2E fixtures. UI evidence for the feature is attached to #5835.

Stack

Merge from top to bottom; after merging a parent, retarget its child to develop before deleting the parent branch.

Order PR Base
1 (this PR) exclude the Electron application entry from file arguments develop
2 manage and restore multiple folder roots fix/2222-electron-entry-args
3 search across sidebar folder roots feat/2222-multi-folder-core
4 add folders from the File menu feat/2222-multi-folder-search
5 add folders from the command palette feat/2222-add-folder-menu

Notes for reviewers

This is part 1 of a five-PR stack. Review this PR against its current base branch; merge the stack in order and retarget each child to develop after its parent lands.

Local native validation was on macOS; Windows and Linux are covered by CI when available. No screenshots or recordings are committed to the repository.


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 21, 2026 •

Copy link
Copy Markdown
Contributor

Build artifacts for PR #5834:

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

Artifact Size Link
marktext-macos-x64 313.6 MB Download
marktext-windows-x64 299.1 MB Download
marktext-windows-arm64 291.0 MB Download
marktext-linux-x64 667.4 MB Download
marktext-macos-arm64 300.2 MB Download
marktext-linux-arm64 522.3 MB Download

@Jocs
Jocs merged commit 7aa0ac7 into develop Oct 21, 2026
13 checks passed
@Jocs
Jocs deleted the fix/2222-electron-entry-args branch October 23, 2026 08:32
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