Skip to content

feat(fonts): ship NV fonts and make Libron default#700

Merged
OGKevin merged 2 commits into
masterfrom
ogkevin/push/zmnkvmlpykmv
Jul 14, 2026
Merged

feat(fonts): ship NV fonts and make Libron default#700
OGKevin merged 2 commits into
masterfrom
ogkevin/push/zmnkvmlpykmv

Conversation

@OGKevin

@OGKevin OGKevin commented Jul 13, 2026

Copy link
Copy Markdown
Owner

This commit adds Core fonts from https://github.com/nicoverbruggen/ebook-fonts and makes it the default font.

It also removes the fonts from git and adds a new xtask command to fetch from from source.

Change-Id: 0dcf4dea1fd43e8544047d0afe59fe22
Change-Id-Short: zmnkvmlpykmv

Closes: #374
Closes: #505

@OGKevin OGKevin self-assigned this Jul 13, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in Cadmus Jul 13, 2026
@OGKevin
OGKevin force-pushed the ogkevin/push/zmnkvmlpykmv branch from bc70b4d to 056f8a7 Compare July 13, 2026 12:04
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This change adds cargo xtask download-fonts, assembling bundled fonts from release archives and pinned Noto/Google submodules with completeness markers. CI caches the generated fonts/ directory. HTML rendering and reader font selection search bundled fonts before custom paths, with Libron and NV Jost used in default stacks. Build guidance, settings documentation, font behavior, OTA handling, and development configuration are updated.

Sequence Diagram(s)

sequenceDiagram
  participant Build as Build workflow
  participant Cache as cache-fonts action
  participant Xtask as cargo xtask download-fonts
  participant Sources as Font sources
  participant Fonts as fonts directory
  Build->>Cache: restore bundled-fonts cache
  Cache->>Xtask: run on cache miss
  Xtask->>Sources: download or reuse archives and submodules
  Sources->>Fonts: install bundled font files
  Cache-->>Build: provide fonts directory
Loading

Possibly related PRs

Suggested labels: documentation, dependencies

Poem

Fonts drift in from archives bright,
Submodules guide them left and right.
Cache them once, let readers choose,
Libron hums in softer hues.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits and accurately summarizes the font shipping change.
Linked Issues check ✅ Passed The PR satisfies #374 and #505 by adding upstream font downloads, CI/dev support, Renovate tracking, and the new Libron/Nico font set.
Out of Scope Changes check ✅ Passed The changes stay focused on font sourcing, defaults, CI, docs, and update tracking without unrelated feature work.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@OGKevin
OGKevin temporarily deployed to cloudflare-pages-preview July 13, 2026 12:09 — with GitHub Actions Inactive
@OGKevin
OGKevin force-pushed the ogkevin/push/zmnkvmlpykmv branch from 056f8a7 to 71999b6 Compare July 13, 2026 12:44
@OGKevin
OGKevin temporarily deployed to cloudflare-pages-preview July 13, 2026 12:48 — with GitHub Actions Inactive
@OGKevin
OGKevin force-pushed the ogkevin/push/zmnkvmlpykmv branch from 71999b6 to 3e9fc91 Compare July 13, 2026 13:24
@OGKevin
OGKevin temporarily deployed to cloudflare-pages-preview July 13, 2026 13:34 — with GitHub Actions Inactive
@OGKevin OGKevin changed the title feat(fonts): ship KF fonts and make them default feat(fonts): ship NV fonts and make them default Jul 13, 2026
@OGKevin OGKevin changed the title feat(fonts): ship NV fonts and make them default feat(fonts): ship NV fonts and make Libron default Jul 13, 2026
@OGKevin

OGKevin commented Jul 13, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (4)
docs/src/fonts.md (1)

1-143: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Regenerate the POT translation template.

This PR adds docs/src/fonts.md and modifies docs/src/SUMMARY.md, docs/src/contributing/devenv-setup.md, and docs/src/settings/index.md — all English documentation sources under docs/src/**/*.md. Per coding guidelines, the POT file must be regenerated when any such source is modified. Run cadmus-translate (available in devenv) to generate the updated .pot file and include it in this PR.

As per coding guidelines: "When any English documentation source under docs/src/**/*.md is modified, regenerate the POT file."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/src/fonts.md` around lines 1 - 143, Regenerate the documentation
translation POT template using the cadmus-translate command available in the
development environment, covering the modified English sources including
docs/src/fonts.md and the other changed documentation files. Include the
resulting updated .pot file in the changes.

Source: Coding guidelines

xtask/src/tasks/download_fonts/font/google.rs (1)

7-9: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Keep SUBMODULE private. It’s only used within xtask/src/tasks/download_fonts/font/google.rs, so pub just widens the API for no benefit.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@xtask/src/tasks/download_fonts/font/google.rs` around lines 7 - 9, Make the
SUBMODULE constant private by removing its public visibility modifier, keeping
its value and existing internal uses unchanged.

Source: Coding guidelines

xtask/src/tasks/download_fonts/font/ebook.rs (1)

60-60: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider early-returning when fonts are already complete.

Unlike source_code::install, ebook::install doesn't check is_complete before proceeding. This means it always processes archives (even if just from cache) and iterates zip entries even when all fonts are already present and the version marker matches. Adding an early return would make the behavior consistent across sources and avoid unnecessary I/O.

♻️ Proposed refactor
 pub fn install(root: &Path, fonts_dir: &Path) -> Result<()> {
+    if is_complete(fonts_dir) {
+        return Ok(());
+    }
+
     let cache_dir = root.join(format!(".cache/ebook-fonts/{EBOOK_FONTS_VERSION}"));
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@xtask/src/tasks/download_fonts/font/ebook.rs` at line 60, Update
ebook::install to check is_complete before processing cached archives or
iterating ZIP entries, and return success immediately when the fonts are already
complete. Preserve the existing installation flow for incomplete font sets,
matching source_code::install’s behavior.
xtask/src/tasks/util/github.rs (1)

27-27: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keep these new APIs crate-private unless they are intentional external contracts.

  • xtask/src/tasks/util/github.rs#L27-L27: use pub(crate) for client if font downloaders are its only consumers.
  • crates/core/src/font/mod.rs#L605-L608: use pub(crate) for from_name_in_paths if Engine is its only non-documentation caller.

Confirm external usage before retaining pub. As per coding guidelines, “Use the most restrictive visibility that works.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@xtask/src/tasks/util/github.rs` at line 27, Restrict the visibility of client
in github.rs to pub(crate) if font downloaders are its only consumers, and
restrict from_name_in_paths in font/mod.rs to pub(crate) if Engine is its only
non-documentation caller; first confirm neither API is used externally,
retaining pub only for intentional external contracts.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.gitmodules:
- Around line 61-64: Update the thirdparty/google-fonts submodule configuration
and its setup flow so fresh checkouts fetch only the four font files consumed by
the download_fonts Google font task, using a smaller package or sparse/partial
checkout rather than the full upstream repository. Preserve the existing paths
expected by the task and avoid changing unrelated submodules.

In `@renovate.json`:
- Around line 220-224: Update the Renovate rule for alerque/libertinus,
identified by depNameTemplate, to use semver-coerced instead of strict semver so
versions such as v7.051 are handled correctly. Keep the existing datasource and
dependency extraction configuration unchanged.

In `@xtask/src/tasks/download_fonts/font/ebook.rs`:
- Around line 60-73: Update install around the EBOOK_FONTS_VERSION marker so
that when the existing version does not match, remove the previously installed
ebook font files from fonts_dir before extracting the cached archives. Preserve
existing files when the marker already matches, and only call
markers::mark_version after both archives are successfully extracted.

In `@xtask/src/tasks/download_fonts/font/google.rs`:
- Around line 24-29: Make Google-font installation revision-aware by updating
is_complete to validate the recorded thirdparty/google-fonts submodule revision
in addition to destination-file existence, and update install to refresh or
rebuild the fonts when that revision changes instead of relying on
util::install_from_submodule’s existing-file skip behavior. Preserve the current
completion behavior when both files and the recorded revision match.

In `@xtask/src/tasks/download_fonts/font/libertinus.rs`:
- Around line 37-53: Update the archive handling around the `archive.exists()`
check and `fs::extract_zip_entries_flat` so corrupt or partially written cached
archives are not reused: download to a temporary path and rename it to `archive`
only after a successful download, or remove the cached archive and re-fetch when
extraction fails. Preserve the existing cache reuse behavior for valid archives.

---

Nitpick comments:
In `@docs/src/fonts.md`:
- Around line 1-143: Regenerate the documentation translation POT template using
the cadmus-translate command available in the development environment, covering
the modified English sources including docs/src/fonts.md and the other changed
documentation files. Include the resulting updated .pot file in the changes.

In `@xtask/src/tasks/download_fonts/font/ebook.rs`:
- Line 60: Update ebook::install to check is_complete before processing cached
archives or iterating ZIP entries, and return success immediately when the fonts
are already complete. Preserve the existing installation flow for incomplete
font sets, matching source_code::install’s behavior.

In `@xtask/src/tasks/download_fonts/font/google.rs`:
- Around line 7-9: Make the SUBMODULE constant private by removing its public
visibility modifier, keeping its value and existing internal uses unchanged.

In `@xtask/src/tasks/util/github.rs`:
- Line 27: Restrict the visibility of client in github.rs to pub(crate) if font
downloaders are its only consumers, and restrict from_name_in_paths in
font/mod.rs to pub(crate) if Engine is its only non-documentation caller; first
confirm neither API is used externally, retaining pub only for intentional
external contracts.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: f0bff0b7-2e86-4741-9813-8785f32877f4

📥 Commits

Reviewing files that changed from the base of the PR and between 79c2cd6 and 3e9fc91.

⛔ Files ignored due to path filters (19)
  • docs/po/messages.pot is excluded by !docs/po/messages.pot
  • fonts/Cormorant-Regular.ttf is excluded by !**/*.ttf
  • fonts/Delius-Regular.ttf is excluded by !**/*.ttf
  • fonts/LibertinusSerif-Bold.otf is excluded by !**/*.otf
  • fonts/LibertinusSerif-BoldItalic.otf is excluded by !**/*.otf
  • fonts/LibertinusSerif-Italic.otf is excluded by !**/*.otf
  • fonts/LibertinusSerif-Regular.otf is excluded by !**/*.otf
  • fonts/NotoSans-Bold.ttf is excluded by !**/*.ttf
  • fonts/NotoSans-BoldItalic.ttf is excluded by !**/*.ttf
  • fonts/NotoSans-Italic.ttf is excluded by !**/*.ttf
  • fonts/NotoSans-Regular.ttf is excluded by !**/*.ttf
  • fonts/NotoSerif-Bold.ttf is excluded by !**/*.ttf
  • fonts/NotoSerif-BoldItalic.ttf is excluded by !**/*.ttf
  • fonts/NotoSerif-Italic.ttf is excluded by !**/*.ttf
  • fonts/NotoSerif-Regular.ttf is excluded by !**/*.ttf
  • fonts/Parisienne-Regular.ttf is excluded by !**/*.ttf
  • fonts/SourceCodeVariable-Italic.otf is excluded by !**/*.otf
  • fonts/SourceCodeVariable-Roman.otf is excluded by !**/*.otf
  • fonts/VarelaRound-Regular.ttf is excluded by !**/*.ttf
📒 Files selected for processing (34)
  • .agents/skills/build-cadmus-native/SKILL.md
  • .github/actions/build-kobo/action.yml
  • .github/actions/cache-fonts/action.yml
  • .github/workflows/cargo.yml
  • .gitignore
  • .gitmodules
  • contrib/Settings-sample.toml
  • crates/build-deps/src/markers.rs
  • crates/core/src/document/html/engine.rs
  • crates/core/src/font/mod.rs
  • crates/core/src/ota/cleanup.rs
  • crates/core/src/settings/mod.rs
  • crates/core/src/view/reader/mod.rs
  • devenv.nix
  • docs/src/SUMMARY.md
  • docs/src/contributing/devenv-setup.md
  • docs/src/fonts.md
  • docs/src/settings/index.md
  • renovate.json
  • thirdparty/google-fonts
  • thirdparty/noto-fonts
  • xtask/src/lib.rs
  • xtask/src/tasks/dist.rs
  • xtask/src/tasks/download_fonts/font/ebook.rs
  • xtask/src/tasks/download_fonts/font/google.rs
  • xtask/src/tasks/download_fonts/font/libertinus.rs
  • xtask/src/tasks/download_fonts/font/mod.rs
  • xtask/src/tasks/download_fonts/font/noto.rs
  • xtask/src/tasks/download_fonts/font/source_code.rs
  • xtask/src/tasks/download_fonts/mod.rs
  • xtask/src/tasks/download_fonts/util.rs
  • xtask/src/tasks/mod.rs
  • xtask/src/tasks/util/fs.rs
  • xtask/src/tasks/util/github.rs
📜 Review details
⚠️ CI failures not shown inline (1)

GitHub Actions: Prepare Copilot Agent Environment / 0_Prepare Copilot Agent Environment.txt: feat(fonts): ship NV fonts and make Libron default

Conclusion: failure

View job details

##[group]GITHUB_TOKEN Permissions
 Contents: read
 Metadata: read
 ##[endgroup]
 Secret source: Actions
 Prepare workflow directory
 Prepare all required actions
 Getting action download info
 Failed to resolve action download info. Error: Service Unavailable
 Retrying in 11.505 seconds
 Failed to resolve action download info. Error: Service Unavailable
 Retrying in 15.237 seconds
 ##[error]Service Unavailable
🧰 Additional context used
📓 Path-based instructions (12)
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: The emulator code path should panic on errors, while the app code path should handle errors gracefully.
Prefer ? over unwrap() or expect() in library and app Rust code.
Use thiserror for custom error types and anyhow for ad-hoc errors.
Prefer iterators over index-based loops.
Use &str instead of String in function parameters when ownership is not needed.
Prefer borrowing over cloning.
Inline expressions directly into struct fields instead of introducing intermediate bindings solely for a struct literal.
Avoid unsafe unless it is required and documented.
Avoid premature collect() calls and keep iterators lazy.
Ensure Rust code compiles without warnings.
Use the most restrictive visibility that works: prefer private mod over pub mod, pub(crate) over pub, and expose items publicly only when non-documentation code outside the parent module uses them.
Before accepting new pub items, check for external non-documentation usage with imports or fully qualified paths.
Prefer newtype wrappers over raw primitives when values represent domain concepts.
Implement Display, FromStr, and other appropriate standard traits on newtypes to keep them ergonomic.
Match on enum variants instead of comparing strings.
Comments should explain why, not what; avoid inline comments, commented-out code, changelog comments, and divider comments. Contextual TODO, FIXME, HACK, and NOTE annotations are allowed.
Use structured fields with the tracing crate; never put log data in formatted strings, use no module prefixes, and do not mix structured fields with format arguments.
Use debug for development detail, info for important runtime events, warn for recoverable issues, and error for failures requiring attention.
Return domain types directly from sqlx queries instead of parsing primitives afterward.
Implement sqlx::Type, Encode, and Decode for owned newtypes used in SQLite query results, delegating to the inner primitive.
Use sqlx t...

Files:

  • xtask/src/tasks/dist.rs
  • xtask/src/tasks/mod.rs
  • crates/core/src/settings/mod.rs
  • xtask/src/tasks/download_fonts/util.rs
  • xtask/src/tasks/download_fonts/font/mod.rs
  • xtask/src/tasks/download_fonts/font/google.rs
  • xtask/src/tasks/util/github.rs
  • xtask/src/tasks/download_fonts/mod.rs
  • xtask/src/lib.rs
  • xtask/src/tasks/download_fonts/font/source_code.rs
  • xtask/src/tasks/download_fonts/font/noto.rs
  • xtask/src/tasks/download_fonts/font/libertinus.rs
  • crates/core/src/font/mod.rs
  • xtask/src/tasks/download_fonts/font/ebook.rs
  • crates/core/src/ota/cleanup.rs
  • crates/core/src/view/reader/mod.rs
  • crates/build-deps/src/markers.rs
  • crates/core/src/document/html/engine.rs
  • xtask/src/tasks/util/fs.rs
**/*.{rs,toml,yml,yaml}

📄 CodeRabbit inference engine (AGENTS.md)

All feature combinations run on ubuntu-latest; only default and test features produce build artifacts.

Files:

  • xtask/src/tasks/dist.rs
  • xtask/src/tasks/mod.rs
  • crates/core/src/settings/mod.rs
  • xtask/src/tasks/download_fonts/util.rs
  • xtask/src/tasks/download_fonts/font/mod.rs
  • xtask/src/tasks/download_fonts/font/google.rs
  • contrib/Settings-sample.toml
  • xtask/src/tasks/util/github.rs
  • xtask/src/tasks/download_fonts/mod.rs
  • xtask/src/lib.rs
  • xtask/src/tasks/download_fonts/font/source_code.rs
  • xtask/src/tasks/download_fonts/font/noto.rs
  • xtask/src/tasks/download_fonts/font/libertinus.rs
  • crates/core/src/font/mod.rs
  • xtask/src/tasks/download_fonts/font/ebook.rs
  • crates/core/src/ota/cleanup.rs
  • crates/core/src/view/reader/mod.rs
  • crates/build-deps/src/markers.rs
  • crates/core/src/document/html/engine.rs
  • xtask/src/tasks/util/fs.rs
**/*.{rs,tsx,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

When testing strings rendered through fl!, construct expected strings with fl! as well.

Files:

  • xtask/src/tasks/dist.rs
  • xtask/src/tasks/mod.rs
  • crates/core/src/settings/mod.rs
  • xtask/src/tasks/download_fonts/util.rs
  • xtask/src/tasks/download_fonts/font/mod.rs
  • xtask/src/tasks/download_fonts/font/google.rs
  • xtask/src/tasks/util/github.rs
  • xtask/src/tasks/download_fonts/mod.rs
  • xtask/src/lib.rs
  • xtask/src/tasks/download_fonts/font/source_code.rs
  • xtask/src/tasks/download_fonts/font/noto.rs
  • xtask/src/tasks/download_fonts/font/libertinus.rs
  • crates/core/src/font/mod.rs
  • xtask/src/tasks/download_fonts/font/ebook.rs
  • crates/core/src/ota/cleanup.rs
  • crates/core/src/view/reader/mod.rs
  • crates/build-deps/src/markers.rs
  • crates/core/src/document/html/engine.rs
  • xtask/src/tasks/util/fs.rs
docs/src/**/*.md

📄 CodeRabbit inference engine (docs/REVIEW.md)

When any English documentation source under docs/src/**/*.md is modified, regenerate the POT file.

docs/src/**/*.md: Format and lint Markdown documentation with rumdl via treefmt; use code blocks with language tags, and preserve documentation Markdown from Prettier formatting.
Use the supported mdBook admonition syntax: [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], and [!CAUTION].
When linking to Cargo-generated API pages, use absolute HTML links such as /api/cadmus_core/...; do not use relative Markdown links.
Do not embed locale prefixes such as en/ in API Markdown links; use unprefixed /api/... site routes.
Use conversational, friendly, active-voice language and avoid jargon in user-facing documentation.

Files:

  • docs/src/SUMMARY.md
  • docs/src/settings/index.md
  • docs/src/contributing/devenv-setup.md
  • docs/src/fonts.md
docs/**/*.md

📄 CodeRabbit inference engine (docs/REVIEW.md)

docs/**/*.md: Format Markdown files with Prettier.
Ensure Markdown files pass rumdl according to .rumdl.toml.

Files:

  • docs/src/SUMMARY.md
  • docs/src/settings/index.md
  • docs/src/contributing/devenv-setup.md
  • docs/src/fonts.md
crates/core/**/*.rs

📄 CodeRabbit inference engine (crates/core/REVIEW.md)

crates/core/**/*.rs: Do not use "string literal".to_string() or format!("literal") for user-visible text.
The fl! macro must be used at every call site for user-visible text.

crates/core/**/*.rs: All handle_event and render methods in view components must use the specified OpenTelemetry #[cfg_attr(feature = "tracing", tracing::instrument(...))] instrumentation.
Instrumentation skip() names must exactly match the method parameter names, including underscore prefixes.
Verify tracing instrumentation with cargo check --features tracing.
A view's render() is called only when it has no children or is a background view; container views with children are not rendered directly.
For container decoration, use a background view for content rendered before children, or a dedicated child view for overlays rendered in child order.
Rustdoc examples should prefer fully compilable examples, then no_run, and use ignore only for private or pub(crate) items unreachable from the test harness, with an explanatory comment.
Use # to hide Rustdoc example boilerplate and verify examples with cargo test --doc.
Use typed SQLx macros: sqlx::query!, sqlx::query_as!, and sqlx::query_scalar!; do not use untyped query functions.
Use .flatten() on query_scalar! results for nullable columns producing Option<Option<T>>.
Untyped SQLx queries are permitted for dynamic SQL only when unit tests cover every dynamic path and a comment explains why a typed macro cannot be used.
All user-visible strings must use fl! with use crate::fl;; do not hardcode labels, buttons, placeholders, notifications, or other user-facing text.
Pass Fluent variable values at call sites using fl!("id", var = value).
Apply localization to SettingKind labels, Event::OpenNamedInput labels, menu entry text, button labels, notification text, and all other user-visible strings.

Files:

  • crates/core/src/settings/mod.rs
  • crates/core/src/font/mod.rs
  • crates/core/src/ota/cleanup.rs
  • crates/core/src/view/reader/mod.rs
  • crates/core/src/document/html/engine.rs
.agents/skills/**

📄 CodeRabbit inference engine (AGENTS.md)

For workflows, load the matching skill from .agents/skills/ before performing native builds, Kobo builds, formatting, linting, sqlx regeneration, documentation, translation synchronization, or log lookup.

Files:

  • .agents/skills/build-cadmus-native/SKILL.md
docs/src/!(contributing)/**/*.md

📄 CodeRabbit inference engine (docs/AGENTS.md)

User-facing documentation must target end users with no technical background using Cadmus.

Files:

  • docs/src/settings/index.md
docs/src/contributing/**/*.md

📄 CodeRabbit inference engine (docs/AGENTS.md)

Contributor documentation may use technical terminology, should be clear and direct, should include code examples where helpful, and must document setup steps precisely.

Files:

  • docs/src/contributing/devenv-setup.md
.github/workflows/cargo.yml

📄 CodeRabbit inference engine (REVIEW.md)

.github/workflows/cargo.yml: When adding a new Cargo feature flag, verify that .github/workflows/cargo.yml has new matrix entries in both clippy and test jobs for the feature alone and in combination with every other feature
Ensure feature flag test coverage is not limited to --all-features alone; paths marked with #[cfg(not(feature = "..."))] must be tested individually in CI matrix

Files:

  • .github/workflows/cargo.yml
**/.github/workflows/cargo.yml

📄 CodeRabbit inference engine (AGENTS.md)

When adding a feature flag, add matrix entries to both clippy and test jobs for the feature alone and every combination with other features.

Files:

  • .github/workflows/cargo.yml
.github/workflows/**

📄 CodeRabbit inference engine (AGENTS.md)

In CI, run cargo xtask download-assets before cargo xtask build-kobo so generated asset lists remain accurate.

Files:

  • .github/workflows/cargo.yml
🧠 Learnings (2)
📚 Learning: 2026-05-31T07:53:12.579Z
Learnt from: OGKevin
Repo: OGKevin/cadmus PR: 553
File: docs/src/installation/migration.md:87-88
Timestamp: 2026-05-31T07:53:12.579Z
Learning: For markdown files under docs/src/ in the cadmus (OGKevin/cadmus) repo, validate mdBook admonition syntax using the allowed types: NOTE, TIP, WARNING, IMPORTANT, and CAUTION. The correct format is a blockquote prefix like `> [!NOTE]`, `> [!TIP]`, `> [!WARNING]`, `> [!IMPORTANT]`, or `> [!CAUTION]`. Do not flag `[!CAUTION]` or `[!IMPORTANT]` as non-standard in this repo.

Applied to files:

  • docs/src/SUMMARY.md
  • docs/src/settings/index.md
  • docs/src/contributing/devenv-setup.md
  • docs/src/fonts.md
📚 Learning: 2026-05-23T14:57:43.820Z
Learnt from: OGKevin
Repo: OGKevin/cadmus PR: 478
File: crates/core/src/view/settings_editor/refresh_rate_by_kind_editor.rs:91-91
Timestamp: 2026-05-23T14:57:43.820Z
Learning: When reviewing Rust code that calls `ToggleableKeyboard::new(parent_rect: Rectangle, number_mode: bool)` (from `crates/core/src/view/toggleable_keyboard.rs`), treat the second argument as `number_mode` (numeric/number-layout mode), not as an initial visibility flag. In the constructor implementation, `visible` is initialized to `false` and the keyboard starts hidden; only the numeric layout changes based on `number_mode` (e.g., for numeric inputs like `refresh rate u8`). Therefore, do not flag `ToggleableKeyboard::new(rect, true)` as “making the keyboard start visible.”

Applied to files:

  • crates/core/src/settings/mod.rs
  • crates/core/src/font/mod.rs
  • crates/core/src/ota/cleanup.rs
  • crates/core/src/view/reader/mod.rs
  • crates/core/src/document/html/engine.rs
🪛 SkillSpector (2.3.11)
.agents/skills/build-cadmus-native/SKILL.md

[warning] 50: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))


[warning] 52: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))


[warning] 53: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))


[warning] 61: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))


[warning] 113: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))


[warning] 113: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))


[warning] 113: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))

🔇 Additional comments (33)
.agents/skills/build-cadmus-native/SKILL.md (1)

36-42: LGTM!

contrib/Settings-sample.toml (1)

169-169: LGTM!

devenv.nix (1)

405-405: LGTM!

docs/src/SUMMARY.md (1)

13-13: LGTM!

docs/src/contributing/devenv-setup.md (1)

27-34: LGTM!

Also applies to: 53-53, 100-100

docs/src/fonts.md (1)

1-143: LGTM!

docs/src/settings/index.md (1)

281-327: LGTM!

crates/build-deps/src/markers.rs (1)

91-92: LGTM!

Also applies to: 94-102, 103-111

thirdparty/google-fonts (1)

1-1: LGTM!

xtask/src/tasks/download_fonts/font/google.rs (1)

1-6: LGTM!

Also applies to: 11-22

crates/core/src/settings/mod.rs (1)

123-123: LGTM!

crates/core/src/view/reader/mod.rs (2)

2711-2713: LGTM!


3370-3370: 🎯 Functional Correctness

Verify the unconditional font path against the bundled resolver.

This now passes only context.settings.reader.font_path. Selecting a family discovered in context.device.install_path("fonts") works only if HtmlDocument::set_font_family searches bundled fonts independently of that argument. Confirm the paired change in crates/core/src/document/html/engine.rs and retain a test covering bundled-family selection.

Based on the supplied cross-layer summary, this is a contract check rather than a confirmed defect.

crates/core/src/ota/cleanup.rs (1)

86-94: LGTM!

.gitignore (1)

19-19: LGTM!

thirdparty/noto-fonts (1)

1-1: LGTM!

xtask/src/lib.rs (1)

29-29: LGTM!

Also applies to: 85-86, 114-114

xtask/src/tasks/mod.rs (1)

14-14: LGTM!

xtask/src/tasks/download_fonts/mod.rs (2)

33-55: LGTM!


22-24: LGTM!

xtask/src/tasks/dist.rs (1)

129-136: LGTM!

xtask/src/tasks/download_fonts/font/mod.rs (1)

29-46: LGTM!

xtask/src/tasks/download_fonts/font/noto.rs (1)

43-49: LGTM!

xtask/src/tasks/download_fonts/font/source_code.rs (1)

30-56: LGTM!

.github/actions/build-kobo/action.yml (1)

52-55: LGTM!

.github/actions/cache-fonts/action.yml (2)

35-56: LGTM!


28-33: 🗄️ Data Integrity & Integration

No Libertinus gitlink to add here. libertinus is archive-based, and xtask/src/tasks/download_fonts/** already feeds the cache key, so this hash only needs the Noto and Google submodules.

			> Likely an incorrect or invalid review comment.
.github/workflows/cargo.yml (1)

46-46: LGTM!

Also applies to: 190-194, 370-374

xtask/src/tasks/download_fonts/util.rs (1)

21-51: LGTM!

xtask/src/tasks/util/fs.rs (1)

292-389: LGTM!

Also applies to: 510-644

renovate.json (1)

68-80: LGTM!

crates/core/src/document/html/engine.rs (1)

37-37: LGTM!

Also applies to: 105-116, 147-154, 2472-2504

crates/core/src/font/mod.rs (1)

619-690: LGTM!

Also applies to: 2805-2838

Comment thread .gitmodules
Comment thread renovate.json Outdated
Comment thread xtask/src/tasks/download_fonts/font/ebook.rs
Comment thread xtask/src/tasks/download_fonts/font/google.rs Outdated
Comment thread xtask/src/tasks/download_fonts/font/libertinus.rs Outdated
@OGKevin OGKevin added this to the 0.12.0 milestone Jul 13, 2026
@OGKevin
OGKevin temporarily deployed to cloudflare-pages-preview July 13, 2026 18:51 — with GitHub Actions Inactive
This commit adds KF https://github.com/nicoverbruggen/ebook-fonts and
makes it the default font.

It also removes the fonts from git and adds a new xtask command to fetch
from from source.

Change-Id: 0dcf4dea1fd43e8544047d0afe59fe22
Change-Id-Short: zmnkvmlpykmv
@OGKevin
OGKevin force-pushed the ogkevin/push/zmnkvmlpykmv branch from 221103a to d491cdb Compare July 13, 2026 21:01
@OGKevin
OGKevin temporarily deployed to cloudflare-pages-preview July 13, 2026 21:06 — with GitHub Actions Inactive
@OGKevin

OGKevin commented Jul 14, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
xtask/src/tasks/util/github.rs (2)

160-161: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Preserve the original file extension for the temp file.

Hey there! Using with_extension("part") replaces the existing extension entirely (for example, fonts.zip becomes fonts.part). While this is completely fine for our current sequential xtask downloads, it might be slightly safer to append .part to the existing filename so we don't accidentally lose the original file type or cause collisions in the future. Feel free to tweak it if you like!

✨ Proposed tweak
-    let temp = dest.with_extension("part");
+    let temp = dest.with_file_name(format!("{}.part", dest.file_name().unwrap_or_default().to_string_lossy()));
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@xtask/src/tasks/util/github.rs` around lines 160 - 161, Update the
temporary-path construction in the download logic around dest so it appends a
“.part” suffix to the complete original filename instead of replacing its
extension, preserving names such as “fonts.zip” as “fonts.zip.part”.

27-27: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Prefer pub(crate) over pub for internal items.

Hey! I noticed several functions across the xtask tasks were opened up as pub. As per our coding guidelines, we should use the most restrictive visibility that works, preferring pub(crate) over pub for items that are only meant to be used within the same parent crate. Since these are all internal build helpers, let's dial them down!

  • xtask/src/tasks/util/github.rs#L27-L27: change pub fn client to pub(crate) fn client.
  • xtask/src/tasks/download_fonts/font/google.rs#L23-L23: change pub fn is_complete to pub(crate) fn is_complete.
  • xtask/src/tasks/download_fonts/font/google.rs#L27-L27: change pub fn install to pub(crate) fn install.
  • xtask/src/tasks/download_fonts/font/noto.rs#L42-L42: change pub fn is_complete to pub(crate) fn is_complete.
  • xtask/src/tasks/download_fonts/font/noto.rs#L46-L46: change pub fn install to pub(crate) fn install.
  • xtask/src/tasks/download_fonts/util.rs#L20-L20: change pub fn is_submodule_install_current to pub(crate) fn is_submodule_install_current.
  • xtask/src/tasks/download_fonts/util.rs#L43-L43: change pub fn install_from_submodule to pub(crate) fn install_from_submodule.
  • xtask/src/tasks/download_fonts/util.rs#L102-L102: change pub fn ensure_cached_release_asset to pub(crate) fn ensure_cached_release_asset.
  • xtask/src/tasks/download_fonts/util.rs#L136-L136: change pub fn extract_cached_archive to pub(crate) fn extract_cached_archive.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@xtask/src/tasks/util/github.rs` at line 27, Restrict these internal xtask
helpers to crate visibility by changing `client` in
`xtask/src/tasks/util/github.rs`, `is_complete` and `install` in
`xtask/src/tasks/download_fonts/font/google.rs`, `is_complete` and `install` in
`xtask/src/tasks/download_fonts/font/noto.rs`, and
`is_submodule_install_current`, `install_from_submodule`,
`ensure_cached_release_asset`, and `extract_cached_archive` in
`xtask/src/tasks/download_fonts/util.rs` from `pub` to `pub(crate)`; no other
behavior changes are needed.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/build-cadmus-native/SKILL.md:
- Around line 36-42: Clarify the asset setup section around the
`download-assets` and `download-fonts` commands: either rename the “optional”
section to reflect that both commands are required for Kobo builds, or split the
emulator-only guidance from the mandatory Kobo prerequisites. Ensure the
resulting text clearly distinguishes required commands from optional setup so
developers do not skip them.

---

Nitpick comments:
In `@xtask/src/tasks/util/github.rs`:
- Around line 160-161: Update the temporary-path construction in the download
logic around dest so it appends a “.part” suffix to the complete original
filename instead of replacing its extension, preserving names such as
“fonts.zip” as “fonts.zip.part”.
- Line 27: Restrict these internal xtask helpers to crate visibility by changing
`client` in `xtask/src/tasks/util/github.rs`, `is_complete` and `install` in
`xtask/src/tasks/download_fonts/font/google.rs`, `is_complete` and `install` in
`xtask/src/tasks/download_fonts/font/noto.rs`, and
`is_submodule_install_current`, `install_from_submodule`,
`ensure_cached_release_asset`, and `extract_cached_archive` in
`xtask/src/tasks/download_fonts/util.rs` from `pub` to `pub(crate)`; no other
behavior changes are needed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 404a3442-dbfc-40cc-8904-c7362eccad97

📥 Commits

Reviewing files that changed from the base of the PR and between 3e9fc91 and d491cdb.

⛔ Files ignored due to path filters (19)
  • docs/po/messages.pot is excluded by !docs/po/messages.pot
  • fonts/Cormorant-Regular.ttf is excluded by !**/*.ttf
  • fonts/Delius-Regular.ttf is excluded by !**/*.ttf
  • fonts/LibertinusSerif-Bold.otf is excluded by !**/*.otf
  • fonts/LibertinusSerif-BoldItalic.otf is excluded by !**/*.otf
  • fonts/LibertinusSerif-Italic.otf is excluded by !**/*.otf
  • fonts/LibertinusSerif-Regular.otf is excluded by !**/*.otf
  • fonts/NotoSans-Bold.ttf is excluded by !**/*.ttf
  • fonts/NotoSans-BoldItalic.ttf is excluded by !**/*.ttf
  • fonts/NotoSans-Italic.ttf is excluded by !**/*.ttf
  • fonts/NotoSans-Regular.ttf is excluded by !**/*.ttf
  • fonts/NotoSerif-Bold.ttf is excluded by !**/*.ttf
  • fonts/NotoSerif-BoldItalic.ttf is excluded by !**/*.ttf
  • fonts/NotoSerif-Italic.ttf is excluded by !**/*.ttf
  • fonts/NotoSerif-Regular.ttf is excluded by !**/*.ttf
  • fonts/Parisienne-Regular.ttf is excluded by !**/*.ttf
  • fonts/SourceCodeVariable-Italic.otf is excluded by !**/*.otf
  • fonts/SourceCodeVariable-Roman.otf is excluded by !**/*.otf
  • fonts/VarelaRound-Regular.ttf is excluded by !**/*.ttf
📒 Files selected for processing (34)
  • .agents/skills/build-cadmus-native/SKILL.md
  • .github/actions/build-kobo/action.yml
  • .github/actions/cache-fonts/action.yml
  • .github/workflows/cargo.yml
  • .gitignore
  • .gitmodules
  • contrib/Settings-sample.toml
  • crates/build-deps/src/markers.rs
  • crates/core/src/document/html/engine.rs
  • crates/core/src/font/mod.rs
  • crates/core/src/ota/cleanup.rs
  • crates/core/src/settings/mod.rs
  • crates/core/src/view/reader/mod.rs
  • devenv.nix
  • docs/src/SUMMARY.md
  • docs/src/contributing/devenv-setup.md
  • docs/src/fonts.md
  • docs/src/settings/index.md
  • renovate.json
  • thirdparty/google-fonts
  • thirdparty/noto-fonts
  • xtask/src/lib.rs
  • xtask/src/tasks/dist.rs
  • xtask/src/tasks/download_fonts/font/ebook.rs
  • xtask/src/tasks/download_fonts/font/google.rs
  • xtask/src/tasks/download_fonts/font/libertinus.rs
  • xtask/src/tasks/download_fonts/font/mod.rs
  • xtask/src/tasks/download_fonts/font/noto.rs
  • xtask/src/tasks/download_fonts/font/source_code.rs
  • xtask/src/tasks/download_fonts/mod.rs
  • xtask/src/tasks/download_fonts/util.rs
  • xtask/src/tasks/mod.rs
  • xtask/src/tasks/util/fs.rs
  • xtask/src/tasks/util/github.rs
🚧 Files skipped from review as they are similar to previous changes (25)
  • .gitignore
  • thirdparty/google-fonts
  • .gitmodules
  • docs/src/SUMMARY.md
  • .github/actions/cache-fonts/action.yml
  • xtask/src/tasks/mod.rs
  • xtask/src/tasks/download_fonts/font/mod.rs
  • docs/src/fonts.md
  • contrib/Settings-sample.toml
  • .github/actions/build-kobo/action.yml
  • xtask/src/tasks/download_fonts/mod.rs
  • xtask/src/tasks/download_fonts/font/libertinus.rs
  • devenv.nix
  • thirdparty/noto-fonts
  • docs/src/settings/index.md
  • crates/core/src/settings/mod.rs
  • crates/core/src/font/mod.rs
  • .github/workflows/cargo.yml
  • xtask/src/lib.rs
  • xtask/src/tasks/download_fonts/font/source_code.rs
  • crates/build-deps/src/markers.rs
  • xtask/src/tasks/util/fs.rs
  • xtask/src/tasks/download_fonts/font/ebook.rs
  • crates/core/src/document/html/engine.rs
  • crates/core/src/view/reader/mod.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (8)
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: The emulator code path should panic on errors, while the app code path should handle errors gracefully.
Prefer ? over unwrap() or expect() in library and app Rust code.
Use thiserror for custom error types and anyhow for ad-hoc errors.
Prefer iterators over index-based loops.
Use &str instead of String in function parameters when ownership is not needed.
Prefer borrowing over cloning.
Inline expressions directly into struct fields instead of introducing intermediate bindings solely for a struct literal.
Avoid unsafe unless it is required and documented.
Avoid premature collect() calls and keep iterators lazy.
Ensure Rust code compiles without warnings.
Use the most restrictive visibility that works: prefer private mod over pub mod, pub(crate) over pub, and expose items publicly only when non-documentation code outside the parent module uses them.
Before accepting new pub items, check for external non-documentation usage with imports or fully qualified paths.
Prefer newtype wrappers over raw primitives when values represent domain concepts.
Implement Display, FromStr, and other appropriate standard traits on newtypes to keep them ergonomic.
Match on enum variants instead of comparing strings.
Comments should explain why, not what; avoid inline comments, commented-out code, changelog comments, and divider comments. Contextual TODO, FIXME, HACK, and NOTE annotations are allowed.
Use structured fields with the tracing crate; never put log data in formatted strings, use no module prefixes, and do not mix structured fields with format arguments.
Use debug for development detail, info for important runtime events, warn for recoverable issues, and error for failures requiring attention.
Return domain types directly from sqlx queries instead of parsing primitives afterward.
Implement sqlx::Type, Encode, and Decode for owned newtypes used in SQLite query results, delegating to the inner primitive.
Use sqlx t...

Files:

  • xtask/src/tasks/download_fonts/font/google.rs
  • xtask/src/tasks/download_fonts/font/noto.rs
  • xtask/src/tasks/util/github.rs
  • xtask/src/tasks/dist.rs
  • xtask/src/tasks/download_fonts/util.rs
  • crates/core/src/ota/cleanup.rs
**/*.{rs,toml,yml,yaml}

📄 CodeRabbit inference engine (AGENTS.md)

All feature combinations run on ubuntu-latest; only default and test features produce build artifacts.

Files:

  • xtask/src/tasks/download_fonts/font/google.rs
  • xtask/src/tasks/download_fonts/font/noto.rs
  • xtask/src/tasks/util/github.rs
  • xtask/src/tasks/dist.rs
  • xtask/src/tasks/download_fonts/util.rs
  • crates/core/src/ota/cleanup.rs
**/*.{rs,tsx,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

When testing strings rendered through fl!, construct expected strings with fl! as well.

Files:

  • xtask/src/tasks/download_fonts/font/google.rs
  • xtask/src/tasks/download_fonts/font/noto.rs
  • xtask/src/tasks/util/github.rs
  • xtask/src/tasks/dist.rs
  • xtask/src/tasks/download_fonts/util.rs
  • crates/core/src/ota/cleanup.rs
docs/src/**/*.md

📄 CodeRabbit inference engine (docs/REVIEW.md)

When any English documentation source under docs/src/**/*.md is modified, regenerate the POT file.

docs/src/**/*.md: Format and lint Markdown documentation with rumdl via treefmt; use code blocks with language tags, and preserve documentation Markdown from Prettier formatting.
Use the supported mdBook admonition syntax: [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], and [!CAUTION].
When linking to Cargo-generated API pages, use absolute HTML links such as /api/cadmus_core/...; do not use relative Markdown links.
Do not embed locale prefixes such as en/ in API Markdown links; use unprefixed /api/... site routes.
Use conversational, friendly, active-voice language and avoid jargon in user-facing documentation.

Files:

  • docs/src/contributing/devenv-setup.md
docs/**/*.md

📄 CodeRabbit inference engine (docs/REVIEW.md)

docs/**/*.md: Format Markdown files with Prettier.
Ensure Markdown files pass rumdl according to .rumdl.toml.

Files:

  • docs/src/contributing/devenv-setup.md
docs/src/contributing/**/*.md

📄 CodeRabbit inference engine (docs/AGENTS.md)

Contributor documentation may use technical terminology, should be clear and direct, should include code examples where helpful, and must document setup steps precisely.

Files:

  • docs/src/contributing/devenv-setup.md
crates/core/**/*.rs

📄 CodeRabbit inference engine (crates/core/REVIEW.md)

crates/core/**/*.rs: Do not use "string literal".to_string() or format!("literal") for user-visible text.
The fl! macro must be used at every call site for user-visible text.

crates/core/**/*.rs: All handle_event and render methods in view components must use the specified OpenTelemetry #[cfg_attr(feature = "tracing", tracing::instrument(...))] instrumentation.
Instrumentation skip() names must exactly match the method parameter names, including underscore prefixes.
Verify tracing instrumentation with cargo check --features tracing.
A view's render() is called only when it has no children or is a background view; container views with children are not rendered directly.
For container decoration, use a background view for content rendered before children, or a dedicated child view for overlays rendered in child order.
Rustdoc examples should prefer fully compilable examples, then no_run, and use ignore only for private or pub(crate) items unreachable from the test harness, with an explanatory comment.
Use # to hide Rustdoc example boilerplate and verify examples with cargo test --doc.
Use typed SQLx macros: sqlx::query!, sqlx::query_as!, and sqlx::query_scalar!; do not use untyped query functions.
Use .flatten() on query_scalar! results for nullable columns producing Option<Option<T>>.
Untyped SQLx queries are permitted for dynamic SQL only when unit tests cover every dynamic path and a comment explains why a typed macro cannot be used.
All user-visible strings must use fl! with use crate::fl;; do not hardcode labels, buttons, placeholders, notifications, or other user-facing text.
Pass Fluent variable values at call sites using fl!("id", var = value).
Apply localization to SettingKind labels, Event::OpenNamedInput labels, menu entry text, button labels, notification text, and all other user-visible strings.

Files:

  • crates/core/src/ota/cleanup.rs
.agents/skills/**

📄 CodeRabbit inference engine (AGENTS.md)

For workflows, load the matching skill from .agents/skills/ before performing native builds, Kobo builds, formatting, linting, sqlx regeneration, documentation, translation synchronization, or log lookup.

Files:

  • .agents/skills/build-cadmus-native/SKILL.md
🧠 Learnings (2)
📚 Learning: 2026-05-31T07:53:12.579Z
Learnt from: OGKevin
Repo: OGKevin/cadmus PR: 553
File: docs/src/installation/migration.md:87-88
Timestamp: 2026-05-31T07:53:12.579Z
Learning: For markdown files under docs/src/ in the cadmus (OGKevin/cadmus) repo, validate mdBook admonition syntax using the allowed types: NOTE, TIP, WARNING, IMPORTANT, and CAUTION. The correct format is a blockquote prefix like `> [!NOTE]`, `> [!TIP]`, `> [!WARNING]`, `> [!IMPORTANT]`, or `> [!CAUTION]`. Do not flag `[!CAUTION]` or `[!IMPORTANT]` as non-standard in this repo.

Applied to files:

  • docs/src/contributing/devenv-setup.md
📚 Learning: 2026-05-23T14:57:43.820Z
Learnt from: OGKevin
Repo: OGKevin/cadmus PR: 478
File: crates/core/src/view/settings_editor/refresh_rate_by_kind_editor.rs:91-91
Timestamp: 2026-05-23T14:57:43.820Z
Learning: When reviewing Rust code that calls `ToggleableKeyboard::new(parent_rect: Rectangle, number_mode: bool)` (from `crates/core/src/view/toggleable_keyboard.rs`), treat the second argument as `number_mode` (numeric/number-layout mode), not as an initial visibility flag. In the constructor implementation, `visible` is initialized to `false` and the keyboard starts hidden; only the numeric layout changes based on `number_mode` (e.g., for numeric inputs like `refresh rate u8`). Therefore, do not flag `ToggleableKeyboard::new(rect, true)` as “making the keyboard start visible.”

Applied to files:

  • crates/core/src/ota/cleanup.rs
🪛 SkillSpector (2.3.11)
.agents/skills/build-cadmus-native/SKILL.md

[warning] 50: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))


[warning] 52: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))


[warning] 53: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))


[warning] 61: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))


[warning] 113: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))


[warning] 113: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))


[warning] 113: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.

(Memory Poisoning (MP2))

🔇 Additional comments (4)
docs/src/contributing/devenv-setup.md (1)

27-34: LGTM!

Also applies to: 53-53, 100-100

xtask/src/tasks/dist.rs (1)

129-136: LGTM!

crates/core/src/ota/cleanup.rs (1)

86-94: LGTM!

renovate.json (1)

68-80: LGTM!

Also applies to: 202-237

Comment thread .agents/skills/build-cadmus-native/SKILL.md Outdated
@OGKevin
OGKevin force-pushed the ogkevin/push/zmnkvmlpykmv branch from d491cdb to 489de4b Compare July 14, 2026 18:04
@OGKevin
OGKevin marked this pull request as ready for review July 14, 2026 18:04
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. documentation Improvements or additions to documentation enhancement New feature or request labels Jul 14, 2026
@dosubot dosubot Bot added the Subsystem/Settings Editor The system that allows users to change app settings. label Jul 14, 2026
@OGKevin OGKevin removed the Subsystem/Settings Editor The system that allows users to change app settings. label Jul 14, 2026
Change-Id: 72817cc55199780786f40e90f6e6cfc5
Change-Id-Short: sxrysnnuuyqq
@OGKevin
OGKevin force-pushed the ogkevin/push/zmnkvmlpykmv branch from 489de4b to a796628 Compare July 14, 2026 18:06
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jul 14, 2026
@OGKevin
OGKevin enabled auto-merge (squash) July 14, 2026 18:17
@OGKevin
OGKevin merged commit aaf4b9b into master Jul 14, 2026
83 checks passed
@OGKevin
OGKevin deleted the ogkevin/push/zmnkvmlpykmv branch July 14, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request Release/0.12.0 size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Ship with Nico's ebook-fonts Pull fonts from source

1 participant