Skip to content

Edge-Drop is a clipboard shelf on the edge of your screen. Hover to open it. Drag files and images into any app, click to copy text and links. Free and open-source for Windows.

fix(settings): migrate legacy autoUpdates off to notify-me and harden validation

Deepender25d1a626cfe8b0
diff --git a/README.md b/README.md
index 12fe3e3..69f6f7d 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@
<a href="https://github.com/Deepender25/Edge-Drop/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/Deepender25/Edge-Drop?style=flat-square&labelColor=23272e&color=f6c7d6" /></a>
<a href="https://github.com/Deepender25/Edge-Drop/network/members"><img alt="Forks" src="https://img.shields.io/github/forks/Deepender25/Edge-Drop?style=flat-square&labelColor=23272e&color=c7e7f6" /></a>
<a href="https://github.com/Deepender25/Edge-Drop/releases"><img alt="Release" src="https://img.shields.io/github/v/release/Deepender25/Edge-Drop?style=flat-square&labelColor=23272e&color=d2f4e8" /></a>
- <img src="https://img.shields.io/badge/tests-364%20passing-8ca77b?style=flat-square&logo=vitest&logoColor=white&labelColor=23272e" alt="Tests" />
+ <img src="https://img.shields.io/badge/tests-444%20passing-8ca77b?style=flat-square&logo=vitest&logoColor=white&labelColor=23272e" alt="Tests" />
<a href="LICENSE"><img alt="License" src="https://img.shields.io/github/license/Deepender25/Edge-Drop?style=flat-square&labelColor=23272e&color=ffe6b3" /></a>
<img src="https://img.shields.io/badge/platform-Windows%2010%20%2F%2011-93a4fc?style=flat-square&logo=windows&logoColor=white&labelColor=23272e" alt="Platform" />
</p>
@@ -260,6 +260,7 @@ npm run build:store # outputs an MSIX .appx for Microsoft Store submission
- **Rest-as-Intent Seam Policy (Multi-Monitor):** Intelligent 140ms dwell threshold for interior monitor boundaries. Moving your cursor between displays passes through smoothly without accidental shelf triggers, while stopping deliberately at the edge opens the shelf instantly.
- **Versioned Screen Geometry & Probe:** Replaced asynchronous display queries with a pure geometric screen probe (`stickProbe.ts`) backed by versioned display-change caching, eliminating boundary seam jitter across mixed-DPI monitor arrays.
- **Cross-Reboot Display Persistence:** Edge-Drop remembers your chosen monitor across device restarts. A 4-tier resolution pipeline silently re-identifies the correct physical monitor after Windows re-assigns numeric display IDs on reboot.
+- **Top screen edge dock:** Besides the left and right edges, the shelf can now live horizontally along the top of your screen (up to 1080px wide), with its own trigger zone, flares, preview flyout, and settings layouts.
- **Smart Windows Fullscreen Game Detection:** Native Win32 `SHQueryUserNotificationState` OS detection (`fullscreen.ts`) combined with `GetForegroundWindow` + `GetClassNameA` filtering (`Progman`, `WorkerW`, `Shell_TrayWnd`) automatically suppresses edge hover during Direct3D games (*VALORANT*, *Cyberpunk*, *PowerPoint*) while allowing Edge-Drop to open smoothly on the Windows Home Screen / Desktop.
- **Self-Healing Launch at Login (Quoted Paths):** Automatic Windows Registry synchronization (`HKCU\Software\Microsoft\Windows\CurrentVersion\Run`) strictly quotes executable paths, guaranteeing that usernames or installation paths with spaces launch cleanly on startup. Includes automatic migration and healing for unquoted keys across updates.
- **RAM Footprint Stabilization (~130 MB):** Large text entries (>300 chars) are stored as disk payload files (`payloads/<id>.txt`), holding only 300-char preview snippets in memory. Locks operational RAM to ~130 MB–160 MB with a V8 ceiling cap of 512 MB.
@@ -270,6 +271,11 @@ npm run build:store # outputs an MSIX .appx for Microsoft Store submission
- **Collision Detection & Dynamic Registration:** Dynamically updates Electron `globalShortcut` with automatic collision resolution and instant toast feedback.
- **Zero OS Focus Stealing:** Dynamically toggles window focusability exclusively during active key recording, keeping normal shelf clicks non-intrusive.
+**Shelf Search**
+- Type-to-filter search box in the shelf (full row on the vertical blade, centered box on the horizontal dock). Typing never steals focus from your active app, and clicking a result pastes straight into it.
+- **Elastic filter controls:** The filter chips and emoji category bar use a rubber-band control with momentum glide and squash-and-settle, fully keyboard navigable with reduced-motion support.
+- **Colors filter & Pantone swatches:** A dedicated Colors tab collects copied color codes, rendered as dynamic Pantone-style swatch cards.
+
**Selective & Filter-Scoped History Clearing**
- **Time-Based Preset Windows:** Clear history in convenient time windows (**Last 1 hour**, **6 hours**, **24 hours**, or **Clear all**).
- **Filter-Aware Scoping:** Clearing history while viewing a category tab (e.g. `Images`, `Files`, `Links`, `Text`) or an active search query *only* deletes unpinned items in that active view, leaving the rest of your history completely safe.
@@ -297,6 +303,7 @@ npm run build:store # outputs an MSIX .appx for Microsoft Store submission
- **5% Magnetic Tick Slider:** Smooth `0.002` real-time 1-to-1 continuous tracking during drag with 60fps/120fps precision, featuring 21 visual tick dashes, live percentage badge (`50%`), percentage quick-jump buttons (`0%`, `50%`, `100%`), and magnetic 5% snapping on pointer release.
- **Position & Display Switch Preview:** 1.75s temporary interactive preview window when changing `Stick position` (`Left` / `Right`) or `Display` monitor in settings.
- **CPU Performance Optimization & Zero Blur Jank:** Replaced heavy `backdrop-filter: blur()` calls across UI components with high-performance solid/semi-transparent dark fills, eliminating CPU rasterization overhead for 60fps/120fps butter-smooth panel opening and scrolling.
+- **Sharper text on every display:** The app now uses Windows native ClearType text rendering instead of forced grayscale smoothing, so text looks crisp next to native apps — most noticeable on 4K monitors.
- **Prominent Support Section & Matching Pill Buttons:** Re-ordered settings footer placing the Support & Sponsor card prominently above the Quit button, linking to official domain `www.edgedrop.app`. Features matching 40px height pill buttons for Support and GitHub Star.
- **Low-Profile Bottom Quit Pill:** Compact, subtle Quit pill button (`.subtle-quit-btn`) centered at the very bottom of the settings view without noisy header text.
@@ -306,6 +313,7 @@ npm run build:store # outputs an MSIX .appx for Microsoft Store submission
- **Windows Light Theme Adaptive System Tray:** Dynamically detects Windows taskbar theme changes and automatically swaps between pure-white and high-contrast dark vector tray icons.
- **Monochrome Glassmorphic Banner:** Prominently positioned at the top of the scrollable content area across all category tabs. Styled with a dark-mode glassmorphic 4% white card fill (`rgba(255, 255, 255, 0.04)`), 12% white border, and high-contrast white button.
- **Microsoft Store Isolation:** Isolated build pipelines ensure Microsoft Store (MSIX) builds remain 100% compliant with Store terms and conditions without integrated update mechanisms (`isStoreBuild()`).
+- **Three update modes:** Choose **Automatic** (check + download + one-click restart), **Notify me** (check at launch, prompt with Download/Skip, never downloads on its own), or **Off** (fully silent). Update prompts sit at the top of Settings, manual checks behave the same in every mode, and skipped versions remind you on next launch.
**Multi-format clipboard engine**
- Captures plain text, URLs, rich HTML, raw images, spreadsheets, and multi-file selections
diff --git a/electron/store/settings.ts b/electron/store/settings.ts
index d72db4a..c619507 100644
--- a/electron/store/settings.ts
+++ b/electron/store/settings.ts
@@ -24,19 +24,26 @@ function merge(base: Settings, patch: Partial<Settings>): Settings {
if (out.stickPosition !== 'left' && out.stickPosition !== 'right' && out.stickPosition !== 'top') {
out.stickPosition = 'left'
}
- if (out.triggerAlignment !== 'top' && out.triggerAlignment !== 'center' && out.triggerAlignment !== 'bottom') {
+ if (out.triggerAlignment !== 'top' && out.triggerAlignment !== 'center' && out.triggerAlignment !== 'bottom' && out.triggerAlignment !== 'left' && out.triggerAlignment !== 'right') {
out.triggerAlignment = 'center'
}
+ if (typeof out.horizontalOffset !== 'number' || Number.isNaN(out.horizontalOffset)) {
+ out.horizontalOffset = 0.5
+ }
+ out.horizontalOffset = Math.min(1.0, Math.max(0.0, out.horizontalOffset))
if (typeof out.language !== 'string' || !out.language.trim()) {
out.language = 'system'
}
// Update mode migration + validation. Legacy files carry only autoUpdates;
- // map them (false -> 'off', anything else -> 'auto') so existing installs
- // keep byte-identical behavior. Then sync the legacy boolean back from the
- // mode so downgraded app versions still read a sensible value.
+ // map them (false -> 'notify', anything else -> 'auto') so upgraders who
+ // silenced auto-downloads still hear about new versions without anything
+ // downloading behind their back. Then sync the legacy boolean back from
+ // the mode so downgraded app versions still read a sensible value.
if (!isUpdateMode(out.updateMode)) {
- out.updateMode = out.autoUpdates === false ? 'off' : 'auto'
+ out.updateMode = out.autoUpdates === false ? 'notify' : 'auto'
}
+ // Drop the long-removed bounceAnimation key so old files stop carrying it.
+ delete (out as unknown as Record<string, unknown>).bounceAnimation
out.autoUpdates = out.updateMode === 'auto'
// Skip is session-only by contract ("remind me next restart"), so a
// persisted skip from older builds is self-healed away on load. This also
diff --git a/shared/types.ts b/shared/types.ts
index 9e4b420..fa860a0 100644
--- a/shared/types.ts
+++ b/shared/types.ts
@@ -18,14 +18,15 @@ const UPDATE_MODES: readonly UpdateMode[] = ['auto', 'notify', 'off']
/**
* Resolve the effective update mode. Prefers the stored updateMode; migrates
- * legacy autoUpdates booleans (true/missing -> 'auto', false -> 'off') so
- * existing installs keep their exact behavior with zero surprises.
+ * legacy autoUpdates booleans (true/missing -> 'auto', false -> 'notify') so
+ * upgraders keep getting told about updates without anything downloading
+ * behind their back. Pure 'off' is opt-in on the new selector.
*/
export function resolveUpdateMode(s: Pick<Settings, 'updateMode' | 'autoUpdates'>): UpdateMode {
if (s.updateMode === 'auto' || s.updateMode === 'notify' || s.updateMode === 'off') {
return s.updateMode
}
- return s.autoUpdates === false ? 'off' : 'auto'
+ return s.autoUpdates === false ? 'notify' : 'auto'
}
export function isUpdateMode(value: unknown): value is UpdateMode {
diff --git a/tests/updateMode.test.ts b/tests/updateMode.test.ts
index b9afb47..ac8ef59 100644
--- a/tests/updateMode.test.ts
+++ b/tests/updateMode.test.ts
@@ -12,13 +12,13 @@ describe('updateMode resolution and legacy migration', () => {
expect(resolveUpdateMode({ updateMode: 'auto', autoUpdates: false })).toBe('auto')
})
- it('migrates legacy booleans with zero behavior change', () => {
+ it('migrates legacy booleans: on stays auto, off becomes notify', () => {
expect(resolveUpdateMode({ autoUpdates: true })).toBe('auto')
- expect(resolveUpdateMode({ autoUpdates: false })).toBe('off')
+ expect(resolveUpdateMode({ autoUpdates: false })).toBe('notify')
})
it('falls back to the legacy boolean on corrupt mode values', () => {
- expect(resolveUpdateMode({ updateMode: 'sometimes' as never, autoUpdates: false })).toBe('off')
+ expect(resolveUpdateMode({ updateMode: 'sometimes' as never, autoUpdates: false })).toBe('notify')
expect(resolveUpdateMode({ updateMode: '' as never })).toBe('auto')
})