KittyCAD / modeling-app

The KittyCAD modeling app.
https://kittycad.io/modeling-app/download
MIT License
422 stars 35 forks source link

[BUG]: can't select features or sketch lines until the KCL Code pane is opened at least once #2636

Closed franknoirot closed 4 months ago

franknoirot commented 5 months ago

Describe the bug

If you enter a project and begin sketching or editing an existing sketch without ever having the KCL Code pane opened, selecting lines fails. I've confirmed the selection fails, not just the blue segment highlighting, because attempting to apply a constraint after the failed selection does nothing. Opening the KCL Code pane remedies this issue.

Steps to Reproduce

  1. Close the KCL Code pane
  2. Refresh
  3. Start sketching or editing an existing sketch
  4. Try selecting lines. This should fail

Expected Behavior

Users should not need to open the KCL Code pane to initialize the selection behavior.

Screenshots and Recordings

https://github.com/KittyCAD/modeling-app/assets/23481541/f6f0c68a-4f1f-4aca-8791-cde0bd9ec091

Desktop OS

Any

Browser

Any

Version

v0.22.1

Additional Context

No response

franknoirot commented 5 months ago

@jessfraz and @Irev-Dev might have insights into this, it seems at the intersection of KclManager and selections

franknoirot commented 5 months ago

Was going to file a separate issue for this but it's really the same issue I think: the same behavior holds for selecting a sketch to edit it. You cannot select a sketch until the KCL Code pane is opened at least once.

https://github.com/KittyCAD/modeling-app/assets/23481541/79fe62a0-743d-4909-9a94-e5e31def4181

jessfraz commented 4 months ago

i think i can figure it out, sometjing is getting triggered by the pane rendering initially

jessfraz commented 4 months ago

okay this is working now and i wonder if had to do with some other fix, i might try and bisect it super weird but legit it works for me

jessfraz commented 4 months ago

oh just part does... okay so you can create a new sketch when the code pane is closed but cant edit

jessfraz commented 4 months ago

let me write a failing test for fun so we know