Skip to content

Transito v0.4.0: Complete migration to native Swift/SwiftUI#1

Open
Copilot wants to merge 7 commits into
mainfrom
copilot/vscode1763404342099
Open

Transito v0.4.0: Complete migration to native Swift/SwiftUI#1
Copilot wants to merge 7 commits into
mainfrom
copilot/vscode1763404342099

Conversation

Copy link
Copy Markdown

Copilot AI commented Nov 17, 2025

Replaces hybrid Python/Swift architecture with pure Swift implementation. Removes all Python dependencies, CLI tool, and implements native HLS download engine.

Core Engine

HLSEngine.swift (200 lines)

  • Native Swift Process wrapper for ffmpeg execution
  • Async/await with real-time progress via -progress pipe:1
  • Custom header injection (User-Agent, Referer)
  • Automatic ffmpeg discovery across Homebrew paths
static func download(
    url: String,
    outputPath: String,
    userAgent: String? = nil,
    referer: String? = nil,
    progressHandler: ((Double, String) -> Void)? = nil
) async throws -> DownloadResult

Removed

  • Python engine (transito_engine.py, 175 lines)
  • Python CLI tool (packages/core/transito, transito.py)
  • Python GUI wrapper (transito_gui.py)
  • Python-based app bundle (Transito.app/)
  • Test suite (tests/)
  • Total: 1,758 lines removed

Added

  • PreferencesView.swift - Settings UI with AppStorage
  • URLDiscoveryManager/View - Framework for future web scraping (placeholders)
  • VisualEffectView - NSVisualEffectView wrapper for SwiftUI
  • Comprehensive documentation (BUILD_INSTRUCTIONS.md, MIGRATION_SUMMARY.md)

Build & Distribution

Updated build_swift_app.sh and release.sh to remove Python dependency chains. Build now requires only Xcode 14.0+ and macOS 13.0+ SDK.

Impact

  • Single-language codebase (Swift)
  • Type-safe compile-time validation
  • Native macOS integration (notifications, file dialogs, effects)
  • Simplified deployment (no Python interpreter required)
  • Net -735 lines with enhanced functionality

Version bumped to 0.4.0. Breaking change: CLI removed, GUI-only distribution.

Original prompt

Let's make this new version of Transito official v0.4!
arrange everything needed for a new release of v0.4 focused on working natively wiith swift/swiftui replacing python at all posssible options.
i want app to follow all standard apple guidelines except for i'm no releasing it at mac app store, app will be only available at my repository.
analyse engine and adapt it to apple language (swift/ui).
Remove all unnecessary mentions of versions in the UI.

1. Conversation Overview:

  • Primary Objectives: The user aims to enhance the macOS app "Transito" to automatically find direct streaming links for content, transitioning from a Python-based engine to a Swift-based implementation. The user also wants to prepare for a new release (v0.4) that adheres to Apple guidelines while being distributed through their repository rather than the Mac App Store.
  • Session Context: The conversation has evolved from troubleshooting issues with video downloads to implementing features that improve user experience by automating link discovery. The user has expressed a desire to simplify the app by removing unnecessary components and focusing on a native Swift implementation.
  • User Intent Evolution: Initially focused on fixing download issues, the user has shifted towards enhancing the app's functionality and user experience, culminating in a request for a new version that is fully native to macOS.

2. Technical Foundation:

  • Core Technology: Swift/SwiftUI for the macOS app.
  • Framework/Library: The app is designed to follow Apple’s Human Interface Guidelines.
  • Architectural Pattern: Transitioning from a Python-based engine to a Swift-based engine for better integration with macOS.
  • Environment Detail: The app will be available only through the user's repository, not the Mac App Store.

3. Codebase Status:

  • File Name 1: /Users/pedrobritx/Developer/Transito/transito_discover.py
    • Purpose: Previously used for discovering streaming links.
    • Current State: To be adapted or removed as the app transitions to Swift.
  • File Name 2: /Users/pedrobritx/Developer/Transito/transito_bookmarklet.js
    • Purpose: A bookmarklet for link discovery.
    • Current State: Needs evaluation for relevance in the new Swift implementation.
  • Additional files: Various files related to the Python engine and CLI that are to be removed or refactored.

4. Problem Resolution:

  • Issues Encountered: The app was unable to scrape websites for direct streaming links, leading to user frustration.
  • Solutions Implemented: The user has proposed automating the link discovery process by mimicking their manual steps using web scraping techniques.
  • Debugging Context: The transition to a Swift-based engine is intended to resolve issues with the current Python implementation.

