Skip to content

feat(acp): add config option settings modal#276

Merged
carlos-algms merged 19 commits into
mainfrom
feat/acp-config-settings-modal
Jul 19, 2026
Merged

feat(acp): add config option settings modal#276
carlos-algms merged 19 commits into
mainfrom
feat/acp-config-settings-modal

Conversation

@carlos-algms

Copy link
Copy Markdown
Owner
  • retain every ACP config option
  • support boolean config updates
  • add session-safe settings modal
  • expose configurable widget keymap
  • document and test new workflow
  • validate live provider interactions

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 963b0bf1-cbf1-4a98-bfb6-44061ccc410a

📥 Commits

Reviewing files that changed from the base of the PR and between 2400c6f and 543bb35.

📒 Files selected for processing (2)
  • lua/agentic/ui/config_options_modal.lua
  • lua/agentic/ui/config_options_modal.test.lua

📝 Walkthrough

Walkthrough

Adds ACP session configuration capabilities and boolean option types alongside selectable options. The client uses a parameter-table API for setting options. AgentConfigOptions stores and snapshots all options, routes changes through unified handling, and preserves legacy callbacks. A floating options modal supports boolean toggles, selectors, navigation, session checks, and re-rendering. The widget adds <localLeader>o to open the modal, with updated defaults and documentation.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Modal as ConfigOptionsModal
  participant Config as AgentConfigOptions
  participant ACP as ACPClient
  User->>Modal: Activate option
  Modal->>Config: handle_change(configId, value, on_done)
  Config->>ACP: set_config_option(params, callback)
  ACP-->>Config: Return configOptions
  Config->>Config: Apply options and invoke callbacks
  Config-->>Modal: Confirm change
  Modal->>Modal: Schedule re-render
Loading

Possibly related PRs

Poem

A rabbit taps <localLeader>o with glee,
A settings modal blooms by the tree.
Boolean switches hop and glow,
Selectors guide the values’ flow,
ACP carries each choice away. 🐰

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% 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 is concise and accurately summarizes the main change: adding a config option settings modal.
Description check ✅ Passed The description is clearly related to the changeset and covers the new modal, boolean updates, keymap, docs, tests, and provider validation.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/acp-config-settings-modal

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.

Comment thread lua/agentic/acp/acp_client.lua
Comment thread lua/agentic/acp/acp_client.lua Outdated
Comment thread lua/agentic/acp/acp_client_types.lua Outdated
Comment thread lua/agentic/acp/agent_config_options.lua Outdated
Comment thread lua/agentic/acp/agent_config_options.lua Outdated
Comment thread lua/agentic/acp/agent_config_options.lua
Comment thread lua/agentic/acp/agent_config_options.lua Outdated
Comment thread lua/agentic/acp/agent_config_options.lua
Comment thread lua/agentic/ui/config_options_modal.lua Outdated
Comment thread lua/agentic/ui/config_options_modal.lua Outdated
@carlos-algms
carlos-algms marked this pull request as ready for review July 14, 2026 20:51

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 `@lua/agentic/acp/agent_config_options.lua`:
- Around line 596-615: Update the asynchronous option-change handlers around
_make_change_response to capture the initiating option ID and generation, track
the latest request per ID, and re-resolve the current target before applying
success or selector results. Ignore stale responses, prevent old values from
being applied to replaced options or newer choices, and guard against nil
targets when IDs change. Add regression coverage for both the in-flight request
race and selector race.
🪄 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: ASSERTIVE

Plan: Pro

Run ID: 650c793d-def0-4fd3-ae09-a4245adae79e

📥 Commits

Reviewing files that changed from the base of the PR and between a37f19f and 1b0c0e6.

📒 Files selected for processing (12)
  • README.md
  • doc/agentic.txt
  • lua/agentic/acp/acp_client.lua
  • lua/agentic/acp/acp_client.test.lua
  • lua/agentic/acp/acp_client_types.lua
  • lua/agentic/acp/agent_config_options.lua
  • lua/agentic/acp/agent_config_options.test.lua
  • lua/agentic/config_default.lua
  • lua/agentic/config_selector.test.lua
  • lua/agentic/session_manager.lua
  • lua/agentic/ui/config_options_modal.lua
  • lua/agentic/ui/config_options_modal.test.lua

Comment thread lua/agentic/acp/agent_config_options.lua

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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 `@lua/agentic/ui/config_options_modal.lua`:
- Around line 128-130: Update the modal sizing logic near build_lines and height
so width is at least the maximum rendered line width, while retaining the
existing vim.o.columns percentage as the default sizing basis. Compute the
longest entry in lines and use that value as a lower bound for width, ensuring
long configuration values do not wrap or exceed the modal height.
- Around line 219-228: Update the navigation logic around _option_rows and
cursor_row so non-option cursor positions search explicitly for the nearest
option row in the requested direction before calculating target. Preserve direct
index handling when cursor_row is an option, and ensure j/k choose the
next/previous option rather than defaulting current to 1.
🪄 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: ASSERTIVE

Plan: Pro

Run ID: a0c67035-bbe1-4e90-a4c4-86a94e1263db

📥 Commits

Reviewing files that changed from the base of the PR and between bda0a4e and 064c7c6.

📒 Files selected for processing (2)
  • lua/agentic/ui/config_options_modal.lua
  • lua/agentic/ui/config_options_modal.test.lua

Comment thread lua/agentic/ui/config_options_modal.lua
Comment thread lua/agentic/ui/config_options_modal.lua Outdated
@carlos-algms
carlos-algms merged commit 246feb4 into main Jul 19, 2026
10 checks passed
@carlos-algms
carlos-algms deleted the feat/acp-config-settings-modal branch July 19, 2026 15:06
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