Skip to content

Desktop skill picker can lose options when a session project path resolves #5044

Description

@liuxiaocs7

What happened

In Desktop, an open Skill picker can briefly lose and remount its options after a session is created. If the user clicks during that window, Playwright and the real UI can observe the option detach before the click completes.

The session Skill catalog is loaded through skills.listInvocable(sessionId), but ComposerMentionsProvider also includes projectPath and new-task defaults in the catalog context key and effect dependencies. projectInfo.projectPath can resolve on a later render for the same session, so that unrelated update is treated as a catalog surface switch: the published list is cleared, loading restarts, and an unnecessary catalog request is made.

Expected behavior: once sessionId is present, only the session identity and explicit catalog revision/events should control that session catalog. Resolving project metadata or changing defaults for a future task must not clear or reload it.

Related context: #2667 / #2768 stabilized same-context catalog refreshes, but this path is currently misclassified as a context change.

How to reproduce

  1. Open Desktop with an invocable project Skill.
  2. Create or enter a session while its project metadata is still resolving.
  3. Open the Skill picker and select an option as projectInfo.projectPath becomes available.
  4. Intermittently, the option is removed and remounted before the click completes.

A deterministic unit reproduction renders ComposerMentionsProvider with one settled sessionId, then supplies projectPath on the next render. The current implementation publishes an empty/loading catalog and issues another listInvocable request.

Observed in CI at https://github.com/apache/maka/actions/runs/34243763841 in skill-draft-lifecycle.spec.ts:110: <html> intercepted the pointer event after the Project Only option was detached.

Environment

  • Maka commit: 21d1609f
  • OS and version: GitHub Actions macOS runner; also analyzed on macOS
  • Surface: Desktop
  • Node.js version, if running from source: repository toolchain

Logs, screenshots, or additional context

The rest of that CI run passed (36 other Desktop E2E cases and 2519 standard tests), consistent with a narrow renderer timing race rather than a broad functional failure.

Drafted with OpenAI Codex; the human contributor remains responsible for review and submission.

Activity

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