Skip to content

feat(v0.7): Lovable integration, torrent lifecycle hardening, and engine synchronization - #1

Merged
professionalman merged 15 commits into
mainfrom
feat/v0.7-lovable-integration
Aug 8, 2026
Merged

feat(v0.7): Lovable integration, torrent lifecycle hardening, and engine synchronization#1
professionalman merged 15 commits into
mainfrom
feat/v0.7-lovable-integration

Conversation

@professionalman

Copy link
Copy Markdown
Owner

Overview

This PR merges the complete v0.7 release branch (\ eat/v0.7-lovable-integration) into \main.

Summary of Changes

1. Lovable UI Integration & Design System

  • Modern responsive layout featuring dark mode, glassmorphic styling, enhanced typography, and dynamic animations.
  • New components: \JobCard, \DownloadsPanel, \TorrentFileSelector, \FormatSelector, \JobPowerControls, \BulkActionBar, and \SettingsPanel.
  • Real-time SSE state updates with live statistics (seeders/leechers, upload/download speeds, ETA, and progress).

2. Torrent Lifecycle & Engine Hardening

  • Precalculated Canonical TorrentID: Added precalculation of 40-character hex infohash before upload, replacing post-add category/tag scanning with bounded hash visibility polling.
  • Start/Resume Race Elimination: Eliminated qBittorrent start/resume race via bounded confirmation polling in \�erifyTorrentStopped\ and \�erifyTorrentFilePriorities.
  • Fail-Closed Retry Persistence: Required durable state persistence before launching background metadata acquisition.
  • Graceful Shutdown vs. User Cancel: Backend shutdown now exits cleanly without deleting active torrents, enabling seamless startup recovery for \ANALYZING\ torrents.
  • Non-Destructive Metadata Recovery: Ensured same-job reconciliation and orphan adoption do not prematurely stop DHT/peer metadata acquisition.
  • Authoritative Selection & Storage Verification: Enforced transactional selection persistence, disk preflight before start/resume, and correct selected-payload \TotalBytes\ display and reporting.

3. Test & Quality Verification

  • Backend: 100% pass across all 14 packages with race detection enabled (\go test -count=1 -race ./...).
  • Frontend: 100% pass across all 131 tests (
    pm test -- --run), 0 TypeScript type errors (
    pm run typecheck), and clean production build (
    pm run build).

… largest-file scanner, add torrent unit tests
…ering, external engine stop reconciliation and UI selected total display
…job reconciliation or orphan adoption

Remove unconditional StopDownload from isSameJob reconciliation path in
acquireTorrentMetadata — metadata may still be fetching from DHT/peers.

Remove unconditional StopTorrents from AdoptTorrent engine method — orphan
magnet adoption must not kill in-progress metadata acquisition.

The existing verifyTorrentStopped safety gate after metadata/files become
available already ensures the torrent is stopped before AwaitingSelection.

Strengthen TestExistingMagnet_StillFetchingMetadata_NotPrematurelyStopped:
after StopDownload, metadata can never arrive (simulating qBittorrent killing
DHT). Test now fails against old code, passes after fix.

Add TestOrphanMagnet_MetadataIncomplete_AdoptDoesNotStop: verifies orphan
adoption does not stop in-progress metadata acquisition.
@professionalman
professionalman merged commit 5ea4a1c into main Aug 8, 2026
4 checks passed
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.

1 participant