-
Notifications
You must be signed in to change notification settings - Fork 0
Add Settings window #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
04913a4 to
fdc802a
Compare
Documents the hybrid declarative registry approach for the settings system, including search via uFuzzy and registry-UI completeness checks.
- docs/specs/settings.md: Complete spec for settings UI, registry, persistence, all sections, keyboard shortcuts editor, themes, and advanced settings - docs/specs/settings-tasks.md: Phased implementation plan with ~80 tasks covering foundation, UI, testing, and documentation
Implements a comprehensive settings system with: - Settings registry for declarative setting definitions - Ark UI components for all setting types (switch, select, slider, etc.) - Settings persistence via tauri-plugin-store - Fuzzy search using uFuzzy (same engine as command palette) - Settings window accessible via Cmd+, - Multiple sections: Appearance, File operations, Updates, Network, Keyboard shortcuts, Themes, Developer/MCP, Logging, Advanced - Unit tests for registry and search functionality - Rust port checker for MCP server configuration
- Remove async from functions that don't await (setSetting, resetSetting)
- Add eslint-disable comments for intentionally unused searchQuery props
- Replace non-null assertions with proper null coalescing defaults
- Fix template literal expressions with number types
- Add keys to all {#each} blocks
- Fix no-confusing-void-expression errors with proper braces
- Remove unused imports (onDestroy, searchSettings, toMilliseconds, etc.)
- Fix floating promises with void operator
- Simplify unnecessary conditionals flagged by ESLint
The console statements are intentional for logging warnings and errors during settings initialization, persistence, and listener notifications.
Tests cover: - Opening settings via keyboard shortcut (Meta+, or Ctrl+,) - Settings sidebar navigation - Search input functionality - Section selection - Closing settings with Escape key - Fallback direct navigation tests Note: Multi-window tests may be skipped if the test environment doesn't support window switching with tauri-driver.
Implements spec from docs/specs/shortcut-settings.md: - New shortcuts module (src/lib/shortcuts/) with: - Scope hierarchy for determining active scopes - Key capture and formatting (platform-specific) - Shortcuts store for persistence - Conflict detection between overlapping scopes - Keyboard handler for matching shortcuts - Updated KeyboardShortcutsSection.svelte: - Click-to-edit shortcuts with 500ms confirmation - Conflict warning with resolve options - Modified indicator (blue dot) - Filter chips: All, Modified, Conflicts (with count) - Add/remove shortcuts per command - Reset to defaults (single and all) - Documentation: - docs/specs/shortcut-settings.md: Full specification - docs/specs/shortcut-settings-tasks.md: Implementation tasks - docs/features/settings.md: Feature documentation - Tests: 27 unit tests for scope hierarchy and key capture
- Add --color-warning-bg CSS variable for light and dark modes - Remove inline color fallbacks from KeyboardShortcutsSection.svelte - Add settings and shortcuts modules to knip ignore list (public API)
Extract shortcut matching into small helper functions to reduce cyclomatic complexity from 19 to under 15.
Rust: - Remove unused port checker commands from invoke_handler (not yet used) - Keep port_checker module for future MCP server configuration CSS: - Add missing .subsections class to SettingsSidebar
Rust: - Remove unused port_checker module (can be re-added when needed) - Export only load_settings from settings module (others unused) Coverage: - Add settings components and sections to allowlist (UI components) - Add shortcuts store files to allowlist (depend on Tauri APIs)
- Add DevTools permission for settings window - Add window positioning (centered, max 852px) - Remember last section (in app-status-store) - Auto-apply UI density (row height in lists) - Auto-apply date/time format - Auto-apply Theme changes (setTheme() in ThemesSection) - Add IntelliJ-style navigation with summary pages - Add settings persistence (debounced save to store) - Fix keyboard shortcuts error - Fix slider visual bug - Add debug logging
- Add cross-window settings sync via Tauri events so settings changes
in Settings window immediately apply to main window
- Wire up `appearance.fileSizeFormat` setting:
- Add formatFileSizeWithFormat() supporting binary (1024) and SI (1000) units
- FullList uses reactive formatFileSize() for file size tooltips
- Wire up `appearance.useAppIconsForDocuments` setting:
- Pass setting through Rust backend icon fetching
- Add clearExtensionIconCache command to clear cache when setting changes
- Icons update immediately when toggling the setting
- Add reactive settings infrastructure for immediate UI updates
- Add debug logging for settings changes
- Add cross-window settings sync via Tauri events (settings:changed) - Create reactive-settings.svelte.ts for immediate UI updates - Wire UI density to row heights in BriefList/FullList - Wire date/time format with live formatting updates - Wire file size format (binary/SI) throughout the app - Wire network timeout settings to SMB client operations - Wire developer settings (verbose logging, MCP config) - Wire advanced settings (virtualization buffer, debounce, timeouts) - Fix Reset feature not clearing modified indicators - Fix app icons toggle causing missing icons (cache refresh) - Fix BriefList bottom bar to use reactive file size format - Add format-utils.ts for pure formatting functions - Add network-settings.ts helpers for timeout calculations - Add settings-applier.ts for CSS variable and backend sync
fdc802a to
3a7f5e9
Compare
- 200ms debounce added to search input in SettingsSidebar - Content filtering: SettingsContent now only shows sections containing matching settings, and only the individual setting rows that match the query - Search highlighting: Matching text is highlighted with <mark class="search-highlight"> in setting labels. Added --color-highlight CSS variable (yellow tint) for light/dark modes. - Updated all section components (Appearance, FileOperations, Updates, Network, McpServer, Logging, Themes, Advanced) to filter individual settings using getMatchingSettingIds() - Bug fixes: Fixed ESLint error in SettingSelect, added CSS classes to allowlist
- Remove shortcut button: Each shortcut pill now has a hoverable "x" button on the right side with "Remove shortcut" tooltip
- ESC handling in "Add shortcut" mode: ESC now cancels the add mode instead of closing the settings window (uses stopPropagation)
- Reset button fixed: Removed unnecessary confirm dialog, added proper event handling so it actually resets to default
- Duplicate prevention: saveShortcut() now checks if the same shortcut already exists on that action and cancels if duplicate
- "Filter by keys" field improved:
- Modifiers show while held, clear when released (unless a non-modifier was pressed)
- Captures special keys (ESC, Backspace, Space, etc.)
- Tab passes through for focus navigation
- Shortcuts now work:
- Added initializeShortcuts() calls in both main window and settings window
- The keyboard handler uses getEffectiveShortcuts() which returns custom shortcuts
- Fix searching for shortcuts Settings-wide - Fix saving/loading settings - Update Tauri menus when changing shortcuts - Some more fixes - Improve MCP server along the way - Also remove some excessive debug logs
fd13fff to
42c361d
Compare
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
Changes
src/lib/settings/module with components, sections, and registrysrc/lib/shortcuts/module for shortcut managementTest plan