Skip to content

v1.4.4: quick wins (auto-tag, thumbnails, growth stats, command palette) - #3

Merged
yaniswav merged 4 commits into
mainfrom
feat/quick-wins-v1.4.4
May 19, 2026
Merged

v1.4.4: quick wins (auto-tag, thumbnails, growth stats, command palette)#3
yaniswav merged 4 commits into
mainfrom
feat/quick-wins-v1.4.4

Conversation

@yaniswav

Copy link
Copy Markdown
Owner

Summary

3 quick wins on top of v1.4.3, all leveraging existing infrastructure (no new deps, no DB migration):

  • Auto-tagging at import: re-run the analyzer on the destination dir and persist its suggested_tags on the product row. Tags appear in ProductCard (already wired) and remain editable via ProductEditDialog.
  • Thumbnails at import: walk for .duf files, call find_best_thumbnail (which existed but was never wired into the pipeline), store as a relative path. ProductCard already renders thumbnailPath with a fallback.
  • Library growth metrics: 2 new SQL aggregates (COUNT installed_at >= now-Nd) using SQLite's date() for robust RFC3339 comparison. Surfaced as 2 stat-cards in the existing LibraryStats.svelte (📈 Last 30 days / 📊 Last 90 days).
  • Command Palette (Ctrl+Shift+P): VSCode-style modal with 7 actions in v1 (Navigate tabs, Cycle theme, Refresh products, Check for updates). Skips Ctrl+K to keep the existing focus-search shortcut intact.

Test plan

  • cargo check, cargo clippy -D warnings, cargo test all green
  • npm run check, npm run build all green
  • npm run tauri:dev — import an archive, verify tags + thumbnail appear in ProductCard
  • Products tab → toggle stats → verify the 2 growth cards
  • Anywhere: Ctrl+Shift+P → palette opens → ESC closes → arrow keys + Enter execute → tabs switch

🤖 Generated with Claude Code

yaniswav and others added 4 commits May 19, 2026 22:08
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>
Copilot AI review requested due to automatic review settings May 19, 2026 20:10
@yaniswav
yaniswav merged commit de2674e into main May 19, 2026
3 checks passed
@yaniswav
yaniswav deleted the feat/quick-wins-v1.4.4 branch May 19, 2026 20:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
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.

2 participants