You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[CTX-1341] fix(ui): fail closed for unwired left/right band slots (#2226) - #2234
Mounting into left/right returned a successful handle but never painted, reserved no columns, and had no hit target. They now map to Unsupported, so the existing mount gate returns typed E_UI_UNAVAILABLE (class runtime) before any handle is minted or block stored.
Changes
band_slots.rs: left/right placement is Unsupported, message names the slot and the missing vertical band host.
services.rs: mount comment plus retained-count expectation (top/bottom/overlay).
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
📝 Walkthrough
Left and right UI slots now fail closed with E_UI_UNAVAILABLE because no vertical band host exists. The runtime no longer routes these slots to vertical bands. Updated tests verify rejection and confirm that no UI blocks are retained.
Changes: Vertical UI slot rejection
Layer / File(s)
Summary
Reject vertical slots at mount crates/bitty-lua/src/ui.rs, crates/bitty-runtime/src/plugin_runtime/services.rs, crates/bitty-runtime/src/runtime.rs, crates/bitty-runtime/src/runtime/band_slots.rs, crates/bitty-runtime/src/runtime/band_host.rs, crates/bitty-runtime/src/runtime/present.rs
Left and Right map to unsupported placement. Mounts fail with E_UI_UNAVAILABLE. Documentation describes the top/bottom-only band behavior.
Verify rejection and routing crates/bitty-runtime/src/plugin_runtime/services.rs, crates/bitty-runtime/src/runtime/band_slots.rs, crates/bitty-runtime/tests/plugin_ui.rs
Tests verify unsupported placement, typed errors, empty vertical bands, and no retained UI blocks.
Left and right mounts now report an unavailable-slot error instead of silently succeeding. No actionable merge-blocking issue remains in the supplied evidence.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Linked Issues check
Issue #2226 requires silent success to be impossible, a regression test, retention-test updates, and slot-table documentation sync. The diff maps left and right to Unsupported, preserves typed `…
Update the canonical slot-table documentation required by #2226, or include that documentation change in this PR.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the main change: UI mounts to unwired left and right band slots now fail closed.
Out of Scope Changes check
The implementation changes, comments, retention expectation, and regression tests all support #2226. They change only vertical-slot admission and its related documentation and tests. No unrelated beha…
Docstring Coverage
Docstring coverage is 90.91% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 7 files.
Full details: Out of Scope Changes check
Explanation
The implementation changes, comments, retention expectation, and regression tests all support #2226. They change only vertical-slot admission and its related documentation and tests. No unrelated behavior change is established.
Full details: Linked Issues check
Explanation
Issue #2226 requires silent success to be impossible, a regression test, retention-test updates, and slot-table documentation sync. The diff maps left and right to Unsupported, preserves typed E_UI_UNAVAILABLE errors, and adds unit and integration coverage that verifies failure and an empty registry. The repository slot-table comments are synchronized, but the canonical documentation update remains a separate follow-up (bitty-terminal-docs#245), so the linked issue's documentation acceptance criterion is not complete.
Resolution
Update the canonical slot-table documentation required by #2226, or include that documentation change in this PR.
Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
Commit to this branch
Create a new PR
🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
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
area:uiArea: UI / layoutfixBug fixP1Priority: high
1 participant
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.
Priority: P1 | Area: area:ui | Labels: fix,P1,area:ui | Milestone: v0.1.0 | RFC: plugin UI surface v1 | Task: CTX-1341
Closes #2226
What
Mounting into
left/rightreturned a successful handle but never painted, reserved no columns, and had no hit target. They now map toUnsupported, so the existing mount gate returns typedE_UI_UNAVAILABLE(classruntime) before any handle is minted or block stored.Changes
band_slots.rs:left/rightplacement isUnsupported, message names the slot and the missing vertical band host.services.rs: mount comment plus retained-count expectation (top/bottom/overlay).plugin_ui.rs: removed the retention lock-in; addedvertical_band_slots_fail_closed_at_mount(ok=false,E_UI_UNAVAILABLE, slot-named message, empty registry).runtime.rs,band_host.rs,present.rs,bitty-lua/src/ui.rs.Verification
-D warnings(runtime all targets), Windows workspace all-targets: passcargo nextest run -p bitty-runtime --locked: 2524 passed, 1 skippedBand(Left/Right)fails both the new unit and integration assertionstop/bottom/overlay, routing, or typed errorsFollow-up
Canonical docs update tracked as bitty-terminal-docs#245 (slot table currently says stored-but-not-painted).
Summary by CodeRabbit