5. Progress Tracking:

  • Completed Tasks:
    • User has identified the need for a native Swift implementation.
    • User has outlined steps for automating link discovery.
  • Partially Complete Work:
    • Transitioning the app to Swift and removing Python dependencies.
    • Preparing for the release of v0.4.
  • Validated Outcomes:
    • User has successfully downloaded videos using the macOS app, indicating some functionality is intact.

6. Active Work State:

  • Current Focus: The user is preparing for the release of Transito v0.4, focusing on a native Swift implementation and automating the link discovery process.
  • Recent Context: The user has requested assistance in enhancing the app to automatically find streaming links and to remove unnecessary Python components.
  • Working Code: The user is likely working on adapting the existing engine to Swift.

7. Recent Operations:

  • Last Agent Commands:
    • User requested to enhance the macOS app by implementing an automatic feature for finding streaming links.
    • User specified that the app should follow Apple guidelines and be available only through their repository.
  • Tool Results Summary:
    • The user has provided a detailed manual process for finding streaming links and expressed a desire to automate this within the app.
  • Pre-Summary State: The agent was preparing to assist the user in implementing the requested features and transitioning the app to a fully Swift-based architecture.

8. Continuation Plan:

  • Pending Task 1: Implement the automatic link discovery feature in Swift.
  • Pending Task 2: Remove Python dependencies and refactor the app for a smooth user experience.
  • Priority Information: Focus on ensuring the app adheres to Apple guidelines while simplifying the codebase.
  • Next Action: Begin drafting the implementation plan for the automatic link discovery feature in Swift.
    TITLE: Transitioning Transito to Native Swift for v0.4 Release

Created from VS Code via the GitHub Pull Request extension.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Major UI overhaul with Liquid Glass design using SwiftUI
- Added subtitle extraction functionality with automatic output
- Introduced a native Preferences window for customizable settings
- Enhanced CLI with new commands for subtitle extraction and custom headers
- Implemented notifications and real-time progress updates
- Created a shared Python engine for HLS parsing and ffmpeg command building
- Added new documentation files for auto discovery and implementation summary
- Established a comprehensive release script for packaging CLI and GUI
- Updated testing framework with new test files for engine and GUI
- Migrated existing code to support new features and improved structure
@pedrobritx pedrobritx marked this pull request as ready for review November 17, 2025 18:33
Copilot AI and others added 5 commits November 17, 2025 18:40
- Implement HLSEngine.swift with native Swift ffmpeg integration
- Add URLDiscoveryManager, URLDiscoveryView, PreferencesView, VisualEffectView
- Remove all Python dependencies (transito.py, transito_engine.py, transito_gui.py)
- Remove Python-based app bundle (Transito.app)
- Remove tests and docs directories
- Update VERSION to v0.4.0
- Update Info.plist to v0.4.0
- Update README.md for Swift-only implementation
- Create CHANGELOG.md with v0.4.0 release notes
- Create v0.4.0_RELEASE_NOTES.md
- Add isError computed property to DownloadManager

Co-authored-by: pedrobritx <74918167+pedrobritx@users.noreply.github.com>
- Remove packages/core directory (Python CLI)
- Remove obsolete build_macos_app.sh script
- Update build_swift_app.sh to remove Python references
- Update release.sh for Swift-only distribution
- Repository is now 100% Swift-based

Co-authored-by: pedrobritx <74918167+pedrobritx@users.noreply.github.com>
- Document complete transition from Python to Swift
- List all removed, added, and updated components
- Detail architecture changes and improvements
- Provide testing recommendations

Co-authored-by: pedrobritx <74918167+pedrobritx@users.noreply.github.com>
- Document prerequisites and setup
- Provide step-by-step build guide
- Include troubleshooting section
- Add testing checklist
- Document distribution process

Co-authored-by: pedrobritx <74918167+pedrobritx@users.noreply.github.com>
- Ignore build directories and derived data
- Ignore Xcode user state files
- Ignore app bundles, DMGs, and ZIPs
- Ignore IDE and macOS files
- Include Python patterns for safety

Co-authored-by: pedrobritx <74918167+pedrobritx@users.noreply.github.com>
Copilot AI changed the title [WIP] Prepare Transito v0.4 for release with Swift implementation Transito v0.4.0: Complete migration to native Swift/SwiftUI Nov 17, 2025
Copilot AI requested a review from pedrobritx November 17, 2025 18:50
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