Fix: Re-exports XpFile, XpLayer, and XpCell #105
Conversation
📝 WalkthroughWalkthroughThis change expands the public API of the rex module by re-exporting ChangesREX Module API Surface
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
bracket-terminal/src/rex.rs (1)
4-4: ⚡ Quick winAdd a regression test for the new public re-exports.
This widens the public API, but there’s no accompanying test proving
XpCell,XpFile, andXpLayerremain reachable through the intended facade path. Please add a small compile-level test in the relevant module (prefer colocatedtests.rsfor split domains).As per coding guidelines, "Add tests for new functionality in the relevant module; for split domains, prefer colocated
tests.rs".🤖 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 `@bracket-terminal/src/rex.rs` at line 4, Add a small compile-time test to ensure the new public re-exports (XpCell, XpFile, XpLayer) remain reachable through the facade: create or update a colocated tests.rs (alongside rex.rs) with a test that imports these symbols via the crate path that re-exports them (e.g., use crate::rex::{XpCell, XpFile, XpLayer};) and performs a no-op assertion or type check so the code fails to compile if the re-exports are removed or renamed; ensure the test is marked #[test] (or a compile-fail style test) and references the exact identifiers XpCell, XpFile, and XpLayer.
🤖 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.
Nitpick comments:
In `@bracket-terminal/src/rex.rs`:
- Line 4: Add a small compile-time test to ensure the new public re-exports
(XpCell, XpFile, XpLayer) remain reachable through the facade: create or update
a colocated tests.rs (alongside rex.rs) with a test that imports these symbols
via the crate path that re-exports them (e.g., use crate::rex::{XpCell, XpFile,
XpLayer};) and performs a no-op assertion or type check so the code fails to
compile if the re-exports are removed or renamed; ensure the test is marked
#[test] (or a compile-fail style test) and references the exact identifiers
XpCell, XpFile, and XpLayer.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 775fcaf4-2272-4568-b6f4-698e4c6fa8e7
📒 Files selected for processing (1)
bracket-terminal/src/rex.rs
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
**/*.rs: Format all Rust code usingcargo fmt --all
Fix allcargo clippywarnings — the CI enforces-D warnings
Add tests for new functionality in the relevant module; for split domains, prefer colocatedtests.rs
Files:
bracket-terminal/src/rex.rs
🧬 Code graph analysis (1)
bracket-terminal/src/rex.rs (1)
bracket-rex/src/rex.rs (4)
XpCell(23-33)XpFile(86-91)XpLayer(38-45)XpLayer(47-82)
##What
Re-exports XpFile, XpLayer, and XpCell from bracket-terminal::rex, restoring their availability through the existing bracket-lib and rltk facade chain.
##Why
rltk examples already rely on these RexPaint types being reachable through the facade path. Restoring the bracket-terminal::rex export point matches that existing structure while avoiding a broader bracket-rex prelude re-export that could introduce conflicts such as XpColor.
No related issue.
Checklist
Required
cargo check --allpassescargo fmt --all -- --checkpassescargo clippy --workspace --all-targets -- -D warnings -A clippy::multiple-crate-versionspassescargo test --allpassesCloses #123)Functional Validation
Configuration & Docs
README.md,ARCHITECTURE.md, or relevant manual pages, if applicable)If Applicable
cargo auditlocally if needed)Summary by CodeRabbit