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.

feat(v0.2.0): silent background auto-updates, GitHub release sync, and UI enhancements

Deepender2532c6aac270b5
diff --git a/.gitignore b/.gitignore
index 733a4d0..72d6139 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,4 +11,5 @@ FIXES_CHECKLIST.md
!.vscode/extensions.json
docs/
+dev-app-update.yml
diff --git a/README.md b/README.md
index 579ecd5..8e0e107 100644
--- a/README.md
+++ b/README.md
@@ -12,8 +12,8 @@
<p align="center">
<a href="#quick-start">Quick Start</a> ·
<a href="#demos">Demos</a> ·
- <a href="#how-it-works">How It Works</a> ·
- <a href="#architecture">Architecture</a> ·
+ <a href="#features">Features</a> ·
+ <a href="#codebase-architecture">Codebase & Architecture</a> ·
<a href="#security">Security</a> ·
<a href="#roadmap">Roadmap</a> ·
<a href="#contributing">Contributing</a>
@@ -65,6 +65,7 @@ It is built for the developer and creative workflow where you constantly juggle
<video src="https://github.com/user-attachments/assets/cee7d5f7-658b-433a-9fa0-6592a5a75fa4" width="100%" autoplay loop muted playsinline></video>
</td>
</tr>
+ <tr>
<td width="50%" align="center"><b>7. Preview Flyout</b><br/><br/>
<video src="https://github.com/user-attachments/assets/fe5a8b47-08c6-4d32-92b6-bb4e0446a82a" width="100%" autoplay loop muted playsinline></video>
</td>
@@ -103,68 +104,20 @@ npm run build:store # outputs an MSIX .appx for Microsoft Store submission
---
-## How It Works
-
-Edge-Drop is an Electron app split into three strictly isolated processes — **Main** (Node.js, OS access), **Preload** (typed sandbox bridge), and **Renderer** (React UI). They communicate over a fully typed IPC contract. No string channel names, no `any` payloads.
-
-### The invisible edge trigger
-
-The shelf stays hidden as a frameless, transparent, click-through `BrowserWindow` anchored at `x=0`. When collapsed, **all mouse events pass through to the apps beneath it** — your desktop is 100% usable. Detection happens in the Main process via a 16ms `screen.getCursorScreenPoint()` poll, because Windows transparent windows silently drop `pointermove` forwarding.
-
-A **dead-band hysteresis state machine** prevents the shelf from flickering open/closed when your cursor hovers near its boundary:
-
-| Threshold | Value | Meaning |
-|---|---|---|
-| Trigger Zone | `x ≤ 3px` | A 3-pixel strip on the left edge starts a 120ms dwell timer |
-| Keep-Open | `x ≤ 255px` | Cursor clearly inside the blade → cancel any close timer |
-| Dead Band | `255px < x ≤ 290px` | Micro-tremors here are ignored — no action |
-| Start-Close | `x > 290px` | Cursor clearly outside → 250ms grace timer begins |
-
-This is the kind of detail that separates a "looks nice" demo from a tool you can actually live with.
-
-### Multi-format clipboard engine
-
-The `ClipboardWatcher` polls the OS clipboard every 600ms. To detect *change* without re-encoding images on every tick, it computes a cheap content signature:
-
-- **Files** → joined path list
-- **Text** → the text itself
-- **Images** → an **FNV-1a hash over ~400 sampled bytes of the raw BGRA bitmap** (dimensions + hash)
-
-The previous naive approach of comparing `toPNG().length` was both expensive (re-encoded the whole image each tick) and broken (two different 1920×1080 screenshots of similar complexity produced identical byte counts → the second was silently dropped). The FNV-1a sampler is O(400) regardless of image size and has astronomically low collision probability.
-
-It also **respects privacy flags**. Clipboard formats from password managers and dictation tools — `ExcludeClipboardContentFromMonitorProcessing`, `ClipboardViewerIgnore`, `CanIncludeInClipboardHistory=0`, `KeePassClipFormat`, `com.bitwarden.concealed`, etc. — are matched case-insensitively and skipped entirely.
-
-### Native OS drag-out (OLE)
-
-Standard HTML5 drag events cannot hand file handles to external desktop software. Edge-Drop intercepts the renderer's `dragstart`, sends a fire-and-forget IPC (`item:start-drag`) to the Main process, which stages the item's content as a temp file and calls `webContents.startDrag({ file, icon })`. The OS then renders a native drag ghost and handles the drop into Photoshop, Word, Explorer, or any other app — exactly as if you had dragged the file from Explorer itself.
-
-Custom drag icons are generated on the fly: stacked card PNGs for file bundles (with a count badge), glassmorphic quote cards for text, real image thumbnails for images. Rendered via `@resvg/resvg-js`, cached, and pre-warmed on startup so the first drag is instant.
-
-### Smart deduplication, stacks, and merging
-
-When you re-copy existing content, Edge-Drop doesn't add a duplicate — it bumps the item to position 0, increments its `hitCount` badge, and refreshes its timestamp. Multi-file drag-ins and multi-image copies auto-group into expandable 3D card stacks (max 10 per stack). Drag any item card over another to merge them into a bundle; double-click to expand and drag a sub-item to the left edge to split it back out.
-
----
-
-## Architecture
-
-Edge-Drop is engineered with a strict process-isolated Electron architecture:
-- **Electron Main Process (Node.js)**: Runs high-frequency cursor polling, Windows DPAPI safeStorage clipboard history persistence, PowerShell Win32 HDROP multi-file parsing, and System Tray synchronization.
-- **Typed Preload Bridge (`contextBridge`)**: Exposes statically typed IPC channels (`window.edge`) with `contextIsolation: true` and zero `nodeIntegration`.
-- **React Renderer**: Powers the glassmorphic blade UI using Zustand state management, Framer Motion spring physics, and high-performance list virtualization.
-
----
-
## Features
**Zero-click edge hover**
- Frameless, transparent, always-on-top `BrowserWindow` anchored at `x=0`
- 100% click-through when collapsed — desktop stays fully usable
- Configurable hot-zone height (25% / 40% / 60% of screen) and blade height (40% – 100%)
-- **Multi-monitor support:** Pick exactly which display the panel sticks to, with options for Left or Right screen edges. Features a single source of truth multi-display engine (`getDisplayListOptions()`) with real-time System Tray menu synchronization, automatic OS topology recovery on monitor disconnect (`display-removed`), and brief 1.5s visual confirmation pop-ups (`popUpAndRetract`).
-- **Fullscreen Protection (Game Mode):** Native Windows `SHQueryUserNotificationState` OS detection (`fullscreen.ts`) automatically suppresses edge hover when Direct3D games, fullscreen videos, or presentations are active. Instantly auto-retracts open panels when entering fullscreen mode, with zero polling overhead (0ms latency) and full `Alt + C` hotkey support.
+- **Multi-monitor support:** Pick exactly which display the panel sticks to, with options for Left or Right screen edges. Features a single source of truth multi-display engine (`getDisplayListOptions()`) with real-time physical resolution calculation (3840×2160, 2560×1440, 1920×1080) across all High-DPI Windows display scaling factors.
+- **Fullscreen Protection (Game Mode):** Native Windows `SHQueryUserNotificationState` OS detection (`fullscreen.ts`) automatically suppresses edge hover when Direct3D games, fullscreen videos, or presentations are active.
- **Ultra-lightweight:** Optimized memory footprint (~60% reduced RAM) using custom `edgelocal://` streaming protocols and compressed WebM assets.
+**Silent Background Auto-Updates**
+- **Zero-Friction Updates (`electron-updater`):** GitHub releases feature silent background downloading and a single-click "Restart to Update" button.
+- **Microsoft Store Isolation:** Isolated build pipelines ensure Microsoft Store (MSIX) builds remain 100% compliant with Store terms and conditions without integrated update mechanisms.
+
**Multi-format clipboard engine**
- Captures plain text, URLs, rich HTML, raw images, and multi-file selections
- Win32 `FileNameW` / HDROP parsing via PowerShell to bypass Electron's single-file limit
@@ -172,35 +125,46 @@ Edge-Drop is engineered with a strict process-isolated Electron architecture:
- Smart deduplication — re-copies bump `hitCount` and move the item to the top
- Incognito mode — one click suspends polling for sensitive data
+**Direct URL Detection & One-Click Launch**
+- **Quick Action Links:** Dedicated external link launcher (`ExternalLinkIcon`) on URL item cards and inside Preview Flyouts.
+- **Browser Launch:** Clicking the link button opens URLs directly in your default web browser without requiring manual copy/pasting.
+
**Native OS drag & drop**
- `webContents.startDrag()` hands real file handles to external apps
-- Custom drag icons: stacked card PNGs with count badges, glassmorphic text cards, real image thumbnails
+- Custom drag icons: stacked card PNGs with count badges, styled text cards, real image thumbnails
- Drag-in: drop files onto the shelf to add them; drag-out: drop anywhere — Photoshop, Word, Explorer, Slack
-- Pre-warmed icon cache so the first drag is instant
**Fluid collections & stacks**
- Auto-group multi-file drag-ins and multi-image copies into 3D card stacks (max 10)
- **Preview Flyout Drag-to-Stack**: Drag any shelf item directly onto an open Preview Flyout to stack and merge them seamlessly
- Double-click to expand, drag a sub-item to the left edge to split it back out
-- Type-safe merge rules: images only merge with images, files with files (text never groups)
**UI / UX**
-- **What's New Release History View**: Integrated in-app release notes viewer (`v0.1.5` to `v0.1.0`) accessible via the Settings header button, featuring unread update badges and automatic main-settings navigation reset
-- **Lucide-React Vector Icon Suite**: Powered by official `lucide-react` vector icon library for crisp, high-precision SVG icons across headers, item cards, and settings
-- **Glassmorphic Pinned Deck**: Dedicated Pinned items deck container with custom icon header, smooth Framer Motion spring collapse/expand height physics, and clean text count
-- **Tactile Spring Toggles**: Settings toggle switches powered by Framer Motion spring physics (`stiffness: 600`, `damping: 35`) for tactile tactile feedback
-- **High-Contrast Typography & Anti-Pixelation**: Ultra-crisp font rendering with `vector-effect: non-scaling-stroke` and high-contrast color tokens eliminating subpixel blurriness on all display scale factors
-- **Dynamic Preview Flyout**: Responsive 100% full-width (`1fr`) layout for single files, 2-column grid for multi-file collections, with calibrated `ResizeObserver` hover boundary tracking (`insideY`)
-- **Customizable Copy Indicator Styles**: Select from 4 vector copy indicators (**Edge-Drop Logo**, **Tick**, **Copy**, and **Sparkle**) in a clean 2x2 grid flyout selector
-- **Universal Click-to-Paste**: Click any text snippet, image thumbnail, or file tile inside Preview Flyout to instantly paste into active desktop applications with shared double-click debounce protection (`tryPaste.ts`)
-- **Community & Feedback Integration**: Integrated **Feedback & Issues** button under **COMMUNITY & SUPPORT** in Settings, linking directly to zero-friction Markdown GitHub Issue templates (`issues/new/choose`)
-- **Staggered Panel & Preview Exit Timing**: Closing while a preview flyout is open dismisses the preview flyout first (`240ms` delay) before collapsing the main shelf to prevent layout collisions
-- **Unified Image Rendering**: Copied image files (`.png`, `.jpeg`, `.gif`, `.webp`) render as visual image cards with thumbnails on the shelf and display full visual image previews in flyouts
-- **High-Contrast Overlays**: Solid dark `rgba(0, 0, 0, 0.85)` copy button overlays with crisp backdrop styling over images
-- Minimalist macOS aesthetic — deep black obsidian surface, hairline borders, and adaptive spring physics (`useAdaptiveSpring`)
-- Custom SVG connection flares that scale with the blade
-- Scroll gradient masks top & bottom to fade items into black
-- Reduce-motion setting for accessibility
+- **Pinned Deck**: Dedicated Pinned items deck container with custom icon header, smooth Framer Motion spring collapse/expand height physics, and clean text count.
+- **Tactile Framer Motion Switches**: Settings toggle switches powered by Framer Motion spring physics (`stiffness: 600`, `damping: 35`) with dark/light contrast styling.
+- **What's New Release History View**: Integrated in-app release notes timeline viewer (`ChangelogView.tsx`) connected to live GitHub Releases API with pure formatted text highlights and zero-lag offline fallbacks.
+- **Lucide-React Vector Icon Suite**: Powered by official `lucide-react` vector icons for crisp graphics across headers, item cards, and settings.
+- **Dynamic Preview Flyout**: Responsive layout for single files and multi-file collections with calibrated hover boundary tracking.
+- **Customizable Copy Indicator Styles**: Select from 4 vector copy indicators (**Edge-Drop Logo**, **Tick**, **Copy**, and **Sparkle**) in a 2x2 grid flyout selector.
+- **Universal Click-to-Paste**: Click any text snippet, image thumbnail, or file tile inside Preview Flyout to instantly paste into active desktop applications.
+- Minimalist macOS aesthetic — deep black obsidian surface, hairline borders, and adaptive spring physics (`useAdaptiveSpring`).
+
+---
+
+## Codebase & Architecture
+
+### Process Isolation & IPC Contract
+Edge-Drop is organized into three strictly isolated layers:
+
+1. **Main Process (`electron/main/`)**: Node.js runtime handling OS integrations, Win32 OLE drag pipelines, Windows DPAPI encryption (`safeStorage`), native `ClipboardWatcher` polling, and background auto-updates (`updater.ts`).
+2. **Preload Sandbox (`electron/preload/`)**: Context-isolated bridge (`contextBridge.exposeInMainWorld('edge', api)`). Consumes single-source-of-truth contracts in `shared/ipc.ts` (`InvokeMap`, `EventMap`, `SendMap`) and `shared/bridge.ts` (`EdgeApi`).
+3. **Renderer Process (`src/`)**: React 18 UI powered by Zustand state management (`appStore.ts`) and Framer Motion spring physics (`useAdaptiveSpring.ts`).
+
+### Key Engine Components
+- **`ClipboardWatcher.ts`**: Polls system clipboard every 600ms. Computes cheap FNV-1a hashes over BGRA bitmap bytes for zero-overhead image deduplication.
+- **`ItemStore.ts`**: Atomic JSON persistence with `safeStorage` DPAPI encryption, automatic duplicate bumping, and stack merging/splitting.
+- **`updater.ts`**: Singleton `autoUpdater` module handling background downloading and single-click restart installation for GitHub builds, gated behind `!isStoreBuild()`.
+- **`drag.ts`**: Server-side SVG → PNG icon rendering via `@resvg/resvg-js` for stacked drag ghosts.
---
@@ -234,6 +198,7 @@ Edge-Drop touches the OS clipboard, the filesystem, and the Win32 OLE drag pipel
| Animation | **Framer Motion** | Adaptive spring physics (`useAdaptiveSpring`), layout transitions, gesture animations |
| State | **Zustand** | Selector-optimized, zero cascading re-renders during drags |
| Drag icons | **@resvg/resvg-js** | Server-side SVG → PNG rendering for custom drag ghosts |
+| Auto-Updates | **electron-updater** | Background downloading and single-click installation for GitHub builds |
---
@@ -243,23 +208,26 @@ Edge-Drop touches the OS clipboard, the filesystem, and the Win32 OLE drag pipel
Edge-Drop/
├─ shared/ Typed IPC contracts & domain models
│ ├─ types.ts ClipboardItem, Bundle, Settings, DragRequest DTOs
+│ ├─ bridge.ts EdgeApi preload interface
│ └─ ipc.ts InvokeMap / EventMap / SendMap channel definitions
├─ electron/ Node.js backend & OS integrations
│ ├─ main/
│ │ ├─ index.ts Single-instance lock, IPC registration, startup
│ │ ├─ window.ts Frameless window, setIgnoreMouseEvents, cursor poll
+│ │ ├─ updater.ts Background auto-update engine (electron-updater)
│ │ ├─ tray.ts System tray icon & context menus
+│ │ ├─ fullscreen.ts Windows SHQueryUserNotificationState game detection
│ │ └─ drag.ts OLE startDrag, temp-file staging, icon generation
│ ├─ preload/ Sandbox bridge exposing window.edge
│ ├─ clipboard/
│ │ ├─ ClipboardWatcher.ts 600ms poll loop, transient-copy rejection
│ │ └─ formats.ts FNV-1a signatures, Win32 HDROP, privacy-flag detection
│ └─ store/
-│ ├─ ItemStore.ts Atomic JSON persistence, dedup, merge/split logic
+│ ├─ ItemStore.ts Atomic JSON persistence, DPAPI encryption, dedup
│ ├─ settings.ts User config & startup registration
│ └─ paths.ts AppData + temp directory resolution
├─ src/ React renderer
-│ ├─ components/ Panel, ItemList, ClipboardItem, SearchBar, Settings, Icons
+│ ├─ components/ Panel, ItemList, ClipboardItem, SearchBar, Settings, ChangelogView, Icons
│ ├─ hooks/ useEdgeHover (hysteresis), useDragOut, useFilteredItems
│ ├─ store/ Zustand appStore
│ ├─ lib/ Theme tokens, format helpers, file-type detection
@@ -275,13 +243,12 @@ Edge-Drop is in **public beta**. The following are planned, in rough priority or
- [ ] **AI semantic self-organization** — embed text/URL/HTML items, auto-cluster into named groups, replace manual pinning
- [ ] **AI summarization** — condense multi-file bundles and long HTML copies into one-line summaries + tags
- [x] **Multi-monitor support** — anchor to any display edge, not just primary
+- [x] **Silent background auto-updates** — background download and 1-click update installation
- [ ] **Linux port** — replace Win32-specific paths with cross-platform equivalents
- [ ] **Plugin SDK** — let users write custom format readers and drag-out targets
- [ ] **Cloud sync (opt-in, E2E encrypted)** — sync pinned items across machines
- [ ] **Search across full history** — currently capped at `historyLimit` (default 500)
-The AI features are the headline roadmap items and the reason this project is applying to OpenAI's **Codex for Open Source** program.
-
---
## Contributing
diff --git a/electron/main/drag.ts b/electron/main/drag.ts
index 41b858a..ba74805 100644
--- a/electron/main/drag.ts
+++ b/electron/main/drag.ts
@@ -317,7 +317,7 @@ function escapeXml(unsafe: string): string {
})
}
-/** Generate a custom glassmorphic quote card PNG icon for text dragging. */
+/** Generate a custom quote card PNG icon for text dragging. */
function createTextDragIcon(text: string): Electron.NativeImage {
const cleaned = text.replace(/[\r\n]+/g, ' ').trim()
let line1 = cleaned.substring(0, 28)
diff --git a/electron/main/index.ts b/electron/main/index.ts
index 42419c6..6f5d39d 100644
--- a/electron/main/index.ts
+++ b/electron/main/index.ts
@@ -16,6 +16,7 @@ import { createTray, registerIncognitoApplier } from './tray'
import { registerIpc, registerSendListeners } from './ipc'
import { prewarmDragIcons } from './drag'
import { initState, getWatcher, loadSettings, pushState, stopStateTimers } from './state'
+import { initAutoUpdater } from './updater'
import { createOnboardingWindow } from './onboardingWindow'
import { startFullscreenMonitor, stopFullscreenMonitor, triggerFullscreenCheck } from './fullscreen'
import { join, resolve } from 'node:path'
@@ -128,6 +129,7 @@ app.whenReady().then(() => {
registerIncognitoApplier((v) => getWatcher().setPaused(v))
getWatcher().setPaused(settings.incognito)
pushState.settings(settings)
+ initAutoUpdater()
// Keep the tray checkmarks in sync after settings change from the UI.
// (Tray menu is rebuilt on each open, so no extra wiring is needed here.)
diff --git a/electron/main/ipc.ts b/electron/main/ipc.ts
index 79857f8..5c08f3a 100644
--- a/electron/main/ipc.ts
+++ b/electron/main/ipc.ts
@@ -5,7 +5,7 @@
* renderer calls them through the typed preload bridge, so a signature mismatch
* is a compile-time error rather than a runtime one.
*/
-import { app, ipcMain, clipboard, nativeImage, screen, shell } from 'electron'
+import { app, ipcMain, clipboard, nativeImage, shell } from 'electron'
import { existsSync, readFileSync } from 'node:fs'
import { join } from 'node:path'
import { execFile } from 'node:child_process'
@@ -14,12 +14,13 @@ import { filterValidPaths, isValidFilePath, isExistingFilePath } from './pathVal
import { type InvokeMap, type InvokeChannel, type SendMap, type SendChannel } from '../../shared/ipc'
import { getStore, loadSettings, saveSettings, pushState, addFiles, getWatcher } from './state'
import { getMainWindow } from './window'
-import { setInteractive, setHeartbeatPaused, setHotZoneWidth, repositionWindow, currentStickDisplayId, getDisplayListOptions, popUpAndRetract } from './window'
+import { setInteractive, setHeartbeatPaused, setHotZoneWidth, repositionWindow, getDisplayListOptions, popUpAndRetract } from './window'
import { getOnboardingWindow } from './onboardingWindow'
import { rebuildTrayMenu } from './tray'
import { startDragOut, resolveDragData } from './drag'
import { clipboardSignature } from '../clipboard/formats'
import type { ItemData, MergeResult } from '../../shared/types'
+import { quitAndInstallUpdate } from './updater'
/**
* Returns true if the current system clipboard content matches the given item data.
@@ -154,7 +155,7 @@ function handle<C extends InvokeChannel>(
}
/** Detects whether the app is packaged and running as a Microsoft Store (MSIX) build. */
-function isStoreBuild(): boolean {
+export function isStoreBuild(): boolean {
if (process.windowsStore || process.env.APP_BUILD_TARGET === 'store') {
return true
}
@@ -183,35 +184,46 @@ export function registerIpc(): void {
}
})
- handle('app:check-update', async () => {
- if (isStoreBuild()) {
- return null
- }
+ handle('app:install-update', () => {
+ if (isStoreBuild()) return
+ console.log('[IPC] app:install-update requested by renderer — calling quitAndInstallUpdate')
+ quitAndInstallUpdate()
+ })
+
+ handle('app:get-releases', async () => {
try {
- const response = await fetch('https://api.github.com/repos/Deepender25/Edge-Drop/releases/latest', {
- headers: {
- 'User-Agent': 'Edge-Drop-App'
- },
- signal: AbortSignal.timeout(5000)
+ const response = await fetch('https://api.github.com/repos/Deepender25/Edge-Drop/releases', {
+ headers: { 'User-Agent': 'Edge-Drop-App' },
+ signal: AbortSignal.timeout(12000)
})
if (!response.ok) {
- console.warn('[IPC] app:check-update GitHub API status:', response.status)
- return null
+ return STATIC_CHANGELOG_FALLBACK
}
- const data = await response.json() as any
- const latestVersion = data.tag_name || ''
- const assets = data.assets || []
- const exeAsset = assets.find((a: any) => a.name && a.name.endsWith('.exe'))
- const apkAsset = assets.find((a: any) => a.name && a.name.endsWith('.apk'))
- const downloadUrl = exeAsset?.browser_download_url || apkAsset?.browser_download_url || data.html_url || ''
- return {
- latestVersion,
- downloadUrl
+ const data = (await response.json()) as any[]
+ if (!Array.isArray(data) || data.length === 0) {
+ return STATIC_CHANGELOG_FALLBACK
}
+
+ return data.slice(0, 10).map((rel, index) => {
+ const tag = rel.tag_name || rel.name || `v0.1.${index}`
+ const dateStr = rel.published_at
+ ? new Date(rel.published_at).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' })
+ : ''
+
+ const rawBody = rel.body || ''
+ const { summary, highlights } = parseReleaseBodyToCleanText(rawBody)
+
+ return {
+ version: tag.startsWith('v') ? tag : `v${tag}`,
+ date: dateStr,
+ isLatest: index === 0,
+ summary: summary || `Release ${tag}`,
+ highlights
+ }
+ })
} catch (err) {
- const msg = err instanceof Error ? err.message : String(err)
- console.log(`[IPC] app:check-update skipped (${msg})`)
- return null
+ console.warn('[IPC] app:get-releases fetch failed, returning static fallback:', err)
+ return STATIC_CHANGELOG_FALLBACK
}
})
@@ -649,3 +661,105 @@ export async function writeItemToClipboard(data: ItemData): Promise<void> {
break
}
}
+
+/** Parses raw GitHub markdown release notes into clean plain text highlights (stripping image/video/HTML tags). */
+function parseReleaseBodyToCleanText(body: string): { summary: string; highlights: Array<{ title: string; description: string }> } {
+ // 1. Strip images, videos, and raw HTML tags completely (pure plain text)
+ const clean = body
+ .replace(/!\[.*?\]\(.*?\)/g, '') // Strip markdown images ![alt](url)
+ .replace(/<img[^>]*>/gi, '') // Strip HTML img tags
+ .replace(/<video[^>]*>.*?<\/video>/gi, '') // Strip HTML video tags
+ .replace(/<[^>]+>/g, '') // Strip any remaining HTML tags
+
+ const lines = clean.split(/\r?\n/).map(l => l.trim()).filter(Boolean)
+ let summary = ''
+ const highlights: Array<{ title: string; description: string }> = []
+
+ for (const line of lines) {
+ if (line.startsWith('#') || line.startsWith('>')) {
+ const text = line.replace(/^[#>\s]+/, '').trim()
+ if (!summary && text && !text.toLowerCase().includes('what\'s changed') && !text.toLowerCase().includes('full changelog')) {
+ summary = text
+ }
+ continue
+ }
+
+ if (line.startsWith('-') || line.startsWith('*') || line.startsWith('•') || /^\d+\./.test(line)) {
+ const content = line.replace(/^[-*•\d.\s]+/, '').trim()
+ if (!content) continue
+
+ const boldMatch = content.match(/^\*\*(.*?)\*\*[\s:-]*(.*)/)
+ if (boldMatch) {
+ const title = boldMatch[1].trim()
+ const description = boldMatch[2].trim()
+ if (title) {
+ highlights.push({ title, description: description || title })
+ continue
+ }
+ }
+
+ const colonIdx = content.indexOf(':')
+ if (colonIdx > 0 && colonIdx < 45) {
+ const title = content.substring(0, colonIdx).trim()
+ const description = content.substring(colonIdx + 1).trim()
+ if (title) {
+ highlights.push({ title, description: description || title })
+ continue
+ }
+ }
+
+ highlights.push({ title: content, description: '' })
+ } else if (!summary && line.length > 10) {
+ summary = line
+ }
+ }
+
+ return {
+ summary: summary || 'Latest updates and fixes.',
+ highlights: highlights.length > 0 ? highlights : [{ title: 'Bug Fixes & Performance Enhancements', description: 'Includes minor bug fixes and stability improvements.' }]
+ }
+}
+
+const STATIC_CHANGELOG_FALLBACK = [
+ {
+ version: 'v0.2.0',
+ date: 'Jul 26, 2026',
+ isLatest: true,
+ summary: 'Silent background auto-updater, GitHub Releases changelog synchronization, and glassmorphic pinned deck.',
+ highlights: [
+ {
+ title: 'Silent Background Auto-Updater',
+ description: 'GitHub releases feature silent background downloading and a single-click Restart to Update installation button.'
+ },
+ {
+ title: 'Microsoft Store Build Isolation',
+ description: 'Isolated build pipelines ensure Microsoft Store (MSIX) builds remain 100% compliant with Store policies.'
+ },
+ {
+ title: 'Direct URL Launcher',
+ description: 'Added quick action buttons to launch links in your default web browser directly from item cards and preview flyouts.'
+ },
+ {
+ title: 'Pinned Items Deck Container',
+ description: 'Encapsulated pinned items inside a dedicated deck container with smooth spring height animations.'
+ }
+ ]
+ },
+ {
+ version: 'v0.1.5',
+ date: 'Jul 24, 2026',
+ isLatest: false,
+ summary: 'Customizable Copy Indicator styles with a 2x2 grid selector flyout alongside panel hover stability fixes.',
+ highlights: [
+ {
+ title: 'Four Vector Indicator Options',
+ description: 'Added support for 4 customizable copy indicator styles including Logo, Tick, Copy, and Sparkle.'
+ },
+ {
+ title: 'Balanced 2x2 Grid Flyout Selector',
+ description: 'Integrated a 2x2 grid selector flyout inside Settings under Indicator Style for quick previews.'
+ }
+ ]
+ }
+]
+
diff --git a/electron/main/state.ts b/electron/main/state.ts
index df44c7b..03b84ac 100644
--- a/electron/main/state.ts
+++ b/electron/main/state.ts
@@ -103,6 +103,14 @@ export const pushState = {
openSettings(): void {
console.log('[Main] Sending window:open-settings event to renderer')
send('window:open-settings')
+ },
+ updateAvailable(info: { version: string }): void {
+ console.log('[Main] Sending app:update-available event to renderer:', info)
+ send('app:update-available', info)
+ },
+ updateDownloaded(info: { version: string }): void {
+ console.log('[Main] Sending app:update-downloaded event to renderer:', info)
+ send('app:update-downloaded', info)
}
}
diff --git a/electron/main/updater.ts b/electron/main/updater.ts
new file mode 100644
index 0000000..1ad14db
--- /dev/null
+++ b/electron/main/updater.ts
@@ -0,0 +1,88 @@
+import { app } from 'electron'
+import { isStoreBuild } from './ipc'
+import { pushState } from './state'
+
+// Module-level reference to the single autoUpdater instance.
+// This is the ONLY instance — both the download logic and the
+// quitAndInstall trigger must use this exact reference.
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+let _autoUpdater: any = null
+
+/**
+ * Called from ipc.ts when the renderer clicks "Restart to Update".
+ * Uses the same autoUpdater instance that performed the download.
+ */
+export function quitAndInstallUpdate(): void {
+ if (!_autoUpdater) {
+ console.error('[AutoUpdater] quitAndInstall requested but autoUpdater is not initialized.')
+ return
+ }
+ if (!app.isPackaged) {
+ console.log('[AutoUpdater] Dev mode — quitAndInstall is a no-op here. Works in packaged builds.')
+ return
+ }
+ console.log('[AutoUpdater] quitAndInstall triggered by renderer button.')
+ _autoUpdater.quitAndInstall(false, true)
+}
+
+/**
+ * Initializes electron-updater for GitHub release auto-updates.
+ * Completely disabled on Microsoft Store (MSIX) builds to comply with Store policies.
+ */
+export function initAutoUpdater(): void {
+ if (isStoreBuild()) {
+ console.log('[AutoUpdater] Store build detected — auto-updater disabled.')
+ return
+ }
+
+ try {
+ const { autoUpdater } = require('electron-updater')
+
+ // Store the module-level reference so quitAndInstallUpdate() can use it
+ _autoUpdater = autoUpdater
+
+ // Verbose console logging for diagnostics
+ autoUpdater.logger = console
+ autoUpdater.autoDownload = true
+ autoUpdater.autoInstallOnAppQuit = true
+
+ // Enable dev-mode testing if unpackaged
+ if (!app.isPackaged) {
+ console.log('[AutoUpdater] Unpackaged dev build detected — enabling forceDevUpdateConfig')
+ autoUpdater.forceDevUpdateConfig = true
+ }
+
+ autoUpdater.on('checking-for-update', () => {
+ console.log('[AutoUpdater] Checking for update... Current version:', app.getVersion())
+ })
+
+ autoUpdater.on('update-available', (info: { version: string }) => {
+ console.log('[AutoUpdater] New update available on GitHub:', info.version)
+ pushState.updateAvailable({ version: info.version })
+ })
+
+ autoUpdater.on('update-not-available', (info: { version: string }) => {
+ console.log('[AutoUpdater] App is up to date. Latest release:', info.version, 'Current:', app.getVersion())
+ })
+
+ autoUpdater.on('update-downloaded', (info: { version: string }) => {
+ console.log('[AutoUpdater] Update downloaded and ready to install:', info.version)
+ pushState.updateDownloaded({ version: info.version })
+ })
+
+ autoUpdater.on('error', (err: Error | string) => {
+ const msg = typeof err === 'string' ? err : err?.message
+ console.warn('[AutoUpdater] Update check error:', msg)
+ })
+
+ // Initiate background update check 3 seconds after startup
+ setTimeout(() => {
+ autoUpdater.checkForUpdates().catch((err: Error | string) => {
+ const msg = typeof err === 'string' ? err : err?.message
+ console.warn('[AutoUpdater] checkForUpdates failed:', msg)
+ })
+ }, 3000)
+ } catch (err) {
+ console.error('[AutoUpdater] Initialization failed:', err)
+ }
+}
diff --git a/electron/preload/index.ts b/electron/preload/index.ts
index d49442a..b788c11 100644
--- a/electron/preload/index.ts
+++ b/electron/preload/index.ts
@@ -99,13 +99,14 @@ const api = {
copySubitem: (req: import('../../shared/types').DragRequest) => invoke('item:copy-subitem', req),
pasteItem: (id: string) => invoke('item:paste', id),
pasteSubitem: (req: import('../../shared/types').DragRequest) => invoke('item:paste-subitem', req),
- checkUpdate: () => invoke('app:check-update'),
+ installUpdate: () => invoke('app:install-update'),
startDrag: (req: DragRequest) => send('item:start-drag', req),
addFiles: (paths: string[]) => invoke('item:add-files', paths),
removeSubitem: (req: import('../../shared/types').DragRequest) => invoke('item:remove-subitem', req),
mergeItems: (sourceId: string, targetId: string) => invoke('item:merge', sourceId, targetId),
splitItem: (req: import('../../shared/types').DragRequest) => invoke('item:split', req),
getDisplays: () => invoke('displays:list'),
+ getReleases: () => invoke('app:get-releases'),
updateSettings: (patch: Partial<InvokeResult<'settings:update'>>) =>
invoke('settings:update', patch),
setInteractive: (value: boolean) => invoke('window:set-interactive', value),
@@ -125,6 +126,8 @@ const api = {
onCursorEdge: (cb: (data: EventArgs<'window:cursor-edge'>[0]) => void) => on('window:cursor-edge', cb),
onToast: (cb: (toast: { id: string; message: string; tone: 'info' | 'error' }) => void) => on('ui:toast', cb),
onTutorialStep: (cb: (step: number) => void) => on('tutorial:step', cb),
+ onUpdateAvailable: (cb: (info: { version: string }) => void) => on('app:update-available', cb),
+ onUpdateDownloaded: (cb: (info: { version: string }) => void) => on('app:update-downloaded', cb),
/* Drag helpers */
// (Handled natively by capturing drop event above)
diff --git a/package-lock.json b/package-lock.json
index 3fdfa8b..d16b952 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "edge-drop",
- "version": "0.1.5",
+ "version": "0.2.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "edge-drop",
- "version": "0.1.5",
+ "version": "0.2.0",
"license": "Apache-2.0",
"dependencies": {
"@iconify-json/cuida": "^1.2.5",
@@ -14,6 +14,7 @@
"@radix-ui/react-scroll-area": "^1.2.13",
"@radix-ui/react-separator": "^1.1.11",
"@resvg/resvg-js": "^2.6.2",
+ "electron-updater": "^6.8.9",
"framer-motion": "^11.0.24",
"gsap": "^3.15.0",
"koffi": "^3.1.2",
@@ -3246,7 +3247,6 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
- "dev": true,
"license": "Python-2.0"
},
"node_modules/asn1js": {
@@ -3469,7 +3469,6 @@
"version": "9.7.0",
"resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-9.7.0.tgz",
"integrity": "sha512-g/kR520giAFYkSXTzcmF3kqQq7wi8F6N6SzeDgZrqTBN+VHdmgWOyTdD1yD7AATDId/yXLvuP34CxW46/BwCdw==",
- "dev": true,
"license": "MIT",
"dependencies": {
"debug": "^4.3.4",
@@ -3812,7 +3811,6 @@
"version": "4.4.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
"integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
- "dev": true,
"license": "MIT",
"dependencies": {
"ms": "^2.1.3"
@@ -4253,6 +4251,69 @@
"dev": true,
"license": "ISC"
},
+ "node_modules/electron-updater": {
+ "version": "6.8.9",
+ "resolved": "https://registry.npmjs.org/electron-updater/-/electron-updater-6.8.9.tgz",
+ "integrity": "sha512-ZhVxM9iGONUpZGI1FxdMRgJjUFXi7AYGVa5PwKlO1tV1/4zDxQmfKpXOHVztKrd6L9rLcFjERvi1Mf2vxyTkig==",
+ "license": "MIT",
+ "dependencies": {
+ "builder-util-runtime": "9.7.0",
+ "fs-extra": "^10.1.0",
+ "js-yaml": "^4.1.0",
+ "lazy-val": "^1.0.5",
+ "lodash.escaperegexp": "^4.1.2",
+ "lodash.isequal": "^4.5.0",
+ "semver": "~7.7.3",
+ "tiny-typed-emitter": "^2.1.0"
+ }
+ },
+ "node_modules/electron-updater/node_modules/fs-extra": {
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
+ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/electron-updater/node_modules/jsonfile": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz",
+ "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==",
+ "license": "MIT",
+ "dependencies": {
+ "universalify": "^2.0.0"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ }
+ },
+ "node_modules/electron-updater/node_modules/semver": {
+ "version": "7.7.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",
+ "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/electron-updater/node_modules/universalify": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+ },
"node_modules/electron-vite": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/electron-vite/-/electron-vite-2.3.0.tgz",
@@ -4935,7 +4996,6 @@
"version": "4.2.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
- "dev": true,
"license": "ISC"
},
"node_modules/gsap": {
@@ -5189,7 +5249,6 @@
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz",
"integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==",
- "dev": true,
"funding": [
{
"type": "github",
@@ -5307,7 +5366,6 @@
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/lazy-val/-/lazy-val-1.0.5.tgz",
"integrity": "sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q==",
- "dev": true,
"license": "MIT"
},
"node_modules/lightningcss": {
@@ -5578,6 +5636,19 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/lodash.escaperegexp": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz",
+ "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==",
+ "license": "MIT"
+ },
+ "node_modules/lodash.isequal": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
+ "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==",
+ "deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead.",
+ "license": "MIT"
+ },
"node_modules/loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
@@ -5781,7 +5852,6 @@
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
- "dev": true,
"license": "MIT"
},
"node_modules/nanoid": {
@@ -6537,7 +6607,6 @@
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.6.0.tgz",
"integrity": "sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==",
- "dev": true,
"license": "BlueOak-1.0.0",
"engines": {
"node": ">=11.0.0"
@@ -6912,6 +6981,12 @@
"semver": "bin/semver"
}
},
+ "node_modules/tiny-typed-emitter": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/tiny-typed-emitter/-/tiny-typed-emitter-2.1.0.tgz",
+ "integrity": "sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA==",
+ "license": "MIT"
+ },
"node_modules/tinybench": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz",
diff --git a/package.json b/package.json
index 459d01c..da8b74a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "edge-drop",
- "version": "0.1.5",
+ "version": "0.2.0",
"description": "Edge-Drop — a clipboard manager that lives on the left edge of your screen and expands on hover.",
"author": "Edge-Drop",
"license": "Apache-2.0",
@@ -32,6 +32,11 @@
"resources/**/*",
"package.json"
],
+ "publish": {
+ "provider": "github",
+ "owner": "Deepender25",
+ "repo": "Edge-Drop"
+ },
"win": {
"target": [
{
@@ -55,7 +60,8 @@
"allowToChangeInstallationDirectory": true,
"shortcutName": "Edge-Drop",
"createDesktopShortcut": true,
- "createStartMenuShortcut": true
+ "createStartMenuShortcut": true,
+ "artifactName": "Edge-Drop-Setup-${version}.${ext}"
},
"appx": {
"identityName": "Deepender.EdgeDrop",
@@ -83,6 +89,7 @@
"@radix-ui/react-scroll-area": "^1.2.13",
"@radix-ui/react-separator": "^1.1.11",
"@resvg/resvg-js": "^2.6.2",
+ "electron-updater": "^6.8.9",
"framer-motion": "^11.0.24",
"gsap": "^3.15.0",
"koffi": "^3.1.2",
@@ -92,4 +99,4 @@
"svg-path-bbox": "^2.1.0",
"zustand": "^4.5.2"
}
-}
+}
\ No newline at end of file
diff --git a/shared/bridge.ts b/shared/bridge.ts
index 1967bf3..6f17e63 100644
--- a/shared/bridge.ts
+++ b/shared/bridge.ts
@@ -19,7 +19,7 @@ export interface EdgeApi {
copySubitem: (req: DragRequest) => Promise<boolean>
pasteItem: (id: string) => Promise<boolean>
pasteSubitem: (req: DragRequest) => Promise<boolean>
- checkUpdate: () => Promise<{ latestVersion: string; downloadUrl: string } | null>
+ installUpdate: () => Promise<void>
/**
* Begin a native OS drag-out. Fire-and-forget: must be called synchronously
* from the DOM `dragstart` event, and main calls `event.sender.startDrag`.
@@ -34,6 +34,13 @@ export interface EdgeApi {
revealFile: (path: string) => Promise<boolean>
minimizeWindow: () => Promise<void>
getDisplays: () => Promise<import('./types').DisplayInfo[]>
+ getReleases: () => Promise<Array<{
+ version: string
+ date: string
+ isLatest: boolean
+ summary: string
+ highlights: Array<{ title: string; description: string }>
+ }>>
setInternalDrag: (active: boolean) => void
broadcastTutorialStep: (step: number) => void
@@ -55,4 +62,6 @@ export interface EdgeApi {
}) => void) => () => void
onToast: (cb: (toast: { id: string; message: string; tone: 'info' | 'error' }) => void) => () => void
onTutorialStep: (cb: (step: number) => void) => () => void
+ onUpdateAvailable: (cb: (info: { version: string }) => void) => () => void
+ onUpdateDownloaded: (cb: (info: { version: string }) => void) => () => void
}
diff --git a/shared/ipc.ts b/shared/ipc.ts
index abd2e0c..44d5be9 100644
--- a/shared/ipc.ts
+++ b/shared/ipc.ts
@@ -65,12 +65,24 @@ export interface InvokeMap {
/** Minimize the window (used by Onboarding). */
'window:minimize': { args: []; result: void }
- /** Check for application updates on GitHub releases. */
- 'app:check-update': { args: []; result: { latestVersion: string; downloadUrl: string } | null }
+ /** Trigger a download of the already-available update and quit-and-install. */
+ 'app:install-update': { args: []; result: void }
/** Reveal a file in native File Explorer / Finder. */
'file:reveal': { args: [path: string]; result: boolean }
+ /** Get full release notes history from GitHub API (or cached/static fallback). */
+ 'app:get-releases': {
+ args: []
+ result: Array<{
+ version: string
+ date: string
+ isLatest: boolean
+ summary: string
+ highlights: Array<{ title: string; description: string }>
+ }>
+ }
+
/** Get the list of connected displays. */
'displays:list': { args: []; result: import('./types').DisplayInfo[] }
}
@@ -99,6 +111,10 @@ export interface EventMap {
* shows it as a toast; `id` lets it dedupe/dismiss.
*/
'ui:toast': [toast: { id: string; message: string; tone: 'info' | 'error' }]
+ /** Fired by electron-updater when a new update is available for GitHub builds. */
+ 'app:update-available': [info: { version: string }]
+ /** Fired by electron-updater when the update has been fully downloaded and is ready to install. */
+ 'app:update-downloaded': [info: { version: string }]
/**
* Main-process cursor poll signals: fired when the cursor enters/leaves
* the screen-edge hot zone. The renderer uses this to open/close the panel
diff --git a/src/App.tsx b/src/App.tsx
index 8cf4394..98c1d15 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -74,6 +74,12 @@ export default function App() {
const offTutorialStep = edge.onTutorialStep((step) => {
useStore.getState().setTutorialStep(step)
})
+ const offUpdateAvailable = edge.onUpdateAvailable((info) => {
+ useStore.getState().setUpdateAvailable(info)
+ })
+ const offUpdateDownloaded = edge.onUpdateDownloaded((info) => {
+ useStore.getState().setUpdateDownloaded(info)
+ })
return () => {
offItems()
offSettings()
@@ -81,6 +87,8 @@ export default function App() {
offToggle()
offOpenSettings()
offTutorialStep()
+ offUpdateAvailable()
+ offUpdateDownloaded()
}
}, [hydrate, setItems, setSettings, pushToast])
diff --git a/src/components/ChangelogView.tsx b/src/components/ChangelogView.tsx
index 0e487b9..37ff54e 100644
--- a/src/components/ChangelogView.tsx
+++ b/src/components/ChangelogView.tsx
@@ -1,3 +1,4 @@
+import { useEffect, useState } from 'react'
import { useStore } from '../store/appStore'
interface HighlightItem {
@@ -170,6 +171,19 @@ const CHANGELOG_DATA: ChangelogRelease[] = [
export function ChangelogView() {
const currentVersion = useStore((s) => s.currentVersion)
+ const [releases, setReleases] = useState<ChangelogRelease[]>(CHANGELOG_DATA)
+
+ useEffect(() => {
+ window.edge.getReleases()
+ .then((fetched) => {
+ if (Array.isArray(fetched) && fetched.length > 0) {
+ setReleases(fetched)
+ }
+ })
+ .catch((err) => {
+ console.warn('Failed to load live GitHub releases:', err)
+ })
+ }, [])
return (
<div style={{
@@ -182,7 +196,7 @@ export function ChangelogView() {
fontFamily: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
color: '#ffffff'
}}>
- {CHANGELOG_DATA.map((rel, index) => {
+ {releases.map((rel, index) => {
const isCurrent = currentVersion ? `v${currentVersion}` === rel.version || currentVersion === rel.version : rel.isLatest
return (
diff --git a/src/components/CopyIndicatorCurve.tsx b/src/components/CopyIndicatorCurve.tsx
index cdb87a4..288a121 100644
--- a/src/components/CopyIndicatorCurve.tsx
+++ b/src/components/CopyIndicatorCurve.tsx
@@ -253,16 +253,8 @@ export function CopyIndicatorCurve() {
const showCurve = (settings.showCopyIndicator !== false) && copyFlareActive && !open
- let topOffset = '50%'
- let yOffset = '-50%'
-
- if (settings.bladePosition === 'top') {
- topOffset = '0%'
- yOffset = '0%'
- } else if (settings.bladePosition === 'bottom') {
- topOffset = '100%'
- yOffset = '-100%'
- }
+ const topOffset = '50%'
+ const yOffset = '-50%'
return (
<AnimatePresence mode="popLayout">
@@ -340,11 +332,11 @@ export function CopyIndicatorCurve() {
}}
>
{indicatorStyle === 'check' ? (
- <TickIndicatorIcon color="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" />
+ <TickIndicatorIcon fillColor="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" />
) : indicatorStyle === 'copy' ? (
- <CopyIndicatorIcon color="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" />
+ <CopyIndicatorIcon fillColor="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" />
) : indicatorStyle === 'sparkle' ? (
- <SparkleIndicatorIcon color="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" />
+ <SparkleIndicatorIcon fillColor="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" />
) : (
<LiquidOctopusLoader fillColor="#ffffff" glowColor="rgba(255, 255, 255, 0.85)" speed={1.2} />
)}
diff --git a/src/components/Header.tsx b/src/components/Header.tsx
index 7e30e24..90fba44 100644
--- a/src/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -1,7 +1,7 @@
/** Panel header: title + settings toggle. */
import { motion } from 'framer-motion'
import { useStore } from '../store/appStore'
-import { GearIcon, CloseIcon, SparklesIcon, InfoIcon } from './icons'
+import { GearIcon, CloseIcon, InfoIcon } from './icons'
export function Header() {
const setSettingsOpen = useStore((s) => s.setSettingsOpen)
diff --git a/src/components/ItemList.tsx b/src/components/ItemList.tsx
index e8d0cf7..f28c519 100644
--- a/src/components/ItemList.tsx
+++ b/src/components/ItemList.tsx
@@ -14,7 +14,7 @@ import { useStore } from '../store/appStore'
import { useFilteredItems } from '../hooks/useFilteredItems'
import { ClipboardItemCard } from './ClipboardItem'
import { EmptyState } from './EmptyState'
-import { ChevronUpIcon, ChevronDownIcon, PinFillIcon } from './icons'
+import { ChevronDownIcon, PinFillIcon } from './icons'
export function ItemList() {
const { pinned, recent } = useFilteredItems()
diff --git a/src/components/LiquidOctopusLoader.tsx b/src/components/LiquidOctopusLoader.tsx
index 77b5c11..618e862 100644
--- a/src/components/LiquidOctopusLoader.tsx
+++ b/src/components/LiquidOctopusLoader.tsx
@@ -1,4 +1,4 @@
-import React, { useEffect, useRef, useMemo } from 'react'
+import { useEffect, useRef, useMemo } from 'react'
import gsap from 'gsap'
// Raw SVG Path for the Central Octopus Logo
diff --git a/src/components/Panel.tsx b/src/components/Panel.tsx
index c7a7dc3..ffbf6e7 100644
--- a/src/components/Panel.tsx
+++ b/src/components/Panel.tsx
@@ -28,7 +28,6 @@ export function Panel() {
const settingsOpen = useStore((s) => s.settingsOpen)
const setSettingsOpen = useStore((s) => s.setSettingsOpen)
const setQuery = useStore((s) => s.setQuery)
- const copyFlareActive = useStore((s) => s.copyFlareActive)
const bounceAnimation = settings.bounceAnimation
useEffect(() => {
diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx
index e669fe9..0ca47de 100644
--- a/src/components/Settings.tsx
+++ b/src/components/Settings.tsx
@@ -12,6 +12,7 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: bool
const settings = useStore((s) => s.settings)
const patch = useStore((s) => s.patchSettings)
const updateInfo = useStore((s) => s.updateInfo)
+ const installUpdate = useStore((s) => s.installUpdate)
const currentVersion = useStore((s) => s.currentVersion)
const styleFlyoutOpen = useStore((s) => s.styleFlyoutOpen)
const setStyleFlyoutOpen = useStore((s) => s.setStyleFlyoutOpen)
@@ -64,13 +65,16 @@ export function Settings({ inlineIndicatorStyle }: { inlineIndicatorStyle?: bool
<>
<div className="update-prompt">
<div className="update-text">
- There is a new version available for this application and you can download it.
+ {updateInfo.downloaded
+ ? `Update ${updateInfo.latestVersion} is ready to install.`
+ : `Downloading update ${updateInfo.latestVersion} in the background...`}
</div>
<button
className="update-btn"
- onClick={() => window.open(updateInfo.downloadUrl, '_blank')}
+ disabled={!updateInfo.downloaded}
+ onClick={() => void installUpdate()}
>
- Download {updateInfo.latestVersion}
+ {updateInfo.downloaded ? `Restart to Update` : `Downloading...`}
</button>
</div>
<div className="setting-divider" />
diff --git a/src/store/appStore.ts b/src/store/appStore.ts
index 42d6c2b..5ede048 100644
--- a/src/store/appStore.ts
+++ b/src/store/appStore.ts
@@ -11,24 +11,6 @@ import { edge } from '../lib/edge'
import type { ClipboardItemDto, Settings, DragRequest } from '../../shared/types'
import { DEFAULT_SETTINGS } from '../../shared/types'
-function isVersionLower(current: string, latest: string): boolean {
- const parse = (v: string) => {
- return v
- .replace(/^v/i, '')
- .split('.')
- .map((part) => parseInt(part, 10) || 0)
- }
- const currParts = parse(current)
- const latParts = parse(latest)
- for (let i = 0; i < Math.max(currParts.length, latParts.length); i++) {
- const c = currParts[i] ?? 0
- const l = latParts[i] ?? 0
- if (l > c) return true
- if (l < c) return false
- }
- return false
-}
-
let flareTimer: ReturnType<typeof setTimeout> | null = null
/** A transient user-facing notice shown as a toast. */
@@ -60,14 +42,16 @@ interface AppState {
toasts: ToastMsg[]
tutorialStep: number
currentVersion: string
- updateInfo: { hasUpdate: boolean; latestVersion: string; downloadUrl: string } | null
+ updateInfo: { hasUpdate: boolean; latestVersion: string; downloaded: boolean } | null
/** Item ID currently being previewed in the flyout. */
previewItemId: string | null
previewItemRect: { y: number; height: number } | null
/* hydration + sync */
hydrate: () => Promise<void>
- checkUpdate: () => Promise<void>
+ setUpdateAvailable: (info: { version: string }) => void
+ setUpdateDownloaded: (info: { version: string }) => void
+ installUpdate: () => Promise<void>
setItems: (items: ClipboardItemDto[]) => void
setSettings: (next: Settings) => void
@@ -141,27 +125,30 @@ export const useStore = create<AppState>((set, get) => ({
currentVersion: version,
hydrated: true
})
- get().checkUpdate().catch(console.error)
},
- async checkUpdate() {
- const current = get().currentVersion
- if (!current) return
- try {
- const res = await edge.checkUpdate()
- if (res) {
- const hasUpdate = isVersionLower(current, res.latestVersion)
- set({
- updateInfo: {
- hasUpdate,
- latestVersion: res.latestVersion,
- downloadUrl: res.downloadUrl
- }
- })
+ setUpdateAvailable: (info) => {
+ set({
+ updateInfo: {
+ hasUpdate: true,
+ latestVersion: info.version,
+ downloaded: false
}
- } catch (e) {
- console.error('Update check failed:', e)
- }
+ })
+ },
+
+ setUpdateDownloaded: (info) => {
+ set({
+ updateInfo: {
+ hasUpdate: true,
+ latestVersion: info.version,
+ downloaded: true
+ }
+ })
+ },
+
+ async installUpdate() {
+ await edge.installUpdate()
},
setItems: (items) => {
diff --git a/src/styles/panel.css b/src/styles/panel.css
index 1b0b71a..9bda38f 100644
--- a/src/styles/panel.css
+++ b/src/styles/panel.css
@@ -212,25 +212,13 @@
margin-top: 4px;
}
-/* Pinned Section Deck */
+/* Clean Pinned Section */
.pinned-section {
- background: rgba(255, 255, 255, 0.025);
- border: 1px solid rgba(255, 255, 255, 0.07);
- border-radius: 18px;
- padding: 6px;
- margin: 8px 0 16px;
- transition: all 0.2s ease;
-}
-
-.pinned-section .item {
- margin-bottom: 0;
- background: rgba(0, 0, 0, 0.35);
- border: 1px solid rgba(255, 255, 255, 0.08);
-}
-
-.pinned-section .item:hover {
- background: rgba(255, 255, 255, 0.06);
- border-color: rgba(255, 255, 255, 0.18);
+ background: transparent;
+ border: none;
+ border-radius: 0;
+ padding: 0;
+ margin: 8px 0 12px;
}
/* Interactive Pinned Section Header */
@@ -239,9 +227,9 @@
align-items: center;
justify-content: space-between;
cursor: pointer;
- padding: 6px 10px;
- margin: 0;
- border-radius: 12px;
+ padding: 6px 6px;
+ margin: 0 0 2px 0;
+ border-radius: 8px;
background: transparent;
transition: background 0.15s ease;
user-select: none;
@@ -252,18 +240,18 @@
.pinned-header-left {
display: flex;
align-items: center;
- gap: 8px;
- font-size: 11px;
- font-weight: 700;
+ gap: 6px;
+ font-size: 11.5px;
+ font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
- color: #ffffff;
+ color: rgba(255, 255, 255, 0.85);
}
.pinned-count-badge {
background: transparent;
- color: #ffffff;
- font-size: 11px;
- font-weight: 700;
+ color: rgba(255, 255, 255, 0.55);
+ font-size: 11.5px;
+ font-weight: 600;
padding: 0;
border-radius: 0;
letter-spacing: 0;