Skip to content

fix(input): clear SDK prompt suggestion only after a prompt is dispatched - #377

Merged
srothgan merged 1 commit into
mainfrom
fix/prompt-suggestion-lifecycle
Sep 13, 2026
Merged

srothgan merged 1 commit into
mainfrom
fix/prompt-suggestion-lifecycle

Conversation

@srothgan

Copy link
Copy Markdown
Owner

Summary

  • submit_input no longer drops the SDK prompt suggestion up front. The reset now lives in the Ok arms of dispatch_prompt_turn and dispatch_active_turn_prompt, so it only happens once a prompt is actually dispatched or queued.
  • Local slash commands (e.g. /config), submissions rejected at queue capacity, and send failures keep the suggestion in place.
  • The /config submit test now verifies the suggestion survives the fullscreen round-trip and is still rendered in the composer hint rows after returning to chat.
  • Event handler tests assert the suggestion survives chat resize, fullscreen resize, and fullscreen Ctrl+C exit.

Why

Submitting anything cleared the suggestion before the input was resolved, so opening /config or hitting a send failure silently discarded an SDK hint the user never acted on. Tying the reset to a successful dispatch keeps the suggestion visible until it is genuinely consumed.

Closes #

Validation

  • Automated: cargo fmt --all -- --check, cargo clippy --all-targets --all-features -- -D warnings, cargo test (1813 lib tests passing)
  • Manual: N/A
  • Screenshot/video (if UI changed): N/A

Notes

  • Breaking changes: N/A
  • Docs updated: N/A
  • Governance/release impact: N/A

🤖 Generated with Claude Code

…ched

- Move the `prompt_suggestion = None` reset out of `submit_input` and into the `Ok` arms of `dispatch_prompt_turn` and `dispatch_active_turn_prompt`, so the suggestion survives local slash commands, rejected submissions and send failures
- Rename the `/config` submit test to assert the suggestion is preserved and still renders in the composer hint rows after returning to chat
- Extend the pending-queue, capacity-rejection, send-failure and advertised-slash tests to pin down when the suggestion is cleared
- Assert the suggestion survives chat resize, fullscreen resize and fullscreen Ctrl+C exit in the event handler tests

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@srothgan srothgan added type: fix Fixes a bug or regression area: tui Terminal UI, rendering, input, and keymap labels Sep 13, 2026
@srothgan
srothgan merged commit 1c5bb76 into main Sep 13, 2026
40 of 44 checks passed
@srothgan
srothgan deleted the fix/prompt-suggestion-lifecycle branch September 13, 2026 09:23
srothgan added a commit that referenced this pull request Sep 13, 2026
- Reopen the Unreleased section
- Record the Agent SDK 0.3.270 migration under Features
- Record the prompt suggestion lifecycle fix under Fixes
srothgan added a commit that referenced this pull request Sep 13, 2026
* feat(agent-sdk): migrate to 0.3.270

- upgrade the Agent SDK dependency and bridge runtime guard to 0.3.270
- honor permission safety hints and SDK-controlled Task and Todo availability
- preserve plural message correlation, permission denials, retry errors, and rate-limit scope
- protect prompt caches with held plugin reloads and explicit force confirmation
- render staged writes, project memory, and expanded Artifact metadata

* docs(changelog): add unreleased entries for #377 and #378

- Reopen the Unreleased section
- Record the Agent SDK 0.3.270 migration under Features
- Record the prompt suggestion lifecycle fix under Fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tui Terminal UI, rendering, input, and keymap type: fix Fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant