From 4f0c6b80ef5ed869cfe9c9672a7fa521db83d559 Mon Sep 17 00:00:00 2001 From: Julian Freeman Date: Sun, 19 Apr 2026 11:10:29 -0400 Subject: [PATCH] upgrade --- package.json | 2 +- spec/logging_feature.md | 58 ---------------- spec/prd.md | 142 -------------------------------------- spec/quickjs_runtime.md | 67 ------------------ spec/quickjs_update.md | 26 ------- spec/url_parsing.md | 111 ----------------------------- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 4 +- 9 files changed, 5 insertions(+), 409 deletions(-) delete mode 100644 spec/logging_feature.md delete mode 100644 spec/prd.md delete mode 100644 spec/quickjs_runtime.md delete mode 100644 spec/quickjs_update.md delete mode 100644 spec/url_parsing.md diff --git a/package.json b/package.json index f4d9887..90a81cc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "stream-capture", "private": true, - "version": "1.2.0", + "version": "1.2.1", "type": "module", "scripts": { "dev": "vite", diff --git a/spec/logging_feature.md b/spec/logging_feature.md deleted file mode 100644 index 7e5157c..0000000 --- a/spec/logging_feature.md +++ /dev/null @@ -1,58 +0,0 @@ -# Feature Request: Real-time Logging & UI Refinement - -## 1. Context & Objective -Users currently experience download failures without sufficient context or error details, making troubleshooting difficult. -The objective is to introduce a dedicated **Logs System** within the application to capture, display, and persist detailed execution logs from the `yt-dlp` process. -Additionally, the application's sidebar layout requires balancing for better UX. - -## 2. Requirements - -### 2.1. Backend (Rust) - Logging Infrastructure -* **Stream Capture**: The `downloader` module must capture both `STDOUT` (progress) and `STDERR` (errors/warnings) from the `yt-dlp` process. -* **Event Emission**: Emit a new Tauri event `download-log` to the frontend in real-time. - * Payload: `{ id: String, message: String, level: 'info' | 'error' | 'debug' }` -* **Persistence (Optional but Recommended)**: Ideally, write logs to a local file (e.g., `logs/{date}.log` or `logs/{task_id}.log`) for post-mortem analysis. *For this iteration, real-time event emission is priority.* - -### 2.2. Frontend - Logs View -* **New Route**: `/logs` -* **UI Layout**: - * A dedicated **Logs Tab** in the main navigation. - * A console-like view displaying a stream of log messages. - * Filters: Filter by "Task ID" or "Level" (Error/Info). - * **Real-time**: The view must update automatically as new log events arrive. - * **Detail**: Failed downloads must show the specific error message returned by `yt-dlp` (e.g., "Sign in required", "Video unavailable"). - -### 2.3. UI/UX - Sidebar Refactoring -* **Reordering**: - * **Top Section**: Home (Downloader), History. - * **Bottom Section**: Logs, Settings. -* **Removal**: Remove the "Version Number" text from the bottom of the sidebar (it can be moved to the Settings page if needed, or just removed as requested). - -## 3. Implementation Steps - -### Step 1: Rust Backend Updates -* Modify `src-tauri/src/downloader.rs`: - * Update `download_video` to spawn the process with `Stdio::piped()` for both stdout and stderr. - * Use `tokio::select!` or separate tasks to read both streams concurrently. - * Emit `download-log` events for every line read. - * Ensure the final error message (if exit code != 0) is explicitly captured and returned/logged. - -### Step 2: Frontend Store & Logic -* Create `src/stores/logs.ts`: - * State: `logs: LogEntry[]`. - * Action: `addLog(entry)`. - * Listener: Listen for `download-log` events globally. - -### Step 3: Frontend UI -* Create `src/views/Logs.vue`: - * Display logs in a scrollable container. - * Style error logs in red, info in gray/white. -* Update `src/App.vue`: - * Add the `FileText` (or similar) icon for Logs. - * Refactor the sidebar Flexbox layout to push Logs and Settings to the bottom. - * Remove the version footer. -* Update `src/router/index.ts` to include the new route. - -## 4. Success Criteria -* When a download fails, the user can go to the "Logs" tab and see the exact error output from `yt-dlp`. -* The sidebar looks balanced with navigation items split between top and bottom. diff --git a/spec/prd.md b/spec/prd.md deleted file mode 100644 index cc13d62..0000000 --- a/spec/prd.md +++ /dev/null @@ -1,142 +0,0 @@ -# Project: StreamCapture (Tauri + Vue 3 YouTube Downloader) - -## 1. Context & Objective -You are an expert Full-Stack Rust/TypeScript developer specializing in Tauri v2 application development. -Your task is to build a cross-platform (Windows & macOS) desktop application named "StreamCapture" in the current directory. -The app is a GUI wrapper for `yt-dlp`, but unlike standard sidecar implementations, it must manage the `yt-dlp` binary externally (in the user's AppData directory) to allow for frequent updates without rebuilding the app. - -**Tech Stack:** -- **Core:** Tauri v2 (Rust) -- **Frontend:** Vue 3 (Composition API, `