Skip to content

feat: add floating layout#16

Merged
smnatale merged 3 commits into
mainfrom
feat/floating-layout
Apr 14, 2026
Merged

feat: add floating layout#16
smnatale merged 3 commits into
mainfrom
feat/floating-layout

Conversation

@smnatale
Copy link
Copy Markdown
Owner

@smnatale smnatale commented Apr 14, 2026

Description

When viewing review, open as floating window by default

Screenshots/Images

image

Summary by CodeRabbit

Release Notes

  • New Features

    • Added configurable display layouts for review results: floating window or buffer view.
    • Introduced float customisation options for width, height, and border styling.
  • Documentation

    • Updated :CodeRabbitShow command documentation to reflect new display mode flexibility.
    • Added comprehensive configuration guidance for the new show settings block.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 14, 2026

Warning

Rate limit exceeded

@smnatale has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 37 minutes and 22 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 37 minutes and 22 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5fecd23a-c6e2-413a-af9a-01def16955f0

📥 Commits

Reviewing files that changed from the base of the PR and between 22a83b6 and 470ff6c.

📒 Files selected for processing (1)
  • lua/coderabbit/show.lua
📝 Walkthrough

Walkthrough

This PR introduces configurable display layouts for CodeRabbit review results. Users can now select between floating windows or buffer display via the show.layout configuration option, replacing the previous hardcoded vertical split behaviour. Float windows support customisation of width, height, and border style.

Changes

Cohort / File(s) Summary
Documentation
README.md, doc/coderabbit.txt
Updated command and configuration documentation to describe the new show configuration block and its layout options ("float" or "buffer"), with float-specific settings for width, height, and border.
Configuration Defaults
lua/coderabbit/config.lua
Added new show configuration subtree with layout (default "float") and float options (width, height, border).
Display Implementation
lua/coderabbit/show.lua
Introduced helper functions set_win_opts() and open_float() for window management, and open_window() to conditionally open floating or buffer display based on layout configuration. Refactored M.open to use these new functions and adjusted bufhidden behaviour per layout type.
Test Coverage
tests/coderabbit/show_spec.lua
Added comprehensive test suite covering float layout creation, buffer layout in-place display, window configuration assertions, and default layout verification.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~23 minutes

Possibly related PRs

  • PR #8: Directly modifies the show command implementation and buffer versus float window handling in lua/coderabbit/show.lua.
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat: add floating layout' accurately captures the main change: introducing a floating window layout option for displaying CodeRabbit review results.

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


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.

@smnatale
Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 14, 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
Contributor

@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 the current code and only fix it if needed.

Inline comments:
In `@lua/coderabbit/show.lua`:
- Line 214: The existing branch that reuses an already-valid buffer calls
open_window(buf_id) but does not reapply window options, causing float windows
or buffer layouts to miss normalized settings; after calling open_window(buf_id)
(the same branch where you handle reopening a hidden buffer), call
set_win_opts(0) to reapply/normalize window options for the newly opened window
so float/config options like wrap and conceallevel are enforced consistently.
🪄 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: c56bc79f-5726-4043-b26e-b89f0b26481c

📥 Commits

Reviewing files that changed from the base of the PR and between ea3a4c0 and 22a83b6.

📒 Files selected for processing (5)
  • README.md
  • doc/coderabbit.txt
  • lua/coderabbit/config.lua
  • lua/coderabbit/show.lua
  • tests/coderabbit/show_spec.lua

Comment thread lua/coderabbit/show.lua
@smnatale smnatale merged commit 10cbfd1 into main Apr 14, 2026
4 checks passed
@smnatale smnatale deleted the feat/floating-layout branch April 14, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant