Skip to content

feat(sidebar): #2222 manage and restore multiple folder roots - #5835

Merged
Jocs merged 2 commits into
developfrom
feat/2222-multi-folder-core
Oct 21, 2026
Merged

Jocs merged 2 commits into
developfrom
feat/2222-multi-folder-core

Conversation

@Jocs

@Jocs Jocs commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Refs #2222

Summary

Keep multiple independent folder roots in one editor window. The bottom-right + and the existing empty-state Open Folder button append a folder; root context menus can remove or retry it without deleting disk content or closing unsaved tabs.

Add window-scoped root identity, watcher generation isolation, versioned recovery snapshots, fold-state restoration, and explicit file ownership for save/image paths. Preserve the existing Open Folder replacement/new-window behavior. Cross-folder search and the additional menu/command entries follow in separate PRs.

Type of change

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

Test plan

  • 1182 unit tests passed.
  • 6 macOS Electron E2E tests passed, including add/remove/restart recovery and sidebar reveal.
  • pnpm run lint, pnpm run typecheck and pnpm run build:unpack passed.

Evidence

Multiple folder roots and the bottom-right add action.

core

Stack

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

Order PR Base
1 (merged) exclude the Electron application entry from file arguments develop
2 (this PR) manage and restore multiple folder roots develop
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

Builds on merged PR #5834. This is part 2 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 #5835:

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

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

@Jocs
Jocs force-pushed the feat/2222-multi-folder-core branch from a70ac6e to 3f1acac Compare October 21, 2026 12:37
@Jocs
Jocs changed the base branch from fix/2222-electron-entry-args to develop October 21, 2026 13:51
@Jocs
Jocs force-pushed the feat/2222-multi-folder-core branch 2 times, most recently from 3f1acac to a5cf579 Compare October 21, 2026 14:02
@Jocs
Jocs merged commit 95e652f into develop Oct 21, 2026
13 checks passed
@Jocs
Jocs deleted the feat/2222-multi-folder-core branch October 23, 2026 08:32
Tkaixiang added a commit that referenced this pull request Nov 23, 2026
…te keys on build (#6120)

* fix(i18n): translate strings left in English

Several feature PRs added English placeholder values to most locales and
they were never translated:

- sideBar.move.* (13 keys, #5945): de, es, fr, ja, ko, nl, pt, ru, tr, zh-TW
- multi-folder sidebar strings (12 keys, #5835): de, es, fr, ja, ko, nl, pt,
  ru, tr
- preferences.editor.fileRepresentation.tabInputNotes (#5891): same 9 locales

Also fills one-off gaps: GitHub Alerts labels in pl (desktop and Muya) and
it (Muya), the Academic export theme in it, and the super/subscript
extension label in es and pt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* chore(i18n): remove unused locale keys

None of these keys is referenced anywhere in packages/desktop/src, either
as a literal or through a template/prefix key:

- menu.counter.document, documentSelection, charactersNoSpaces,
  allCharacters
- sideBar.tree.noFolders, overlappingFolder
- sideBar.search.searchInFolder (the UI uses searchInFolders)
- preferences.theme.modeThemes
- dialog.file, files, keepOpen, saveFailure
- error.report, unexpectedErrorWithMessage
- store.editor.anchorLinkCopied
- editor.sourceCode.cursorNullComment, imageStructureDeletedComment
- readingMode.skipped

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* build(i18n): validate locale keys before minifying

minify-locales now fails, before writing any .min.json, when:

- a locale is missing a key from en.json or has a key en.json lacks
- an en.json key is not referenced by any .ts or .vue file under
  packages/desktop/src

The usage check is a single ripgrep pass that collects quoted dotted
strings. Template literals (`menu.theme.${name}`) and concatenation
prefixes ('sideBar.move.') match as patterns, so keys built from a
variable still count as used. ripgrep comes from @vscode/ripgrep,
resolved through packages/desktop, which already declares it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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