Skip to content

fix(tasks): stop spinner after provisioning error#2481

Merged
arnestrickmann merged 1 commit into
mainfrom
jan/eng-1575-stop-activity-indicator-after-workspace-creation-failure
Jun 15, 2026
Merged

fix(tasks): stop spinner after provisioning error#2481
arnestrickmann merged 1 commit into
mainfrom
jan/eng-1575-stop-activity-indicator-after-workspace-creation-failure

Conversation

@janburzinski

Copy link
Copy Markdown
Collaborator

Description

  • stop activity indicator when workspace creation fails

Screenshot/Recording (if applicable)

https://streamable.com/9kizfv

Checklist
  • I kept this PR small and focused
  • I ran a self-review before opening this PR
  • I ran the relevant local checks or explained why not
  • I updated docs when behavior or setup changed
  • I added or updated tests when behavior changed, or explained why not
  • I only added comments where the logic is not obvious
  • I used Conventional Commits for commit
    messages and, when possible, the PR title

@greptile-apps

greptile-apps Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a bug where the activity spinner kept running indefinitely after workspace creation or provisioning failed, by narrowing isBootstrapping to exclude error phases. It also removes duplicated local derivations of this flag from two sidebar components, consolidating the logic in TaskStore.

  • task-store.ts: isBootstrapping now returns true only for unregistered+creating and unprovisioned+provision — error phases (create-error, provision-error) are explicitly excluded so the spinner settles on failure.
  • task-sidebar-agent-status.tsx / task-item.tsx: Both components drop their local copies of the flag and read task.isBootstrapping directly, eliminating the previously diverged definitions.

Confidence Score: 5/5

Safe to merge — the change is a small, focused fix that only affects spinner visibility after provisioning errors.

The narrowed isBootstrapping logic is correct for every phase/state combination, transitionToUnregistered already hardcodes phase = 'creating' so the new check is always entered on creation start, and both consumers are updated consistently. No unrelated code is touched.

No files require special attention.

Important Files Changed

Filename Overview
apps/emdash-desktop/src/renderer/features/tasks/stores/task-store.ts Narrows isBootstrapping to exclude error phases ('create-error', 'provision-error'), stopping the spinner when creation or provisioning fails. Logic is correct for all phase/state combinations.
apps/emdash-desktop/src/renderer/features/sidebar/task-sidebar-agent-status.tsx Removes duplicated local isBootstrapping derivation, delegates to task.isBootstrapping. Clean simplification with no behavior loss.
apps/emdash-desktop/src/renderer/features/sidebar/task-item.tsx Removes duplicated local isBootstrapping computation, delegates to task.isBootstrapping. Text dimming now correctly clears on provisioning error.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[TaskStore state/phase] --> B{isBootstrapping?}
    B -->|unregistered + creating| C[true → show spinner]
    B -->|unregistered + create-error| D[false → stop spinner ✅]
    B -->|unprovisioned + provision| E[true → show spinner]
    B -->|unprovisioned + provision-error| F[false → stop spinner ✅]
    B -->|unprovisioned + idle/teardown/teardown-error| G[false → no spinner]
    B -->|provisioned| H[false → no spinner]
    C --> I[CLISpinner in TaskSidebarTrailingSlot]
    C --> J[Dimmed text in SidebarTaskItem]
    D --> K[AgentStatusIndicator or timestamp]
    F --> K
Loading

Reviews (1): Last reviewed commit: "fix(tasks): stop spinner after provision..." | Re-trigger Greptile

@arnestrickmann arnestrickmann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

great small addition!

@arnestrickmann arnestrickmann merged commit 41007ee into main Jun 15, 2026
1 check passed
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.

2 participants