Skip to content

让 Markup 编辑器统一使用已校验的文本 - #28

Merged
tiye merged 1 commit into
mainfrom
refine/markup-editor-content-types
Nov 13, 2026
Merged

tiye merged 1 commit into
mainfrom
refine/markup-editor-content-types

Conversation

@tiye

@tiye tiye commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

使用者需要注意

编辑器仍读取原有存档,输入框和 Run 按钮使用同一份已校验文本。存档里的扩展字段仍可随状态保存。

改动与验证

  • 从存档 Map 读取 content 后立即解码为 Option String,渲染和点击处理共享该值。
  • Calcit 0.42.1 全定义检查、完整 strict、生产构建和 3 项 Reel JS 回归通过,覆盖旧存档恢复和编辑回放。

Summary by CodeRabbit

  • Bug Fixes
    • Improved how editor content is displayed in the textarea, including handling multiple content values as strings.

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The editor container now reads editor data through schema/read-editor-data, decodes each value in :content as a string, and passes the mapped content directly to the textarea.

Changes

Editor content rendering

Layer / File(s) Summary
Map and render editor content
calcit.cirru
The container maps decode-map-as with String over :content and passes the result to the textarea. This replaces handling :content as an optional single value.

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

Change: Refactor

Possibly related PRs

  • Respo/markup#27: Changes validation and decoding for the save body, which concerns the same content field.
  • Respo/markup#25: Changes the edit action and body type for the same content field.
Merge Risk: Minimal · up to fd992

The Markup editor now reads saved content through a validated decoding step. No actionable merge-blocking risk was identified in this change.

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 Markup editor now uses the validated text in a unified way. The change decodes the stored content once through schema/read-editor-data and passes the result to the textarea. The…
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 Markup editor now uses the validated text in a unified way. The change decodes the stored content once through schema/read-editor-data and passes the result to the textarea. The objectives say the input box and the Run button share the same validated text, and that the decoded content is an Option String used by rendering and click handling. The title matches this main change. The title is in Chinese, which fits the project's language of the PR objectives.

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: 0fd3071b-6c21-403a-9691-7c0a2e84185f
Commits

Reviewing files that changed from the base of the PR and between 6c36cac and fd9920b.

Files selected for processing: 1

  • calcit.cirru

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 491c8a9 into main Nov 13, 2026
1 check passed
@tiye
tiye deleted the refine/markup-editor-content-types branch November 13, 2026 09:12
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