Skip to content

fix: close cli rich input with ctrl-g from editor#10030

Merged
advait-m merged 2 commits intowarpdotdev:masterfrom
nihalxkumar:fix/ctrl-g
May 5, 2026
Merged

fix: close cli rich input with ctrl-g from editor#10030
advait-m merged 2 commits intowarpdotdev:masterfrom
nihalxkumar:fix/ctrl-g

Conversation

@nihalxkumar
Copy link
Copy Markdown
Contributor

Description

Fixes #9286 - Ctrl-G now closes CLI agent rich input when dispatched from the focused editor context. Previously the keybinding only matched the terminal context, so rich input couldn't be closed with Ctrl-G when the editor was focused.

This issue was reproduced on Arch Linux based system. The issue wasn't reproducible on MacOS.

Linked Issue

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Screenshots / Videos

Before:

warp-richinput-amp.webm

After:

warp-ctrlg-fix.webm

Testing

Added regression test ctrl_g_closes_cli_agent_rich_input_when_editor_is_focused() that verifies Ctrl-G closes rich input when dispatched from the focused editor context.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX: Fixed Ctrl-G not closing CLI agent rich input on linux when editor is focused (fixes #9286)

@cla-bot cla-bot Bot added the cla-signed label May 4, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 4, 2026

@nihalxkumar

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I reviewed this pull request and requested human review from: @warpdotdev/oss-maintainers.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 4, 2026
@nihalxkumar
Copy link
Copy Markdown
Contributor Author

@advait-m this fixes it and is complete

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR updates the Ctrl-G CLI agent rich input binding so it can close rich input when the embedded editor is focused, while preserving the existing terminal-context open behavior. It also adds a regression test that dispatches Ctrl-G through the focused editor responder chain and verifies the rich input session closes.

Concerns

  • No blocking concerns found.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@oz-for-oss oz-for-oss Bot requested review from a team and vkodithala and removed request for a team May 4, 2026 13:12
@advait-m advait-m requested review from advait-m and removed request for vkodithala May 4, 2026 15:49
Copy link
Copy Markdown
Member

@advait-m advait-m left a comment

Choose a reason for hiding this comment

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

this is great! Thank you for the vids - super helpful!

Could you fix the failing unit test?

    thread 'terminal::view::tests::ctrl_g_closes_cli_agent_rich_input_when_editor_is_focused' (55316) panicked at /home/runner/work/warp/warp/crates/warpui_core/src/core/app.rs:4614:17:
    Cannot get singleton model of type "warp::settings::import::model::ImportedConfigModel" that was never registered
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Should be able to run this test specifically locally to work on this error (should just be registering the singleton model I believe - Oz should be able to handle this).

I think besides that, this is looking shippable to me - ping me if you need help re-running CI!

@advait-m
Copy link
Copy Markdown
Member

advait-m commented May 4, 2026

I think once CI checks are green, I can approve and we can get this in for this week's release!

@nihalxkumar
Copy link
Copy Markdown
Contributor Author

Good to go 🫡

@advait-m
Copy link
Copy Markdown
Member

advait-m commented May 5, 2026

Good to go 🫡

Approved CI to re-run

(late night for me, so I'll check back in morning)

Copy link
Copy Markdown
Member

@advait-m advait-m left a comment

Choose a reason for hiding this comment

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

shipit!

@advait-m advait-m merged commit 13b756f into warpdotdev:master May 5, 2026
22 checks passed
@advait-m
Copy link
Copy Markdown
Member

advait-m commented May 5, 2026

Congrats on your first contribution to Warp @nihalxkumar - looking forward to many more! 🎉

@advait-m
Copy link
Copy Markdown
Member

advait-m commented May 5, 2026

This should be live in Thursday's Warp release

@nihalxkumar
Copy link
Copy Markdown
Contributor Author

I hope it improves the workflow and adoption for linux users ❤️

@advait-m
Copy link
Copy Markdown
Member

advait-m commented May 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't exit Rich text prompt with Ctrl + g

2 participants