Skip to content

Preserve OAuth projection during config onboarding - #705

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-7116-preserve-oauth-profile-projection-after-setup-with-config
Aug 28, 2026
Merged

Preserve OAuth projection during config onboarding#705
TheGreatAxios merged 3 commits into
mainfrom
cl-7116-preserve-oauth-profile-projection-after-setup-with-config

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Preserves settings-source provenance through first-run onboarding reloads.
  • Keeps CLI --config composed with home OAuth profiles while programmatic settings remain isolated.

Verification

  • bun run check passes.
  • bun test src/config.test.ts src/tui/onboarding.test.ts passes with 76 tests.

Fixes CL-7116

@linear-code

linear-code Bot commented Aug 28, 2026

Copy link
Copy Markdown

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review · Approve

Onboarding preserves OAuth projection semantics across config reloads.

No findings.

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review · Approve

Records on UnconfiguredConfig whether the settings source was a CLI --config path or a programmatic globalSettingsPath override, so the onboarding reload re-passes --config and only suppresses home OAuth-profile projection when the caller was programmatic.

No findings.

Notes

  • Merge this before #706. git merge-tree --write-tree reports a content conflict in src/tui/onboarding.ts:45-55: #706 keeps the overridesSettingsPath gate and swaps in isProgrammaticSettingsOverride, which still returns true for any distinct --config file and so does not fix this bug. Resolve in favour of this branch's provenance logic and drop #706's isProgrammaticSettingsOverride import. src/config/index.ts merges clean; #707 shares no files.
  • src/tui/onboarding.ts:47 — when both cliConfigPath and programmaticSettingsPath are set the reload passes the CLI path as globalSettingsPath; harmless since loadConfig only checks for undefined and --config wins, and the combination is test-only.
  • Checks: bun run typecheck, bun run lint, bun test src/config.test.ts src/tui/onboarding.test.ts (76 pass). With origin/main:src/tui/onboarding.ts swapped in, the new tests fail with Selected provider "xai/work" is not configured in settings — the reported bug.
@TheGreatAxios
TheGreatAxios merged commit eae0170 into main Aug 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant