REFACTOR: Hotkeys are no longer hardcoded in Settings UI
NEW SYSTEM:
1. Plugins advertise their hotkeys via class attributes:
Legacy (single hotkey):
hotkey = 'ctrl+shift+s'
New format (multiple hotkeys with descriptions):
hotkeys = [
{
'action': 'toggle',
'description': 'Toggle Skill Scanner',
'default': 'ctrl+shift+s',
'config_key': 'skillscanner_toggle' # optional
},
{
'action': 'quick_scan',
'description': 'Quick Scan',
'default': 'f12',
}
]
2. Settings UI dynamically discovers hotkeys:
- Scans all plugins for hotkey/hotkeys attributes
- Groups hotkeys by plugin name
- Shows description + input field + reset button
- Core system hotkeys in separate 'Core System' group
3. Visual improvements:
- Scrollable hotkey list
- Reset button (↺) for each hotkey
- Tooltips showing default value
- Plugin grouping for organization
4. Backward compatible:
- Still supports legacy 'hotkey' attribute
- Converts to new format automatically
- Existing settings preserved
BASE PLUGIN:
- Added hotkeys attribute documentation
- Added docstring with usage examples
- Shows both formats in class docstring
SETTINGS PLUGIN:
- _create_hotkeys_tab() now dynamic
- _collect_plugin_hotkeys() scans all plugins
- Groups by plugin with QGroupBox
- Reset buttons restore defaults
- ScrollArea for long lists
This allows plugins to define multiple hotkeys with
descriptions, and they'll automatically appear in
Settings without hardcoding them in the core.
NEW FEATURES:
1. Dependency Indicators:
- 🔗 (cyan) - Plugin has dependencies (hover for list)
- ⚠️ (yellow) - Plugin is required by other enabled plugins
- 🔄 (orange) - Auto-enabled due to dependency
2. Legend Bar:
Shows what each indicator means at the top of the plugins tab
3. Dependency Tooltips:
- 🔗 Shows: 'This plugin requires: X, Y, Z. These will be auto-enabled.'
- ⚠️ Shows: 'Required by enabled plugins: A, B. Disable those first.'
- 🔄 Shows: 'Auto-enabled by: PluginName'
4. Enable with Dependencies:
When enabling a plugin with unmet dependencies:
- Shows confirmation dialog listing all plugins to be enabled
- User can cancel before enabling
- Dependencies are auto-enabled on confirmation
5. Disable Protection:
When trying to disable a plugin that others depend on:
- Shows warning dialog listing dependent plugins
- Prevents accidental breaking of dependencies
- User must disable dependents first
6. Dependency Report Dialog:
- New '📋 Dependency Report' button
- Shows HTML report with:
* Summary stats (total/enabled plugins)
* Plugins with dependencies list
* Plugins required by others list
* Full dependency chains
7. Enable/Disable All with Ordering:
- Dependencies are enabled first (topological sort)
- Dependents are disabled first (reverse order)
- Prevents enable/disable failures due to ordering
8. Auto-refresh UI:
After enabling/disabling, plugin list refreshes to show:
- Updated auto-enabled status
- Updated dependency indicators
- Updated checkbox states
VISUAL IMPROVEMENTS:
- Better spacing and layout
- Color-coded indicators
- Clear visual hierarchy
- Informative tooltips throughout
This makes plugin management much more intuitive and prevents
common mistakes like accidentally breaking dependencies.