v1.4.4: quick wins (auto-tag, thumbnails, growth stats, command palette) - #3
Merged
Conversation
Two enrichments at product creation time, both leveraging existing infrastructure that was never wired into the import pipeline. - Auto-tagging: re-run analyzer on destination after extraction and set NewProduct.tags from suggested_tags. Avoids a DB migration on import_tasks; suggested_tags were already generated but discarded. - Thumbnails: walk destination for .duf files, call find_best_thumbnail (3-tier priority: exact stem match, keyword match, root-level image), and store as a relative path. The frontend already renders thumbnailPath in ProductCard with a fallback placeholder. NewProduct gains a thumbnail_path field + with_thumbnail builder. add_product INSERT extended with the new column. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Surface how fast the library is growing in the existing LibraryStats panel — useful for power users tracking import velocity. Backend: 2 COUNT queries over installed_at, using SQLite's date() function so the lexicographic comparison works regardless of the RFC3339 / "T" vs space separator quirk. Frontend: 2 new stat-cards (📈 Last 30 days, 📊 Last 90 days). The grid auto-fit layout absorbs them without reflow. No DB migration: aggregates over the existing installed_at column. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
VSCode-style palette accessible from anywhere in the app. Skips Ctrl+K to preserve the existing focus-search shortcut in ProductsList. v1 actions (7 total, 3 groups): - Navigate: Extract / Products / Tools / Settings tabs - View: Cycle theme (light → system → dark → OLED) - Actions: Refresh products list, Check for updates Implementation: - src/lib/commands/palette.ts: typed PaletteAction registry + filter - src/lib/components/CommandPalette.svelte: stateless modal with fuzzy substring match, ↑↓ navigation, Enter to run, ESC to close - Wired in +page.svelte via svelte:window onkeydown No new dependencies; substring match suffices for ~10 actions. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Ships 3 quick wins on top of v1.4.3: - feat(import): auto-tag products and persist thumbnails on creation - feat(stats): add 30d / 90d growth metrics to library dashboard - feat(ui): add command palette (Ctrl+Shift+P) for global navigation Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds v1.4.4 quick-win features across import enrichment, library stats, and UI command execution, while bumping package/app versions.
Changes:
- Adds import-time auto-tagging and thumbnail discovery/persistence for completed import tasks.
- Extends library stats with 30-day and 90-day growth counts and displays them in the stats panel.
- Adds a Ctrl/Cmd+Shift+P command palette for navigation and common actions.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/routes/+page.svelte |
Wires command palette actions and global shortcut into the main page. |
src/lib/components/products/LibraryStats.svelte |
Displays new growth metric cards. |
src/lib/components/CommandPalette.svelte |
Adds the command palette modal and keyboard/mouse interaction. |
src/lib/commands/palette.ts |
Defines palette action types and filtering helper. |
src/lib/api/commands.ts |
Extends frontend LibraryStats typing with growth fields. |
src-tauri/tauri.conf.json |
Bumps app version to 1.4.4. |
src-tauri/src/db/repository.rs |
Persists thumbnail paths and computes growth aggregates. |
src-tauri/src/db/models.rs |
Extends product/stat models for thumbnails and growth fields. |
src-tauri/src/commands/import_tasks.rs |
Adds import-time analyzer rerun and thumbnail discovery. |
src-tauri/Cargo.toml |
Bumps Rust package version to 1.4.4. |
src-tauri/Cargo.lock |
Updates lockfile package version. |
package.json |
Bumps frontend package version to 1.4.4. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+326
to
+328
| if let Ok(rel) = thumb_abs.strip_prefix(destination) { | ||
| let rel_str = rel.to_string_lossy().replace('\\', "/"); | ||
| new_product = new_product.with_thumbnail(rel_str); |
Comment on lines
+78
to
+81
| } else if (e.key === 'ArrowDown') { | ||
| e.preventDefault(); | ||
| selectedIndex = Math.min(selectedIndex + 1, filtered.length - 1); | ||
| scrollToSelected(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
3 quick wins on top of v1.4.3, all leveraging existing infrastructure (no new deps, no DB migration):
suggested_tagson the product row. Tags appear inProductCard(already wired) and remain editable viaProductEditDialog..duffiles, callfind_best_thumbnail(which existed but was never wired into the pipeline), store as a relative path.ProductCardalready rendersthumbnailPathwith a fallback.COUNT installed_at >= now-Nd) using SQLite'sdate()for robust RFC3339 comparison. Surfaced as 2 stat-cards in the existingLibraryStats.svelte(📈 Last 30 days / 📊 Last 90 days).Test plan
cargo check,cargo clippy -D warnings,cargo testall greennpm run check,npm run buildall greennpm run tauri:dev— import an archive, verify tags + thumbnail appear in ProductCard🤖 Generated with Claude Code