Skip to content

feat(ui): add KeyValueEditor component for managing key-value pairs#29

Merged
faloker merged 1 commit into
mainfrom
feat/settings-page-ui
Jul 6, 2026
Merged

feat(ui): add KeyValueEditor component for managing key-value pairs#29
faloker merged 1 commit into
mainfrom
feat/settings-page-ui

Conversation

@faloker

@faloker faloker commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator
  • Implemented KeyValueEditor.svelte to handle key-value pairs with validation for empty keys/values.
  • Integrated KeyValueEditor into PackParametersDialog and SchemaForm components.
  • Refactored config page to utilize KeyValueEditor for default tags management.
  • Added utility functions for object and entry conversions in KeyValueEditor.
  • Enhanced form validation to prevent saving of blank entries in settings.
  • Created reusable field components for better UI consistency and structure.
  • Updated AppConfig type to include new configuration options related to tags and logging.

…ttings

- Implemented KeyValueEditor.svelte to handle key-value pairs with validation for empty keys/values.
- Integrated KeyValueEditor into PackParametersDialog and SchemaForm components.
- Refactored config page to utilize KeyValueEditor for default tags management.
- Added utility functions for object and entry conversions in KeyValueEditor.
- Enhanced form validation to prevent saving of blank entries in settings.
- Created reusable field components for better UI consistency and structure.
- Updated AppConfig type to include new configuration options related to tags and logging.
Copilot AI review requested due to automatic review settings July 6, 2026 21:36
@github-actions github-actions Bot added the size/XXL PR size: XXL label Jul 6, 2026
@faloker faloker merged commit b859070 into main Jul 6, 2026
3 of 4 checks passed
@faloker faloker deleted the feat/settings-page-ui branch July 6, 2026 21:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR redesigns the /config route into a tabbed Settings UI with typed controls for known AppConfig keys, adds a reusable key/value map editor for default_tags, and introduces a reusable field component set for consistent form layout.

Changes:

  • Rewrote the settings page into four tabs (General / Default tags / Retention / About) with typed inputs and per-tab save semantics.
  • Extracted the string-map editor into a shared KeyValueEditor and reused it in SchemaForm plus validation reuse in PackParametersDialog.
  • Added shadcn-svelte-style Field.* components and expanded the AppConfig TS type for known settings keys.

Reviewed changes

Copilot reviewed 18 out of 22 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
web/frontend/src/routes/config/+page.svelte Replaces generic config loop with tabbed, typed Settings UI and save/toggle behavior.
web/frontend/src/lib/types/index.ts Extends AppConfig with known optional settings keys.
web/frontend/src/lib/components/ui/field/index.ts Barrel export for new Field.* UI primitives.
web/frontend/src/lib/components/ui/field/field.svelte Base Field wrapper with orientation variants.
web/frontend/src/lib/components/ui/field/field-title.svelte Adds Field.Title primitive (slot naming needs correction).
web/frontend/src/lib/components/ui/field/field-set.svelte Adds Field.Set wrapper for fieldset layouts.
web/frontend/src/lib/components/ui/field/field-separator.svelte Adds separator element for grouping within forms.
web/frontend/src/lib/components/ui/field/field-legend.svelte Adds legend/label variant for grouped form sections.
web/frontend/src/lib/components/ui/field/field-label.svelte Adds Field.Label wrapper around existing Label.
web/frontend/src/lib/components/ui/field/field-group.svelte Adds Field.Group container for consistent spacing/layout.
web/frontend/src/lib/components/ui/field/field-error.svelte Adds standardized field error rendering (single/multi error).
web/frontend/src/lib/components/ui/field/field-description.svelte Adds Field.Description text primitive.
web/frontend/src/lib/components/ui/field/field-content.svelte Adds Field.Content wrapper for horizontal field layouts.
web/frontend/src/lib/components/SchemaForm.svelte Replaces inline map editor with shared KeyValueEditor.
web/frontend/src/lib/components/PackParametersDialog.svelte Reuses hasBlankEntry helper for map validation.
web/frontend/src/lib/components/KeyValueEditor.svelte New shared key/value map editor + helper exports.
openspec/specs/settings-page/spec.md Adds Settings page specification and requirements.
openspec/changes/archive/2026-07-06-settings-page-redesign/tasks.md Archives the completed implementation task checklist.
openspec/changes/archive/2026-07-06-settings-page-redesign/specs/settings-page/spec.md Captures delta requirements for the redesign.
openspec/changes/archive/2026-07-06-settings-page-redesign/proposal.md Proposal describing rationale and intended UX.
openspec/changes/archive/2026-07-06-settings-page-redesign/design.md Design doc detailing decisions and trade-offs.
openspec/changes/archive/2026-07-06-settings-page-redesign/.openspec.yaml OpenSpec metadata for the archived change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

</Card.Content>
</Card.Root>
{/if}
<Tabs.Root value="general">
Comment on lines +89 to +94
try {
for (const [key, value] of dirty) {
await updateConfig(key, value);
}
config = { ...config, ...Object.fromEntries(dirty) };
toast.success('Settings saved');
Comment on lines +102 to +111
function saveGeneral() {
return saveKeys(
[
['parallelism', Math.trunc(Number(parallelism))],
['terraform_version', terraformVersion]
],
(v) => (generalSaving = v),
(v) => (generalError = v)
);
}
Comment on lines +126 to +135
function saveRetention() {
return saveKeys(
[
['run_log_retention_days', Math.trunc(Number(runLogRetentionDays))],
['run_retention_days', Math.trunc(Number(runRetentionDays))]
],
(v) => (retentionSaving = v),
(v) => (retentionError = v)
);
}

<div
bind:this={ref}
data-slot="field-label"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XXL PR size: XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants