[BUG]: mismatch between json schema and code #701

Closed
opened 2026-01-05 14:52:27 +01:00 by adam · 4 comments
Owner

Originally created by @codingismy11to7 on GitHub (Nov 10, 2025).

Summary

i am a brand-new user to komorebi, have never heard of it before today. I followed directions and installed with winget and created the configs with quickstart. i opened the configs in vscode, and the Network widget had warnings about missing keys. i added the missing keys, so my network widget was now configured like

    {
      "Network": {
        "enable": true,
        "show_activity": true,
        "show_total_activity": true,
        "show_total_data_transmitted": true,
        "show_network_activity": true
      }
    },

and things started crashing. turns out that while this is valid according to the json schema, the application crashes:

╰─╼ $ komorebi-bar.exe
2025-11-10T02:43:09.272871Z  INFO komorebi_bar: found configuration file: C:\Users\steven\komorebi.bar.json
Error:
   0: duplicate field `show_total_activity` at line 53 column 37

Location:
   komorebi-bar\src\config.rs:477

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: RtlUserThreadStart<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.

⤷ ✘1

it's obviously wrong, there is no duplicate field here.

Version Information

╰─╼ $ systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version"
OS Name:                       Microsoft Windows 11 Pro
OS Version:                    10.0.26100 N/A Build 26100
╰─╼ $ komorebic.exe --version
komorebic 0.1.38
tag:v0.1.38
commit_hash:ffa76ea2
build_time:2025-09-13 18:41:29 +00:00
build_env:rustc 1.89.0 (29483883e 2025-08-04),stable-x86_64-pc-windows-msvc

Komorebi Configuration

{
  "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.38/schema.bar.json",
  "monitor": 0,
  "font_family": "JetBrains Mono",
  "theme": {
    "palette": "Base16",
    "name": "Ashes",
    "accent": "Base0D"
  },
  "left_widgets": [
    {
      "Komorebi": {
        "workspaces": {
          "enable": true,
          "hide_empty_workspaces": false
        },
        "layout": {
          "enable": true
        },
        "focused_window": {
          "enable": true,
          "show_icon": true
        }
      }
    }
  ],
  "right_widgets": [
    {
      "Update": {
        "enable": true
      }
    },
    {
      "Media": {
        "enable": true
      }
    },
    {
      "Storage": {
        "enable": true
      }
    },
    {
      "Memory": {
        "enable": true
      }
    },
    {
      "Network": {
        "enable": true,
        "show_activity": true,
        "show_total_activity": true,
        "show_total_data_transmitted": true,
        "show_network_activity": true
      }
    },
    {
      "Date": {
        "enable": true,
        "format": "DayDateMonthYear"
      }
    },
    {
      "Time": {
        "enable": true,
        "format": "TwentyFourHour"
      }
    },
    {
      "Battery": {
        "enable": true
      }
    }
  ]
}

Hotkey Configuration

n/a

Output of komorebic check

it ran successfully

Originally created by @codingismy11to7 on GitHub (Nov 10, 2025). ### Summary i am a brand-new user to komorebi, have never heard of it before today. I followed directions and installed with winget and created the configs with quickstart. i opened the configs in vscode, and the `Network` widget had warnings about missing keys. i added the missing keys, so my network widget was now configured like ```json { "Network": { "enable": true, "show_activity": true, "show_total_activity": true, "show_total_data_transmitted": true, "show_network_activity": true } }, ``` and things started crashing. turns out that while this is valid according to the json schema, the application crashes: ``` ╰─╼ $ komorebi-bar.exe 2025-11-10T02:43:09.272871Z INFO komorebi_bar: found configuration file: C:\Users\steven\komorebi.bar.json Error: 0: duplicate field `show_total_activity` at line 53 column 37 Location: komorebi-bar\src\config.rs:477 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1: RtlUserThreadStart<unknown> at <unknown source file>:<unknown line> Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering. Run with RUST_BACKTRACE=full to include source snippets. ⤷ ✘1 ``` it's obviously wrong, there is no duplicate field here. ### Version Information ``` ╰─╼ $ systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version" OS Name: Microsoft Windows 11 Pro OS Version: 10.0.26100 N/A Build 26100 ``` ``` ╰─╼ $ komorebic.exe --version komorebic 0.1.38 tag:v0.1.38 commit_hash:ffa76ea2 build_time:2025-09-13 18:41:29 +00:00 build_env:rustc 1.89.0 (29483883e 2025-08-04),stable-x86_64-pc-windows-msvc ``` ### Komorebi Configuration ```json { "$schema": "https://raw.githubusercontent.com/LGUG2Z/komorebi/v0.1.38/schema.bar.json", "monitor": 0, "font_family": "JetBrains Mono", "theme": { "palette": "Base16", "name": "Ashes", "accent": "Base0D" }, "left_widgets": [ { "Komorebi": { "workspaces": { "enable": true, "hide_empty_workspaces": false }, "layout": { "enable": true }, "focused_window": { "enable": true, "show_icon": true } } } ], "right_widgets": [ { "Update": { "enable": true } }, { "Media": { "enable": true } }, { "Storage": { "enable": true } }, { "Memory": { "enable": true } }, { "Network": { "enable": true, "show_activity": true, "show_total_activity": true, "show_total_data_transmitted": true, "show_network_activity": true } }, { "Date": { "enable": true, "format": "DayDateMonthYear" } }, { "Time": { "enable": true, "format": "TwentyFourHour" } }, { "Battery": { "enable": true } } ] } ``` ### Hotkey Configuration n/a ### Output of komorebic check it ran successfully
adam added the bug label 2026-01-05 14:52:27 +01:00
adam closed this issue 2026-01-05 14:52:28 +01:00
Author
Owner

