Skip to content

Terminal Emulator Task Output #2088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Jul 21, 2025

Conversation

thecoolwinter
Copy link
Collaborator

@thecoolwinter thecoolwinter commented Jul 15, 2025

Description

Utilizes the terminal emulator to both run tasks and display output.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Screen.Recording.2025-07-15.at.2.28.32.PM.mov

@thecoolwinter thecoolwinter requested a review from Copilot July 17, 2025 14:19
Copy link

@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

Enhances how tasks run in the terminal emulator by capturing live shell output and streamlining tests with an async helper

  • Adds waitForExpectation utility to replace XCTestExpectation patterns
  • Refactors TerminalEmulatorView into distinct .shell and .task modes and updates shell integration to honor an interactive flag
  • Converts CEActiveTask to publish a terminal view for live output, updates task management, and migrates tests to the new Testing framework

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.

File Description
CodeEditTests/Utils/waitForExpectation.swift New async helper for test predicates instead of XCTestExpectation
CodeEdit/Features/TerminalEmulator/Views/TerminalEmulatorView.swift Split view into shell/task modes and integrate caching
CodeEdit/Features/TerminalEmulator/Model/ShellIntegration.swift Added interactive parameter and history‐disable flag for both bash and zsh
CodeEdit/Features/Tasks/Models/CEActiveTask.swift Switched output from String to terminal view and updated process lifecycle
Comments suppressed due to low confidence (2)

CodeEdit/Features/Tasks/TaskManager.swift:23

  • Removing the default = nil for workspaceURL is a breaking change for callers that rely on omitting that argument. Consider restoring the default value (workspaceURL: URL? = nil) or updating all call sites.
    init(workspaceSettings: CEWorkspaceSettingsData, workspaceURL: URL?) {

CodeEditTests/Features/TerminalEmulator/ShellIntegrationTests.swift:20

  • All existing tests pass interactive: true, but there’s no coverage for interactive: false to assert that non-interactive sessions behave correctly. Consider adding tests for the false case.
            interactive: true

@thecoolwinter thecoolwinter merged commit 688dc84 into CodeEditApp:main Jul 21, 2025
3 of 4 checks passed
@thecoolwinter thecoolwinter deleted the terminal-task-output branch July 21, 2025 18:12
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.

🐞 Output utility doesn't show color 🐞 Tasks store whole output in one String
3 participants