Skip to content

Make preview config widgets default-aware and show override state explicitly#3069

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-config-widgets-preview
Draft

Make preview config widgets default-aware and show override state explicitly#3069
Copilot wants to merge 3 commits intomainfrom
copilot/add-config-widgets-preview

Conversation

Copy link
Contributor

Copilot AI commented Mar 15, 2026

The preview-only config editor treated “unset” as a missing value, but Wave’s config system uses unset to mean “inherit the shipped default.” This updates the preview widgets so default vs explicit override is visible and selectable, including cases where an override matches the default value.

  • Default is now a first-class field state

    • Booleans now expose Default (...), True/False (or On/Off) instead of only a binary toggle.
    • Enum/select fields now include a default option with the effective shipped value.
    • Text, number, and font-size fields now surface Use Default when overridden.
  • Override vs inherited state is visible

    • Added per-field badges: Using default vs Overridden.
    • Added inline default value display for all supported field types.
    • Preserved the distinction between:
      • inherited default
      • explicit override with a different value
      • explicit override with the same value as the default
  • Preview updated to demonstrate real config semantics

    • The sample editor now loads shipped defaults from defaultconfig.
    • Added examples for:
      • inherited values
      • changed overrides
      • explicit empty-string override
      • same-as-default override (window:magnifiedblocksize: 0.95)
    • Added side panels for:
      • sparse JSON output (settings.json contents)
      • effective merged values
      • override summary
  • Support code

    • Added small helpers for:
      • isConfigValueOverridden
      • getEffectiveConfigValue
    • Extended focused tests around default/inherited behavior.
<ConfigBooleanField
    configKey="term:cursorblink"
    label="Cursor blink"
    value={settings["term:cursorblink"]}
    defaultValue={DefaultSettings["term:cursorblink"]}
    onValueChange={(value) => setSettingsValue(setSettings, "term:cursorblink", value)}
    trueLabel="On"
    falseLabel="Off"
/>
  • UI preview
    • default-aware config UI preview

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 15, 2026

Deploying waveterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2b4022e
Status: ✅  Deploy successful!
Preview URL: https://46f84153.waveterm.pages.dev
Branch Preview URL: https://copilot-add-config-widgets-p.waveterm.pages.dev

View logs

Copilot AI changed the title [WIP] Add config widgets for modifying config values Add preview-only config UI widget library and sample editor Mar 15, 2026
Copilot AI requested a review from sawka March 15, 2026 21:50
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Copilot AI changed the title Add preview-only config UI widget library and sample editor Make preview config widgets default-aware and show override state explicitly Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants