- Remove RELOAD_TAB message chain, use chrome.tabs.reload() directly
- Rename IndexedDB label to '站点存储' for accuracy
- Introduce StorageSizeInfo type to distinguish bytes vs count
- Rename totalSize to totalBytes for clarity
- Merge runCleanScript into runScript to reduce duplication
- Rename CleaningResult.success to overallSuccess to avoid confusion
- Remove unused domain state and setDomain call
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Replace useMemo with direct expression for animationClass
- Move entryPointType to module scope (value is fixed after mount)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove the custom 373-line GlobalSnackbar component and its Provider/Hook
in favor of the already-installed sonner library.
Changes:
- Delete src/components/GlobalSnackbar.tsx (+ tests)
- Remove SnackbarProvider from popup/App.tsx and sidepanel/App.tsx
- Replace useSnackbar() calls with toast.success()/toast.error() in:
- ImageUploader.tsx
- useQrCode.ts
- ParsePanel.tsx
- LiveClock.tsx
- Update test mocks to use sonner instead of GlobalSnackbar
-554 lines, +43 lines (net -511 lines)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Mark formatFileSize() as @deprecated, delegate to formatBytes
- Replace manual for-loop in base64ToBytes() with Uint8Array.from()
- Replace nested loops in sniffMimeFromBytes() with Array.every()
5 insertions(+), 23 deletions(-)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the 30-line chrome.alarms API implementation with a simple
setTimeout for delayed tab reloads.
Rationale: The only usage is a 1-second delay after storage cleaning.
Service workers don't go idle within 1 second, so alarms' persistence
benefit is unnecessary here.
- Removed: alarm naming, create/clear, listener register/unregister
- Added: 4-line setTimeout conditional
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move the 62-line inline main world injection function from background.ts
to a dedicated utils/rightClickInjection.ts file.
This separates the RightClickRestorer's DOM patching logic from the
service worker's message routing concerns.
- background.ts: -62 lines, now delegates to imported function
- utils/rightClickInjection.ts: new file with mainWorldInjectionScript()
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace nested if/try/catch with a single ternary expression.
isUnsupportedPage() already handles invalid URLs, so new URL() is safe here.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Remove messageHandler.ts (6-line pass-through facade)
- Import contextMenuHandler directly from content.ts
- Replace local getI18nText() with shared getMessage() from utils/chromeI18n
Reduces content script files from 3 to 2 and eliminates i18n logic duplication.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Replace react-i18next docs with chrome.i18n API documentation
- Update translation file paths from i18n/locales/ to public/_locales/
- Update test mock description for chromeI18n
- Remove references to useLazyTranslation, vendor-i18n chunk, and snackbar
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- StorageCleaner: add px-3.5 to grid container to prevent content sticking to border
- StorageCleaner: adjust select-all bar to pl-3.5 pr-7 for checkbox alignment with grid items
- Base64Converter: add px-2 to TextMode and Base64ConverterSection for consistent spacing
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Group storage options, auto-refresh toggle, and clean button into unified card
- Remove card wrappers from StorageOptionsGrid and AutoRefreshToggle (now sections within parent card)
- Align OptionItem and Select All checkboxes with consistent px-3.5 padding
- Distinguish indeterminate vs checked checkbox states visually
- Standardize spacing (space-y-4), add select-none to page root
- Fix import path for StorageCleanerConfirm to relative ./
feat: optimize dashboard/search UX and simplify extension architecture
Redesign Dashboard with compact tool grid and recently used tools
Improve TopBar search UX with Cmd/Ctrl+K shortcut and better history navigation
Reorganize project structure into src/
Migrate i18n from react-i18next to chrome.i18n
Remove runtime language switch and settings page
Remove HTML/Markdown conversion tools
Clean up unused code, dead animations, redundant comments, and imports
Improve component consistency with shadcn/ui patterns
Replace hardcoded strings/colors with i18n tokens and theme tokens
Add comprehensive project documentation and coding standards
Fix CI artifact upload workflow and multiple TypeScript/test issues
Includes various refactors, UI polish, i18n cleanup, CI improvements,
and maintenance updates across the codebase.
- Store feature keys (PageType) in history instead of translated labels
- Show icon + name + description in history items (same as search results)
- Click or Enter on history item navigates directly to the tool page
- Remove History icon import (no longer needed)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add global Cmd/Ctrl+K keyboard shortcut to focus search input
- Show keyboard shortcut hint (⌘K) in search input when empty
- Improve input styling: rounded-lg, softer borders, focus transitions
- Improve dropdown: rounded-lg, larger shadow, better spacing
- Larger result icons (h-8 w-8) with rounded-lg containers
- Refined history section with uppercase label and muted icon
- Search icon fades in on focus via group-focus-within
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace large ToolCard layout with dense grid (3-6 columns responsive)
- Each item shows icon + tool name in a compact tile
- Hover highlights icon and text with smooth transitions
- Remove ToolCard import from Dashboard (component retained for reuse)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add search input at top to filter tools by name/description
- Add 'recently used' section showing last 3 used tools as compact chips
- Add 'all tools' section header for the tool card grid
- Track tool usage via new 'app/recentlyUsedTools' storage key
- Update navigateTo to record recently used tools (max 3, LRU order)
- Add i18n keys: dashboard_searchPlaceholder, dashboard_recentlyUsed, dashboard_allTools
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove unused imports and variables across 35 files
- Simplify component logic and remove dead code
- Clean up test files by removing unnecessary setup
- Streamline CI workflow configuration
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use react-i18next withTranslation HOC for class component to translate
title, description, and retry button text.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use react-i18next withTranslation HOC for class component to translate
title, description, and refresh button text.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add keys for errorBoundary, pageErrorBoundary, router, and
messages.copyEmpty in both zh and en locales.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>