Skip to content

Conversation

saoudrizwan
Copy link
Contributor

@saoudrizwan saoudrizwan commented Aug 9, 2025

After adding the terminal output capture fallback for commands that returned no output, it removed the need for us to use the various fallbacks we had in place around grace periods and hardcoded fast command handling that MAY have been the root cause of the issues users report about commands putting the webview in a blocked state.


Important

Refactor TerminalProcess to improve command handling by removing grace periods and using terminal output capture fallback.

  • Behavior:
    • Refactor run() in TerminalProcess.ts to remove grace periods and hardcoded fast command handling.
    • Use terminal output capture fallback when no output is produced.
    • Emit completed and continue events after command execution.
  • Error Handling:
    • Add fallback to capture terminal content if shell integration fails.
    • Detect and handle Ctrl+C interruption in command execution.
  • Misc:
    • Remove unused functions and variables related to grace periods and command type analysis.

This description was created by Ellipsis for 08f135a. You can customize this summary. It will automatically update as commits are pushed.

@Copilot Copilot AI review requested due to automatic review settings August 9, 2025 01:19
Copy link

changeset-bot bot commented Aug 9, 2025

🦋 Changeset detected

Latest commit: d5bf480

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
claude-dev Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR simplifies terminal command handling by removing complex fallback mechanisms that were causing webview blocking issues. The change eliminates grace periods, hardcoded fast command handling, and various timers that were previously used to manage command completion detection.

Key changes:

  • Simplified the command execution flow by removing multiple fallback mechanisms
  • Eliminated grace period timers and complex command completion detection logic
  • Streamlined the shell integration and non-shell integration code paths into a single unified approach

if (!didOutputNonCommand) {
const lines = data.split("\n")
for (let i = 0; i < lines.length; i++) {
if (command.includes(lines[i].trim())) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Use strict equality for command echo removal rather than relying on substring matching (using 'includes') to avoid accidentally removing legitimate output.

Suggested change
if (command.includes(lines[i].trim())) {
if (command.trim() === lines[i].trim()) {

Copy link
Contributor

github-actions bot commented Aug 9, 2025

Coverage Report

Extension Coverage

Base branch: 47%

PR branch: 48%

✅ Coverage increased or remained the same

Webview Coverage

Base branch: 17%

PR branch: 17%

✅ Coverage increased or remained the same

Overall Assessment

Test coverage has been maintained or improved

Last updated: 2025-08-09T01:28:13.682903

@saoudrizwan saoudrizwan changed the title Fix terminal commands putting webview in blocked state Revert unnecessary terminal command issue workarounds Aug 9, 2025
Copy link
Contributor

@abeatrix abeatrix left a comment

Choose a reason for hiding this comment

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

Tried starting a task that involves running terminal command and verified everything works as expected, both when auto-approve is enabled and disabled.

@saoudrizwan saoudrizwan merged commit a430226 into main Aug 9, 2025
13 checks passed
@arafatkatze
Copy link
Contributor

image

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.

3 participants