Skip to content

test(desktop): fix flaky unassigned-project E2E #1923

Closed

Description

@Astro-Han

What happened

apps/desktop/e2e/project-management.spec.ts intermittently times out while waiting for the 未归属项目 group after creating and sending the first message in an unassigned session.

The assistant response is already visible when the test opens the sidebar and switches to project grouping, but no matching [data-project-id] appears within 10 seconds.

The same assertion has failed in unrelated CI runs:

Adjacent CI runs pass, and the focused test passed 20/20 repeated runs on current main.

How to reproduce

  1. Run the full desktop E2E suite on the Ubuntu CI runner with one worker.
  2. Observe project-management.spec.ts.
  3. Intermittently, the final assertion cannot find the unassigned project group even though the fake backend response is visible.

The failure has not reproduced in 20 focused local runs.

Environment

  • Maka commit: 5cb50df59
  • CI: GitHub-hosted ubuntu-latest
  • Node.js: 24
  • Surface: Desktop Electron E2E
  • Playwright workers: 1
  • Retries: 0

Expected fix

Identify which state boundary has not settled before the final assertion and synchronize the test with that authoritative state. Do not hide the failure with retries or a longer timeout.

Verification should include repeated focused runs and the full desktop E2E suite.

Activity

  1. Astro-Han commented on Aug 2, 2026

    @Astro-Han
    ContributorAuthor

    I’m taking this. I’ll isolate whether the missing group comes from session-list convergence or the project-grouping transition, fix the actual synchronization boundary without retries, and verify the focused test under repetition plus the full desktop E2E suite.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions