Repository navigation
fix(team-profile): import tries every row and reports the ones that could not be saved (#1759) - #1781
Merged
ZhuchkaTriplesix merged 1 commit intoOct 25, 2026
Conversation
…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.
ZhuchkaTriplesix
merged commit Oct 25, 2026
b0456fc
into
test/secrets-failure-injection
1 check passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1759. Based on #1779 (it uses
failOnCallfrom the test backend); GitHub retargets this PR todevwhen #1779 is merged.Fix
TeamProfileCodec.importIntocaught 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 saysN could not be saved: <first error>(error variant) next to the count of imported rows.The other direct
addConnectioncallers named in the issue (file_launch_service,demo_playground_service, the scratch connection) are not changed here. The scratch connection already runs in atry/catchthat 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/teamandtest/features/connections(115 tests, all pass),dart analyzeon the changed files. Not checked against a real locked keyring.