feat: add settings.local.json support for Claude Code integration#309
Open
CorticalCode wants to merge 10 commits intosirmalloc:mainfrom
Open
feat: add settings.local.json support for Claude Code integration#309CorticalCode wants to merge 10 commits intosirmalloc:mainfrom
CorticalCode wants to merge 10 commits intosirmalloc:mainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds optional `targetPath` parameter to `installStatusLine` so it can write to settings.local.json (or any path) instead of the default settings.json. Hook sync is skipped for targeted writes pending Task 6. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
Adds
settings.local.jsonsupport to the Claude Code integration layer. Fixes #276.settings.local.jsonexists, the TUI install flow lets users choose which file to targetisKnownCommandguard)Design decisions
settings.local.jsonexists on disk, prompt the user to choose a target. If it doesn't exist, default behavior is unchanged — zero friction for the common case.settings.local.jsontakes precedence when checking installation status, matching Claude Code's own merge semantics.statusLineentries identified byisKnownCommand(). A company-managed or user-custom statusLine in either file is never touched.settings.jsonwhilesettings.local.jsonalready has a statusLine that would take precedence.Files changed
src/utils/claude-settings.ts—filePathparam on load/save, privateresolveStatusLine()for dual-file precedence, ownership-guarded uninstallsrc/utils/hooks.ts— file-aware hook sync targeting active file, stale hook cleanup from non-active filesrc/tui/components/FileTargetSelect.tsx— new component for install target selectionsrc/tui/App.tsx— install flow integration, fileTarget screen, confirmation warningssrc/tui/components/InstallMenu.tsx—localSettingsDetectedprop for contextual help textKnown limitations
settings.jsonis read-only (e.g., company-managed with restrictive permissions), write operations that target it will error. Thesettings.local.jsonsupport provides a workaround.Test plan
settings.json(default, nosettings.local.jsonpresent) — unchanged behaviorsettings.local.jsonexists — FileTargetSelect screen appearssettings.local.json— writes only to local file🤖 Generated with Claude Code