Skip to content

fix(ui): preserve skill editor frontmatter through repeated saves - #644

Merged
runkids merged 2 commits into
mainfrom
runkids/fix-editor-frontmatter-roundtrip
Oct 25, 2026
Merged

runkids merged 2 commits into
mainfrom
runkids/fix-editor-frontmatter-roundtrip

Conversation

@runkids

@runkids runkids commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Type

  • Bug fix
  • Small improvement (docs, typo, minor refactor)
  • Feature proposal

Linked Issue

Closes #637

Summary

SKILL.md / agent markdown
  existing yaml parser → decoded description + nested metadata
  form edits → YAML serializer → readable folded description
  save → reopen / preview without accumulating quote escapes
  • Replace the editor's limited YAML parsing/serialization with the already-installed yaml package; retain the legacy parser for non-YAML headers.
  • Preserve nested metadata and render object-valued form fields as read-only JSON instead of [object Object] inputs. Unedited frontmatter remains verbatim.
  • Add focused round-trip regression tests and document the editor behavior.

Evidence

  • Before: The MinerU rename/description workflow in After changing the name of the skill, the layout became abnormal. #637 exposed YAML quote escapes, misread folded descriptions and flattened nested metadata during saves.
    After: Regression tests cover quoted descriptions, folded/chomped blocks, nested flow metadata, typed values and three consecutive edits.
  • Devcontainer: pnpm test --run — 93 files / 799 tests passed; make check passed (rerun before this PR).
  • Devcontainer: pnpm run lint and pnpm run build passed. Existing lint and bundle-size warnings remain.
  • React Doctor changed-scope scan: no new findings.
  • Isolated browser check using the upstream MinerU skill: rename and replace the reported description, save, reopen and inspect the preview; verified nested metadata and saved YAML.
  • python3 scripts/ai-context.py check and git diff --check passed. Five-pass pre-PR review was clean.

Merge Danger

Door: Two-way — no migration or API changes.

Blast Radius: Editor — shared skill/agent frontmatter parsing and serialization. Edited headers may normalize YAML formatting; unedited headers remain unchanged.

Not Covered

  • No automatic repair of files already damaged by earlier saves.
  • Nested object fields remain read-only in the form; use the YAML editor to change them.
  • Website build and Windows-specific testing were not run; no website or platform-specific code changed.

Checklist

  • I've read CONTRIBUTING.md
  • Tests included and passing (make check) — for code changes
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR

Use the existing YAML parser and serializer so folded descriptions, quoted text, and nested metadata survive repeated editor saves without accumulating escapes or losing structure. Keep legacy headers editable and render nested object fields as read-only JSON.

Add regression coverage for the MinerU workflow reported in #637 and document editor behavior. Verified UI tests, lint, build, make check, and an isolated browser save/reopen flow.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T17:38:05.573017Z db113fd Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@runkids

runkids commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: db113fd2c3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@runkids
runkids merged commit 18d47d8 into main Oct 25, 2026
8 checks passed
@runkids
runkids deleted the runkids/fix-editor-frontmatter-roundtrip branch October 25, 2026 17:39
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.

After changing the name of the skill, the layout became abnormal.

1 participant