Skip to content

fix(team-profile): import tries every row and reports the ones that could not be saved (#1759) - #1781

Merged
ZhuchkaTriplesix merged 1 commit into
test/secrets-failure-injectionfrom
fix/team-profile-import-partial-failure
Oct 25, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
test/secrets-failure-injectionfrom
fix/team-profile-import-partial-failure

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Fixes #1759. Based on #1779 (it uses failOnCall from the test backend); GitHub retargets this PR to dev when #1779 is merged.

Fix

TeamProfileCodec.importInto caught nothing: a keyring refusal on the 4th of 10 rows aborted the loop, the first three stayed saved, the rest were never tried and the count was lost. It now tries every row and returns (added, failed, firstError). The import toast says N could not be saved: <first error> (error variant) next to the count of imported rows.

The other direct addConnection callers named in the issue (file_launch_service, demo_playground_service, the scratch connection) are not changed here. The scratch connection already runs in a try/catch that shows a toast; the other two were not looked at.

Tests

test/core/team/team_profile_import_test.dart: all rows saved; a refusal on the middle row (the other two saved, failed == 1, the error is the one thrown); every row refused (first error kept, nothing saved); an existing row is skipped, not counted as failed.

Run: test/core/team and test/features/connections (115 tests, all pass), dart analyze on the changed files. Not checked against a real locked keyring.

…not be saved (#1759)

A keyring refusal on one row no longer aborts the loop, hides the rows that
were saved or loses the count. importInto returns added, failed and the first
error; the toast says so.
@github-actions github-actions Bot added bug Something isn't working connections Database connections, URI parsing, pools P3 Low priority / Polish & Enhancements labels Oct 25, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit b0456fc into test/secrets-failure-injection Oct 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working connections Database connections, URI parsing, pools P3 Low priority / Polish & Enhancements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant