Bases - sorting a column after expanding width of other columns results in duplicate columnSize entries in YAML and causes Uncaught YAMLParseError: Map keys must be unique at line 22, column 5

Steps to reproduce

Use the following base in the sandbox vault

views:
  - type: table
    name: Table
    order:
      - file.name
      - count
      - formula.price
      - formula.percent
      - contexts
      - file.ctime
      - file.ext
    sort:
      - column: property.contexts
        direction: DESC
      - column: formula.price
        direction: DESC
      - column: formula.percent
        direction: DESC

Follow instructions in the GIF. Essentially, extend the right most column enough to create a horizontal scroll bar, then extend the second last column so that the last column goes out of visibility, then sort the third last column. This somehow results in duplicate columnSize entries in the YAML as shown in the stacktrace on the right side. If I go to the source view and remove this duplication, the base comes back.

base_sort_after_width_expansion_duplicate_bug_clean

Did you follow the troubleshooting guide? [Y/N]

Yes

Expected result

No crash when sorting

Actual result

Crash

Environment

SYSTEM INFO:
Obsidian version: v1.9.1
Installer version: v1.7.7
Operating system: Windows 11 Home 10.0.26100
Login status: logged in
Language: en
Catalyst license: insider
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

I don’t know if there is a second issue or not, but sometimes, this causes the whole base code to disappear, essentially corrupting the note.

Here is the first stack trace when this crash happens. This is from a second attempt after I recorded the GIF

app.js:1 Uncaught YAMLParseError: Map keys must be unique at line 22, column 5:

      file.ctime: 220
    columnSize:
    ^

    at constructor.onError (app.js:1:768265)
    at app.js:1:752692
    at iy (app.js:1:753701)
    at app.js:1:766193
    at dy (app.js:1:766737)
    at app.js:1:754292
    at iy (app.js:1:754423)
    at app.js:1:766193
    at dy (app.js:1:766737)
    at app.js:1:753214

A post was merged into an existing topic: Embedded Bases Codeblocks: Code changes / corruption when dragging to resize columns