Repository navigation
feat(node): 公开状态页 Markdown/HTML 备注 - #34
Merged
Merged
Conversation
- node 新增独立列 public_remark(迁移 v8,与 v7 同理不挂 v6 删列闸门) - 用 pulldown-cmark 渲染源文本为 HTML(裸 HTML 透传,受信任管理员内容, 不引入 ammonia/html5ever 以免增大二进制) - node_view 公开帧下发渲染后的 public_remark_html;原文仅管理员帧可见, 私有 remark 仍不公开 - web-admin 节点编辑弹窗新增“公开备注”文本域
公开备注在读取路径按节点逐条渲染(每约 2s 一帧),无上限的源文本会被无限 重复解析。在 create_node/update_node 写入边界拒绝超限输入,并给后台文本域加 maxLength,封顶存储与每帧渲染成本。(code review ADV-005/ADV-002)
2 of 3 tasks
CarlJia
added a commit
that referenced
this pull request
Sep 24, 2026
公开备注功能(PR #34)为新增特性,按语义化版本升次版本号。tag 由发布流程 在合入 main 后据此打出(release.yml 校验 tag 与 Cargo.toml 版本一致)。
1 task done
github-actions Bot
pushed a commit
to lkdd20/monitor
that referenced
this pull request
Sep 24, 2026
公开备注功能(PR CarlJia#34)为新增特性,按语义化版本升次版本号。tag 由发布流程 在合入 main 后据此打出(release.yml 校验 tag 与 Cargo.toml 版本一致)。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
public_remark字段(面向公开状态页,与仅管理员可见的remark分离)pulldown-cmark把管理员写的 Markdown/HTML 源文本渲染为public_remark_html,随公开节点帧下发;原始源仅在管理员帧可见ammonia/html5ever,避免增大二进制);仅新增pulldown-cmark一个轻量依赖public_remark TEXT NOT NULL DEFAULT ''(与 v7 同理不挂 v6 删列闸门)主题侧渲染在配套 PR:CarlJia/monitor-theme-gymin#feat/node-public-remark(消费本 PR 的帧契约,需本 PR 先合入)。
Test plan
cargo test(236 通过,含公开/管理员帧隔离、Markdown+内联 HTML 渲染、长度上限、迁移一致性)cargo fmt --check/cargo clippy干净cargo tree确认未引入ammonia/html5evertsc+vite build+oxlint干净安全说明
公开备注为受信任管理员撰写、未经净化即渲染到公开页(存储型 XSS 面在管理员账号被盗时才成立)。可选的防御纵深(给主题静态托管加 CSP)见计划 Open Questions,非本 PR 范围。
Post-Deploy Monitoring & Validation
无额外运行时监控需求:功能为附加字段,迁移纯附加、可重复执行;回滚只需还原本 PR。关注点仅为公开页渲染是否符合预期,可人工核对。
🤖 Generated with Claude Code