Add on-demand and hidden input window display modes - #262
Merged
Conversation
New pi-coding-agent-input-window-display user option with three values: - `always' (the default): the input window is shown whenever the session is displayed (unchanged behavior). - `on-demand': the input window is shown at launch, hidden after each send, and reopened with the new pi-coding-agent-open-input command. Redisplaying an existing session (e.g. via pi-coding-agent-toggle) shows only the chat window. - `hidden': like `on-demand', but a session also launches with only the chat window visible, so you start in a chat-centric view and open the input only when composing. Also fix pi-coding-agent--best-input-window returning a non-input window when no input window was visible.
SayreBlades
force-pushed
the
input-window-on-demand
branch
from
August 9, 2026 18:49
e312579 to
91086c6
Compare
dnouri
reviewed
Aug 9, 2026
dnouri
left a comment
Owner
There was a problem hiding this comment.
Sorry but this is outright bullshit. The author of this PR has not understood what this project is about at all. But thanks I guess.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a
pi-coding-agent-input-window-displayuser option so the input window can be ephemeral rather than always-on, enabling a chat-centric workflow where the input pane appears only while composing.always(default, unchanged): the input window is shown whenever the session is displayed.on-demand: the input window is shown at launch, hidden after each send, and reopened with the newM-x pi-coding-agent-open-input;pi-coding-agent-toggle/ redisplay show chat-only.hidden: likeon-demand, but a session also launches chat-only — the input never appears until you summon it (i/aunder Evil, orM-x pi-coding-agent-open-input).Motivation
Today the input pane is permanent chrome even when you're only reading agent output (scrolling tool output, following streaming thinking, reviewing a diff). On a small laptop that's a meaningful chunk of the chat you're actually trying to read, and the input buffer is useful only for the few seconds you spend composing a prompt.
The only current recourse for a chat-centric view is fragile user advice:
That advice is incomplete in two ways:
show-session-buffers→display-buffers, which unconditionally splits. So after the advice closes the input on send, the next focus/launch re-opens the input split — the user closes it by hand over and over.window-parentguard) and silently breaks when those internals move.Additionally, non-Evil users have no way to dismiss the input at all today — only the Evil integration has
pi-coding-agent-evil-close-input(q).This PR makes the input a first-class transient pane — completing the existing dismissable-input design (Evil
i/ato focus,qto close) — and lets users delete their hand-rolled advice in favor of one variable.Changes
pi-coding-agent-input-window-display(always/on-demand/hidden).pi-coding-agent-open-input: focus an existing input window, else split one below the chat window, else restore the full layout.pi-coding-agent--display-buffersgains an optionalchat-onlyargument; the input-splitting logic is extracted into api-coding-agent--split-input-below-chathelper (reused byopen-input).pi-coding-agent--input-window-on-demand-pgroups the two ephemeral modes (on-demandandhidden) for shared behavior: hide after send, and chat-only on redisplay/toggle.pi-coding-agent--show-session-buffershonorshidden(chat-only launch). Note: when both windows are already visible, the existing layout is preserved and input is focused — it never yanks an intentionally-opened input away.pi-coding-agent-sendviapi-coding-agent--maybe-hide-input-window.pi-coding-agent--best-input-windowcould return a non-input window when no input window was visible; it now returnsnil. Underon-demand/hidden, "no input window visible" is a normal state rather than an error state, so this becomes load-bearing.Design notes
pi-coding-agent-thinking-displayandpi-coding-agent-project-trust-policy(both symbol enums).hiddenreuseson-demand's ephemeral behavior; the only delta is the launch window, which is the dedicated knob this exposes. A cross-product of booleans (hide-after-send×chat-only-at-launch) would be harder to read and extend (side-by-side / input-only layouts later).Compatibility & testing
always— no behavior change for existing users.pi-coding-agent--display-buffers's new arg is optional and backward compatible.pi-coding-agent-ui-test.el(batch-runnable viamake test-ui), all passing:hiddenon-demandand underhiddenalwaysopen-inputsplits-below-chat and focuses-existing-inputdisplay-bufferschat-onlybyte-compile-error-on-warn; checkdoc clean on changed source files.Window-layout logic is unit-covered;
make test-guiis unaffected by this change.