Skip to content

迁移到 Calcit 0.34.2 正式依赖图并收紧 DOM 事件类型 - #20

Merged
tiye merged 2 commits into
mainfrom
migrate/markup0342-1112
Nov 4, 2026
Merged

tiye merged 2 commits into
mainfrom
migrate/markup0342-1112

Conversation

@tiye

@tiye tiye commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

使用者影响

Markup 配对正式 Calcit / @calcit/procs 0.34.2,完整依赖图移出旧 Reel/Router alpha。请重新安装依赖、生成 JS 并完整刷新页面;Content 输入、Run、Reel 调试工具、原存档 key/格式和 HUD 提示保持。UI/Reel 跨 minor 升级可能有样式差异,本次不新增 Markdown 解析功能。版本继续为 main 已声明且尚未发 tag 的 0.0.5 候选,不可作为已发布依赖引用。

改动

  • 使用正式 Respo 0.19.2、UI 0.14.1、Reel 0.9.0、JS-FFI 0.2.10,传递 Router 0.11.2,完整 Caps strict 图已验证。
  • 移除已退役的 reel.schema/read-field 调用;直接读取原状态 Map,内容字段保留 Map/Struct 受检读取及缺失值语义。DOM 输入使用 Respo 公开 event-value,实际 textarea String 输入不变,非 String 事件值会在入口被拒绝。
  • 两个回调改为真实 RespoEvent + 单 Enum dispatch,替代 Map 和可变参数 Dynamic 标注。应用及 Reel 控制共用的开放 Enum 入口仍检查并转为具名 Op;共享异构状态树仍保留真实边界,不用伪泛型或含 Dynamic 的 union 隐藏。
  • 两个 gap 保持 8 / 8px;开发态可选子节点用 Option,缺省仍不渲染。根构造/渲染及原 SSR 测试入口使用公开 managed memo frame。
  • 官方 formatter 归一原类型表达式。按相同官方 0.34.2 formatter 对照后,18 个原定义仅 comp-container、render-app! 两个运行代码体及两个 imports 改变;原 schema、测试、文档、examples、tags 全部相同。
  • README 更新当前依赖及恢复合同;原三项 Node 回归仅包住 SSR 入口,全部原断言与固定 0.27.0 合成存档字节保持。未新增测试组、脚本或框架。

验证与范围

  • 原 main 0c90a88 的 CI 40910169597 为成功基线;新图 Caps strict / toolchain、Yarn immutable、226 全定义、完整 strict(diagnostics=[])、原 3 项 Node、文档和 JS/Vite 构建通过。
  • unsafe=0、dynamic-method=0、deprecated-call=0;未更改原类型门禁、基线或 workflow。
  • 最终构建在隔离可见 Chrome 实测:合成中文/emoji 输入、Run 输出、快捷键打开 Reel、实际 :states 历史、刷新恢复均通过,无应用 console error。保留旧 Store 的回放及非法游标拒绝原断言;未声称坏存档恢复 UI、HMR 或所有浏览器均完成验收。
  • 先恢复成功后注册保存的顺序和 HUD 不变;不改变后端、公开协议或原部署路径。PR 沿用原 dist 隔离 COS 预览和 action 内置 verify,不合并或部署生产,不发 tag/npm。

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of stored state and cursor data, including clearer failure behavior for invalid cursors.
    • Updated event input handling and rendering behavior for more reliable display of content.
  • Documentation
    • Updated setup and validation guidance, compatibility information, and notes on runtime behavior and recovery.
  • Tests
    • Expanded coverage for rendering empty history, edited content, and legacy archives.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

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: 646836aa-d456-4285-a523-3bcf2f904ebc
Commits

Reviewing files that changed from the base of the PR and between 9eeef7e and 0b1d152.

Files selected for processing: 1
  • README.md

Walkthrough

The 0.0.5 candidate updates Calcit and Respo dependency versions, revises type declarations, and changes container event and rendering behavior. Rendering tests now wrap Reel rendering in a memo frame. The README documents runtime constraints, build commands, and validation scope.

Changes

Runtime and dependency update

Layer / File(s) Summary
Dependency and type updates
deps.cirru, package.json, calcit.cirru
Calcit, Respo Reel, Respo UI, Respo, JS FFI, and @calcit/procs versions change. Operation payload declarations and decode-map-as type expressions use revised type syntax.
Container and rendering updates
calcit.cirru, scripts/typed-reel-render.test.mjs, README.md
The container unwraps state and content, converts struct state to a map or decodes it as a map, and rejects a present non-list cursor. Event handlers use event-value; Reel rendering uses Option values. render-app! renders inside a memo frame, which the rendering tests also use. The README documents runtime constraints and build and validation commands.

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

Change: Other

Possibly related PRs

  • Respo/markup#18: Introduced cursor validation and struct-to-map state decoding, which this change retains.
  • Respo/markup#19: Updated Calcit and type declarations that this change revises again.
  • Respo/markup#17: Established startup restoration ordering and updated the same render path discussed in this change.
Merge Risk: Low · previous review 9eeef

Correct the recovery documentation so operators are not misled about whether parse failures display a HUD error.

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.34.2 正式依赖图,以及收紧 DOM 事件类型。
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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
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: a99f6c67-f217-4b66-a0ca-84f6ecb36879
Commits

Reviewing files that changed from the base of the PR and between 0c90a88 and 9eeef7e.

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.

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fix comments: Fix CodeRabbit comments on this PR

Comment thread README.md Resolved
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