Skip to content

Conversation

@ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented Dec 10, 2025

When clicking the terminate button on a background process, the X icon immediately swaps to a spinner and the row dims, giving instant visual feedback.

Changes

  • Track terminatingIds in useBackgroundBashHandlers hook
  • Pass to BackgroundProcessesBanner for visual styling
  • Show spinning Loader2 icon instead of X while terminating
  • Dim row with opacity-50 + pointer-events-none
  • Clear stale IDs when processes change (via subscription) to handle process restarts

Why only clear on failure?

Clearing on success causes a flash: the promise resolves slightly before the subscription arrives, briefly showing the X again. By only clearing on failure, the spinner stays until the subscription removes the row.

Generated with mux

- Show dimmed row + disabled X button immediately on click
- Only clear terminating state on failure (to allow retry)
- On success, subscription removes the process while still dimmed (no flash)

_Generated with mux_
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- Clear terminatingIds for processes no longer in the list (via subscription)
- Clear all terminatingIds on workspace change
- Fixes issue where restarting a process with same name would render dimmed
@ethanndickson
Copy link
Member Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…emoved

Processes transition to killed/exited/failed before being removed from the list.
Without this fix, a new process with the same name would render as terminating.
@ethanndickson
Copy link
Member Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ethanndickson ethanndickson added this pull request to the merge queue Dec 10, 2025
Merged via the queue into main with commit 34895ca Dec 10, 2025
33 of 35 checks passed
@ethanndickson ethanndickson deleted the background-process-c08n branch December 10, 2025 06:36
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.

1 participant