Skip to content

Flaky e2e: "switching back to a project opens the latest workspace session" #14461

Closed
XiaomiMiMo/MiMo-Code
#1030

Description

@amdmax

Description

The e2e test switching back to a project opens the latest workspace session in packages/app/e2e/projects/projects-switch.spec.ts:49 is flaky.

After switching to another project and then switching back, the test expects to land on the workspace session URL (/{workspaceSlug}/session/{sessionID}), but intermittently the page remains on the other project's URL, causing toHaveURL to time out (10s).

Local reproduction with --repeat-each 3: 2/3 pass, 1/3 fail. This suggests a race condition in the project-switch navigation — the session restoration sometimes doesn't complete in time.

Steps to reproduce

  1. cd packages/app
  2. bun test:e2e:local -- --grep "switching back to a project" --repeat-each 5
  3. Observe intermittent failure at line 117

OpenCode version

Latest dev

Operating System

macOS (also reproduces in CI)

Activity

  1. CopilotMe commented on Mar 10, 2026

    @CopilotMe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions