fix: Google Fit setup on multi-profile — guided wizard, clear errors, per-profile credentials#43
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What changed
profiles/{slug}/fit_credentials.json, takes precedence over the global file).Why
Connecting Google Fit from a second profile was a dead end: the wizard skipped the credentials step because the global
fit_credentials.jsonalready existed, the new profile's Google account wasn't a Test user of the project, and Google's "Error 403: access_denied" page never redirects back — so the CLI hung indefinitely with no explanation.How to test
pytest tests/test_fit_setup_wizard.py tests/test_fit_auth_errors.py tests/test_config_paths.py -v— covers all wizard branches, the error classifier, the refresh fall-through and the credentials resolution order (env > profile > global).fit_credentials.jsonalready configured, create a second profile and run Google Fit → Connect — the client/project panel and the reuse menu must appear (no silent skip), with the Test-user reminder before the browser opens.Type of change
Checklist
pytest tests/ -vpasses locally (519 passed)ruff check .andruff format --check .passmypy .passes (new-code errors fixed; remaining local noise is missing venv stubs, clean in CI)i18n._()with keys in bothlocales/en.jsonandlocales/pt_BR.json.env,*.db,fit_token.json,fit_credentials.json)🤖 Generated with Claude Code