Repository navigation
Release TGDrive 2.0.0 - #12
Merged
Merged
Conversation
Add a Clear history button with confirmation so owners can remove old transfer entries, including entries for deleted files, across all pages and filters. Delete archived summaries and hide terminal live jobs while preserving recovery contexts, stored files, active work and unfinished folder members. Reconcile cleared jobs through polling so stale responses and other browsers do not restore finished rows or leave progress stuck. Document the workflow and API contract, and add regression cases for persistence, authorization, failed requests and polling races. Tests, builds and other validation were not run because project instructions require separate approval.
Remove source preflight from the start request and immediately show a cancellable transfer with animated source checks. Reconcile lost start responses by request identity without silently creating duplicate imports. Retrieve large validator-bound sources with adaptive 2-to-8 parallel streams, validate each range, and drain writers before falling back to one full stream. Keep full-speed source slots separate from Telegram uploads: default to two, configurable live from one to eight. Pace waiting connections at 64 KiB/s, bound open source jobs and range responses, and reserve rolling staging windows before promoting eligible jobs to full-file reservations. Preserve downloaded prefixes on promotion and keep intake pacing from suppressing Telegram-stage ETAs. Document scheduling, storage waits, timeout/retry behavior and link-expiry limits. Slow intake cannot extend a signed link's fixed expiry or guarantee throughput. Validation: 156 offline backend tests plus 24 subtests and 88 frontend tests passed. After the ETA correction, all 15 progress-metrics tests passed again. TypeScript, Ruff lint/format on 17 Python files, and Prettier on 10 frontend files passed. No live download, benchmark, production build, browser visual check or deployment was performed.
Recover temporary URL-source failures automatically within four bounded attempts, releasing partial files, staging claims and source slots before backoff. Show retry timing and preserve cleared popup receipts across tabs. Fix distant video seeks that counted skipped offsets as buffered bytes and show elapsed wait time with per-seek delivery. Replace the PDF lifetime read cap with bounded active buffers, and improve EPUB typography and manga page-fit/right-to-left controls while retaining selective reader requests. Add an owner-confirmed Settings action to regenerate existing thumbnails in the background, with progress, cancellation and restart status. Reuse cached ranges through paced lower-priority reads, preserve originals and old covers on failure, and keep automatic upload generation independent. Prefer video frames from the middle 40-60 percent and support book covers, large JPEGs, embedded audio art and office previews. Update the operational/API guides. Validation: focused offline backend/frontend checks, 14 pinned-player patch checks, 15 synthetic Chromium cases, TypeScript, Ruff, Prettier and frontend builds passed. Two native CBR checks were skipped because WSL lacks libarchive. Builds retain existing bundle-size and upstream CommonJS warnings. No live rebuild or deployment was performed. Large PDFs can require full source reads; a server restart marks a manual rebuild interrupted rather than restarting it.
Large comic pages exceeded the old 16 MiB resource limit, while shared PDF resource dictionaries could download most of a document before rendering. Serve selected original raster pages up to 64 MiB through bounded binary parser output without conversion or upscaling. Reuse results in a bounded five-minute cache, coalesce same-resource requests, and recheck access before cache hits or conditional 304 responses. Add measured progress, transient retries and offscreen EPUB image cleanup. Defer unused PDF image payloads in the pinned worker and render visible pages before overscan. Align reader toolbar styling and PDF page navigation. Document limits, cache behavior and the reviewed PDF.js patch upgrade requirement. Validation: 89 backend tests, 27 frontend tests, 19 distinct local browser cases, PDF worker integrity checks, TypeScript, Ruff, Prettier and the production frontend build passed. Two native CBR checks were skipped because local libarchive is unavailable. Synthetic fixtures cover a 39 MiB original page, shared PDF resources, compressed images and a soft mask, retries, caching and EPUB image cleanup. No production deployment or live-file validation was performed.
A fresh backup bot session could switch to its assigned Telegram data center but fail authorization because automatic request retries are disabled. Retry only sign-in once after a migration, preserving the 30-second deadline and journal ownership of durable message retries. Report repeated migrations and unresolved channel IDs without exposing provider credentials. Document where MongoDB archives, SQLite catalogs and encrypted channel recovery capsules are retained, and how to retry setup failures. Validation: the approved offline transport test file passed all 56 tests: .venv/bin/python -m pytest tests/test_replica_transport.py -q Coverage includes real Telethon request handling with mocked network replies, bounded migration retries, non-migration failures and channel-access errors. Live Telegram channels and the deployed site were not validated or changed.
Replace placeholder artwork with real screenshots and normal-speed browser recordings with cursor overlays, click highlights and captions. Add a visual workflow guide and include the public media and guides in source releases. Clarify README features, demo access, local versus server use, optional managed hosting at ₹100/month including a server, and server-only plans. Keep detailed hosting setup and ownership guidance in a dedicated guide. Update capture notes to match the replacement videos. Media was inspected during preparation; no automated tests, builds, linters or benchmarks were run for these documentation changes. Minor duplicate-cursor polish in the sharing chapter remains pending.
Remove the optional plaintext demo administrator password mapping so Coolify can release its Compose-owned variable and recreate it without legacy escaping. Document the temporary state and the removal, recreation, restoration and redeployment workflow. The mapping must be restored before deploying with a plaintext demo administrator password. Demo mode and the hash alternative remain configured. Reviewed the Git diff; no tests, builds or other validation were run because they were not requested for this change.
Repeated cooldown retries rechecked each confirmed part with separate channel and message requests, producing new request bursts before copying could advance. Serialize explicit replica transport calls with a one-second gap, double the gap up to four seconds after FloodWait, and retain pacing across replacement connections. Reverify committed parts in batches of at most 32 while preserving fresh channel checks, document checks, durable send identities and provider retry deadlines. Include the failed operation and retry duration in activity/error messages, and give cooldown-specific guidance. Restore the optional plaintext demo administrator password mapping after its Coolify variable was recreated with exact-value escaping. Document pacing, reference-based copying and the recovery workflow. Validation: 99 tests passed in tests/test_replica_transport.py and tests/test_replica.py using synthetic clients, including resuming after 29 confirmed copies and rejecting a missing destination document. No live Telegram validation, frontend build or broader test suite was run.
Remove the stale second cursor from blank space in the sharing chapter while preserving the instructional pointer, captions, frame count and normal playback timing. Leave dialog text and controls visible. Add feature timestamps for all three walkthroughs and explain the off-camera file picker, link generation and final revocation confirmation. Document cursor visibility and export inspection when replacing captures. Inspected the changed media frames and dialog boundary. No application tests, builds, linters, benchmarks or new browser captures were run.
Add a first-read guide with practical do and do not rules and 18 expandable FAQs. Explain the Telegram/MongoDB/server storage model, bounded split uploads, shared access, upload completion, backup confirmation, recovery material and deletion behavior. Correct common assumptions about permanent storage, provider invisibility, ban immunity and proven multi-terabyte capacity using Telegram official policy references and implementation reading. Link the guide from the README and core guides and include it in public source releases. Reviewed the documentation against the current implementation and official Telegram sources. No application tests, builds, linters, benchmarks or browser validation were run.
Completed channel backups reopened an empty Telegram StringSession roughly every minute for health checks, repeatedly authorizing the backup bot even when no files changed. Persist private credential-isolated backup sessions and check existing authorization before signing in; retain bot identity checks and bounded data-center migration handling. Check healthy unchanged checkpoints hourly without creating a copy job or showing file-copy progress. Changed catalogs and recovery settings still schedule protection promptly. Manual sync and retries recheck when needed, saved provider waits remain binding, and destructive Telegram mutations always force fresh checkpoint verification. Identify routine health-check cooldowns in activity messages and document the policy and session storage. Validation: 121 focused offline tests passed across tests/test_replica_transport.py and tests/test_replica.py. Coverage includes real SQLite session reuse with synthetic Telegram clients, credential isolation, expired-auth waits, idle checks, pause/retry behavior and deletion barriers. Existing ephemeral sessions cannot be migrated; one successful sign-in may still be needed after the current Telegram wait. No live Telegram rate-limit validation was run.
Explain folder upload snapshots and skipped files, original quality, name-based search, server disk and traffic, password recovery versus backup keys, and safe bug reports. Clarify supported bot imports and add first-upload steps and a visible public-demo privacy reminder, with links to the canonical guides. Reviewed implementation and existing documentation. No tests, builds, linters or browser checks were run; repository guidance requires explicit approval for those checks. This commit changes documentation only.
Probe the saved Telegram identity directly so authorization FloodWait errors retain their operation and deadline instead of triggering another sign-in. Preserve pause and disable controls across failed requests, recovery preflight and mutation lock waits, and reject saved cooldowns without extending their deadlines. Commit each confirmed restore point, matching channel and MongoDB keys, and credential digest in one SQLite transaction. Add regressions for provider waits, control races, interrupted publication, reopened journals and rotated keys. Document the behavior and offline validation scope. Validation: the complete offline backup group passed with 248 tests and 5 opt-in live MongoDB tests skipped. After the final cooldown-boundary guard, all 67 coordinator tests passed. The checks used synthetic Telegram clients and did not validate live Telegram rate limits or production recovery.
Routine pushes rebuilt browser, Docker and source-release environments even for documentation changes, while stale tests and lint failures prevented useful packaging results. Skip automatic CI for Markdown/docs/license-only changes, run Python 3.14 on pushes and the three-version matrix on pull requests/manual runs, and retain browser coverage for pull requests or an explicit manual suite. Make container and extracted-source verification selectable manual checks, with a documented all-suite release procedure. Pass REMOTE_DOWNLOAD_CONCURRENCY through Compose and verify operator overrides. Repair database setup and screenshot expectations in tests, align browser assertions with independent file clearing and the mobile reader layout, and let bounded upload retries finish before testing reload/reselection. Bind receipt reconciliation closure values, resolve lint/format issues, and annotate reviewed parameterized SQL and fixed crash-test subprocess calls. Update the transitive filelock lock entry from 4.2.0 to 4.2.4 to clear dependency audit findings. Validation: 253 affected Python tests passed; two isolated-MongoDB receipt tests skipped. All three previously failing Chromium cases passed against the production frontend build. Repository-wide Ruff lint and format checks, Bandit, Python and npm dependency audits, and the frontend production build passed. No checks were repeated solely for this commit. Full GitHub CI, the Python version matrix, Docker builds and extracted-release execution were not run locally. actionlint was unavailable. Existing frontend bundle-size/CommonJS and stale Bandit-suppression warnings remain. Changes are local and have not been pushed or deployed.
Group backend modules, frontend features and tests by responsibility. Remove obsolete launch/configuration wrappers, the setup CLI, legacy formats and unused helpers. Standardize authored code formatting, simplify Compose/environment examples, and consolidate current setup, architecture, usage and recovery guides. Stop tracking local output captures while keeping public showcase media. Require MongoDB for startup, initialize pristine databases atomically, and expose owner archive recovery in the website. Preserve staged uploads through committed finalization, bound receipt caches and book image geometry, apply API deadlines, and retain unrelated settings drafts during successful configuration refreshes. Bundle pinned, locally patched Movi Player and PDF.js archives with integrity manifests, licenses and source notices. Use native player chapters and controls; serve matching PDF workers/resources locally and support password retry. Normal install/build commands no longer patch installed dependency sources. Validation from the earlier cleanup runs: the complete offline Python run passed 1,908 cases and 36 subtests, followed by successful reruns of its two repaired fixture errors and an additional authorization regression. All 287 Chromium cases passed across the full run and focused retries. The isolated MongoDB group passed 103 cases, including 43 live database cases. Viewer patch checks (28), final recovery checks (37), Ruff/Prettier, Bandit, Python/npm audits and lockfile checks passed. AMD64 builds/offline container smoke checks and clean extracted source frontend install/build checks also passed. No checks were rerun solely for this commit; live Telegram, production deployment and physical devices were not validated. Preserve this working state before the audit fixes. Nine reported issues remain: backup revision labels, two-write upload admission, cross-tab receipt recovery, blocking job-state writes, failed-export cleanup, repeated bulk catalog copies, stale unauthorized responses after relogin, drafts lost on failed configuration refresh, and the standalone transport benchmark startup path.
Make setup, everyday use and recovery easier to follow with plain-language explanations, grouped FAQs, visible procedures and fewer repeated sections. Document the available v2 development source, demo administrator exceptions, password safety, upload progress, live storage limits and settings endpoints. Label the preview recording's older controls and retain its current-guide link. Include the Octicons MIT notice in source archives and add an assertion to the release-package test. Remove the transport benchmark script and its repository map entry. Reviewed implementation sources, diffs and affected documentation references. No tests, builds, linters or browser validation were run for this change; the new packaging assertion remains unrun. The preview recording was not refreshed.
Keep backup revisions and upload recovery state accurate across concurrent writes, process interruptions, slow database commits and multiple browser tabs. Capture archive revisions from the exported MongoDB snapshot and remove failed or cancelled unadmitted exports without deleting uncertain pending archives. Persist each upload job's complete recovery context in its first write. Make journal mutations asynchronous, ordered and cancellation-drained. Keep reads responsive and publish lifecycle changes, cancellation signals and receipt cleanup only after database acknowledgement. Preserve in-flight staging reservations and await dispatch and scheduler callbacks. Update internal callers and fixtures. Store browser recovery and dismissals per item, guard session expiry against old responses, and retain disabled settings drafts during failed configuration refreshes. Apply bulk metadata mutations through shared batch working copies while preserving rollback. Update the canonical operational documentation. Validation: offline suite and focused follow-up regressions, including the complete Vitest suite; 402 transfer/Telegram cases and 24 subtests; 98 MongoDB parity cases using a disposable local replica set; four synthetic Chromium cases; production build/TypeScript, Ruff and Prettier checks. See docs/development.md for details. No deployment, live Telegram or hard-kill validation was performed for these fixes. Historical orphan archives are not swept. The separate EPUB/comic compression issue remains outside this change. The removed transport benchmark stays removed.
Rotate a download request's queued blocks behind other waiters after each admission, and give anonymous streams stable request identities. This prevents one file's read-ahead from owning every next turn while retaining account eligibility, upload limits, demand priority and shared cache fills. Keep background thumbnail metadata from reserving the payload slot its reader needs. Track authorized file-request preparation, receiving and queue-full retry status; image/audio previews show busy feedback and retry at most twice without shortening the server delay. Document scheduling, API fields and the in-memory queue's restart limits. Validation: focused Python queue, slot, stream and API regressions passed across the initial and targeted follow-up runs after correcting a test-ordering assumption. All 16 preview unit tests and the frontend typecheck passed. Browser regressions were added but not run. Builds, linters and live Telegram load checks were not run; actual browser/load behavior remains unverified.
Bootstrap the first storage connection from MAIN_BOT_TOKEN and require allowed Telegram user IDs for bot imports. Preserve legacy BOT_TOKENS and saved managed connections without reactivating removed or disabled credentials. Align Compose, bootstrap examples, container smoke settings and regression fixtures. Clarify setup, configuration save scopes, background transfers, recovery, HTTPS hosting and resource policies. Add a public performance-tuning guide for monitoring, cache reuse, bottlenecks and capacity planning, include it in source releases, and improve navigation across the user and technical guides. Use Content-Length only for unencoded reader image responses so proxy compression cannot turn successful downloads into retries. Preserve decoded image limits and uncompressed truncation checks, with focused regressions. Suppress only the reviewed Bandit B105 false positive for a cleared recovery credential and record the actual CI failure and local verification evidence. Validation: the exact CI Bandit command passed on Python 3.14.8 with no findings; all 12 focused bookImage Vitest tests passed on Node 24.22.0. Bandit emitted unused-suppression warnings for other keys in the same mapping. No additional tests, typechecks, builds, browser checks or live deployment and recovery validation were run while preparing this commit. Broader server compatibility remains unverified. Nothing was pushed or deployed.
Wrap long test and retry-status expressions, combine the equivalent file-status queue conditions, and format the scheduler sort lambda. Preserve request priority, short-circuit order and response behavior while clearing the lint and format failures introduced by the download-scheduling change. Record the failing GitHub job and the local verification in the development guide. Repository-wide Ruff lint passed on Python 3.14.8; the final Ruff format check passed for all 270 Python files after formatting the reported lambda. No tests, builds or security audits were rerun for this correction. A new GitHub run is still needed to establish the complete CI result.
Establish semantic versions and immutable annotated release tags on final main commits. Keep development on dev and document main as the stable update channel. Make cloning main the primary installation path; versioned clones and source archives remain alternatives, with custom ZIP/checksum assets optional. Reject version drift across Python, npm, lockfile and Docker metadata before packaging or CI, and compare v* tags with the canonical pyproject version. Reuse the runtime version in FastAPI. Update application help links, deployment guides and browser expectations to point at stable main documentation. Add regression coverage for version drift, invalid versions and tag mismatches. Validation: reviewed source and Git diffs only. No tests, typechecks, builds, linters, benchmarks or browser checks were run because this work has no current validation approval. No release tag, asset or deployment has been published.
Resolve the release PR conflict with the legacy main branding commit by keeping the complete dev tree. The approved branding already exists under the v2 public asset paths. Record main as an ancestor so the PR replaces legacy contents without restoring obsolete pages or rewriting main history. Validation: Git tree and ancestry inspection only. No tests or builds were run. This is a local merge into dev; the release PR remains open and main is unchanged.
Ruff RUF043 rejected two newly added pytest match patterns because their version separators were unescaped regular-expression wildcards. Use raw patterns with literal dots so the intended error-message assertions pass the quality gate. Validation: 17 release-package tests passed on Python 3.14.8. Ruff lint and format checks passed for scripts/build_release.py, tests/core/test_release_package.py and tgdrive/web/app.py. No broader local tests or builds were run.
Give GitHub visitors a clear place to find TGDrive announcements and community help through the TechZBots channel and TechZBots_Support group. Validation: reviewed the Markdown diff and user-provided link destinations. No tests or builds were run for this documentation-only change.
Main branch protection requires PRs and the six routine CI jobs before merging. Skipping the entire workflow for documentation-only PRs would leave those checks pending indefinitely. Remove only the pull-request path exclusions, retaining the lighter push filters and manual container/source-release suites. Document the required checks, up-to-date branch requirement, administrator enforcement, blocked force pushes/deletion and solo-maintainer approval policy. Validation: inspected the workflow, existing check names and Git diff only. No tests, builds, linters or manual workflow runs were started for this change.
Lead the product showcase with evergreen TGDrive v2 artwork and remove the duplicate opening logo, tagline and file-browser image. Preserve the real captures in the showcase, document the promotional asset and include it in source release archives. Validation: reviewed local GitHub-style desktop light/dark and mobile previews with no horizontal overflow or broken images. Application tests and live GitHub rendering were not run.
TGDrive deploys on Python 3.14.8 only. Remove the legacy compatibility matrix and run one stable Backend tests job using the project interpreter pin. Require exactly 3.14.8 in project/script metadata, regenerate the lockfile without older Python branches or ABI artifacts, and align the lint target and current guides. Use native type-alias syntax and apply the exception-handler formatting required by the Python 3.14 Ruff target. Preserve all handlers and runtime behavior. Document that branch protection remains disabled at the maintainer's request; the four release CI checks remain the review policy rather than enforced rules. Validation: 31 client-pool and URL-transfer tests passed on Python 3.14.8. Repository-wide Ruff lint passed; the format check passed after mechanical Python 3.14 formatting across 21 files. The regenerated lockfile consistency check passed. No full suite, builds, browser checks or manual CI dispatch ran.
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
Release TGDrive 2.0.0 by promoting the v2 development work from
devtomain. The legacy application becomes a rebuilt single-owner drive with resumable transfers, rich browser previews, scoped sharing, MongoDB persistence and recovery workflows.What ships
Versioning and branch policy
main: stable, reviewed versioned updates.dev: ongoing development that may be unstable.pyproject.tomlagainst the Python runtime, npm package and lockfile roots, uv project entry and Docker image label before packaging and in CI. FastAPI now uses the shared runtime version. Tag-push CI also checksvX.Y.Zagainst this metadata.maincommit and a GitHub release linking the PR and exact revision.v2.0.0is created after the maintainer merges this PR.git clone --branch main. Cloning a published tag fixes the exact version. ZIP downloads and custom ZIP/checksum assets are optional.maindocumentation. Setup, hosting, development and operations guides explain the branch roles.See the release policy and procedure. Documentation links in this PR description use its exact head revision.
Python runtime and release CI
TGDrive supports Python 3.14.8 only. The Docker image, interpreter pin, exact project/script requirements, lockfile, lint target and CI agree on that runtime. The compatibility matrix is removed; one stable
Backend testsjob uses.python-version.Release PRs should pass
Quality and security,Frontend behavior,Backend testsandChromium end-to-end. Branch protection is disabled at the maintainer's request; these checks are the release review policy rather than an enforced merge gate. Documentation-only PRs still run CI. Manual container/source-release checks remain separate.Resolve the legacy main conflict
The only main-exclusive commit applied branding to the legacy UI. The v2 tree already contains that branding under its current public asset paths. Integrate
mainancestry intodevwhile retaining the complete v2 tree, so the PR replaces legacy contents and stays mergeable. Git tree IDs before and after that integration are identical. No history rewrite or remotemainupdate was performed.Deployment and data safety
Validation
Added regression cases for metadata drift, malformed versions and tag mismatches, and updated existing browser expectations for stable documentation URLs.
Approved local checks for the Python 3.14.8-only update: 31 client-pool and URL-transfer tests passed on Python 3.14.8. Repository-wide Ruff lint and formatting passed, and the regenerated lockfile consistency check passed. The Python 3.14 lint/format target required six native type aliases and mechanical exception-handler formatting.
Earlier focused release-package verification passed 17 tests plus lint/format for its three changed Python files; those checks were not rerun solely for this update.
No full local suite, builds, browser checks or manual CI dispatch were run for this update. Automatic PR CI selects quality/security, frontend, one backend test job on Python 3.14.8 with isolated MongoDB, and selected Chromium cases. Review results for the final revision. The manual
allrelease suite and applicable live smoke checks remain separate approval-gated work. Known live-validation limits remain documented.Maintainer release steps
main, potentially unstabledev, cloning and immutable versions.mainrevisionv2.0.0and create its release entry; attach custom source assets only if desired.Updates and support
Updates channel · Support group