feat: auto-group macros in the sidebar#2993
Conversation
cdd1fe5 to
097c3d1
Compare
|
Good catch! Just committed. How about now? |
|
By headlines, I assume you mean non-leaf items. I've tried to make them more prominent, but it looked overkill. The current indentation and the downward-pointing arrow should indicate that they're non-leaf nodes. Implemented the rest of your suggestions. |
|
Just a question I don't know what is the good behaviour. If I open the popover of a key action and navigate to the And may be worth to add a 3rd macro grouping option about how to show macros when Agent opens. In collapsed or opened. It is not a strong option I have to use this feature more to see better |
|
Great catch regarding the jump to macro! The macro should expand. Just submitted a commit. Let's not add a default opening option for now. I think the current behavior is fine, and we'll add further options if requested. |
|
Looking into the code/dom now, and... it seems that everything is a leaf item in that tree. That greatly limits any indent-related formatting. 😑 |
|
Looks nice! Is this in a usable state now, or should I wait? Because I really don't wanna wait...😁 |
|
Usable state :) |
Add optional sidebar grouping derived from macro names, with settings for camelCase splitting, nesting depth, and minimum group size. Grouping is off by default and only affects sidebar display, not stored macro names. Closes #1845 Co-authored-by: Cursor <cursoragent@cursor.com>
Use \p{L} and \p{N} so non-English macro names and unicode digits group
correctly in the sidebar instead of breaking on accented characters.
Co-authored-by: Cursor <cursoragent@cursor.com>
Grouped sidebar items now always display the full macro name, and macros whose name matches a group label are listed inside that group. Co-authored-by: Cursor <cursoragent@cursor.com>
When a macro is selected via Jump to macro or navigation, open its ancestor sidebar groups so the target macro stays visible. Co-authored-by: Cursor <cursoragent@cursor.com>
| &__macro-group-children { | ||
| width: auto; | ||
| padding-left: $macro-tree-indent-step; | ||
| border-left: 1px solid silver; |
There was a problem hiding this comment.
I havent checked out the PR just looked into it. Is this silver looks goon in light and dark mode? Should not we use a predefined "silver" color?
There was a problem hiding this comment.
Yes, the silver color does look good in light and dark modes alike.
There was a problem hiding this comment.
Should not we use a predefined "silver" color?
We definitely should.
Keep persisted MacroGroupingSettings in uhk-common and colocate display-time grouping, tree types, and layout-derived max depth with the Agent UI. Co-authored-by: Cursor <cursoragent@cursor.com>
751bed9 to
90f1cdb
Compare



Summary
bindMouseLeft.$prefixes and avoids incorrect deeper nesting when siblings do not share a next segment.Closes #1845
Test plan
Doom: Chainsaw,Doom: Plasma gun→ collapsibleDoomfolderbindMouseLeft/bindMouseRight→bindgroup$onInit/$onJoingroup under$on, notonOpen daily sites/Open weekly sites→Open>daily sites,weekly sites(not full names)npm testinpackages/uhk-commonMade with Cursor