Skip to content

Fix:re-export XpFile, XpLayer, XpCell#106

Open
mors119 wants to merge 2 commits into
utilForever:mainfrom
mors119:feature/rexpaint-reexports
Open

Fix:re-export XpFile, XpLayer, XpCell#106
mors119 wants to merge 2 commits into
utilForever:mainfrom
mors119:feature/rexpaint-reexports

Conversation

@mors119
Copy link
Copy Markdown

@mors119 mors119 commented May 25, 2026

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 --all passes
  • cargo fmt --all -- --check passes
  • cargo clippy --workspace --all-targets -- -D warnings -A clippy::multiple-crate-versions passes
  • cargo test --all passes
  • I linked the related issue (for example: Closes #123)

Functional Validation

  • Behavior related to this change was verified locally (if applicable)
  • Rendering/backend behavior was verified when runtime code changed (if applicable)
  • Algorithm behavior (pathfinding/FOV/noise/random) was verified when affected (if applicable)
  • I added or updated tests for changed behavior (if applicable)

Configuration & Docs

  • User-facing docs were updated (README.md, ARCHITECTURE.md, or relevant manual pages, if applicable)
  • New dependencies/configuration are documented (if applicable)
  • No sensitive values or credentials were introduced

If Applicable

  • Security impact considered (run cargo audit locally if needed)
  • Breaking behavior changes are clearly described in this PR

Summary by CodeRabbit

  • New Features
    • Expanded the public API to expose additional rexpaint-related types, enabling broader access to rexpaint file handling and manipulation.
  • Tests
    • Added unit tests to verify the public prelude correctly exposes the rexpaint-related types and that those types integrate as expected.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

📝 Walkthrough

Walkthrough

The rex module now publicly re-exports three Xp types from bracket_rex::preludeXpCell, XpFile, and XpLayer — and a unit test was added to verify crate::prelude re-exports those types. Existing functions remain unchanged.

Changes

Xp-Related Type Exports

Layer / File(s) Summary
Xp-related type re-exports
bracket-terminal/src/rex.rs
The module switches from a private XpFile import to public re-exports of XpCell, XpFile, and XpLayer, expanding the public API surface.
Test verifying prelude re-exports
bracket-terminal/src/lib.rs
Adds a #[cfg(test)] unit test that constructs XpFile/XpLayer, extracts an XpCell, and type-checks it to ensure crate::prelude re-exports the rexpaint types.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • utilForever

Poem

I nibble code beneath moon's light, 🐇
Three little types now hop in sight,
Cell, File, Layer — joined the show,
Prelude spreads so others know,
A tiny test gives cheer and might.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: re-exporting three specific RexPaint types (XpFile, XpLayer, XpCell) from bracket-terminal, which aligns with the changeset that adds these re-exports to bracket-terminal/src/rex.rs and validates them via tests in lib.rs.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@mors119
Copy link
Copy Markdown
Author

mors119 commented May 27, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

✅ Actions performed

Review triggered.

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@bracket-terminal/src/rex.rs`:
- Line 4: Add a colocated unit test that asserts the re-exports are publicly
reachable: create or update tests.rs (or the module's #[cfg(test)] tests) and
add a test function that references the three symbols XpCell, XpFile, and
XpLayer via the facade path (e.g., let _ : crate::rex::XpCell = /* use
default/constructed value or core type placeholder */; similarly for XpFile and
XpLayer) to ensure they compile when imported from the public re-export; keep
the test minimal (it only needs to name the types to verify the API surface).
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b9154e20-ba79-4ad7-bc7b-e7621f3e3f23

📥 Commits

Reviewing files that changed from the base of the PR and between fe7bf77 and 0db57cf.

📒 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 using cargo fmt --all
Fix all cargo clippy warnings — the CI enforces -D warnings
Add tests for new functionality in the relevant module; for split domains, prefer colocated tests.rs

Files:

  • bracket-terminal/src/rex.rs

Comment thread bracket-terminal/src/rex.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant