Skip to content

[CTX-1341] fix(ui): fail closed for unwired left/right band slots (#2226) - #2234

Merged
Xuepoo merged 1 commit into
mainfrom
ctx-1341/fix-vertical-band-slots
Oct 19, 2026
Merged

Xuepoo merged 1 commit into
mainfrom
ctx-1341/fix-vertical-band-slots

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

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/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).
  • plugin_ui.rs: removed the retention lock-in; added vertical_band_slots_fail_closed_at_mount (ok=false, E_UI_UNAVAILABLE, slot-named message, empty registry).
  • Code comments synchronized in runtime.rs, band_host.rs, present.rs, bitty-lua/src/ui.rs.

Verification

  • fmt, clippy -D warnings (runtime all targets), Windows workspace all-targets: pass
  • cargo nextest run -p bitty-runtime --locked: 2524 passed, 1 skipped
  • Mutation: restoring Band(Left/Right) fails both the new unit and integration assertions
  • No behavior change to top/bottom/overlay, routing, or typed errors

Follow-up

Canonical docs update tracked as bitty-terminal-docs#245 (slot table currently says stored-but-not-painted).

Summary by CodeRabbit

  • Bug Fixes
    • Mounting UI elements in the left or right slots now fails with a clear unavailable error. These slots are no longer retained as chrome bands.
    • Top, bottom, and overlay placements remain available.

@Xuepoo Xuepoo added this to the v0.1.0 milestone Oct 18, 2026
@Xuepoo Xuepoo added fix Bug fix P1 Priority: high area:ui Area: UI / layout labels Oct 18, 2026
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 02516ae6-3cc1-44ea-81a0-beddf3560fc0
📥 Commits

Reviewing files that changed from the base of the PR and between f424321 and 319eb2b.

📒 Files selected for processing: 7
  • 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_host.rs
  • crates/bitty-runtime/src/runtime/band_slots.rs
  • crates/bitty-runtime/src/runtime/present.rs
  • crates/bitty-runtime/tests/plugin_ui.rs

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.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 319eb

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: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Linked Issues check Warning 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 Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 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 Passed 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 Passed 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.

❤️ Share

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

@Xuepoo
Xuepoo merged commit da63e42 into main Oct 19, 2026
17 checks passed
@Xuepoo
Xuepoo deleted the ctx-1341/fix-vertical-band-slots branch October 19, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ui Area: UI / layout fix Bug fix P1 Priority: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ui): mounting into left/right band slots succeeds but the block is never painted

1 participant