Visibility toggle for sketch blocks in feature tree#10744
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…' into pierremtb/issue10742-feature-tree-integration
There was a problem hiding this comment.
Codex wrote those, think they're alright?
There was a problem hiding this comment.
Nice yeah even added coverage to the helix hide behavior, thanks.
| pathArtifact: Extract<Artifact, { type: 'path' }>, | ||
| artifactGraph: ArtifactGraph | ||
| ): Extract<Artifact, { type: 'sketchBlock' }> | undefined { | ||
| // TODO: replace this pathToNode match once the artifact graph can map a Path to its SketchBlock directly. |
There was a problem hiding this comment.
This is wrapped nicely but still isn't a great way to find the sibbling. Keeping the TODO for now.
| item, | ||
| operations: kclManager.operations ?? [], | ||
| artifactGraph: kclManager.artifactGraph, | ||
| }) |
| return null | ||
| } | ||
|
|
||
| export function hasSamePathToNode( |
There was a problem hiding this comment.
c: I'm a little surprised we don't have a helper for this already
| pathArtifact.codeRef.pathToNode, | ||
| artifactGraph | ||
| ).find( | ||
| (artifact): artifact is Extract<Artifact, { type: 'sketchBlock' }> => |
There was a problem hiding this comment.
c: I like this type predicate with the is Extract, we should use this more.
There was a problem hiding this comment.
Agreed! Was from Codex and I found it great.
There was a problem hiding this comment.
Nice yeah even added coverage to the helix hide behavior, thanks.
| targetArtifact?: Artifact | ||
| } | ||
|
|
||
| export function resolveFeatureTreeVisibility(input: { |
There was a problem hiding this comment.
This will be helpful to use in the bodies pane, nice encapsulation.

Closes #10742. Stacked on #10743 ✅
If people are happy with this we may consider applying the
hide(sketch###)directly on extrusion.Clipboard-20260406-232445-925.mp4