@AhmedHawater2003 commented on GitHub (Nov 10, 2025):

It looks like some of the keys you’re using in the Network widget configuration are outdated; they’re not listed in the latest schema, which you can find here:
https://komorebi-bar.lgug2z.com/schema.html#right_widgets_items_oneOf_i8_Network

It’s likely that some of the fields you’re using have been renamed or replaced, which is causing the error.

Try updating your configuration to only include the fields listed in the latest schema.

@AhmedHawater2003 commented on GitHub (Nov 10, 2025): It looks like some of the keys you’re using in the Network widget configuration are outdated; they’re not listed in the latest schema, which you can find here: https://komorebi-bar.lgug2z.com/schema.html#right_widgets_items_oneOf_i8_Network It’s likely that some of the fields you’re using have been renamed or replaced, which is causing the error. Try updating your configuration to only include the fields listed in the latest schema.
Author
Owner

@LGUG2Z commented on GitHub (Nov 10, 2025):

I think this is a case of unfortunate aliasing:

https://github.com/LGUG2Z/komorebi/blob/master/komorebi-bar/src/widgets/network.rs#L31-L32

show_network_activity is a legacy alias for show_activity to preserve backwards compatibility, but if you have both show_network_activity and show_activity in the config, it will error out

@LGUG2Z commented on GitHub (Nov 10, 2025): I think this is a case of unfortunate aliasing: https://github.com/LGUG2Z/komorebi/blob/master/komorebi-bar/src/widgets/network.rs#L31-L32 `show_network_activity` is a legacy alias for `show_activity` to preserve backwards compatibility, but if you have both `show_network_activity` and `show_activity` in the config, it will error out
Author
Owner

@codingismy11to7 commented on GitHub (Nov 14, 2025):

It looks like some of the keys you’re using in the Network widget configuration are outdated; they’re not listed in the latest schema, which you can find here:

this was a brand new install, had never touched anything, had just opened the config file for the first time. i'm not sure where vscode got the schema - perhaps there's one hosted online that is outdated?

I think this is a case of unfortunate aliasing:

that makes sense for the duplicate keys error. but like - i got past this issue, but it was difficult and confusing for a brand new user, and i'm just trying to give some feedback. komorebi just silently crashing over and over was part of the confusion, until i (well i don't remember what i did, maybe i ran from cmdline to see logs, or went and tracked down logs) saw the error crashing things.

so instead of spamming discord i came to leave an issue that could hopefully be turned into a polish item later. whatever went wrong, however vscode got the schema, it said i was missing required fields, i added the required fields, the application crashed

so yeah anyway - brand new users are always the best source of bug reports, imo, because they had no outdated stuff on their system. so just letting you know the OOB experience is currently slightly broken, but not any sort of major issue

@codingismy11to7 commented on GitHub (Nov 14, 2025): > It looks like some of the keys you’re using in the Network widget configuration are outdated; they’re not listed in the latest schema, which you can find here: this was a brand new install, had never touched anything, had just opened the config file for the first time. i'm not sure where vscode got the schema - perhaps there's one hosted online that is outdated? > I think this is a case of unfortunate aliasing: that makes sense for the duplicate keys error. but like - i got past this issue, but it was difficult and confusing for a brand new user, and i'm just trying to give some feedback. komorebi just silently crashing over and over was part of the confusion, until i (well i don't remember what i did, maybe i ran from cmdline to see logs, or went and tracked down logs) saw the error crashing things. so instead of spamming discord i came to leave an issue that could hopefully be turned into a polish item later. whatever went wrong, however vscode got the schema, **it said i was missing required fields, i added the required fields, the application crashed** so yeah anyway - brand new users are always the best source of bug reports, imo, because they had no outdated stuff on their system. so just letting you know the OOB experience is currently slightly broken, but not any sort of major issue
Author
Owner

@LGUG2Z commented on GitHub (Nov 14, 2025):

a77b3e774a/docs/komorebi.bar.example.json (L49-L53)

Updated the example generated by the quickstart command to use the canonical configuration options instead of the previous aliases, this will ship in v0.1.39

@LGUG2Z commented on GitHub (Nov 14, 2025): https://github.com/LGUG2Z/komorebi/blob/a77b3e774aba5ebd1e4a6033ddab6d4e6686d65c/docs/komorebi.bar.example.json#L49-L53 Updated the example generated by the quickstart command to use the canonical configuration options instead of the previous aliases, this will ship in v0.1.39
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#701