Skip to content

fix(team-profile): importing a profile stops at the first failed save and loses the count #1759

Closed

Description

@ZhuchkaTriplesix

Problem

`TeamProfile.importInto` (lib/core/team/team_profile.dart) calls `db.addConnection` in a loop with no error handling. `addConnection` rolls its own row back and rethrows when the secret write fails (keyring locked or unavailable). The loop then aborts: connections before the failing one stay saved, the rest are never tried, the returned "added" count is lost, and the caller gets only the exception.

Expected

Try every row, collect the failures, and report "N added, M failed" with the first error, so a keyring problem on one row neither hides the rows that were saved nor skips the rest.

Related

  • Same family as the silent failure of the creation flows fixed in fix(connections): report and log a failed save of a new connection #1757.
  • Other direct `addConnection` callers without handling: `lib/core/platform/file_launch_service.dart`, `lib/core/demo/demo_playground_service.dart`, the scratch connection in `lib/features/main_screen/main_screen_dialogs.dart`. Their failures show up as "Failed to open file" or not at all.

Found in the review of #1757.

Activity

  1. added
    bugSomething isn't working
    connectionsDatabase connections, URI parsing, pools
    P3Low priority / Polish & Enhancements
    on Oct 25, 2026
  2. added a commit that references this issue on Oct 25, 2026
  3. ZhuchkaTriplesix commented on Oct 25, 2026

    @ZhuchkaTriplesix
    MemberAuthor

    Fixed on dev in #1779 (merged). Closing by hand: the PRs target dev, so GitHub would only close this when dev is merged into main.

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

    P3Low priority / Polish & EnhancementsbugSomething isn't workingconnectionsDatabase connections, URI parsing, pools

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions