Skip to content

[BUG] Adding variants fails [dev] #1729

@rexy712

Description

@rexy712

Describe the bug
Adding a variant to a shape fails with an error in console.

Missing shape properties [layer.ts:206:49](http://127.0.0.1:8000/src/game/layers/variants/layer.ts)
    addShape layer.ts:206
    addVariant VariantSwitcher.vue:91
    cacheKey vue.esm-browser.js:12322
    callWithErrorHandling vue.esm-browser.js:2417
    callWithAsyncErrorHandling vue.esm-browser.js:2424
    invoker vue.esm-browser.js:11339
    (Async: EventListener.handleEvent)

And a corresponding error for a nonexistent shape in the server logs

2026-01-09 17:59:23,270 - WARNING - Attempt by rexy712 on unknown shape. {method: ToggleComposite.Variants.Add, shape id: eeff2451-aa15-4185-91f1-60e75450be29} (utils.py:14)
2026-01-09 17:59:23,270 - CRITICAL - Uncaught async exception <Model: Shape> instance matching query does not exist:

The new variant shape is successfully created, but the parent shape is not. So the new variant doesn't recognize that it is in fact a subshape to the parent that failed to be created. The original variant becomes uninteractable and invisible.

To Reproduce
Steps to reproduce the behavior:

  1. Create a shape.
  2. Add a variant in the shape properties menu.
  3. Error in console and server.

Expected behavior
Variant parent shape should be created successfully. If I had to guess, I believe this happened due to the intermediate shape representation changing how shape creation works and this particular instance of shape creation was overlooked.

Screenshots

out.mp4

Desktop:

  • OS: gentoo linux
  • Browser: firefox 140.5.0 and ungoogled chromium 139.0.7258.154
  • Version: dev branch commit c719a78

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions