Design and implement source-aware authoring edit previews
还没有人认领这个 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 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
master-co/css 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
breaking change runtime
难度 5/5 一周以上 新手友好度 35/100
-
runtime server
难度 5/5 一周以上 新手友好度 35/100
-
runtime
难度 5/5 一周以上 新手友好度 35/100
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
juice-shop/juice-shop#3686 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
dsh-market/dsh-market#877 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 74/100
ScottKirvan/GOMAC#61 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
stellar/stellar-dev-skill#151 ·
维护者通常 1 天内回复