feat(application): add groups, comments, and ordering to app config items#70
Merged
Merged
Conversation
…tems
Env/file config items were previously a flat, unordered list keyed only by
name, which grows hard to read once an app has dozens of variables. This adds
three pieces of per-item metadata — a display group, a free-text comment, and
a manual order — without introducing a database table.
The metadata is serialized as JSON in a new `oops.config-meta` annotation
(`key -> {group, comment, order}`) on each {app}/{app}.files ConfigMap/Secret,
mirroring the existing `oops.mounts` annotation pattern. Each annotation only
describes the keys in its own resource's data, so an item moving between
env/secret/mounted carries its metadata along on the next full-rewrite save.
The metadata never enters the container. `order` lets the editor persist a
manual arrangement that the ConfigMap data map (unordered) cannot; getConfigMaps
sorts by it, with legacy/unset items falling back to key name.
Frontend reworks the config editor into collapsible per-group sections with a
key/comment search box. Each row gains an inline comment field and a group
popover (pick an existing group or create a new one), and rows are drag-sortable
within a group and draggable across groups via dnd-kit. Import/export round-trips
groups as `## group:` markers and comments as `#` lines in the dotenv format.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Redesign the app config editor around per-group tabs and single-line rows. Each item's mount path, comment, and group are edited through three dedicated dialogs with draft/staging semantics: edits stay local until confirmed, and cancel / close / outside-click discard them. Group is a single autocomplete input — typing filters existing groups and a non-matching name creates a new one implicitly. Dragging a row now only reorders it and no longer rewrites its group, so items keep their group when moved. ConfigMap and Secret each get their own section filter and an info tooltip for the section hint. Add YAML import/export (js-yaml) that round-trips groups and comments losslessly, alongside the existing dotenv format. Co-authored-by: Claude <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
Env/file config items were a flat, unordered list keyed only by name, which becomes hard to read once an app has dozens of variables. This adds three pieces of per-item metadata — a display group, a free-text comment, and a manual order — without introducing a database table.
The metadata is serialized as JSON in a new
oops.config-metaannotation (key -> {group, comment, order}) on each{app}/{app}.filesConfigMap/Secret, mirroring the existingoops.mountsannotation pattern. Key properties:datais untouched — onlymetadata.annotationsgainsoops.config-meta, so nothing changes about how the ConfigMap/Secret is injected (envFrom) or mounted.data, so an item moving between env / secret / file-mounted carries its metadata along on the next full-rewrite save.orderlets the editor persist a manual arrangement that the ConfigMapdatamap (unordered) cannot;getConfigMapssorts by it, with legacy/unset items falling back to key name.What the stored K8s resources look like
Env-injected ConfigMap (
envFrom), unchangeddata, new annotation only:Companion
.filesConfigMap (mounted, never injected) carrying both annotations side by side:Frontend
Testing
ConfigMetaAnnotationTestscoversof()normalization, independent mount/meta serialization, full annotation round-trip including order preservation, legacy meta without anorderfield, and garbled/missing annotation handling.pnpm lintandtsc --noEmitpass.