Skip to content

Saved recipes falsely report unavailable accounts while the account catalog is loading #268

Description

@cristicretu

A valid saved recipe with an explicit account can fail its first activation after app startup because account loading is treated as a missing account.

Reproduction

  1. Save a launch recipe using an existing named account profile.
  2. Restart the app and open New Session.
  3. Activate that recipe before the account-profile request finishes (hold the response in a test to make this deterministic).
  4. Return a catalog containing the correct profile.

The launcher reports the account as unavailable, and the original activation does not resume when the catalog arrives. A second activation is required even though the saved profile exists.

Evidence

  • Launcher initialization starts with an empty account catalog.
  • activate_new_session starts account refresh asynchronously and opens the launcher immediately.
  • validate_recipe_account checks only whether the cached profile exists; it does not distinguish pending/loading from authoritative absence.
  • resolve_recipe performs that check before Agent readiness resolution.
  • activate_recipe queues a pending activation only for AgentsLoading; AccountUnavailable takes the repair/error branch.
  • Account refresh completion replaces the catalog and notifies the view without retrying recipe activation or clearing the stale repair notice.

Expected behavior and regression coverage

Treat account readiness as asynchronous, retain the exact requested recipe identity while loading, and revalidate it once the catalog arrives. Launch once when the requested account is present. Continue to fail closed if it is absent or the catalog fetch fails; never substitute another account.

Test delayed successful account loading, genuinely removed profiles, fetch failures, and cancel/edit/choose-another-recipe while waiting. Cancellation must prevent a delayed launch.

Validation: source-path review on main 1196d89; no live UI reproduction or new test was run.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions