Fixed
- +page.svelte: Fixed missing closing
</script>tag that causedelement_unclosederror preventing the app from loading; script tag was accidentally left open after refactoring - +page.svelte: Removed redundant
role=\"main\"from<main>element (semantic HTML already implies the role)
Improved
- Component architecture: Refactored all 10 Svelte components with improved code quality, type safety, and accessibility
- Enhanced reactivity patterns using modern Svelte 5
$effectand$staterunes - Added comprehensive TypeScript type annotations for all functions and parameters
- Improved accessibility with proper ARIA labels, roles, and semantic HTML
- Optimized event handlers and reduced code duplication
- Better error handling and validation throughout
- Enhanced performance with optimized state management and computed values
- Enhanced reactivity patterns using modern Svelte 5
- i18n utilities: Refactored internationalization modules with improved type safety and functionality
- Added comprehensive input validation for all formatter functions (handles invalid/infinite values)
- Enhanced locale detection with fallback handling and normalization (strips region codes)
- Added new utility functions:
isLocaleSupported,getSupportedLocaleOrDefault,changeLocale - Improved error handling for invalid dates and numeric values
- Added
formatTimeandformatFileSizeformatters for better data presentation - Better code organization with constants (
DEFAULT_LOCALE,MILLION,THOUSAND) and helper functions - Enhanced type definitions with
LocaleInfointerface and readonly arrays
- Core library modules: Refactored all 7 core TypeScript modules with comprehensive improvements
- audioPlayer.ts: Enhanced type safety, added helper methods (
getVolume,getDuration,getCurrentTime), improved event handler management, better error handling with clamping functions - downloadQueue.ts: Optimized queue processing with helper functions, improved state management, better type safety with
DownloadStatustype, enhanced error handling and validation - keyboardShortcuts.ts: Improved shortcut matching logic, added utility methods (
has,getShortcut,clear), enhanced key formatting with arrow keys support, better input element detection - notifications.ts: Added notification batching with configurable limits, improved permission handling, better error truncation, added utility methods (
clearPending,getPendingCount) - rateLimiter.ts: Enhanced with utility methods (
reset,canCallNow,getCallCount), added input validation, better timing accuracy, improved documentation - stores.ts: Added comprehensive type definitions (
DownloadStatus,QualityOption), exported constants (DEFAULT_VOLUME,DEFAULT_THEME), explicitWritabletypes for all stores - tray.ts: Added debounced updates to reduce API calls, improved cleanup with
destroy()method, better tooltip building logic, enhanced type safety
- audioPlayer.ts: Enhanced type safety, added helper methods (
- Route and app files: Refactored core SvelteKit routes and configuration files
- +layout.svelte: Extracted helper functions for initialization, theme management, and event handling; improved code organization with constants; better cleanup with
onDestroy; optimized theme application with separated logic - +page.svelte: Centralized keyboard shortcut registration, added type safety with
ViewType, improved cleanup withonDestroy, better code organization with helper functions - app.css: Added CSS custom properties for transitions and shadows, enhanced with utility animations (
fadeIn,slideUp), improved global styles with better resets, added selection styling - app.html: Enhanced meta tags (description, theme-color, color-scheme), improved accessibility with viewport-fit and role attributes, better SEO with descriptive title
- +layout.svelte: Extracted helper functions for initialization, theme management, and event handling; improved code organization with constants; better cleanup with
Fixed
- DownloadsView: Fixed
ReferenceError: unsubHistory is not definedcaused by invalid reactive statement that tried to referenceunsubHistorybefore initialization; moved store subscription intoonMountlifecycle function for proper initialization and cleanup - Navigation: Fixed sidebar navigation buttons (Search, Settings) not switching views — problematic
$effectblock with store subscriptions was interfering with reactivity; moved subscriptions toonMountto restore proper view switching - SettingsView: Fixed confusing empty ARL input field when already logged in — added visual indicator showing "ARL token is securely saved (hidden for security)" with updated placeholder text to clarify that the field is for updating the token