Infer DS labels from code + argument display names (arg-N)#128
Open
mkayander wants to merge 3 commits into
Open
Infer DS labels from code + argument display names (arg-N)#128mkayander wants to merge 3 commits into
mkayander wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
54babea to
7956594
Compare
7956594 to
55d0d43
Compare
- JS: extend array literal transform to call __dstructArrayLiteralWithName for const/assign/assignment-pattern RHS; keep unnamed helper for single-string literals and return-position literals - Runtime: build labeled literals via ControlledArray with displayLabel in addArray options - Redux: store displayLabel on ArrayData; show caption in array/map/matrix views - Python: attach AST parents and infer list names from assign/ann/aug assign; pass displayLabel in TrackedList addArray options; seed case arg labels from arg name Co-authored-by: Max Kayander <mkayander@users.noreply.github.com>
- Add optional ArgumentObject.label (non-unique); getArgumentDisplayLabel falls back to arg-{order+1}
- caseSlice.updateArgumentLabel + include label in args content signature
- ArgInput: composite field labels; suffix rename opens Popover with debounced 300ms save + flush on close
- JsonInput: suffixSlot + timeout passthrough; string/json inputs use 300ms debounce
- New projects/cases: short-uuid argument ids instead of head/array keys; addCase binary tree uses uuid
- useArgumentsParsing: structure displayLabel uses display name, not store id
- i18n: rename tooltip strings (en + generated types)
Co-authored-by: Max Kayander <mkayander@users.noreply.github.com>
- Extend array literal transform: append { displayLabel } to new Array/ArrayProxy
when RHS is inferable; skip ambiguous new Array(singleNumber) length form
- Require array literal parent to be actual RHS (init/right) for named literals
- ArrayProxy constructor accepts optional trailing options object for displayLabel
Co-authored-by: Max Kayander <mkayander@users.noreply.github.com>
55d0d43 to
5bcccdd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Runtime structure labels (JS/Python)
__dstructArrayLiteralWithName; single-string literals stay unnamed to avoid ambiguity.TrackedListpassesdisplayLabelinaddArrayoptions.displayLabelon array/map/matrix slices; trees/graphs unchanged.Test case arguments (this PR)
ArgumentObject.label— optional, non-unique display string.nameremains the only stable store / structure key (short-uuid for new defaults).arg-${order + 1}viagetArgumentDisplayLabel()whenlabelis empty.{displayName} ({type}), e.g.arg-1 (Array).head/array;addCasefor binary tree creates a uuid argument, nothead.Files of note
src/entities/argument/lib/getArgumentDisplayLabel.ts,caseSlice.updateArgumentLabelsrc/features/argsEditor/ui/ArgumentRenameSuffix.tsx,ArgInput.tsx,ArgsEditor.tsx(delete tooltip uses display name)src/server/api/routers/project.ts(getDefaultArguments,addCase)src/features/treeViewer/hooks/useArgumentsParsing.ts(structuredisplayLabelfrom display name)Testing
pnpm test:cipnpm run tscBranch
Rebased onto latest
main; includes prior DS label commit + this args commit.