Skip to content

feat(cli): add built-in changelog viewer with styled paging - #77

Merged
SunYanbox merged 13 commits into
mainfrom
feat/changelog-viewer
Aug 24, 2026
Merged

feat(cli): add built-in changelog viewer with styled paging#77
SunYanbox merged 13 commits into
mainfrom
feat/changelog-viewer

Conversation

@SunYanbox

@SunYanbox SunYanbox commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Summary

Add a built-in changelog viewer to the manualaid-cli settings menu. The changelog is embedded through i18n public APIs, parsed by ## [version] headings, and displayed through a styled pager with three-line pages for general output and a 20/10-line diff pager.

Changes

  • Add changelog_all, changelog_versions, and changelog_version public APIs in the i18n crate.
  • Embed docs/changelog/CHANGELOG_ZH_CN.md and add a root-level developer changelog CHANGELOG_ZH_CN.md.
  • Add a third-level settings submenu with view-all and per-version entries.
  • Add print_paged_three_lines and print_paged_diff pager helpers, and use three-line paging for changelog and tool output.
  • Add unit and integration tests, including coverage for command/config/pager branches.

中文

摘要

manualaid-cli 设置菜单中内置更新日志查看器。更新日志通过 i18n 公开接口嵌入并按 ## [版本] 标题解析,使用带样式的分页器展示:普通输出每页三行,diff 输出首次 20 行、之后每次 10 行。

变更

  • i18n crate 中新增 changelog_allchangelog_versionschangelog_version 公开接口。
  • 嵌入 docs/changelog/CHANGELOG_ZH_CN.md,并新增根目录开发者更新日志 CHANGELOG_ZH_CN.md
  • 新增三级设置子菜单,支持查看全部和按版本查看。
  • 新增 print_paged_three_linesprint_paged_diff 分页辅助,更新日志和工具输出使用每页三行分页。
  • 新增单元和集成测试,覆盖 command/config/pager 分支。

Add i18n public changelog APIs that embed docs/changelog/zh-CN.md and parse it by version heading. Add a third-level settings submenu with view-all and per-version entries, using the existing pager for output. Empty changelog shows a localized notice. Add unit and integration tests.
@SunYanbox SunYanbox added the enhancement New feature or request label Aug 24, 2026
…entation

Add format_changelog_text to render changelog markdown with emphasized version headings, accented section headings, gray body text, and two-space indentation. Rename docs/changelog/zh-CN.md to docs/changelog/CHANGELOG_ZH_CN.md, add v0.1.0 user-facing changelog content to the renamed file, and update the i18n include path.
Add root developer changelog and user-facing built-in changelog covering v0.1.0 initial release, v0.2.0 session statistics and Windows fixes, and v0.3.0 parser tool filtering and clipboard provider abstraction.
Add v0.3.1 and v0.4.0 entries to both changelog files and reorganize existing entries under standard Added/Changed/Fixed headings.
Add v0.4.1 entries for Read line diagnostic flags and Edit not-found hints, and v0.5.0 entries for the debug whitelist command, inline shortcut commands, expanded default shell whitelist, and prompt/tool description updates.
Add Unreleased entries for bang shell commands, built-in changelog viewer, and stable menu keys; add v0.7.0 entries for menu/command unification, parser order change, and copy-prompt submenu; add v0.6.0 entries for invoke parser and XML bare less-than fix.
Rename print_paged_collapsed to print_paged_three_lines and make it show three lines per key press for every page. Replace its uses in approval, handlers, command, and config, and update the format test.
@SunYanbox
SunYanbox force-pushed the feat/changelog-viewer branch from 594674d to 830f29c Compare August 24, 2026 15:41
Add print_paged_diff that shows 20 lines on the first page and 10 lines per key press afterwards. Use it for approval preview and diff output, and update the Unreleased changelog entries.
Replace empty-changelog assertions with checks that the embedded changelog contains Unreleased and version entries, and that changelog_version returns Some for an existing version and None for a bogus one.
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.39785% with 32 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ates/manualaid-cli/src/commands/loop_cli/config.rs 87.78% 16 Missing ⚠️
crates/manualaid-cli/src/pager.rs 68.42% 12 Missing ⚠️
...tes/manualaid-cli/src/commands/loop_cli/command.rs 95.74% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

Add run_command coverage for menu, toggle and changelog branches, a changelog menu version-body test, and print_paged_diff pager tests. Raise command.rs/config.rs/pager.rs line coverage to at least 91%.
@SunYanbox SunYanbox changed the title feat(cli): add built-in changelog viewer feat(cli): add built-in changelog viewer with styled paging Aug 24, 2026
…u test

Replace the cli.config.back text assertion with the numeric marker assertion already present, avoiding CI locale-dependent failures that poisoned the skill lock.
Add changelog menu invalid-input and config-menu changelog-entry tests, plus a write_pages_with pager test. Raise config.rs and pager.rs line coverage to at least 91%.
Add changelog_all, changelog_versions, changelog_version and set_locale wrapper to the developer changelog Unreleased section.
@SunYanbox
SunYanbox merged commit 6a3b7e4 into main Aug 24, 2026
7 of 8 checks passed
@SunYanbox
SunYanbox deleted the feat/changelog-viewer branch August 24, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant