Skip to content

Open a side conversation beside its parent, and hand findings back through a compose buffer - #3

Merged
liaowang11 merged 2 commits into
mainfrom
compose-handback
Sep 12, 2026
Merged

liaowang11 merged 2 commits into
mainfrom
compose-handback

Conversation

@liaowang11

Copy link
Copy Markdown
Owner

Two changes, plus a review round on top of them.

Where a side conversation opens

New agent-shell-side-display-action, defaulting to a 40% window on the
right. The parent keeps using upstream's agent-shell-display-action; it
is an ordinary shell. Closing a side conversation deletes its side window
rather than handing the parent a narrow strip. Toggling with both on
screen now selects the other window instead of duplicating the side.

Setting the option to display-buffer-same-window reproduces the old
behaviour exactly, so nothing needed a special case. Under viewport
interaction the action is not consulted: the viewport owns its layout.

One handback path

Findings always go into the parent's compose buffer now, whatever
agent-shell-prefer-viewport-interaction says. That setting decides
where the user's own prompts go and has no business deciding what happens
to findings.

This deletes the wait-for-idle machinery: --stage-when-idle,
--parent-busy-p, the pending flag, its mode-line marker, and the
agent-shell-side-handback-submit option. A compose buffer takes text
mid-turn and offers send, queue, or steer from its own keys. Waiting
could only ever offer send, and only later.

Review fixes (624b7e0)

  • conclude signalled "Not yet supported" when run from a compose
    buffer. agent-shell-insert dispatches on the current buffer, not the
    target. Both call sites now address the side shell directly.
  • Appending findings reset the compose disposition, silently turning a
    queued draft into a steer. The in-progress draft's disposition is now
    carried through.
  • The new side-window branch in --close was dead: kill-buffer already
    deletes a dedicated side window. Removed.
  • Live probes and docs updated; the compose buffer being selected on
    arrival is now stated in the README.

Verification

make check green, 107/107. The three new tests fail against 30236f8,
as does an existing viewport test that had been passing vacuously
because the stub did not dispatch. Byte-compiles clean against the real
agent-shell, shell-maker and acp; checkdoc clean.

Not verified: make live-check has not been re-run against a real agent
since the handback moved. Its probes were updated to match but the run
has not happened, and DESIGN.md and the README now say so.

@liaowang11
liaowang11 merged commit 624b7e0 into main Sep 12, 2026
1 check passed
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