Skip to content

fix(executor): clear project thread hints on removal - #2178

Merged
qdaxb merged 5 commits into
mainfrom
fix/wework-short-conversation-whitespace
Jul 24, 2026
Merged

qdaxb merged 5 commits into
mainfrom
fix/wework-short-conversation-whitespace

Conversation

@qdaxb

@qdaxb qdaxb commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • clear Codex thread workspace-root hints when removing a project
  • pass the concrete workspace path alongside project keys during removal
  • explicitly remove successfully deleted runtime projects from Wework state so optimistic creation preservation cannot restore them
  • extend runtime and reducer regression coverage

Root causes

  1. runtime.workspaces.remove removed the project root but retained thread-workspace-root-hints, allowing the executor to reconstruct the project.
  2. After the executor was fixed and returned an empty runtime-work list, Wework still preserved a fresh optimistic creating task for two minutes, keeping the removed project visible.

Validation

  • focused Executor global-state and runtime workspace contract tests
  • focused Wework reducer/provider tests
  • Wework lint and TypeScript
  • full Wework unit suite via pre-push
  • real Wework cloud desktop E2E (pnpm --filter wework e2e:desktop:cloud)
  • pre-push Executor tests and clippy

This fixes the cloud desktop E2E follow-up discovered after #2173.

Summary by CodeRabbit

  • Bug Fixes

    • Fixed workspace removal so associated thread and project state is fully cleared.
    • Removed projects now disappear from the workbench immediately after deletion.
    • Cleared stale task counts, selections, and active task details when the currently selected project is removed.
    • Preserved the active project selection when removing a different project.
    • Improved cleanup of workspace-specific runtime data during project removal.
  • Tests

    • Added coverage for project removal, workspace state cleanup, and optimistic task handling.
    • Increased timeout coverage for custom model catalog persistence checks.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cdda2b64-b5ac-4300-bbdb-4dedf24a7ecd

📥 Commits

Reviewing files that changed from the base of the PR and between a9828ab and 6c24136.

📒 Files selected for processing (6)
  • executor/src/runtime_work/codex_global_state.rs
  • executor/tests/app_runtime_work_workspace_contract.rs
  • wework/src/components/settings/ConnectionsSettingsPage.test.tsx
  • wework/src/features/workbench/useWorkbenchProjectActions.ts
  • wework/src/features/workbench/workbenchReducer.test.ts
  • wework/src/features/workbench/workbenchReducer.ts

📝 Walkthrough

Walkthrough

Workspace removal now distinguishes project IDs from workspace paths when pruning Codex state, including thread workspace hints. Runtime project removal synchronizes Workbench state and clears related selections. A connection settings test receives an explicit timeout.

Changes

Codex global state cleanup

Layer / File(s) Summary
Project and workspace state removal
executor/src/runtime_work/codex_global_state.rs, executor/tests/app_runtime_work_workspace_contract.rs
Project removal now accepts separate project and workspace identifiers, prunes matching thread-workspace-root-hints, and verifies the cleanup behavior.

Workbench runtime project removal

Layer / File(s) Summary
Runtime project removal synchronization
wework/src/features/workbench/workbenchReducer.ts, wework/src/features/workbench/useWorkbenchProjectActions.ts, wework/src/features/workbench/workbenchReducer.test.ts
Runtime project removal dispatches a new reducer action, removes the project and task totals, clears matching UI state, and covers optimistic-task cleanup.

Connection settings test timing

Layer / File(s) Summary
Async assertion timeout
wework/src/components/settings/ConnectionsSettingsPage.test.tsx
The final asynchronous assertion uses an explicit 10,000 millisecond timeout.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: icycrystal4

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/wework-short-conversation-whitespace

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qdaxb
qdaxb marked this pull request as ready for review July 24, 2026 08:35
@qdaxb
qdaxb merged commit ea89c43 into main Jul 24, 2026
29 of 31 checks passed
@qdaxb
qdaxb deleted the fix/wework-short-conversation-whitespace branch July 24, 2026 08:38
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