Skip to content

升级 Markup 到 Calcit 0.41.0 并约束正文编辑类型 - #25

Merged
tiye merged 1 commit into
mainfrom
migrate/markup-calcit-0410
Nov 11, 2026
Merged

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

Conversation

@tiye

@tiye tiye commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

使用者影响

Content 输入、Run、HUD、Reel 面板和存档格式保持原行为。开发时配对 Calcit 与 @calcit/procs 0.41.0 并重新生成 JS。已打开的旧开发会话需刷新,内存中的旧编辑操作与新事件名不同。

改动与风险

  • 将编辑动作改为具名 :edit-content,正文单独声明为 String。更新时保留原状态 Map 的其他字段。
  • 继续校验并恢复原格式的 Store,开放的状态树与旧存档边界保留。候选版本为 0.0.6。
  • 保留原 strict、测试和前端部署配置。

验证

218 个定义、完整 strict、Caps/Yarn 严格安装、原 3 项回归和 PR 路径构建通过。覆盖 Unicode 正文、其他字段保留、Reel 重放及旧存档恢复。隔离 Chromium 验证真实输入和 Run 输出。

Summary by CodeRabbit

  • New Features
    • Content edits now use a dedicated operation that updates the selected content while preserving other state fields.
  • Bug Fixes
    • Reel replay now verifies that unrelated state is preserved after a content edit.
  • Documentation
    • Clarified that edit callbacks provide string content and preserve other state fields. Updated the documented version pairing to 0.0.6 and 0.41.0.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The edit flow now dispatches a typed :edit-content operation and updates content at the cursor while retaining the prior state Map. The changes also update version references, type references, documentation, and replay test coverage.

Changes

Typed content editing

Layer / File(s) Summary
Version and type-reference updates
README.md, deps.cirru, package.json, calcit.cirru
The documented and configured versions change to 0.0.6 and 0.41.0. CalcIt option expressions and schema references use Some/None and local aliases.
Edit-content contract and updater
calcit.cirru
The Op enum replaces :states with :edit-content, carrying a cursor, prior state Map, and content String. The updater writes the content at the cursor.
Textarea dispatch and replay coverage
calcit.cirru, README.md, scripts/typed-reel-render.test.mjs
The textarea dispatches :edit-content with the cursor, prior state, and entered content. The documentation describes the operation, and the replay test checks the content and preservation of another state value.

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

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant Textarea
  participant dispatch!
  participant updater
  Textarea->>dispatch!: Send cursor, prior state, and entered content
  dispatch!->>updater: Apply :edit-content operation
  updater->>updater: Update content at the cursor
Loading

Possibly related PRs

  • Respo/markup#20: Updates the DOM input handler to validate the String value passed into the edit operation.
  • Respo/markup#24: Types the prior :states edit payload and preserves fields when editing legacy state.
  • Respo/markup#23: Updates dispatch to accept app.schema/Op and adds typed operations to the Reel test.
Merge Risk: Minimal · up to 1e72b

No actionable merge-blocking risk was identified.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 标题准确概括了主要变更:升级到 Calcit 0.41.0,并约束正文编辑类型。
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (4 skipped: 4 unsupported.)

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
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: 839273dd-7e30-4899-b0d3-b496d5f576bf
Commits

Reviewing files that changed from the base of the PR and between 636afd3 and 1e72b32.

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 b463d79 into main Nov 11, 2026
1 check passed
@tiye
tiye deleted the migrate/markup-calcit-0410 branch November 11, 2026 08:47
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