Repository navigation
Implement copy-on-first-add for project-level list settings - #20
Merged
Merged
Conversation
Owner
Author
|
Im not sure this PR makes any sense actually. We dont even want list-fields in the settings UI, so if you make a project file, its sorta on you to base it off the global file.. |
foxfirecodes
approved these changes
Jun 19, 2026
| return "saved"; | ||
| } | ||
|
|
||
| /* -------- step 3b: per-field list editor (stringList) -------- */ |
Collaborator
There was a problem hiding this comment.
I don't love these "step X" comments :ded: but something we should probably purge holistically from the repo at a later date
|
|
||
| let anySaved = false; | ||
| let selectedIndex = 0; | ||
| for (;;) { |
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.
Implements the "Copy inherited arrays when editing project-level list
settings" TODO. Adds list-typed (
string[]) field editing to/pi-auto-settingswith the inheritance behavior the TODO described:when a project-level array hasn't been set yet, the first add copies
the inherited (defaults + user-global) entries before appending, so
the project file doesn't silently clobber the list the user sees.
settings-store.ts: purenextArrayForAppend/nextArrayForRemovehelpers,
modifySettingArrayFieldthat composes them with partial-merge file IO, and a
perProjectPath: nulloption onloadSettingsfor computing the inherited value (skip per-project layer).
settings-ui.ts:kind: "stringList"descriptors forsensitivePathPatterns+ all seven sandbox arrays; list-view editorwith
aadd /dremove / enter remove / esc back. Shows an(inheriting N items — first edit copies them)hint when projectlayer is still inheriting.
string[][]fields (extraSafeCommandPrefixes,sandbox.reviewOnlyCommandPrefixes) intentionally left for afollow-up — they need a 2D editor. Added a TODO entry.
Also:
in
docs/HISTORY.md); added a note at the top that completed itemsget removed and moved to HISTORY.
inheritance" section.
This is part 1 of 2 in a stack made with GitButler: