Skip to content

升级 Markup 到 Calcit 0.41.1 并收紧编辑事件类型 - #26

Merged
tiye merged 1 commit into
mainfrom
migrate/markup-calcit-0411
Nov 12, 2026
Merged

tiye merged 1 commit into
mainfrom
migrate/markup-calcit-0411

Conversation

@tiye

@tiye tiye commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

使用时需要注意

编辑正文和恢复旧存档的用法照常。本地构建请同时使用 Calcit CLI 与 @calcit/procs 0.41.1。若调试脚本手动构造内部 Op :edit-content,参数改为光标和 String 正文。

改动与风险

  • 从编辑事件移除 Map<Dynamic, Dynamic> 载荷。Updater 从当前分支读取扩展字段,只更新正文,既有存档 Map 与 Struct 兼容处理共用同一入口。
  • 同步工具链和锁文件。风险集中在 Reel 回放和旧状态恢复,已用原用例覆盖。

验证

220 个定义、完整 strict、动态方法零门禁、原 3 项 SSR、Reel 回放与旧存档回归和带 CDN 前缀的构建通过。原 CI 验证独立前端预览。

Summary by CodeRabbit

  • Bug Fixes
    • Editing content now preserves other editor data fields. Missing or nil editor state is handled consistently.
  • Documentation
    • Updated the callback documentation to clarify that content edits carry the cursor and edited text, while other editor data remains intact.

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The edit operation now carries the cursor and content. The updater reads existing editor data from the state tree before changing its content, preserving other fields. A new function normalizes editor data, and the Calcit and @calcit/procs versions change to 0.41.1.

Changes

Editor content update

Layer / File(s) Summary
Normalize editor state and apply content edits
calcit.cirru, scripts/typed-reel-render.test.mjs, README.md, deps.cirru, package.json
The edit operation carries the cursor and content. The updater reads existing editor data and updates its content while retaining other fields. The test prepares prior state with an additional field and verifies the edit flow. The README documents the payload and preservation behavior. Calcit and @calcit/procs versions change to 0.41.1.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Possibly related PRs

  • Respo/markup#25: Introduces the prior operation payload that this change replaces with state lookup in the updater.
Merge Risk: Minimal · up to 55034

The change upgrades the Calcit toolchain and narrows the edit event payload, and old state is still preserved by the updater. No concrete merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title says the PR upgrades Markup to Calcit 0.41.1 and tightens the edit-event type. The changeset supports both parts. The version bumps in README.md, deps.cirru, and package.json move to 0.41.1.…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title says the PR upgrades Markup to Calcit 0.41.1 and tightens the edit-event type. The changeset supports both parts. The version bumps in README.md, deps.cirru, and package.json move to 0.41.1. The calcit.cirru changes reduce Op :edit-content to a cursor and String body, which tightens the edit-event type. The title names the main changes and stays specific, so it passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 3d81be69-53ee-44ca-9a62-5c2bfb4dd381
Commits

Reviewing files that changed from the base of the PR and between b463d79 and 55034b8.

Files ignored due to path filters: 1

  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
Files selected for processing: 5

  • README.md
  • calcit.cirru
  • deps.cirru
  • package.json
  • scripts/typed-reel-render.test.mjs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@tiye
tiye merged commit 5a9bda5 into main Nov 12, 2026
1 check passed
@tiye
tiye deleted the migrate/markup-calcit-0411 branch November 12, 2026 06:50
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