Skip to content

FIX: Hide Stop Button Once Response Streaming Begins#67

Merged
wicky-zipstack merged 3 commits intomainfrom
fix/hide-stop-button-when-response-streaming
Apr 17, 2026
Merged

FIX: Hide Stop Button Once Response Streaming Begins#67
wicky-zipstack merged 3 commits intomainfrom
fix/hide-stop-button-when-response-streaming

Conversation

@tahierhussain
Copy link
Copy Markdown
Contributor

What

  • Added isResponseStreaming computed state to detect when response has started streaming
  • Updated Stop button condition to only show during thought chain phase
  • Once response starts streaming, the Send button is displayed instead of Stop button

Why

  • Previously, the Stop button was shown throughout the entire prompt execution (thought chain + response streaming)
  • Users don't need the Stop button once the response has started streaming
  • This provides a cleaner UX by showing the Send button earlier, allowing users to prepare their next prompt

How

  • Added isResponseStreaming useMemo in ExistingChat.jsx that computes:
    • isPromptRunning && lastMessage?.response?.length > 0
  • Threaded isResponseStreaming prop through the component hierarchy:
    • ExistingChat.jsx -> InputPrompt.jsx -> PromptInput.jsx -> MonacoPromptInput.jsx / DefaultPromptInput.jsx
  • Updated button condition from isPromptRunning to isPromptRunning && !isResponseStreaming

Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)

  • No, this PR should not break existing features
  • The change only affects the visual display of the Stop/Send button
  • All existing functionality (prompt submission, stopping prompts during thought chain) remains intact
  • The prop defaults to false, so NewChat.jsx (which has no chat messages) works without changes

Database Migrations

  • None

Env Config

  • None

Relevant Docs

  • None

Related Issues or PRs

  • None

Dependencies Versions

  • No new dependencies added

Notes on Testing

  • Start a new prompt and verify Stop button appears during thought chain phase
  • Once response starts streaming (text appears below thought chain), verify Send button replaces Stop button
  • Test with both Monaco editor and default input modes
  • Verify NewChat component still works correctly (no regressions)

Screenshots

The "Stop" button is replaced by the "Send" button once the response starts streaming.
image

Checklist

I have read and understood the Contribution Guidelines.

When a prompt is running, the Stop button was shown throughout the entire
process (thought chain + response streaming). Now the Stop button is only
shown during the thought chain phase. Once the response starts streaming,
the Send button is displayed instead.

Changes:
- Add isResponseStreaming computed state in ExistingChat.jsx
- Thread isResponseStreaming prop through InputPrompt, PromptInput
- Update button condition in MonacoPromptInput and DefaultPromptInput

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@tahierhussain tahierhussain self-assigned this Apr 16, 2026
@tahierhussain tahierhussain requested a review from a team as a code owner April 16, 2026 20:00
@tahierhussain tahierhussain added the bug Something isn't working label Apr 16, 2026
@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 16, 2026

Greptile Summary

This PR introduces an isResponseStreaming computed state in ExistingChat.jsx that hides the Stop button once the AI response starts streaming text, replacing it with a (disabled) Send button. The logic is correctly threaded through five components in the hierarchy, with prop defaults cleanly applied at each layer.

Confidence Score: 5/5

Safe to merge — logic is correct, all edge cases handled, no regressions introduced.

No P0 or P1 issues found. The isResponseStreaming computation is correct, dependency arrays are complete, and the disabled-button change prevents double submissions.

No files require special attention.

Important Files Changed

Filename Overview
frontend/src/ide/chat-ai/ExistingChat.jsx Adds isResponseStreaming useMemo with correct dependencies and passes it down to InputPrompt.
frontend/src/ide/chat-ai/InputPrompt.jsx Threads isResponseStreaming prop with a default of false, correctly covering the NewChat use case.
frontend/src/ide/chat-ai/PromptInput.jsx Passes isResponseStreaming to both child components; no default in destructuring but safe given InputPrompt always provides one.
frontend/src/ide/chat-ai/MonacoPromptInput.jsx Correctly updates button condition and Send button disabled state; default for isResponseStreaming now added.
frontend/src/ide/chat-ai/DefaultPromptInput.jsx Mirrors MonacoPromptInput changes for the default (non-Monaco) input path; both conditions updated consistently.

Reviews (3): Last reviewed commit: "fix: prevent concurrent submissions in M..." | Re-trigger Greptile

Comment thread frontend/src/ide/chat-ai/MonacoPromptInput.jsx
tahierhussain and others added 2 commits April 17, 2026 01:38
- Add explicit default `= false` for isResponseStreaming in MonacoPromptInput and DefaultPromptInput
- Disable SendButton when isPromptRunning to prevent concurrent prompt submission

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add isPromptRunning to disabled condition to match DefaultPromptInput behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@wicky-zipstack wicky-zipstack left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@abhizipstack abhizipstack left a comment

Choose a reason for hiding this comment

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

LGTM

@wicky-zipstack wicky-zipstack merged commit 8b90b04 into main Apr 17, 2026
8 checks passed
@wicky-zipstack wicky-zipstack deleted the fix/hide-stop-button-when-response-streaming branch April 17, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants