Shared parameter definitions: management UI (2/2)#32
Merged
Conversation
Adds the authoring surfaces for the shared-parameter resolution landed in part 1: - CLI-scoped params: a "Shared parameters" section in the CLI editor dialog (reuses the existing parameter-row editor); CliEditorViewModel gains an editable Parameters collection. - Global params: a new GlobalParametersViewModel content view, opened from a "Shared parameters" entry in the pane footer (Trash-style), with add/remove rows and a Save persisted by ShellViewModel.SaveGlobalParameters. Global params live in the main UI, not Settings, per the agreed design. Both reuse ParameterEditorRowViewModel and the existing param-row layout. Co-Authored-By: Claude Opus 4.8 <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.
Part 2 of the shared parameter definitions feature (task #1) — the management UI on top of the part-1 resolution engine (PR #31, merged).
What this adds
CliEditorViewModelgains an editableParameterscollection (add/remove), andBuildUpdatedCliwrites them.GlobalParametersViewModelcontent view with add/remove rows and a Save (persisted byShellViewModel.SaveGlobalParameters). Per your call, global params live in the main UI, not Settings.Both surfaces reuse
ParameterEditorRowViewModeland the same param-row layout as the Snip editor, so authoring is consistent everywhere.Behaviour
With the part-1 resolver already merged, a snip now actually inherits these:
{env}with no localenvpicks up the CLI'senv, or a globalregion, by name (local > CLI > global). The feature is now fully usable end to end.Tests
GlobalParametersViewModelTests(load / add+build / remove), extendedCliEditorViewModelTests(load+rebuild params, add/remove rows), and aShellViewModeltest thatSaveGlobalParameterspersists edited rows to the document. Full suite: 175 passing.Manual check (can't from Linux)
A quick visual pass that the CLI-editor "Shared parameters" section and the pane-footer "Shared parameters" view render and save as expected.
🤖 Generated with Claude Code