Skip to content

WebUI: human-readable labels and section titles/descriptors in Settings #436

@lonix

Description

@lonix

Problem

The Settings page presents each row by its raw dotted key — voicetracking.enabled, voicechannels.lobby.offlinename — which is fine for developers but unfriendly for the operators we expect to use this UI. Section headers are equally bare: the renderer (src/web/admin-views.ts:254) emits <h2>voicechannels</h2> — a slug, no descriptor.

settingsMetadata (src/services/config-schema.ts:220-223) already carries a per-key description, but the dotted key is still the primary label and categories have no human-readable title at all.

Proposed change

Extend the per-key and per-category metadata:

export interface SettingMetadata {
  label: string;        // NEW. Human-readable, e.g., "Voice Tracking enabled".
  description: string;  // (existing) one-line help text.
  category: string;     // (existing) machine slug.
}

export interface CategoryMetadata {
  title: string;        // NEW. e.g., "Voice Tracking".
  description: string;  // NEW. e.g., "Time-in-voice tracking, leaderboards, last-seen, …".
}

export const categoryMetadata: Record<string, CategoryMetadata> = {};

Rendering changes in renderSettingsPage / renderSettingInput:

  • Section header: <h2>{title}</h2><p class="muted">{description}</p> instead of <h2>{category}</h2>.
  • Per-row primary: <strong>{label}</strong> (e.g., "Voice Tracking enabled").
  • Per-row secondary: the existing description as the help text.
  • Per-row tertiary, muted, right-aligned: the raw key (voicetracking.enabled) as a small <code> for technical reference — devs and bug reporters still need to see it.

Acceptance

  • Every key has a non-empty label.
  • Every category has a non-empty title and description.
  • Settings page renders human labels as the primary text; raw dotted keys are visible but de-emphasized.
  • Existing tests still pass; new test asserts the metadata maps cover every key in ConfigSchema (no orphans).

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions