Skip to content

refactor(muya): type mutation sources with ChangeSource - #5811

Merged
Jocs merged 1 commit into
developfrom
refactor/muya-change-source
Oct 21, 2026
Merged

Jocs merged 1 commit into
developfrom
refactor/muya-change-source

Conversation

@Jocs

@Jocs Jocs commented Oct 21, 2026

Copy link
Copy Markdown
Member

Summary

Mutation-source parameters currently accept arbitrary strings despite having only user and api values. Export ChangeSource from types.ts and use it throughout editor operations, history, block mutations, and their callers.

The enum retains the existing string values and defaults. TypeScript callers must pass ChangeSource.User or ChangeSource.Api.

Type of change

  • Breaking change (TypeScript API tightening)

Test plan

  • Full Muya unit suite; desktop/Muya typecheck; Muya and root ESLint.
  • Existing regression tests cover operation dispatch, undo/redo and task-checkbox updates; new tests would duplicate those contracts.
  • Isolated worktree tests used a temporary Vite filesystem allowlist to reuse installed dependencies; the test configuration is not part of the PR.
  • No visual change; screenshots and manual platform UI checks are not applicable.

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

@Jocs
Jocs merged commit a9adca0 into develop Oct 21, 2026
8 checks passed
@Jocs
Jocs deleted the refactor/muya-change-source 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