Skip to content

Performance#106

Merged
dantheuber merged 7 commits into
mainfrom
performance
Mar 23, 2026
Merged

Performance#106
dantheuber merged 7 commits into
mainfrom
performance

Conversation

@dantheuber
Copy link
Copy Markdown
Owner

Summary

  • Performance & rendering optimizations: Virtualized clip list, extracted SyntaxHighlightedCode component, memoized expensive computations, improved language detection with debouncing and caching
  • Domain-split storage (COP-25): Split monolithic data.enc into settings.enc, clips.enc, templates.enc, and meta.json so each save writes only its domain file; window bounds load directly from filesystem without SecureStorage dependency; background load notifies renderer via storage-ready IPC event; legacy data.enc auto-migrated
  • External image storage (COP-26): Images saved as individual encrypted files (images/{id}.enc) with 200px thumbnails; clips store imageId + thumbnailDataUrl instead of inline base64; full images loaded on demand via get-full-image IPC; orphaned image files cleaned up on clip deletion
  • Version bump: 1.7.2

Added

  • SyntaxHighlightedCode component extracted from TextClip for reuse and lazy rendering
  • image-store.ts module for encrypted per-image file storage with thumbnail generation
  • storage-ready IPC event for non-blocking renderer startup
  • meta.json for unencrypted storage metadata (version tracking)
  • Clipboard monitoring tests (monitoring.test.ts) and hotkey action tests (actions.test.ts)
  • Image store tests (image-store.test.ts)

Changed

  • Storage split from single data.enc into domain-specific encrypted files (settings.enc, clips.enc, templates.enc)
  • Image detection priority changed to prefer image binary over HTML for correct handling of Discord-style image copies
  • Clip list rendering virtualized for large clip histories
  • Language detection rewritten with debouncing, caching, and improved heuristics
  • Context menus and clip options refactored to use native context menus
  • Window bounds loading no longer blocks on SecureStorage initialization
  • Migration system extended to handle both legacy monolithic → split-file and inline-base64 → external-image migrations
  • File operations updated with listFiles, deleteFile, and domain-aware read/write helpers
  • ClipsProvider refactored to support async storage readiness and prevent duplicate clip creation from useEffect re-runs

Fixed

  • Startup blocking caused by synchronous SecureStorage load
  • Duplicate clip creation from useEffect re-runs in ClipsProvider
  • Imperative DOM error handler corruption in virtualizer
  • Inline base64 images bloating the main storage file

Removed

  • Monolithic data.enc storage format (auto-migrated to split files)
  • Inline base64 image storage in clip records (auto-migrated to external files)

…(COP-25)

Split monolithic data.enc into settings.enc, clips.enc, templates.enc, and
meta.json. Each save writes only its domain file. Window bounds load directly
from filesystem without SecureStorage dependency. Background load notifies
renderer via storage-ready IPC event. Legacy data.enc is auto-migrated.
…OP-26)

Images are saved as individual encrypted files (images/{id}.enc) with 200px
thumbnails ({id}_thumb.enc). Clips store imageId + thumbnailDataUrl instead
of inline base64. Full images loaded on demand via get-full-image IPC.
Existing inline base64 clips auto-migrated on load. Orphaned image files
cleaned up on clip deletion. Image detection priority changed to prefer
image binary over HTML to correctly handle Discord-style image copies.
Fixed duplicate clip creation from useEffect re-runs and imperative DOM
error handler corruption in virtualizer.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

📊 Coverage Report

Metric Coverage
Statements 100%
Branches 100%
Functions 100%
Lines 100%

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 23, 2026

🧪 E2E Test Results

13 passed, 0 failed, 0 skipped

Test Suite Result
App Launch
Clipboard
Image Clipboard
Quick Clips
Settings
Theme
Settings — Search Terms CRUD
Settings — Quick Tools CRUD
Settings — Templates CRUD
Tools Launcher — Pattern Scanning
Tools Launcher — Clip Templates

@dantheuber dantheuber merged commit 0c236f0 into main Mar 23, 2026
3 checks passed
@dantheuber dantheuber deleted the performance branch March 23, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant