Wire auth and locale to shared.json, AI settings to cli.json#2821
Open
bcotrim wants to merge 9 commits intostu-1350-decoupled-config-devfrom
Open
Wire auth and locale to shared.json, AI settings to cli.json#2821bcotrim wants to merge 9 commits intostu-1350-decoupled-config-devfrom
bcotrim wants to merge 9 commits intostu-1350-decoupled-config-devfrom
Conversation
Move auth token reads/writes from appdata to shared-config for Desktop+CLI. Move locale reads/writes to shared-config (Desktop saves, CLI reads). Move aiProvider and anthropicApiKey from shared-config to cli-config (CLI-only). Remove auth and locale fields from appdata schema and types since they're now in separate files. Update all imports and tests accordingly. Co-Authored-By: Claude Haiku 4.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.
Related issues
How AI was used in this PR
All code was generated via Claude Code (Opus + Haiku). Changes were reviewed and validated by the author through iterative conversation — verifying architecture decisions, confirming read/write boundaries, and running the full test suite at each step.
Proposed Changes
tools/common/lib/shared-config.ts— new shared config infrastructure at~/.studio/shared.jsonfor data shared between Desktop and CLI (auth token + locale)aiProvider,anthropicApiKey) from appdata tocli.jsonlastBumpStats) from appdata tocli.jsonauthToken,locale, AI fields, andlastBumpStatsfrom appdata types and schemasAfter these changes the write boundaries are:
appdata-v1.json(sites, snapshots, preferences) +shared.json(auth, locale)cli.json(sites, AI settings, telemetry) +shared.json(auth) +appdata-v1.json(snapshots only)Testing Instructions
npm run typecheck— should pass with no errorsnpm test— all 1292 tests should pass~/.studio/shared.jsoncontains the auth token~/.studio/shared.jsoncontains the localestudio auth loginfrom CLI — verify shared.json is updatedstudio aiand switch provider/enter API key — verify~/.studio/cli.jsoncontainsaiProviderandanthropicApiKeyPre-merge Checklist