Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Design and implement source-aware authoring edit previews

未关闭
#458 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust, typescript

调研方向

Start by reading site/architecture/styling-ir-roadmap.md and the context in roadmap issue #456, then inspect the compiler, type, and boundary test areas mentioned in the acceptance criteria. Define the separately versioned authoring contract, source revision and ownership errors, exact preview patch, diagnostics, and before/after behavior while preserving canonical Rust semantics. Done means the preview is non-writing, stale-source checks work, the listed cases are tested, documentation passes, and authoring code does not enter runtime or static bundles.

由索引模型根据 Issue 内容生成。

描述

Goal

Add a source-aware edit preview for visual editors, separate from execution Manifest v1 and separate from a file-writing command.

Roadmap: #456. Design context: site/architecture/styling-ir-roadmap.md. Source provenance from the public report proposal is a prerequisite.

Concrete use case

An editor proposes changing only the second color declaration inside an imported @utilities badge definition while retaining an earlier fallback declaration and a following native font-size: 0.875rem declaration. Preview identifies the owning file/range/revision, exact patch, diagnostics, and before/after behavior for an explicit class corpus. A later write is performed by the host only after checking the same revision.

Ownership and compatibility

  • Compiler/project owns source selection and graph orchestration; Rust owns parsing, edit targeting and lowering. An authoring contract must be separately versioned and stay out of runtime/Manifest payloads.
  • Specify input/output schema, source revision rule, stale/missing/read-only owner errors, and write authorization boundaries before implementation. Do not assume universal stable node IDs or a general lossless AST.
  • Additive 2.x API; never silently edit a different source or treat a successful preview as permission to write.

Acceptance criteria

  • Preview changes no source file. Exact patch and affected definition are reviewable; source changed between selection and preview is rejected.
  • Tests preserve duplicate declarations, comments/formatting around the edit, native declaration and conditional boundaries, imported ownership, native CSS, and diagnostics on an invalid edit.
  • Accepted previews recompile through the canonical Rust semantics and report finite before/after behavior; unsupported comparisons remain explicitly unknown.
  • Compiler/type/boundary tests and site documentation pass; unused authoring code does not increase runtime or static bundles.
主要语言
TypeScript
星标
2k
派生
44
平均合并
1 天 3 小时
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

master-co/css 的其他 Issue

查看 master-co/css 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。