Skip to content

Make sweep tests more point-and-click like and clean up pathToNode retrieval #6963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

pierremtb
Copy link
Contributor

@pierremtb pierremtb commented May 15, 2025

Relates to #6952

Part of #6650.

Copy link

vercel bot commented May 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 17, 2025 6:39pm

Comment on lines -140 to +142
const pathNodePath = getNodePathFromSourceRange(
ast,
path.graphSelections[0].codeRef.range
)
// Find the path declaration for the labeled argument
const pathDeclaration = getNodeFromPath<VariableDeclaration>(
ast,
pathNodePath,
path.graphSelections[0].codeRef.pathToNode,
Copy link
Contributor Author

@pierremtb pierremtb May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Irev-Dev @jtran I was playing with this as I remember you telling me to start trusting codeRef.pathToNode more. This change away from getNodePathFromSourceRange works perfectly for me when I'm creating a sweep, but not if I'm editing one. Just a data point, I can help investigate whenever

Related https://github.com/KittyCAD/modeling-app/pull/6737/files#r2077656349

@pierremtb pierremtb changed the title WIP: udpate sweep point-and-click tests and mess with pathToNode Make sweep tests more point-and-click like and clean up pathToNode retrieval May 17, 2025
@pierremtb pierremtb marked this pull request as ready for review May 17, 2025 20:07
@pierremtb pierremtb requested review from jtran, Irev-Dev and a team May 17, 2025 20:08
@pierremtb pierremtb enabled auto-merge (squash) May 18, 2025 15:14
@pierremtb pierremtb disabled auto-merge May 18, 2025 15:46
@pierremtb pierremtb marked this pull request as draft May 18, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant