[PR #23738] feat: enhance GotoAnything UX with @ command selector #30381

Closed
opened 2026-02-21 20:47:23 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/23738

State: closed
Merged: Yes


Fixes #23736

Summary

This PR enhances the GotoAnything search functionality by adding a command selector interface when users type the @ character. The enhancement improves user experience through better command discoverability while maintaining full backward compatibility.

Key Changes

Command Selector Component

  • Added CommandSelector component that displays when user types @
  • Shows available search commands (app, plugin, knowledge, node) with descriptions
  • Supports keyboard navigation and click selection
  • Clean, aligned layout with consistent spacing

Improved Default Interface

  • Simplified default view with concise guidance text
  • Replaced verbose command list with clear action prompts
  • Better visual hierarchy and breathing space

State Management Optimization

  • Synchronized UI state transitions to prevent flickering
  • Real-time state updates for smooth user interactions
  • Intelligent query management to avoid unnecessary requests

Enhanced User Flow

  1. Users see simplified guidance when modal opens
  2. Typing @ immediately shows command selector
  3. Selecting a command auto-fills input and maintains focus
  4. All existing @app hello syntax continues to work unchanged

Technical Implementation

  • Backward Compatibility: All existing @ command syntax works identically
  • Performance: Disabled search requests during command selection mode
  • Accessibility: Full keyboard navigation support
  • Internationalization: Reused existing translation keys for consistency
  • Type Safety: Comprehensive TypeScript integration

Testing

  • Manual testing of all user interaction flows
  • Verified existing functionality remains unaffected
  • Tested state transitions and edge cases
  • Confirmed accessibility with keyboard-only navigation

This enhancement reduces the learning curve for new users while providing a more polished experience for all users of the GotoAnything feature.

Screenshots

Before After
Complex default view with all commands listed Clean guidance with @ command selector on demand

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/23738 **State:** closed **Merged:** Yes --- Fixes #23736 ## Summary This PR enhances the GotoAnything search functionality by adding a command selector interface when users type the @ character. The enhancement improves user experience through better command discoverability while maintaining full backward compatibility. ### Key Changes **Command Selector Component** - Added CommandSelector component that displays when user types @ - Shows available search commands (app, plugin, knowledge, node) with descriptions - Supports keyboard navigation and click selection - Clean, aligned layout with consistent spacing **Improved Default Interface** - Simplified default view with concise guidance text - Replaced verbose command list with clear action prompts - Better visual hierarchy and breathing space **State Management Optimization** - Synchronized UI state transitions to prevent flickering - Real-time state updates for smooth user interactions - Intelligent query management to avoid unnecessary requests **Enhanced User Flow** 1. Users see simplified guidance when modal opens 2. Typing @ immediately shows command selector 3. Selecting a command auto-fills input and maintains focus 4. All existing @app hello syntax continues to work unchanged ### Technical Implementation - **Backward Compatibility**: All existing @ command syntax works identically - **Performance**: Disabled search requests during command selection mode - **Accessibility**: Full keyboard navigation support - **Internationalization**: Reused existing translation keys for consistency - **Type Safety**: Comprehensive TypeScript integration ### Testing - Manual testing of all user interaction flows - Verified existing functionality remains unaffected - Tested state transitions and edge cases - Confirmed accessibility with keyboard-only navigation This enhancement reduces the learning curve for new users while providing a more polished experience for all users of the GotoAnything feature. ## Screenshots | Before | After | |--------|-------| | Complex default view with all commands listed | Clean guidance with @ command selector on demand | ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos\!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:47:23 -05:00
yindo closed this issue 2026-02-21 20:47:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30381