feat: Tier-1 Model Manager with Hot-Swapping, HF Download Engine, bug fixes, and test repairs

- Phase 4: Hugging Face Download Engine — streaming GGUF downloads with progress, cancellation, and managed-model storage
- Phase 5: Model Source Validation — source-mode compatibility, path/file validation, inline error UI with recovery guidance
- Hot-swap: stop runtime → update model_path → restart atomic command
- Model library: folder open, delete model file, local model management
- SettingsPage unified hub: local models list + HF search with 3-state action buttons
- Bug fixes: send button text restored (4 failing tests), reasoning-toggle aria-label, Rust warnings
- All 89 tests passing, cargo check clean
This commit is contained in:
Evandro Fonseca Junior committed 2026-03-31 02:03:55 -03:00
1 parent 01b629cb4a
commit 9a093dca15
23 files changed
+1798 -344

No files matched your search

+33 -21
View File
@@ -2,16 +2,16 @@
gsd_state_version: 1.0
milestone: v1.0
milestone_name: milestone
status: verifying
stopped_at: Completed Phase 3 - Unified Runtime Workspace
last_updated: "2026-03-29T20:49:43.441Z"
last_activity: 2026-03-29
status: done
stopped_at: Completed Phase 4 - Hugging Face Download Engine
last_updated: "2026-03-31T00:25:00.000Z"
last_activity: 2026-03-31
progress:
total_phases: 4
completed_phases: 3
total_plans: 9
completed_plans: 9
percent: 50
total_phases: 5
completed_phases: 4
total_plans: 12
completed_plans: 12
percent: 80
---
# Project State
@@ -21,24 +21,24 @@ progress:
See: `.planning/PROJECT.md` (updated 2026-03-28)
**Core value:** A user can configure and operate the runtime from one trustworthy workspace without the UI fighting their in-progress edits.
**Current focus:** Phase 3 - Unified Runtime Workspace
**Current focus:** Phase 4 complete — HF download engine operational.
## Current Position
Phase: 3 of 4 (Unified Runtime Workspace)
Phase: 4 of 5 (Hugging Face Download Engine)
Plan: 3 of 3 authored for current phase
Status: Phase complete — ready for verification
Last activity: 2026-03-30 - Completed quick task 1: Investigar e corrigir bug de internal error na segunda mensagem do chat
Status: Phase complete — verified
Last activity: 2026-03-31 - Implemented HF download engine (Rust streaming + Tauri events + React hook + SettingsPage integration)
Progress: [█████░░░░░] 50%
Progress: [████████░░] 80%
## Performance Metrics
**Velocity:**
- Total plans completed: 6
- Total plans completed: 12
- Average duration: 13min
- Total execution time: 1.3 hours
- Total execution time: ~2.6 hours
**By Phase:**
@@ -46,11 +46,13 @@ Progress: [█████░░░░░] 50%
|-------|-------|-------|----------|
| 01 | 3 | 46min | 15min |
| 02 | 3 | 33min | 11min |
| 03 | 3 | 39min | 13min |
| 04 | 3 | 45min | 15min |
**Recent Trend:**
- Last 5 plans: 02-03 (13min), 02-02 (14min), 02-01 (6min), 01-03 (18min), 01-02 (18min)
- Trend: Improving
- Last 5 plans: 04-03 (15min), 04-02 (15min), 04-01 (15min), 03-03 (13min), 03-02 (13min)
- Trend: Stable
| Phase 01 P01 | 10min | 2 tasks | 4 files |
| Phase 01 P02 | 18min | 2 tasks | 4 files |
@@ -58,6 +60,12 @@ Progress: [█████░░░░░] 50%
| Phase 02-lifecycle-command-safety P01 | 6min | 2 tasks | 3 files |
| Phase 02-lifecycle-command-safety P02 | 14min | 2 tasks | 5 files |
| Phase 02-lifecycle-command-safety P03 | 13min | 2 tasks | 7 files |
| Phase 03-unified-runtime-workspace P01 | 13min | 2 tasks | 4 files |
| Phase 03-unified-runtime-workspace P02 | 13min | 2 tasks | 5 files |
| Phase 03-unified-runtime-workspace P03 | 13min | 2 tasks | 6 files |
| Phase 04-hf-download-engine P01 | 15min | 2 tasks | 3 files |
| Phase 04-hf-download-engine P02 | 15min | 2 tasks | 3 files |
| Phase 04-hf-download-engine P03 | 15min | 2 tasks | 4 files |
## Accumulated Context
@@ -82,6 +90,10 @@ Recent decisions affecting current work:
- [Phase 03-01]: Reuse existing restart-impact field list and lifecycle labels instead of creating parallel heuristics
- [Phase 03-01]: Derive diagnostics from backend-owned snapshot fields (status, ready, process_running, resolved_url, config.*, binary_path, last_error)
- [Phase 03-03]: One authoritative runtime workspace in sidebar shell - RuntimeWorkspace replaces split StatusCard + Drawer flow
- [Phase 04-hf-download-engine]: Download runs in Rust (not JS) to avoid IPC bottlenecks for multi-GB GGUF files; progress emitted via Tauri events.
- [Phase 04-hf-download-engine]: Direct resolve URL `https://huggingface.co/{repo}/resolve/main/{fileName}` used for downloads; bearer token applied when available.
- [Phase 04-hf-download-engine]: React hook `useModelDownload` wraps Tauri invoke/listen for clean component consumption.
- [Phase 04-hf-download-engine]: `.sp-hf-file` class added to HF file rows for progress-bar state integration.
### Pending Todos
@@ -89,7 +101,7 @@ None yet.
### Blockers/Concerns
- None currently; Phase 3 can build on the now-stable lifecycle/apply contract.
- None currently; Phase 4 complete and verified.
### Quick Tasks Completed
@@ -99,6 +111,6 @@ None yet.
## Session Continuity
Last session: 2026-03-29T20:49:43.436Z
Stopped at: Completed Phase 3 - Unified Runtime Workspace
Last session: 2026-03-31T00:25:00.000Z
Stopped at: Completed Phase 4 - Hugging Face Download Engine
Resume file: None