improvement(home): position @ mention popup at caret and fix icon consistency#3831
improvement(home): position @ mention popup at caret and fix icon consistency#3831waleedlatif1 merged 3 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview The dropdown was refactored to support an explicit anchor point and improved keyboard navigation (ArrowDown moves focus into results, ArrowUp from first result returns to search, Enter selects the first match). Resource dropdown rendering was standardized by adding a reusable Written by Cursor Bugbot for commit 617983e. Configure here. |
|
@greptile |
|
@cursor review |
Greptile SummaryThis PR improves the Key changes:
Confidence Score: 4/5Safe to merge after restoring the All UI improvements are well-implemented and the previously raised concerns (mirror-div origin pinning, early-return for null button rect) have been addressed. A single one-line type regression in
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Textarea as UserInput (textarea)
participant getCaretAnchor
participant PlusMenu as PlusMenuDropdown
participant DropdownMenu as Radix DropdownMenu
User->>Textarea: types "@"
Textarea->>getCaretAnchor: getCaretAnchor(textarea, caretPos)
getCaretAnchor-->>Textarea: { left, top } (viewport coords)
Textarea->>PlusMenu: plusMenuRef.open({ left, top })
PlusMenu->>PlusMenu: setAnchorPos({ left, top })
PlusMenu->>DropdownMenu: setOpen(true)
DropdownMenu-->>User: popup appears at caret
User->>PlusMenu: clicks + button
PlusMenu->>PlusMenu: doOpen() — reads buttonRef.getBoundingClientRect()
PlusMenu->>PlusMenu: setAnchorPos({ left, top })
PlusMenu->>DropdownMenu: setOpen(true)
DropdownMenu-->>User: popup appears at + button
User->>PlusMenu: ArrowDown from search input
PlusMenu->>DropdownMenu: firstItem.focus()
User->>PlusMenu: ArrowUp from first item
PlusMenu->>PlusMenu: searchRef.focus()
|
apps/sim/app/workspace/[workspaceId]/home/components/user-input/user-input.tsx
Show resolved
Hide resolved
...sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown.tsx
Show resolved
Hide resolved
...sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown.tsx
Outdated
Show resolved
Hide resolved
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
…sistency (#3831) * improvement(home): position @ mention popup at caret and fix icon consistency * fix(home): pin mirror div to document origin and guard button anchor * chore(auth): restore hybrid.ts to staging
* feat(logs): add additional metadata for workflow execution logs * Revert "Feat(logs) upgrade mothership chat messages to error (#3772)" This reverts commit 9d1b976. * Fix lint, address greptile comments * improvement(sidebar): expand sidebar by hovering and clicking the edge (#3830) * improvement(sidebar): expand sidebar by hovering and clicking the edge * improvement(sidebar): add keyboard shortcuts for new workflow/task, center search modal, fix edge ARIA * improvement(sidebar): use Tooltip.Shortcut for inline shortcut display * fix(sidebar): change new workflow shortcut from Mod+Shift+W to Mod+Shift+P to avoid browser close-window conflict * fix(hotkeys): fall back to event.code for international keyboard layout compatibility * fix(sidebar): guard add-workflow shortcut with canEdit and isCreatingWorkflow checks * feat(ui): handle image paste (#3826) * feat(ui): handle image paste * Fix lint * Fix type error --------- Co-authored-by: Theodore Li <theo@sim.ai> * feat(files): interactive markdown checkbox toggling in preview (#3829) * feat(files): interactive markdown checkbox toggling in preview * fix(files): handle ordered-list checkboxes and fix index drift * lint * fix(files): remove counter offset that prevented checkbox toggling * fix(files): apply task-list styling to ordered lists too * fix(files): render single pass when interactive to avoid index drift * fix(files): move useMemo above conditional return to fix Rules of Hooks * fix(files): pass content directly to preview when not streaming to avoid stale frame * improvement(home): position @ mention popup at caret and fix icon consistency (#3831) * improvement(home): position @ mention popup at caret and fix icon consistency * fix(home): pin mirror div to document origin and guard button anchor * chore(auth): restore hybrid.ts to staging * improvement(ui): sidebar (#3832) * Fix logger tests * Add metadata to mothership logs --------- Co-authored-by: Theodore Li <theo@sim.ai> Co-authored-by: Waleed <walif6@gmail.com> Co-authored-by: Theodore Li <theo@sim.ai>

Summary
Type of Change
Testing
Tested manually
Checklist