feat(chat): fold checkpoint resume into the input — Continue + abandon (#255) - #264
Merged
Conversation
#255) The inline ▶ Continue button competed with the chat input even though sending any message already resumes a suspended turn, and there was no way to abandon a suspended turn without reloading. - send button becomes 3-state: Send (idle) / ■ Stop (busy) / Continue (suspended+idle); Continue or Enter on empty input resumes, a typed steer resumes with that steer - new ✕ abandon control, visible only while suspended, clears agent.suspendedTurn so the next message starts a fresh turn - _syncInputControls() centralizes the three states (was scattered across handleSend); placeholder hints the resume affordance while paused - remove the standalone renderContinueButton / .checkpoint-actions block Tests: chat-ui-controls covers the state machine, abandon, and the empty-input/typed-steer resume paths.
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
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.
Fixes #255.
Problem
When the agent pauses at a checkpoint, the UI rendered a standalone
▶ Continuebutton inside the message stream — competing with the chat input even though sending any message already resumes the suspended turn (same code path). And once paused, there was no way to abandon the suspended work: any new message got folded into the old turn as a steer, with no escape short of reloading.Change
The resume affordance now lives in the input row:
_syncInputControls():"continue"); typing a steer first resumes with that steer instead.agent.suspendedTurnso the next message starts a fresh turn.renderContinueButton/.checkpoint-actionsblock and its now-dead CSS.State that was scattered through
handleSend(the busy on/off button mutations) is now centralized in_syncInputControls().Tests
test/chat-ui-controls.test.js(jsdom) drives the prototype methods on a minimal instance (mirroring the map-manager unit tests):_syncInputControls: idle→Send, busy→Stop (abandon hidden even if suspended), suspended→Continue+abandon+hint.abandonSuspendedTurn: clears the turn / resets to Send / notes it; no-op while busy.handleSend: empty input resumes with"continue"; empty + no suspended turn is a no-op; a typed steer wins over the canned resume.Full suite green (334).
Manual verification (browser-bound, per AGENTS.md)
On a downstream app with a low
max_tool_calls(e.g.3) so a checkpoint triggers: