Skip to content

🤖 refactor: clean up workspace status handoff rendering#3136

Open
ammar-agent wants to merge 1 commit intomainfrom
workspace-status-indicator-cleanup
Open

🤖 refactor: clean up workspace status handoff rendering#3136
ammar-agent wants to merge 1 commit intomainfrom
workspace-status-indicator-cleanup

Conversation

@ammar-agent
Copy link
Copy Markdown
Collaborator

@ammar-agent ammar-agent commented Apr 6, 2026

Summary

This follow-up to #3132 cleans up the workspace status indicator handoff without changing the behavior of the merged fix. It removes the mirrored JavaScript timeout used to retire the transient spinner slot, clears stale collapse state when another status row hides the slot first, and keeps the overall follow-up diff net negative.

Background

#3132 intentionally kept a temporary phase slot alive so the model label would not jump left when the sidebar moved from starting into live streaming. That fix worked, but the cleanup path still depended on a hard-coded timeout that duplicated the CSS transition duration. It also needed a guard so other status rows could hide the transient slot without leaving stale collapse state behind.

Implementation

  • switch the transient phase-slot cleanup to onTransitionEnd so the component stops guessing when the CSS collapse finished
  • clear the collapse state immediately when agentStatus or other blocking status UI hides the slot before any transition event can fire
  • keep the steady-state streaming layout on the shared render path instead of maintaining a separate fast path
  • fold the related spec down to shared helpers so this follow-up stays net negative overall (115 insertions / 122 deletions)

Validation

  • bun test ./src/browser/components/WorkspaceStatusIndicator/WorkspaceStatusIndicator.test.tsx
  • bun test ./src/browser/stores/WorkspaceStore.test.ts --filter "stream starting state"
  • bun test ./src/browser/components/AgentListItem/AgentListItem.test.tsx
  • make static-check

Risks

Low. This only touches the sidebar status indicator's transient start-to-stream cleanup path and its tests; the pending-model label behavior from #3132 stays intact.


Generated with mux • Model: openai:gpt-5.4 • Thinking: xhigh • Cost: $19.05

@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

@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.

Reviewed commit: e5094def01

ℹ️ 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".

@ammar-agent ammar-agent force-pushed the workspace-status-indicator-cleanup branch from e5094de to 58157b3 Compare April 6, 2026 13:57
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Please take another look.

@chatgpt-codex-connector
Copy link
Copy Markdown

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

ℹ️ 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".

Remove the mirrored timeout from the sidebar handoff slot, clear the transient collapse state when another status row hides the slot, and fold the related spec back down so the follow-up diff stays net negative.

---

_Generated with `mux` • Model: `openai:gpt-5.4` • Thinking: `xhigh` • Cost: `$19.05`_

<!-- mux-attribution: model=openai:gpt-5.4 thinking=xhigh costs=19.05 -->
@ammar-agent ammar-agent force-pushed the workspace-status-indicator-cleanup branch from 58157b3 to a0da41f Compare April 6, 2026 14:47
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Please take another look.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ 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".

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